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

Sample code for Posting documents into FB50 using BAPI(BAPI_ACC_DOCUMENT_POST)

Former Member
0 Likes
896

Hi Experts,

I already tried for BDC program(FB50),But its not efficient.Please give some ideas for posting documents into FB50 using BAPI.

Regards,

Sathish P

1 REPLY 1
Read only

paul_bakker2
Active Contributor
0 Likes
552

Hi,

Have you tried reading the doco on the BAPI itself?

After that, I would do a where-used to see how to use it.

I admit, there are a lot of parameters, but you can successfully post document with relatively few of them:

* post the GL document
    CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
      EXPORTING
        documentheader = ls_documentheader
      TABLES
        accountgl                 = lt_accountgl
        currencyamount      = lt_currency
        return                      = lt_return.

cheers

Paul