Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CHECK statement

Former Member
0 Likes
482

hi all,

i have a code where i have used CHECK statement within LOOP...ENDLOOP.

the statement is as follows:

CHECK wa_rseg-ebeln IN s_ebeln

but even though this condition is false its going to the next statemtn and executing it without skipping that LOOP pass...

how is it posssible?

please give me the solution....

4 REPLIES 4
Read only

Former Member
0 Likes
453

Hi,

Use like below..

IF wa_rseg-ebeln IN s_ebeln

ELSE.

continue.

ENDIF.

Rgds,

Bujji

Read only

former_member435013
Active Participant
0 Likes
453

Hi,

I don't believe that.

Have an intensive look at your check condition: length of fields, leading zeroes, alignment etc. .

regards

Walter Habich

Read only

Former Member
0 Likes
453

Hi,

Here Is the Sample Program Using Check statement Hope this Might Help you.

REPORT demo_program_check_1.

NODES: spfli, sflight, sbook.

START-OF-SELECTION.

LOOP AT airp_fr.

CHECK airp_fr-low NE ' '.

WRITE: / 'Selected Aiport-From:', airp_fr-low.

ULINE.

ENDLOOP.

LOOP AT airp_fr.

CHECK airp_to-low NE ' '.

WRITE: / 'Selected Airport-To:', airp_to-low.

ULINE.

ENDLOOP.

GET sflight.

WRITE: / 'Connid:', sflight-connid,

'Carrid:', sflight-carrid,

'Fldate:', sflight-fldate.

Reward If helpfull,

Naresh.

Read only

Former Member
0 Likes
453

Good chance s_ebeln contains no values. If that is the case, anything is valid and will pass through