03-06-2007 8:32 AM
Hi
I am doing implementaion on BADI DIWPS_PMPS. This BADI method is being called in a loop i want to exit from the loop where the badi method is called, by coding in my BADI. how can i do so? Exit takes me out of the method only.
Can anybody please help me?
03-06-2007 8:34 AM
Hi Richa,
Maintain a Global Flag in a variable and check if its value is initial at the start of the badi method's code. Set that value on the condition you need.
check v_flag is initial.
if <condition>.
v_flag = 'X'.
endif.
Regards,
Ravi
03-06-2007 8:49 AM
I have tried this ...but it will exit from the method . I want to exit from the loop in which this method of BADI is called.. Can i exit from this loop in which i m calling this method of BADI.
LOOP AT it_act01 INTO ls_nw_afvgd.
Call BAdI
CALL METHOD lr_badi_pmps->pm_ps_field_comp
EXPORTING
pm_order_field = ls_caufvd-adpsp
ps_activity_field = ls_nw_afvgd-adpsp
revnr = i_revnr
iwerk = i_iwerk
IMPORTING
RESULT = l_result.
endloop.
03-06-2007 11:19 AM
Unless you modify code in which LOOP is used, you cannot exit.