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: 

Column Headings in ALV

Former Member
0 Kudos

Hi All,

I am working on ALV (Using OO - Concept CL_GUI_ALV_GRID) where I need to display the column header text in two lines. Each Column should be further divided into one or more columns.

Is this possible in ALV Grid (OO Concepts) ? Please help me.

Regards,

Vara

1 ACCEPTED SOLUTION

Former Member
0 Kudos

I don't think so.

3 REPLIES 3

Former Member
0 Kudos

I don't think so.

Former Member
0 Kudos

hi vara

As per my knowledge there is no such option in ALV.

You can make use of FIELD CATALOG coloumn text as LONG, MEDIUM, SHORT.

ls_fieldcat-seltext_l = text-t05. "LONG

ls_fieldcat-seltext_m = text-t06. "MEDIUM

ls_fieldcat-seltext_s = text-t07. "SHORT

Multiple lines in the ALV header is not possible.

u can use this code i donno weather it will workout for u or not

You can do this in ALV.

Declare the layout for the ALV as this.

data: lv_fieldcat TYPE slis_t_fieldcat_alv,

lv_is_layout TYPE slis_layout_alv.

And then use the normal ways to get the fieldcatlog etc...

But just befor the CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

use this line,

lv_is_layout-colwidth_optimize = 'X'.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = SY-REPID

is_layout = lv_is_layout

it_fieldcat = lv_fieldcat[]

i_default = 'X'

i_save = 'A'

is_variant = lv_tmplt

I_GRID_TITLE = LV_GRID_TITLE

TABLES

t_outtab = NO_AUTH_EMP

EXCEPTIONS

program_error = 1

OTHERS = 2.

Regards

naveen

Former Member
0 Kudos

Varaprasad,

Its not possible to have two headings, neither its possible to merget two columns.

regards,

Ravi