Monday, August 7, 2023

Code to get the Voucher transactions from purchase order receipts

 

public static void main(Args _args)

   {

       GeneralJournalAccountEntry      generalJournalAccountEntry;

       GeneralJournalEntry             generalJournalEntry;

 

       while select generalJournalEntry

           where generalJournalEntry.DocumentNumber == "1234" //product receipt number

           && generalJournalEntry.AccountingDate == mkDate(07,08,2023) //delivery date

       {

           while select generalJournalAccountEntry

                    where generalJournalAccountEntry.GeneralJournalEntry == generalJournalEntry.RecId

           {

               info(strFmt("Voucher : %1,Accounitng Currency Amount : %2,Journal num : %3",generalJournalEntry.SubledgerVoucher,generalJournalAccountEntry.AccountingCurrencyAmount,generalJournalEntry.JournalNumber));

 

           }

       }        

   }

Output :




Other Way:

https://jaipaljadav11.blogspot.com/2023/08/tables-involved-while-opening-voucher.html




No comments:

Post a Comment