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

syntax problem

Former Member
0 Likes
501

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
483

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.

4 REPLIES 4
Read only

Former Member
0 Likes
484

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.

Read only

Former Member
0 Likes
483

hi,

try by writeing <b>sy-index = sy-index + 1</b> over their

regards,

pavan

Read only

JozsefSzikszai
Active Contributor
0 Likes
483

Read only

0 Likes
483

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