‎2007 Dec 06 11:23 AM
Dear All,
see this sample code..
LOOP AT it_record.
if it_record-pkey = '39'.
"HERE I HAVE TO MOVE THE NEXT LINE ITEM OF IT_rECORD
perform get_Data()
endif.
endloop.
FORM GET_DATA.
it_Record1-vramt
it_Record1-vramt1
it_Record1-vramt2
ENDFORM.
I need to move the next line item inside the same loop only, how its possible? pls guide me...
Regards,
Thanuskodi T.
‎2007 Dec 06 11:27 AM
Hi,
LOOP AT it_record.
if it_record-pkey = '39'.
n = sy-tabix."current row number
n = n + 1."next row number
read table it_record into wa_record INDEX n."get next row like this
endif.
endloop.
rgds,
bharat.
‎2007 Dec 06 11:27 AM
Hi,
LOOP AT it_record.
if it_record-pkey = '39'.
n = sy-tabix."current row number
n = n + 1."next row number
read table it_record into wa_record INDEX n."get next row like this
endif.
endloop.
rgds,
bharat.
‎2007 Dec 06 11:28 AM
hi,
try by writeing <b>sy-index = sy-index + 1</b> over their
regards,
pavan
‎2007 Dec 06 11:33 AM
‎2007 Dec 06 1:28 PM
loop at itab
write:/itab<field> "1234
i itab-pkey = '39'.
call screen '121'.
loop at itab where pkey = '39'.
cur_row = sy-tabix + 1.
write:/itab-<field> "2345
if itab-pkey = '39'.
continue. "the same loop
endif.
endloop.
itabcontains
-
1234
2345
3456
my reqs is...
first its printing 123
2nd time its printing 2345
aftre that itab-pkey <> 39
the value should print 3456 na..
its printing 2345
please guide me friends..
Regards,
Thanuskodi T.
the loop is not moving, i mean the main loop