Skip to Content

Multiple header document posting using BAPI for FB01 transaction

Hi Friends,

I have a GL posting program which is using BDC for transaction FB01. the requirement has changed as the posting document is now having multiple headers. The existing program is causing my issues so I was asked to develop new program using BAPI.

Well I have manged to get document data in to Header and lineitem internal tables. The mapping look good now. But I am struck with the BAPI.

I am trying to use BAPI_ACC_DOCUMENT_POST.

lt_header:

H1,,,,,

H2,,,,

H3,,,,

lt_lineitem:

H1,L1,,,,

H1,L2,,,,

H1,L3,,,,

H2,L1,,,,

H2,L2,,,,

H2,L3,,,,

Can someone please help me with this .

Thank you and regards.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jul 05, 2017 at 02:20 PM

    How one document should have more than one header? I don't understand the requirement.

    For each document you have to call the BAPI separately, the header i not an internal table but a structure.

    Add comment
    10|10000 characters needed characters exceeded

    • Now where exactly is your problem? Again: for each header in your header table you have to call the BAPI (and of course you have to move the corresponding items to a separate internal table first)

  • Jul 25, 2017 at 08:34 AM

    Well I figured out the solution. Thank you so much for your comments.

    Add comment
    10|10000 characters needed characters exceeded