on 12-13-2018 10:55 AM
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
HI Igor,
Try this please:
im_schedule->get_bom( IMPORTING et_bom = lt_bom ).
IF lt_bom[] IS NOT INITIAL.
CLEAR lt_bom.
io_sched->set_bom( it_bom = lt_bom ).
ENDIF.
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you try some trick such as only refresh BOM when schedule 'IS_VALID' then and only then immediately 'INVALIDATE' the schedule (with some dummy error message such as 'BOW refreshed') does it prevent the infinite loop and is the BOM cleared?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.