One of the most important aspect of SAP FICO is the posting of the documents. Document postings can be done in several ways. When abapers use Interface or report program to post documents , they face many issues. Here I am discussing the solution of two of the most common issues for document postings to the fico.
Frist scenario is related to lines Items postings. The second scenario is related to the error ‘balance in currency transaction.
(1)First one is the error related to line items of the tables such as accounts payable, tax , currency amount , gl account etc. The return table of BAPI_ACC_DOCUMENT_CHECK shows this error as “FI/CO interface: Line item entered several times”.
In my sample program I will demonstrate this error as below:
The reason for that error is that in the code I have provided the same value for the itemno_acc for tax,glaccount, criteria as shown in the below screen capture.
The issue is resolved by provide separate value for itemno_acc value. Now I am updating values for itemno_acc and we will check the results :
First screen capture shows value updation:
Now we ll test it to see how it goes:
As you can see in the above screen capture , providing separate values for itemno_acc resolved the issue and the return table shows no error.
(2) Second scenario is related to the issue which comes across by many Abapers who work in FICO. This error shows up in return table of bapi_acc_doc_check is balance in currency transaction.
Let me demonstrate this error first with the following screen capture:
As you can see, the error shows by return table 'balance in transaction currency' indicating that it is not balanced by 647.00 Euros. The reason is that if additional amount is provided for document currency amount named as amt_base then this issue will show up in return table.
Depends upon your scenario and the amount provided, I am just putting 0 in the value for the document curreny (amt_doccur) field as showed in the below screen capture
Now we ll run it and see the results :
As you can see in the above screen capture, BAPI_ACC_DOCUMENT_CHECK runs successfully giving no errors.
now finally I will post this document using 'BAPI_ACC_DOCUMENT_POST'
The Below screen capture shows that the document is posted successfully.