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

if statement

Hi All,

Please let me know is there anything wrong with following if statement.

LOOP AT t_bsid_zpp_zpr.

IF t_bsid_zpp_zpr-zterm = 'ZPP '.

IF ( t_bsid_zpp_zpr-blart = 'SS' OR t_bsid_zpp_zpr-blart = 'SR' ).

t_bsid = t_bsid_zpp_zpr.

APPEND t_bsid.

ENDIF.

ENDIF.

ENDLOOP.

IF NOT t_bsid[] IS INITIAL.

record-blart_002 = 'P7'.

PERFORM sub_process_records.

ENDIF.

Regards,

Sai Prasad

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    Posted on Dec 04, 2007 at 08:50 AM

    Hi,

    nothing but if u r facing any problem on that then try like this

    LOOP AT t_bsid_zpp_zpr.

    IF ( t_bsid_zpp_zpr-zterm = 'ZPP ' ) AND

    ( t_bsid_zpp_zpr-blart = 'SS' ) OR

    ( t_bsid_zpp_zpr-blart = 'SR' ).

    t_bsid = t_bsid_zpp_zpr.

    APPEND t_bsid.

    ENDIF.

    ENDLOOP.

    IF NOT t_bsid[] IS INITIAL.

    record-blart_002 = 'P7'.

    PERFORM sub_process_records.

    ENDIF.

    Regards,

    Prashant

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 04, 2007 at 09:03 AM

    Absolutely correct. Maybe something's wrong in your form sub_process_records?

    Regards,

    John.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 04, 2007 at 08:53 AM

    "Please let me know is there anything wrong with following if statement."

    syntactically it is ok, the question is if you get, what you expect...

    however you can make simplier:

    LOOP AT t_bsid_zpp_zpr WHERE zterm = 'ZPP ' AND

    ( blart = 'SS' OR blart = 'SR' ).

    t_bsid = t_bsid_zpp_zpr.

    APPEND t_bsid.

    ENDLOOP.

    ec

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 04, 2007 at 08:54 AM

    hi sai

    this if statement is correct . if condition is true then loop is working other wise it's not work .

    check ur itab fields its correct r not .

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 04, 2007 at 08:57 AM

    HI

    there is nothing wrong , tell me what problem facing you

    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.