Skip to Content
author's profile photo Former Member
Former Member

Reuse ALV Grid Display

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Dec 14, 2015 at 12:56 PM

    Hi Andre,

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

    Regards

    Oliver

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 14, 2015 at 01:01 PM

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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 14, 2015 at 02:12 PM

    Hi

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

    Automatically it takes the width as per field value .

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 14, 2015 at 03:24 PM

    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.




    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.