2008 Aug 01 5:43 PM
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
2008 Aug 01 5: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'
a®
2008 Aug 01 5: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'
a®
2008 Aug 01 7: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