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

BAPI_ACC_DOCUMENT_CHECK

Former Member
0 Likes
13,122

Hi gurus,

There is an inbound interface where the document postings are done in two steps. where the miro posting is done in step1 and another posting is done using BAPI.  This is the function module that is used for postings IDOC_INPUT_INVOIC_MRM.

In case step1 doc is not posted, then step 2 is also not posted. This is already taken care of by the code.

Now the requirement is that "In case step2 is not posted, then step1 should also not be posted".

i came to know that This can be overcome by BAPI_ACC_DOCUMENT_CHECK whichwill tell us beforehand if step2 doc will fail or not. In case this BAPI gives error, we will not proceed in posting MIRO(step1) and through error in IDOC.

Can any one please tell me, how to use this bapi, when to use, where to use & which exit is going to use...  can any one please give me some overview abt this bapi.

1 ACCEPTED SOLUTION
Read only

atul_mohanty
Active Contributor
0 Likes
6,666

Hi -

The FM BAPI_ACC_DOCUMENT_CHECK is used to check whether a posting to accounting is possible. After calling this function module check the table parameter 'RETURN' of this function module if you have any error (RETURN-TYPE = 'E'). If there is no such message then the FM : BAPI_ACC_DOCUMENT_POST can be called to post accounting document.

Check the 2nd step as mentioned by you is using the FM : BAPI_ACC_DOCUMENT_POST or not .

Also check for the documention in SE37 for the above two FM for more information.

1 REPLY 1
Read only

atul_mohanty
Active Contributor
0 Likes
6,667

Hi -

The FM BAPI_ACC_DOCUMENT_CHECK is used to check whether a posting to accounting is possible. After calling this function module check the table parameter 'RETURN' of this function module if you have any error (RETURN-TYPE = 'E'). If there is no such message then the FM : BAPI_ACC_DOCUMENT_POST can be called to post accounting document.

Check the 2nd step as mentioned by you is using the FM : BAPI_ACC_DOCUMENT_POST or not .

Also check for the documention in SE37 for the above two FM for more information.