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

ALV OOPS Based

Former Member
0 Likes
537

SLIS_LAYOUT_ALV-COLWIDTH_OPTIMIZE

in normal alv the above function is to optimize the field length but in OOPS alv how can we do this function???

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
485

Here it can be done in two ways. for all the columns using the layout option.

LAYOUT-CWIDTH_OPT

for individual columns it is mentioned in the fieldcatalog.

FIELDCAT-COL_OPT.

in some case we want only for few columns then we go for fieldcatalog option.

3 REPLIES 3
Read only

Former Member
0 Likes
485

In the layout parameter of the call


DATA gs_layout TYPE lvc_s_layo .

 gs_layout-CWIDTH_OPT = 'X'. 

    CALL METHOD go_alvgrid->set_table_for_first_display
      EXPORTING
        is_layout                     = gs_layout --- > 

Cheers,

KD

Read only

Former Member
0 Likes
486

Here it can be done in two ways. for all the columns using the layout option.

LAYOUT-CWIDTH_OPT

for individual columns it is mentioned in the fieldcatalog.

FIELDCAT-COL_OPT.

in some case we want only for few columns then we go for fieldcatalog option.

Read only

Former Member
0 Likes
485

Hello

You need to call method of class CL_GUI_ALV_GRID

LAYOUT_COLWIDTH_OPTIMIZE

~hitesh