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

LOOP problem

Former Member
0 Likes
450

hi all

Is there any wrong in following code as i was unable fill IT_JTAB.

-


loop at IT_ZIARCHIVE.

str = IT_ZIARCHIVE-zfilemmyy.

leng = strlen( str ).

j = leng - 4.

var = str+j(4).

if var BETWEEN so_zfnam-low and so_zfnam-high .

append IT_ZIARCHIVE to IT_JTAB .

ENDIF.

endloop.

-


regards

sateesh

1 ACCEPTED SOLUTION
Read only

prasanth_kasturi
Active Contributor
0 Likes
427

hi,

check your if condition

var = str+j(4). how are you adding a number to string . i think mistake lies here

regards

prasanth

3 REPLIES 3
Read only

prasanth_kasturi
Active Contributor
0 Likes
428

hi,

check your if condition

var = str+j(4). how are you adding a number to string . i think mistake lies here

regards

prasanth

Read only

Former Member
0 Likes
427

Hi,

did you check if you if-condition works.

try it without the if and check if the itab is filled.

regards

Nicole

Read only

Former Member
0 Likes
427

hi,

Check out whether the value var is falling between so_zfnam-low and so_zfnam-high ... I guess the below condition fails in your case ... also make sure the structure of IT_ZIARCHIVE and IT_JTAB should be same for appending ...


if var BETWEEN so_zfnam-low and so_zfnam-high .

endif.