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: 

Reuse ALV Grid Display

Former Member
0 Kudos

Hi there,

I would like to have the optimized colwidth within standard alv call function reuse alv grid display,

what do I need to declare for IS_Layout = gs_layout =??

I dont want to use methods.

I already got this

DATA: gt_fieldcat TYPE slis_t_fieldcat_alv,

       gs_fieldcat TYPE slis_fieldcat_alv.

DATA: gs_layout TYPE slis_layout_alv.


but nothing happens

Thanks in advance!

Andre

1 ACCEPTED SOLUTION

oliver_wurm
Active Participant
0 Kudos

Hi Andre,

you need to populate gs_layout-colwidth_optimize with 'X' before you pass it the the ALV function module.

Regards

Oliver

6 REPLIES 6

oliver_wurm
Active Participant
0 Kudos

Hi Andre,

you need to populate gs_layout-colwidth_optimize with 'X' before you pass it the the ALV function module.

Regards

Oliver

0 Kudos

Thank you!

michael_kozlowski
Active Contributor
0 Kudos

Check out link which shows you how to optimize column-width in ALV alv grid column width optimising | SCN

0 Kudos

Thanks alot!

Former Member
0 Kudos

Hi

For this we have one option  like colwidth_optimization = 'X'

Automatically it takes the width as per field value .

0 Kudos

Fill data in your Work area gs_fieldcat with colwidth_optimization = 'X'


i.e


gs_fieldcat-colwidth_optimization = 'X' .


append gs_fieldcat to gt_fieldcat  .


This works now with column width optimization.