‎2009 Mar 18 6:28 AM
Please use more informative subject in future
hi,
I have a internal table as follows.
po no | item | state |
45 10 ap
45 10 sp
45 10 pp
46 10 sf
46 10 as
I am useing the read table syntax for this table .
for pono 45 and 46 i want read the records.
but read table is triggring for first record only.
can any body explain how read the record of 46 also.
thanks,
padmaja.
Edited by: Matt on Mar 18, 2009 7:46 AM
‎2009 Mar 18 6:30 AM
Hi,
Read statement will read the very first line matching the condition.
So try using:
loop at itab where po_no = '45' or po_no = '46'.
write: / itab-po_no, itab-item, itab-state.
endloop.
Hope this helps you.
Regards,
Tarun
‎2009 Mar 18 6:31 AM
Hi,
You can LOOP statement with where clause or
Read Statement will work for each entry only when it is
inside the LOOP statement with KEY mentioned.
Regards
Mansi
‎2009 Mar 18 6:35 AM
Hi,
Do like this.
loop at itab into wa.
read table itab into wa with key po_no = wa-po_no.
your logic, if any*************
endloop.
this will read every record.
Cheers,
Rudhir
‎2009 Mar 18 6:38 AM
Hi,
Either used
At new po.
read table it into wa.
endat.
or
put loop it into wa.
endloop.
Regards,
Anagha Deshmukh
‎2009 Mar 18 6:39 AM
Hi Padmaja
Use the Loop Statement instead of the Read statement since Read statement will give you the very first line of the matching condition.
Hope this helps.
Harsh
‎2009 Mar 18 6:42 AM
hi,
use loop....end loop it select all th evalues in the internal table.
regards
Ritesh J
‎2009 Mar 18 6:47 AM
‎2009 Mar 18 6:48 AM
Hi,
Loop the internal table with where condition or llop the table and use read statement within that.
Sort the internal table before that.
Thanks.
‎2009 Mar 18 6:59 AM
Hi,
Reading the intrenal table will only be done either by using the READ statement within the loop -endloop or using the WRITE statement again with in the loop-endloop.
As both the statement will read the table at the curretn index only, to read the other entry you need to do it in loop-endloop or in lopp that run from first index to last value(sy-dbcnt).
Pooja
‎2009 Mar 20 4:43 AM