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

select

Former Member
0 Likes
889

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
Read only

b_deterd2
Active Contributor
0 Likes
856

Hi,

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

Regards,

bert

8 REPLIES 8
Read only

b_deterd2
Active Contributor
0 Likes
857

Hi,

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

Regards,

bert

Read only

Former Member
0 Likes
856

Hi,

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

Reward if Helpfull,

Naresh.

Read only

prasanth_kasturi
Active Contributor
0 Likes
856

hi

if the condition fails the loop will be skiped

regards

prasanth

Read only

Former Member
0 Likes
856

Hi,

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

Reward if Helpfull,

Naresh.

Read only

Former Member
0 Likes
856

Hi Frd

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

Reward Me Point

By

Pari

Read only

Former Member
0 Likes
856

Hi,

If the condition fails loop will never be executed.

Regards.

Read only

Former Member
0 Likes
856

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.

Read only

Former Member
0 Likes
856

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