Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Bapi G/L posting problem

Former Member
0 Kudos

Hi experts,

am using the bapi BAPI_ACC_DOCUMENT_POST for posting GL for t-code f-02. am getting erros like

Error in document: BKPFF $ P31CLNT781

No currency line exists for line item 0000000000

Order 6000002 does not exist.

whats the problem in it ?

regards

sunita

1 ACCEPTED SOLUTION

Former Member
0 Kudos

You must input at least two lines in table parameters of ACCOUNTGL, ACCOUNTRECEIVABLE, ACCOUNTPAYABLE, ACCOUNTTAX. Because finance documents should have at lease two items.

5 REPLIES 5

mvoros
Active Contributor
0 Kudos

Hi,

you don't fill all required parameters. There have to records in multiple tables for each posting line. It looks like you don't fill table CURRENCYAMOUNT. Why don't you read documentation for this BAPI? Just go to SE37, enter name of you BAPI and then hit button Documentation.

Regards

Former Member
0 Kudos

You must input at least two lines in table parameters of ACCOUNTGL, ACCOUNTRECEIVABLE, ACCOUNTPAYABLE, ACCOUNTTAX. Because finance documents should have at lease two items.

0 Kudos

Hi sheng,

thnx for the reply, in this fmodule am not passing any values to the accountreceivable and accountpayable so do u mean that i need to pass??

CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
    EXPORTING
      documentheader    = lw_header
    TABLES
      accountgl         = lt_items
*      accountreceivable = lt_acct_rec
*      accountpayable    = lt_acct_pay
      accounttax     = lt_acct_tax
      currencyamount    = lt_amount
      return            = lt_return.

regards

Sunita.

0 Kudos

can any give me more inputs plz.

0 Kudos

if you input 2 lines in "lt_items", it's can work too.

and for all the lines of "lt_amount", the sum of values of field "amt_doccur" should be 0.

this is the balance.