2017 May 24 2:10 PM
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.
2018 May 14 8:00 AM
Hi Mohamad,
Please refer the below code this may be useful for you.
Regards
Srujana
2017 May 24 2:54 PM
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.
2018 May 14 8:00 AM
Hi Mohamad,
Please refer the below code this may be useful for you.
Regards
Srujana