‎2010 Dec 08 10:57 AM
Hi All,
Problem with PR Badi ME_PROCESS_REQ_CUST
My requirement is
At the time of PR creation (ME51N), if the document type (BSART) is 'XX',
Item level Goods Receipt field(WEPOS) should be un-checked automatically.
I am using the badi ME_PROCESS_REQ_CUST
Method PROCESS_ITEM.
When I use the following code, it is going to infinite loop. This method is getting called repeatedlt and going to infinite loop.
Can u plz write your comments.
*************************************************************************************
method IF_EX_ME_PROCESS_REQ_CUST~PROCESS_ITEM .
DATA WA_DATA TYPE MEREQ_ITEM.
CALL METHOD IM_ITEM->GET_DATA
RECEIVING
RE_DATA = WA_DATA.
if WA_DATA-BSART = 'FO'.
WA_DATA-WEPOS = ''.
ENDIF.
CALL METHOD IM_ITEM->SET_DATA
EXPORTING
IM_DATA = WA_DATA.
endmethod.
*************************************************************************************
I kept break point after get_data method, I and getting BSART value and changing the WEPOS VALUE.
When I use SE_DATA method, it is going to infinite loop.
Thanks
Narendra
‎2010 Dec 08 11:14 AM
Execute the code within IF condition
IF IM_COUNT eq 1.
Code Lines
ENDIF.