11-16-2007 11:00 AM
In my internal table i hav three records.
RAM2
RAM1
Ram3
Now i wish to take these in diffrent variables x = ram2 y= ram1 & z= ram3.
How to do the same plz guide
11-16-2007 11:03 AM
loop at itab.
if sy-tabix = 1.
move itab-field to y
elseif sy-tabix = 2.
move itab-field to x
else.
move itab-field to z.
endif.
endloop.
plz reward points if dis helps
Message was edited by:
user_15
11-16-2007 11:03 AM
loop at itab.
if sy-tabix = 1.
move itab-field to y
elseif sy-tabix = 2.
move itab-field to x
else.
move itab-field to z.
endif.
endloop.
plz reward points if dis helps
Message was edited by:
user_15
11-16-2007 11:03 AM
loop at itab into wa.
if sy-index = 1.
var1 = wa-field1
elseif sy-index = 2.
var2 = wa-field1.
else.
sy-index = 3.
var3 = wa-field1.
endloop.
11-16-2007 11:05 AM
Hi,
do like this
loop at itab.
case sy-tabix.
when 1.
move itab-value to x.
when 2.
move itab-value to y.
when 3.
move itab-value to z.
endloop.
Reward if this helps,
Satish
11-16-2007 11:05 AM
Hi,
Try like this
Read table itab with key field = 'RAM1'.
If sy-subrc eq 0.
X = itab-field.
endif.
similarly do 2 more read statements and pass ur values to variables..
Reward if helpful.
Regards,
nagaraj
11-16-2007 11:07 AM
if ur internal table is without headr line, den..
loop at itab into wa.
if sy-tabix = 1.
move wa-field to y.
elseif sy-tabix = 2.
move wa-field to x.
else.
move wa-field to z.
endif.
endloop.
write:/ x,y, z.
11-16-2007 12:58 PM