Skip to Content
1
Dec 13, 2018 at 10:55 AM

endless loop in ME_PROCESS_PO_CUST->PROCESS_SCHEDULE: clear BOM by SET_BOM

879 Views

Hi,

I am trying to use ME_PROCESS_PO_CUST BADI in order to change BOM. Inside the method PROCESS_SCHEDULE I am calling GET_BOM and SET_BOM. It works well for all the cases where I am making changes, as well as for deletions, if at least one BOM item is left behind.

However, in one case I should completely remove the whole BOM so I call SET_BOM with empty IT_BOM internal table, in which case I am getting the well known endless loop error message "Data from Business Add-In ME_PROCESS_PO_CUST not adopted". I understand the long text documentation: I should not change certain "forbidden" fields. But complete deletion should not mean that.

I found a blog Endless loop in BADI ME_PROCESS_PO_CUST which looks complex, but I think that the bottom line could be: "do not call SET statement if there are no actual changes". This does not work for me, as my attempt to delete BOMs is always unsuccessful - they re-appear in next loop pass.

In this thread there was a suggestion to clear the MY_RECHECK_QUEUE public attribute of header object. I did it - the error disappeared, but there was also no effect of my method call (exactly as stated in the thread).

The same happens if I programmatically limit the SET_BOM # of calls to 1 - no error, but also no effect.

Does anyone has any more ideas before I create OSS note?

Thanks!

KR,

Igor