Skip to Content
0

How to use BAPI_ACC_GL_POSTING_POST for f-02 transaction.

May 24, 2017 at 01:10 PM

158

avatar image

Dear members,
I am New to ABAP.
I got a requirement of gl account posting using BAPI_ACC_GL_POSTING_POST .

I have a flat file with multiple Headers and each header will have multiple line items.

1.How to post these type of flat file using Bapi?

2.After posting through bapi_acc_gl_posting_post, i have to generate a report showing Detail of line item in which error has occured.
I have gone through many threads but could not find any answer...

I have the following field in flat file (Excel file )

Mandatory field : Document date,Posting date,Document type,Company code,Currency,Document header text, posting key, Account Number, Amount,Profit center. and I too have some optional fields.
I know how to do it using BDC recording because of the requirement i am forced to do it using bapi.

Regards,
Moin.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Raymond Giuseppi
May 24, 2017 at 01:54 PM
0

Use any search tool (google, launchpad) there are already many blogs with sample codes on BAPI_ACC_DOCUMENT_POST and BAPI_ACC_GL_POSTING_POST, also read the BAPI documentation (suggestion: read for both BAPI). As for any BAPI after each call, one per document, build a protocol with the messages (Success, Error, etc.) returned in RETURN parameter, if no error use BAPI_TRANSACTION_COMMIT, else... etc.

Share
10 |10000 characters needed characters left characters exceeded