2009 Apr 11 4:32 AM
Dear all,
In my report i have records in internal table like this :
Line no. LAR01 LAR02 LAR03 LAR04
20 LNTP LSTP LNTP LTPS
40 LSTP PNTR PN26 P2C2.
I want these records should display like this :
Line no.
20 LNTP
LSTP
LNTP
LTPS
40 LSTP
PNTR
PN26
P2C2
Can u pls give me any solution that how can i able to display records in my required format.
Thanks & Regards,
Shivam Pastagia.
2009 Apr 11 4:55 AM
HI,
Try this way
LOOP AT ITAB.
WRITE:/ ITAB-LINENO, ITAB-FIELD1.
WRITE:/ ITAB_FIELD2.
WRITE:/ ITAB_FIELD3.
WRITE:/ ITAB_FIELD4.
SKIP.
ENDLOOP.
2009 Apr 11 5:01 AM
Thanks but i am using ALV report so how can it wiil be possible in ALV report.
2009 Apr 11 5:12 AM
HI,
You need to alter the internal table in the way you want to display.
Example.
You have data in the internal table..
20 LNTP LSTP LNTP LTPS
40 LSTP PNTR PN26 P2C2.
You cannot achevie this passing the above table you need to do some alteration in the table data.
Take other internal table ans Convert the data in this way. and pass this to the ALV
Line no.
20 LNTP
LSTP
LNTP
LTPS
40 LSTP
PNTR
PN26
P2C2
2009 Apr 11 5:28 AM
Thanks for reply.
I am not getting this reply so if you give me a details of how to do.
2009 Apr 11 5:41 AM
HI,
You have the data in internal as below format..if you pass this to alv it displays in the same foramt..which is not your requiremnt.
Example.
You have data in the internal table..
20 LNTP LSTP LNTP LTPS
40 LSTP PNTR PN26 P2C2.
Now you take another internal table with two fields and populate it as shown below and build the fieldcataog for this and pass to ALV
Line no. FIELD
20 LNTP
LSTP
LNTP
LTPS
40 LSTP
PNTR
PN26
P2C2
2009 Apr 11 6:16 AM
loop at itab into wa.
write:/ wa-lineno.
write: wa-lar01.
write:/ wa-lar02.
write:/ wa-lar03.
write:/ wa-lar04.
write: / .
endloop.
This is the way to do !
Regards,
Lalit Mohan Gupta.
2009 Apr 11 6:19 AM
2009 Apr 12 5:23 AM
Hi,
You can do this using a hierarchical sequential ALV, Provided you have a definite relation among the Header & Detail ALV.
Divide your Data among Header & Detail and then try.
Use FM 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'