Application Development and Automation 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: 
Read only

Bapi_acc_document_post

Former Member
0 Likes
591

Hi All,

I am not able to post GL account using Bapi_acc_document_post and passing the following values. I am getting the following error msg.Please can anyone help me.

Error in document: BKPFF $ DEVCLNT120

Error in assigning the tax group

Order 10000 does not exist

Order 10000 does not exist

thanks,

Hemanth

*header

documentheader-DOC_DATE = '20070118' .

documentheader-DOC_TYPE = 'RA'.

documentheader-COMP_CODE = '1100'.

documentheader-PSTNG_DATE = '20070121' .

documentheader-REF_DOC_NO = 'mtrtest 987654'.

documentheader-HEADER_TXT = 'GL Upload1'.

documentheader-USERNAME = SY-UNAME.

documentheader-BUS_ACT = 'RFBU'.

*lineitem1

accountgl-ITEMNO_ACC = '0000000010'.

accountgl-GL_ACCOUNT = '0000073110'.

accountgl-COSTCENTER = '0000110200'.

accountgl-ITEM_TEXT = 'Test Line 1'.

accountgl-TAX_CODE = 'I0'.

accountgl-COMP_CODE = '1100' .

append accountgl.

clear accountgl.

*LINEITEM2

accountgl-ITEMNO_ACC = '0000000020'.

accountgl-GL_ACCOUNT = '0000073210'.

accountgl-ITEM_TEXT = 'Test Line 2'.

accountgl-TAX_CODE = 'I0'.

accountgl-COMP_CODE = '1100' .

accountgl-ORDERID = '000000010000'.

*accountgl-DE_CRE_IND = 'S'.

append accountgl.

clear accountgl.

*LINEITEM3

accountgl-ITEMNO_ACC = '0000000030'.

accountgl-GL_ACCOUNT = '0000075310'.

accountgl-ITEM_TEXT = 'Test Line 3'.

accountgl-TAX_CODE = 'I0'.

accountgl-COMP_CODE = '1100'.

accountgl-WBS_ELEMENT = '10001E'.

*accountgl-DE_CRE_IND = 'S'.

append accountgl.

clear accountgl.

*LINEITEM4

accountgl-ITEMNO_ACC = '0000000040'.

accountgl-GL_ACCOUNT = '0000073210'.

accountgl-ITEM_TEXT = 'Test Line 4'.

accountgl-TAX_CODE = 'I0'.

accountgl-COMP_CODE = '1100' .

accountgl-COSTCENTER = '0000110200'.

accountgl-ASSET_NO = '000000300002'.

*accountgl-DE_CRE_IND = 'S'.

accountgl-SUB_NUMBER = '0000' .

append accountgl.

clear accountgl.

*currency1

currencyamount-ITEMNO_ACC = '0000000010'.

currencyamount-CURRENCY = 'USD'.

currencyamount-AMT_DOCCUR = '-123' .

append currencyamount .

clear currencyamount.

*currency2

currencyamount-CURRENCY = 'USD'.

currencyamount-ITEMNO_ACC = '0000000020' .

currencyamount-AMT_DOCCUR = 23.

append currencyamount.

clear currencyamount.

*currency3

currencyamount-CURRENCY = 'USD'.

currencyamount-ITEMNO_ACC = '0000000030' .

currencyamount-AMT_DOCCUR = 51 .

append currencyamount.

clear currencyamount.

*currency4

currencyamount-CURRENCY = 'USD'.

currencyamount-ITEMNO_ACC = '0000000040'.

currencyamount-AMT_DOCCUR = 49 .

append currencyamount.

clear currencyamount.

2 REPLIES 2
Read only

Former Member
0 Likes
447

Have you checked to see if order 10000 exists?

Rob

Read only

0 Likes
447

Hi Rob,

Thanks. The order no. was incorrect. I have one more question. To which filed I can pass Billing document no. There is field AC_DOC_NO ( BELNR_D) in the table BAPIACGL09 which is of the same length as VBELN, but I am not sure this is the field that I should be using.

thanks,

Regards,

Hemanth