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 optimize

Former Member
0 Likes
534

Hello Friends

When you right-click anywhere in an ALV container, you get an "optimize width" option.

Can this choice be preset anywhere under program control?

gs_layout-CWIDTH_OPT = 'X' - didnot work

Thanks

2 REPLIES 2
Read only

Former Member
0 Likes
476

hi,

chk this.

http://www.sapdevelopment.co.uk/reporting/reportinghome.htm

u can do it here

*&---------------------------------------------------------------------*
*&      Form  BUILD_LAYOUT
*&---------------------------------------------------------------------*
*       Build layout for ALV grid report
*----------------------------------------------------------------------*
form build_layout.
  gd_layout-no_input          = 'X'.
  gd_layout-colwidth_optimize = 'X'.
  gd_layout-totals_text       = 'Totals'(201).
*  gd_layout-totals_only        = 'X'.
*  gd_layout-f2code            = 'DISP'.  "Sets fcode for when double
*                                         "click(press f2)
*  gd_layout-zebra             = 'X'.
*  gd_layout-group_change_edit = 'X'.
*  gd_layout-header_text       = 'helllllo'.
endform.                    " BUILD_LAYOUT

Rgds

Rsehma

Read only

0 Likes
476

Reshma

in type lvc_s_layo , colwidth_optimize is not present. so, i cant use.

i am using oops

Thanks for the reply though