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

SET_TABLE_FOR_FIRST_DISPLAY in Docking container

Former Member
0 Likes
1,266

DATA  GS_LAYOUT TYPE DISVARIANT.

      DATA X_SAVE.

      DATA : G_REPID LIKE SY-REPID.

      G_REPID = SY-REPID.

      GS_LAYOUT-REPORT = G_REPID.

      X_SAVE = 'A'.

      CALL METHOD GRID->SET_TABLE_FOR_FIRST_DISPLAY

        EXPORTING

*    I_BUFFER_ACTIVE               =

*    I_BYPASSING_BUFFER            =

*    I_CONSISTENCY_CHECK           =

*    I_STRUCTURE_NAME              =

  IS_VARIANT                    = gs_layout

        I_SAVE                        = X_SAVE

     I_DEFAULT                     = 'X'

     IS_LAYOUT                     = IO_LAYOUT

*    IS_PRINT                      =

*    IT_SPECIAL_GROUPS             =

*    IT_TOOLBAR_EXCLUDING          =

*    IT_HYPERLINK                  =

*    IT_ALV_GRAPHICS               =

*    IT_EXCEPT_QINFO               =

*    IR_SALV_ADAPTER               =

        CHANGING

          IT_OUTTAB                     = I_POP[]

     IT_FIELDCATALOG               = IO_FCAT

*    IT_SORT                       =

*    IT_FILTER                     =

        EXCEPTIONS

          INVALID_PARAMETER_COMBINATION = 1

          PROGRAM_ERROR                 = 2

          TOO_MANY_LINES                = 3

          OTHERS                        = 4

              .

      IF SY-SUBRC <> 0.

        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

      ENDIF.

this was my code.

actually the problem is :

i want to provide the option for save layout.

thats why i passed gs_layout in is_varient parameter.

all this grid is display in docking container.

this went wrong when i user gs_layout in is_varient and x_save in i_save parameter.

the docking container is displayed blank.

but when i comment these two parametrs in report in docking container in perfectly fine.

DATA  GS_LAYOUT TYPE DISVARIANT.

      DATA X_SAVE.

      DATA : G_REPID LIKE SY-REPID.

      G_REPID = SY-REPID.

      GS_LAYOUT-REPORT = G_REPID.

      X_SAVE = 'A'.

      CALL METHOD GRID->SET_TABLE_FOR_FIRST_DISPLAY

        EXPORTING

*    I_BUFFER_ACTIVE               =

*    I_BYPASSING_BUFFER            =

*    I_CONSISTENCY_CHECK           =

*    I_STRUCTURE_NAME              =

  IS_VARIANT                    = gs_layout

        I_SAVE                        = X_SAVE

     I_DEFAULT                     = 'X'

     IS_LAYOUT                     = IO_LAYOUT

*    IS_PRINT                      =

*    IT_SPECIAL_GROUPS             =

*    IT_TOOLBAR_EXCLUDING          =

*    IT_HYPERLINK                  =

*    IT_ALV_GRAPHICS               =

*    IT_EXCEPT_QINFO               =

*    IR_SALV_ADAPTER               =

        CHANGING

          IT_OUTTAB                     = I_POP[]

     IT_FIELDCATALOG               = IO_FCAT

*    IT_SORT                       =

*    IT_FILTER                     =

        EXCEPTIONS

          INVALID_PARAMETER_COMBINATION = 1

          PROGRAM_ERROR                 = 2

          TOO_MANY_LINES                = 3

          OTHERS                        = 4

              .

      IF SY-SUBRC <> 0.

        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

      ENDIF.

this was my code.

actually the problem is :

i want to provide the option for save layout.

thats why i passed gs_layout in is_varient parameter.

all this grid is display in docking container.

this went wrong when i user gs_layout in is_varient and x_save in i_save parameter.

the docking container is displayed blank.

but when i comment these two parametrs in report in docking container in perfectly fine.

6 REPLIES 6
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,120

How did you fill those parameters, which value for disvariant-report (movde sy-subrc) and save (A ?)

Regards,

Raymond

Read only

0 Likes
1,120

DATA  GS_LAYOUT TYPE DISVARIANT.

      DATA X_SAVE.

 

      DATA : G_REPID LIKE SY-REPID.

      G_REPID = SY-REPID.

      GS_LAYOUT-REPORT = G_REPID.

      X_SAVE = 'A'.


i fill these parameters like this.

and passed through the method.

Read only

0 Likes
1,120

Are there other layouts stored for an other grid with same report name. try to clear the I_DEFAULT parameter.

Regards,

Raymond

Read only

0 Likes
1,120

I have tried to clear i_default parameter. but its not working.

within this grid this is the only layout paramter.

i have created an alv with FM reuse_alv_grid_display.

on user_command of reuse_alv_grid_display....i have created docking container.

on that i want save layout option.

but still blank grid is getting displayed.

Read only

0 Likes
1,120

Looks like you have 2 ALV's!

If that is the case refer the WIKI from Clemens on how to set different layouts for Multiple ALV's

http://wiki.sdn.sap.com/wiki/display/Snippets/Create+unique+handle+for+ALV+layout+(variant)

Read only

0 Likes
1,120

There should be a mis-match between the two ALV grid, if you identify those only with the report name, system will try to reuse first layout for second grid. fill the handle subfield (disvariant-handle) of the is_variant parameter. (You could also look for variant via SE16 on table LTDX selecting on report name)

Regards,

Raymond