Sap prevent parked document from updating commitment Pron amanel
I am trying the post an invoice to SAP using the F-47 transaction and using SHDB to record the transaction and learn how it works.I see there that sometimes BU and ZK BDC OK codes are used.After the splitting, loop at the line item table and validate the GL account numbers.If the GL accounts are valid, Populate the line item data into BAPI GL and currency tables otherwise append that GL account number into error message table.Find out line item company code currency key and compare if the line item currency key and header currency key given is same or different.If these are different then we need to populate ‘EXCHANGE_RATE’ field of currency table if it is given in the file.
When posting an accounting document, the SAP system updates the transaction figures in the accounts to which the document is posted.
Due to this we need to give and exchange rate base on which the BAPI will convert the amounts.
Post the document using BAPI ‘BAPI_ACC_DOCUMEN_POST’. Check for sy-subrc, if initial; commit the work using ‘BAPI_TRANSACTION_COMMIT’.
The file should be balanced for the document to be posted i.e. In FI, header table for document data is BKPF and line item table is BSEG.
After we upload excel data into an internal table we need split the data into field patterns into header data and line item data as explained in subroutine ‘SPLIT_INTO_RECORDS’.