Skip to Content
author's profile photo Former Member
Former Member

Exit from the loop calling BADI in the method of BADI.

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?

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Mar 06, 2007 at 08: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 06, 2007 at 08: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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.