Hello all,
I'm a newbie to ABAP and SAP so I might not express my problem clearly. I'm trying to use BAPI_REQUISITION_CREATE to create 3 different PRs based on some specifications in my BADI when a material document is posted. I'm calling the BAPI 3 times and it works fine when used directly in SAP- that is when I post a material document using MB1B for example, it works fine and creates different PRs.
When I test with batch, on the first call of BAPI_REQUISITION_CREATE, only the first PR is created and it doesn't return to the program to create the other types of PRs if any. This is a problem because I need for it to function with both batch and directly.
Any suggestions? I know the commit statement in this BAPI is responsible and I have tried using BAPI_PR_CREATE but I'm running into more problems.
Any help will be greatly appreciated. Thanks