Hi,
I have created a custom Z report using custom OO ALV Grid display. Added two custom button in toolbar. While saving the layout using layout button. It is not showing the default save layout.when I passed i_variant-variant = 'X' then it is allowing to save the layout,but default layout is not showing up. I have also saved the default setting. when I removed the i_variant-variant = 'X', then default save layout is showing up. Kindly suggest some solutions. In I variant I am passing the below field value.
Initially when I was not passing the i_variant = 'X', It was not saving the layout. Below is the program logic.
i_variant-report = sy-repid.
i_variant-username = sy-uname.
i_variant-variant = 'X'.
i_save = 'A' or 'U' or 'X'.
CALL METHOD GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
IS_VARIANT = i_VARIANT
I_SAVE = 'A'
I_DEFAULT = 'X'
IT_TOOLBAR_EXCLUDING = LT_EXCLUDE
CHANGING
IT_OUTTAB = GT_LST[]
IT_FIELDCATALOG = GT_FIELDCATALOG