Skip to Content
0
Aug 21, 2011 at 09:15 AM

Read statement

15 Views

hi

my requirement is to read the data from it1 to it2 . for multiple equipment numbers that we had given in the select-options

i have used read statement ..but prob is it reading only for one equipment no...

when cursor is in loop statement the data of second record coming in [wa_final1 ] but when it going for read again the first record coming again it transferring first record data only

LOOP AT it_final1 into wa_final1.

READ TABLE it_final1 into wa_final1 WITH KEY idate = date-low.

if sy-subrc = 0.

wa_output-point1 = wa_final1-point1.

wa_output-pttxt = wa_final1-pttxt.

wa_output-date1 = wa_final1-idate.

wa_output-cntr1 = wa_final1-power1.

endif.

READ TABLE it_final1 into wa_final1 WITH KEY idate = date-high.

if sy-subrc = 0.

wa_output-cntr2 = wa_final1-power2.

wa_output-date2 = wa_final1-idate.

endif.

append wa_output to it_output.

clear wa_output.

write sy-tabix.

endloop.

Thanks a lot ...