Application Development 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: 

select

Former Member
0 Kudos

Hi,

Consider the syntax given below.

select lifnr from lfa1 where lifnr =200.

..........

endselect.

suppose if sy-subrc NE 0 then will the loop gets executed atleast once.

1 ACCEPTED SOLUTION

b_deterd2
Active Contributor
0 Kudos

Hi,

No, if there is no LIFNR 200 then the loop will not be entered.

Regards,

bert

8 REPLIES 8

b_deterd2
Active Contributor
0 Kudos

Hi,

No, if there is no LIFNR 200 then the loop will not be entered.

Regards,

bert

Former Member
0 Kudos

Hi,

If the above condition fails then the loop will not get excecuted .

Reward if Helpfull,

Naresh.

prasanth_kasturi
Active Contributor
0 Kudos

hi

if the condition fails the loop will be skiped

regards

prasanth

Former Member
0 Kudos

Hi,

If the above condition fails then the loop will not get excecuted .

Reward if Helpfull,

Naresh.

Former Member
0 Kudos

Hi Frd

No,the LOOP will not execute.because no datas will be in internal table.

Reward Me Point

By

Pari

Former Member
0 Kudos

Hi,

If the condition fails loop will never be executed.

Regards.

Former Member
0 Kudos

hi,

u write select and endselect.. it is loop statement.

The SELECT statement sets sy-subrc to 0 for every pass by value to an ABAP data object. The ENDSELECT statement sets sy-subrc to 0 if at least one row was transferred in the SELECT loop

regards.

chandu.

Former Member
0 Kudos

hI

IF YOUR SELECT QUERY FAILS THEN SY-SUBRC WILL FAIL SO IT WON'T EXECUTE ONE LOOP ALSO

DIRECTLY IT WILL COME OUT OF THE SELECT - ENDSELECT LOOP