Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

BAPI_ACC_DOCUMENT_POST fields

Hi,

I'm trying to use this BAPI to do a FB01, but i don't understand the structure of the BAPI. I was wondering if someone has use it before and can tell me moreless how to fill it in an standard way.

Thx

Former Member
Former Member replied

Hi alfaro,

When trying to use that Bapi you have to mention few of the inputs there, like

user name,

then company code,

doc type,

also you have to mention maximum possible detail of GL line item no1 and same for gl line item 2

then for the currency if u want the GL line item 1 to be debited then u have to mention the amount as positive n if u wanna to post the line item no 2 with negative amount then the same is to be posted with negative amount.

And other characters for both gl line item 1 n 2 you have to give details, like, cost centre, profit centre, doc type, posting date, doc date and other things a like.

This would help u

documentheader-username = sy-uname.

documentheader-header_txt = 'Test using BAPI'.

documentheader-comp_code = '1000'.

documentheader-doc_date = sy-datum.

documentheader-pstng_date = sy-datum.

documentheader-doc_type = 'SA'.

accountgl-itemno_acc = '1'.

accountgl-gl_account = '0000160100'.

accountgl-comp_code = '1000'.

accountgl-pstng_date = sy-datum.

accountgl-doc_type = 'SA'.

accountgl-profit_ctr = '0000010000'.

append accountgl.

accountgl-itemno_acc = '2'.

accountgl-gl_account = '0000160100'.

accountgl-comp_code = '1000'.

accountgl-pstng_date = sy-datum.

accountgl-doc_type = 'SA'.

accountgl-profit_ctr = '0000010000'.

append accountgl.

currencyamount-itemno_acc = '1'.

currencyamount-currency = 'GBP'.

currencyamount-amt_doccur = '100.00'.

append currencyamount.

currencyamount-itemno_acc = '2'.

currencyamount-currency = 'GBP'.

currencyamount-amt_doccur = '-100.00'.

Regards

Inder

Edited by: Inderpreet Singh on Oct 16, 2008 8:38 PM

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question