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: 

Header row in ALV Grid, based on the data in the table

Former Member
0 Kudos

Hi All,

I have a requirement wherein, based on the data in the table used for ALV, i need to add rows as sort of header in the ALV display.

For e.g. my table has

Appl No. Item Material Desc. Cost -> Column Heading

1 10 400 Excavation 10.00 -> Data

1 20 400 Footing 10.00

2 10 400 Excavation 10.00

2 20 400 Footing 10.00

For every new Appl No., i need to add a row, or sort of header specifying the appl no. details. means

Appl No. Item Material Desc. Cost

Appli. No. 1 Date: 01/01/1009 -> my requirement

1 10 400 Excavation 10.00

1 20 400 Footing 10.00

Appli. No. 2 Date: 02/01/1009

2 10 400 Excavation 10.00

2 20 400 Footing 10.00

Is this possible in ALV my any means? Currently i m using normal ALV Grid

Regards,

Janaki

1 REPLY 1

Former Member
0 Kudos

Hi..

Try like this... I think u have Application number and date in ur table ... First get the total table data into internal table.. and to add the row

*Declare the var1 as 0 and var2.

  • loop at internal table

*var1 = var1 +1

  • when application number =var1

concatenate : 'Appli. No.' (table- appli no field) 'Date:' (table-date field) into var2.

  • perform display(some name)

*endloop.

*form display...

alv display part.. first give that var2 like eg.. wa_alv-field= 'var2'.

  • end form.

Hope this will help u .....

Regards,

Abaper