Skip to Content
avatar image
Former Member

MB_PHYSICAL_INVENTORY buffer not cleared

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Jun 15, 2017 at 02: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 document

    Regards,

    Dipin

    Add comment
    10|10000 characters needed characters exceeded

  • May 30, 2017 at 09: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

    Add comment
    10|10000 characters needed characters exceeded