Application Development and Automation 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: 
Read only

Regarding Report Display Format

Former Member
0 Likes
1,005

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
Read only

Former Member
0 Likes
958

HI,

Try this way

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

Read only

Former Member
0 Likes
958

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

Read only

0 Likes
958

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

Read only

Former Member
0 Likes
958

Thanks for reply.

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

Read only

0 Likes
958

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

Read only

Former Member
0 Likes
958
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.

Read only

Former Member
0 Likes
958

i dont think you can do that in alv report.

Read only

Former Member
0 Likes
958

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'