2012 May 24 12:26 PM
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.
2012 May 24 12:52 PM
2012 May 24 12:57 PM
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.
2012 May 24 1:02 PM
2012 May 25 5:00 AM
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.
2012 May 25 1:49 PM
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)
2012 May 28 9:34 AM
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
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |