Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding Report Display Format

Former Member
0 Kudos
169

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.

8 REPLIES 8

Former Member
0 Kudos
122

HI,

Try this way

LOOP AT ITAB.
WRITE:/ ITAB-LINENO, ITAB-FIELD1.
WRITE:/ ITAB_FIELD2.
WRITE:/ ITAB_FIELD3.
WRITE:/ ITAB_FIELD4.
SKIP.
ENDLOOP.

Former Member
0 Kudos
122

Thanks but i am using ALV report so how can it wiil be possible in ALV report.

0 Kudos
122

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

Former Member
0 Kudos
122

Thanks for reply.

I am not getting this reply so if you give me a details of how to do.

0 Kudos
122

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

Former Member
0 Kudos
122
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.

Former Member
0 Kudos
122

i dont think you can do that in alv report.

Former Member
0 Kudos
122

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'