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: 

LOOP problem

Former Member
0 Kudos

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

prasanth_kasturi
Active Contributor
0 Kudos

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

prasanth_kasturi
Active Contributor
0 Kudos

hi,

check your if condition

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

regards

prasanth

Former Member
0 Kudos

Hi,

did you check if you if-condition works.

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

regards

Nicole

Former Member
0 Kudos

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.