Tuesday 11 July 2017

SAP FICO ABAP Interface (Iine Items/Balance in currency transaction) error resolved)

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:

SAP ABAP, ABAP Development, SAP NetWeaver Application Server for ABAP, ABAP

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.

SAP ABAP, ABAP Development, SAP NetWeaver Application Server for ABAP, ABAP

SAP ABAP, ABAP Development, SAP NetWeaver Application Server for ABAP, ABAP

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 :

SAP ABAP, ABAP Development, SAP NetWeaver Application Server for ABAP, ABAP

First screen capture shows value updation:

Now we ll test it to see how it goes:

SAP ABAP, ABAP Development, SAP NetWeaver Application Server for ABAP, ABAP

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:

SAP ABAP, ABAP Development, SAP NetWeaver Application Server for ABAP, ABAP

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.

SAP ABAP, ABAP Development, SAP NetWeaver Application Server for ABAP, ABAP

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

SAP ABAP, ABAP Development, SAP NetWeaver Application Server for ABAP, ABAP

Now we ll run it and see the results :

SAP ABAP, ABAP Development, SAP NetWeaver Application Server for ABAP, ABAP

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’

SAP ABAP, ABAP Development, SAP NetWeaver Application Server for ABAP, ABAP

The Below screen capture shows that the document is posted successfully.

SAP ABAP, ABAP Development, SAP NetWeaver Application Server for ABAP, ABAP

1 comment:

  1. Dear Sabrina,

    Thank you for your all wonderful Post.

    Could you please help me with Payment posting and clearing automation as above code does posting but do not clear open invoices.

    if possible could you please share logic for the same assuming data are coming from portal (customer ) and we have to clear the invoice based on payment done by either credit card or cheque.

    regards,
    Rahul Bhayani.

    ReplyDelete