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

cl_gui_alv_grid save layout problem

Hello all,

I have a screen in wich i have a custom container for an ALV.

When running the method set_table_for_first_display i am sending the parameter I_SAVE as 'A'.

The problem is that it is not showing the save layout button.

Does anyone have any idea why could this be?

Thank you

Nuno Silva

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Aug 01, 2008 at 04:54 PM

    Try to pass

        gs_variant-report       = sy-repid.
        gs_variant-username     = sy-uname.
    

    then

        call method grid1->set_table_for_first_display
          exporting
            is_layout                     = gs_layout
            is_variant                    = gs_variant
            i_save                        = 'A'
    

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 01, 2008 at 06:34 PM

    Hi,

    you need to supply the is_variant as well

    DATA : gs_variant TYPE disvariant,

    gs_variant-report = sy-repid.

    CALL METHOD obj_grid0->set_table_for_first_display

    EXPORTING

    is_layout = ds_layo

    is_variant = gs_variant

    i_save = 'A'

    CHANGING

    it_outtab = t_final[]

    it_fieldcatalog = t_fcat.

    if you are using a layout selection on the selection screen. Than you might need to do the coding for its F4 selection.

    For e.g.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_layout.

    PERFORM f4_for_variant.

    FORM f4_for_variant .

    DATA: fl_exit(1) TYPE c.

    gs_variant-report = sy-repid.

    CALL FUNCTION 'REUSE_ALV_VARIANT_F4'

    EXPORTING

    is_variant = gs_variant

    i_save = 'A'

    IMPORTING

    e_exit = fl_exit

    es_variant = *gs_variant

    EXCEPTIONS

    not_found = 2.

    IF sy-subrc = 2.

    MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno

    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

    ELSE.

    IF fl_exit = space.

    p_layout = *gs_variant-variant.

    ENDIF.

    ENDIF.

    ENDFORM. " f4_for_variant

    Please reward if you find the answer useful.

    Thanks,

    Kamesh Bathla

    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.