‎2007 Apr 25 3:33 PM
Hi
I need to save chaged layout in ALV GRID DISPLAY
I am using I_save = 'A' but iam unable to save the layout
wat could be reason
Give me suggestion
Regards
‎2007 Apr 25 3:48 PM
Rasheed,
Actually it should work, do one small change declare a variable called s_save and initialize it with s_save = 'A' under Initialization event and then use s_save in your CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'.
Regards,
Amey
‎2007 Apr 25 5:21 PM
‎2007 Nov 21 9:03 AM
Hi,
You have to use the parameter "IS_VARIANT" to enable save :
DATA: ls_variant TYPE disvariant.
ls_variant-report = sy-repid.
ls_variant-username = sy-uname.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_save = 'A'
it_fieldcat = lt_fieldcat
is_variant = ls_variant
TABLES
t_outtab = lt_tab
EXCEPTIONS
program_error = 1
OTHERS = 2.Hope that will work.
Regards,
Yann
‎2013 Nov 20 2:11 PM
‎2015 Aug 17 11:25 AM
thank you Yann
It works like charm.
The point is : i_save = 'A'
i_save = 'X' is not correct.
‎2007 Nov 21 9:43 AM
first declare two variables :
it_variant LIKE disvariant,
it_variant_return LIKE it_variant.
then declare parameter for variant on selection screen.
PARAMETER p_vari LIKE disvariant-variant.
and then use this function module which will provide u f4 help for parameter on selection screen.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
it_variant-report = sy-repid.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = it_variant
i_save = 'A'
IMPORTING
es_variant = it_variant_return
EXCEPTIONS
not_found = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
p_vari = it_variant_return-variant.
ENDIF.
and finally pass this variant to REUSE_ALV_GRID_DISPLAY
as.....
is_variant = it_variant_return
after all this when u run ur report then in the tool bar u will see save layout option which will be the last one them save it with that name. next time when ever u run that report then it will give u name of variant in the parameter a sf4 help.
plz reward point if helpful.
with this u will sure use variant.
‎2015 Aug 17 1:02 PM
Populate the IS_Variant Parameter (field Report) with your report name, leaving the variant field blank. The ALV grid needs this field partially filled before it will alow you to save a variant. Then set your i_Save parameter to either 'A' or 'X'.
Regards,
Rich