‎2007 Aug 06 3:26 PM
.<b>
Hello every body ,
In my report ,Before populating the fieldcatalog i am first fetching the details of g/l account into my internal table .There are two line items with same posting date .Now wen i use read table to populate my final table looping through the internal table i am getting only one LIne item record .But wen i give my specific line item number in the sel-screen i am getting all the details.if i don't give it tat is to fetch all the data ,then i am able to get only one line item details that is coming first in the order but the second one is not getting displayed.</b>
Wat could be the reason .
is it bcoz of only using the read statement?
‎2007 Aug 06 3:33 PM
Hi Naveen,
Yes. As READ can only read one line from the table.
Regards,
Atish
‎2007 Aug 06 3:29 PM
Hi Naveen,
If you use the Read statment then it will fetch a single record, so you need to use the LOOP statment ot do the FOR ALL ENTRIES
Regards
Sudheer
‎2007 Aug 06 3:32 PM
Hi
1st check the tables weather that tables getting correct data or not by going into debugging
if don't get proper data correct there it self
other wise
it will be problem with reading the table
give proper conditions then it will display the data
whenever u got problem like this go through the debugging so u can solve prob very easyly
reward if usefull
‎2007 Aug 06 3:33 PM
Hi Naveen,
Yes. As READ can only read one line from the table.
Regards,
Atish
‎2007 Aug 06 3:35 PM
My friend :
before looping for read table concept
you have to sort the both tables and the internal table fields should in the same order what ever fields are common in the bot internal table ,.
then the line item table should be the loop and the header table should be the read table .
" example .sort bseg by burks belnr .
sort bkpf by burks belnr .
loop at bseg .
read table bkpf with key bukrs = bseg-bukrs belnr = bseg-belnr .
you query for modify /inserting into new internal table .....etc
endloop .but what you are doing is BKPF is looped and BSEG is used in the read concept so it will take only one line item ..and the remainining line item will be skiped .
and remember to sort also ..
reward points if it is usefulll.....
Girish