getCalculated TDS amount value from InvoiceJournal

in Accounts payable-> Journal-> Invoices-> InvoiceJournal

and select any journal entry

From that line details Withholdtax is calculated

now how to get the amount 500 through X++ code

Entry is in LedgerJournalTrans table and tax amount in TmpTaxWithholdWorkTrans_IN table

Any help to get this

Thanks

TaxWithholdUncommitted_IN taxWithholdUncommitted;

select * from taxWithholdUncommitted

where taxWithholdUncommitted.HeadingRecId == ledgerJournalTable.RecId

&& taxWithholdUncommitted.HeadingTableId == tableNum(LedgerJournalTable)

&& taxWithholdUncommitted.Voucher == ledgerJournalTrans.Voucher

&& taxWithholdUncommitted.InvoiceId == ledgerJournalTrans.Invoice;

info(taxWithholdUncommitted.TaxAmountCur);

Thanks,

\Data Dictionary\Tables\TaxWithholdUncommitted_IN\Methods\getActualTaxAmountForVoucher