‎2008 Oct 22 11:38 AM
Hi all,
I have a requirement where I have to do material issue using BAPI_GOODSMVT_CREATE
once for Movement type 923 and 924 in the same program serially.
First I am trying to create a material doc for 923 mvmt type and When I am trying to create the second material doc with mvmt type 924 ,It was showing an error like "Function module MB_CREATE_GOODS_MOVEMENT cannot be Executed"...
When I tried in a different way like first creating for 924 and then 923,it was able to create for the first one and it is again faling for the second time...
Why it was failing?
Should we not use the same BAPI for two defferent materila movemtns in the same program?
Kindly suggest the possible approach...
Thanks,
Lakshmi Prasanna Gandham...
‎2008 Oct 22 11:44 AM
Use BAPI_TRANSACTION_COMMIT after calling first BAPI.
Wait for Commit to happen and then procceed .. You can use parameter WAIT = 'X' for this purpose
Edited by: Mohaiyuddin Soniwala on Oct 22, 2008 4:15 PM
‎2008 Oct 22 11:46 AM
Hi,
Did you call BAPI_TRANSACTION_COMMIT after the call of first BAPI.
Thanks & Regards,
Navneeth K.
‎2008 Oct 22 11:47 AM
I am using
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
WAIT UP TO 1 SECONDS.
‎2008 Oct 22 11:48 AM
Hi Lakshmi,
the BAPI may lock the material master data. Please try to call the FM BAPI_TRANSACTION_COMMIT with the parameter "wait = 'X'" after each call of the BAPI.
Hope this solves the problem
Uwe
grrr, was too slow
‎2008 Oct 22 11:48 AM
Hello
Try to use
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING wait = 'X'.
after each call 'BAPI_GOODSMVT_CREATE'.
‎2008 Oct 22 11:50 AM
I am commiting the BAPI still it is runnig only for the first movement type only.........
‎2008 Oct 22 11:51 AM
‎2008 Oct 22 12:16 PM
Do you have cleared all the tables before you call the BAPI the 2nd time (e.g. the RETURN table) ?
Uwe
‎2008 Nov 26 6:56 AM
The problem is solved by running the BAPI in another program and calling the program each time ,
whenever the BAPI has to be executed....