05-30-2017 9:35 AM
Hi All,
I am developing a custom program to delete Physical Inventory Document (standard transaction MI02). I am calling Function Module MB_PHYSICAL_INVENTORY in loop to delete multiple Physical Inventory Documents. But variable EIN_BELEG is not getting cleared after the first call to the FM. How can I clear the buffer values after the first function call.
Note: I have already tried
COMMIT WORK AND WAIT.
CALL FUNCTION 'BUFFER_REFRESH_ALL'.
CALL FUNCTION 'CKML_BUFFER_REFRESH_ALL'.
CALL METHOD PO_BUFFER_REFRESH.
Regards,
Dipin
06-15-2017 3:14 PM
First call FM 'MB_PHYSICAL_INVENTORY' with inv_action = 1 and then call the same FM with inv_action = 2. This will delete the physical inventory document.
inv_action,1 = Check 2 = Post the invoice documentRegards,
Dipin
05-30-2017 10:03 AM
Hi!
As I see, this variable not cleared by any initialization FMs, so you can try to use construction CALL FUNCTION ... DESTINATION 'NONE' for all your function calls and then CALL FUNCTION 'RFC_DESTINATION_CLOSE' after loop step is finished. It will separate the processing into different user sessions.
Hope it's helpful.
Evgeny
06-15-2017 3:14 PM
First call FM 'MB_PHYSICAL_INVENTORY' with inv_action = 1 and then call the same FM with inv_action = 2. This will delete the physical inventory document.
inv_action,1 = Check 2 = Post the invoice documentRegards,
Dipin