‎2007 May 22 8:31 PM
Hi,
I am trying to move the stock using 'BAPI_GOODSMVT_CREATE'. I have 2 issues:
1. i get a msg deficit in SL for material in plant BP01. I see the error in the 143 rd record of my file which moves stock for this material from storage location X to Y. I am only moving quantity 1 from X to Y and I see in MMBE that the stock in X is 144. Then why am i getting this error when there is stock? What else could be the reason.
2. I am running multiple files with one material in each file from different storage locations. In this process after executing few files in b/w i get a msg that the plant data is locked by me. Again few of them are processed and i see the msg in my error file like these. After BAPI_TRANSACTION_COMMIT i have written wait 3 seconds. Is this not sufficient. There are approximately 900 records in each file and one material document will be created for each file. Should i increase the wait time ?
Please let me know.
Thanks.
‎2007 May 22 9:27 PM
Hi ,
can you check mard-LABST for that material whether its greater than EQUAL TO 1. - you have to see the unrestricted use when you are seeing MMBE ,THATS WHAT IS IMPORTANT IT SHOULD BE GREATER THAN 1
You get error Locked by you because you might opened the tansaction in other sesiion.
I am sure that you won't get if you close alll other sessions.
Just increase the wait time to10 seconds that should be ok
‎2007 May 22 9:27 PM
Hi ,
can you check mard-LABST for that material whether its greater than EQUAL TO 1. - you have to see the unrestricted use when you are seeing MMBE ,THATS WHAT IS IMPORTANT IT SHOULD BE GREATER THAN 1
You get error Locked by you because you might opened the tansaction in other sesiion.
I am sure that you won't get if you close alll other sessions.
Just increase the wait time to10 seconds that should be ok
‎2007 May 22 9:31 PM
Hi,
Thanks for hte response venki, I am sure i have nto opened any other sessions, as i ran it at night as a background job and went to sleep :).
The saw the stock under unrestricted use only. I got the answer for the 1st one though, there is 144 stock in location X and in the file it filled up to 143 record and the stock is more than 144 i.e, 145 so is the error.
but the second one may be i think i have to increase the wait time. If there is any other solution please let me know.
Thanks.
‎2007 May 22 9:37 PM
Hi Vinni,
I guess your looping the Bapi.
Then increase the wait time to 45 seconds.
I got the same error when i opened the t-code in another session.
Are you suing different movement types or single movement types
Thanks
venki
‎2007 May 22 9:41 PM
Hi Vinni,
Try this
DATA : lv_try TYPE i.
CLEAR lv_try.
lv_try = 5.
DO lv_try TIMES.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
IMPORTING
RETURN =
.
WAIT UP TO 5 SECONDS.
enddo.
It might help.
Thanks
Vinni
‎2007 May 22 9:45 PM
Yes, i am looping at the no. of files and for each file i am calling the BAPI once, may be because each file has approximately 900 records it takes time to process and before that it tries to fetch another file and process it. I have already incorporated a wait tiem of 3 seconds, which i guess still is not sufficient. lemme increase it but i wonder how much should i increase to...