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

Multiple line header for ALV

Former Member
0 Likes
2,493

I am using CL_SALV_TABLE (List_Display = X) to create a ALV report. I am willing to change it to function module REUSE_ALV_LIST_DISPLAY if it serves my requirement.

The header for the report needs to be multiple lines (8 lines). How can I accomplish this?

I looked into the possibility of using TOP_OF_PAGE event but I will have to hard code the vertical positions of the headers and since it is ALV and you can remove columns at will, I dont think this solution will work. Also if the columns are optimized or output length changed by the user, the positioning of the headers will be ruined.

Currently the header can only be of one line, how can we make the header to display a table of contents.

H1-L1		H2-L1		H3-L1
H1-L2		H2-L2		H3-L2
H1-L3		H2-L3		H3-L3
H1-L4		H2-L4		H3-L4
H1-L5		H2-L5		H3-L5
H1-L6		H2-L6		H3-L6
H1-L7		H2-L7		H3-L7
H1-L8		H2-L8		H3-L8

Thank you.

1 ACCEPTED SOLUTION
Read only

naimesh_patel
Active Contributor
0 Likes
1,773

It is possible to achieve by using the CL_SALV_TABLE approach.

You have to get the Top of page object which is type of the CL_SALV_FORM_LAYOUT_GRID. Than you have to use the method SET_TOP_OF_LIST method of the class CL_SALV_TABLE to set it back to ALV.

Check this article: http://help-abap.blogspot.com/2008/09/salv-model-5-add-header-top-of-page.html

Regards,

Naimesh Patel

I am using CL_SALV_TABLE (List_Display = X) to create a ALV report. I am willing to change it to function module REUSE_ALV_LIST_DISPLAY if it serves my requirement.

The header for the report needs to be multiple lines (8 lines). How can I accomplish this?

I looked into the possibility of using TOP_OF_PAGE event but I will have to hard code the vertical positions of the headers and since it is ALV and you can remove columns at will, I dont think this solution will work. Also if the columns are optimized or output length changed by the user, the positioning of the headers will be ruined.

Currently the header can only be of one line, how can we make the header to display a table of contents.

H1-L1		H2-L1		H3-L1
H1-L2		H2-L2		H3-L2
H1-L3		H2-L3		H3-L3
H1-L4		H2-L4		H3-L4
H1-L5		H2-L5		H3-L5
H1-L6		H2-L6		H3-L6
H1-L7		H2-L7		H3-L7
H1-L8		H2-L8		H3-L8

Thank you.

3 REPLIES 3
Read only

naimesh_patel
Active Contributor
0 Likes
1,774

It is possible to achieve by using the CL_SALV_TABLE approach.

You have to get the Top of page object which is type of the CL_SALV_FORM_LAYOUT_GRID. Than you have to use the method SET_TOP_OF_LIST method of the class CL_SALV_TABLE to set it back to ALV.

Check this article: http://help-abap.blogspot.com/2008/09/salv-model-5-add-header-top-of-page.html

Regards,

Naimesh Patel

Read only

0 Likes
1,773

Please guide me hw to put internal table field at report header in ALV.

this is my field catalog.

wa_fieldcat-row_pos = 1.

wa_fieldcat-col_pos = 1.

wa_fieldcat-tabname = 'ITAB'.

wa_fieldcat-fieldname = 'VBELN'.

wa_fieldcat-seltext_m = 'SalesOrderNo'.

wa_fieldcat-outputlen = '10'.

APPEND wa_fieldcat TO i_fieldcat.

CLEAR wa_fieldcat.

Also i wnt to total 4 field at header level and other is detail level.

Please guide me hw to do.

thnks

Bhavesh

Read only

Former Member
0 Likes
1,773