Skip to Content

Additional Accounting Document Posting During MIGO or MIGO_GI

Hello Folks,

        just thought of sharing a solution of a requirement with you. I need to post additional accounting document during goods issue of a material ( T CODE MIGO_GI or MIGO ). I achieved it using implementation of MB_DOCUMENT_BADI in method MB_DOCUMENT_UPDATE. I basically used BAPI_ACC_DOCUMENT_POST and as i have to do only GL relevent postings so i used “documentheader”,”accountgl”,currencyamount” and “return” parameters of the BAPI. Some Key points.

1. Earlier i tried using MB_MIGO_BADI and method POST, but i failed to achieve my requirement as it is giving dump or FI interface accounting error.

2. So i used the above mentioned method, but do remember to use the above BAPI without the BAPI_TRANSACTION_COMMIT as it will result in a dump if you use that.

3. as the method MB_DOCUMENT_UPDATE is called in update mode so if you want to debug it, remember to put the update debugging on.

4.I didnt pass OBJ_TYPE, OBJ_KEY and OBJ_SYS parameters although in the bapi documentation it is written as required ones, but my code works fantastically by automatically determining the OBJ_TYPE as BKPFF.

5. Some of the dumps i got is like ” abend error” if i was using BAPI_TRANSACTION_COMMIT and “system is cheking for MKPF as OBJECT TYPE although the checks were run for OBJECT TYPE BKPFF” and i remove those parameters as i told in step 4.

Regards

Animesh Sundriyal

Be the first to leave a comment
You must be Logged on to comment or reply to a post.