To Validate Ledger Journal By Code in Axapta You can try following code.
(_LedgerJournalTable,NoYes::Yes);
LedgerJournalCheckpost _ledgerJournalCheckpost;
LedgerJournalTable _LedgerJournalTable;
;
_LedgerJournalTable=LedgerJournalTable::find('004458/JV);
_LedgerJournalCheckPost =LedgerJournalCheckPost::newLedgerJournalTable
(_LedgerJournalTable,NoYes::No);
_LedgerJournalCheckPost.run();
Same code you can use for Journal Posting. You need to change only following line.(_LedgerJournalTable,NoYes::Yes);