Skip to Content
0

MB_PHYSICAL_INVENTORY buffer not cleared

May 30, 2017 at 08:35 AM

106

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
dipin p d Jun 15, 2017 at 02:14 PM
0

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 document

Regards,

Dipin


mi02.jpg (34.8 kB)
Share
10 |10000 characters needed characters left characters exceeded
Evgeny Gubenko May 30, 2017 at 09:03 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded