‎2007 Jun 27 3:15 PM
Hello !
I have developed a ALV report, and included the icon ICON_ALV_VARIANTS with function code &OL0. With this icon, the user can change the way it see the report, hide columns or show other ones. But the report doesn't show the option to save that variant, so the user can load in a easy way later.
What do I have to do, so the user can save his variant.
Thanks,
Javier
‎2007 Jun 27 3:17 PM
at selection-screen on value-request for p_vari.
**-- Display all existing variants
call function 'REUSE_ALV_VARIANT_F4'
exporting
is_variant = g_variant
i_save = g_save
importing
e_exit = g_exit
es_variant = gx_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 g_exit = space.
p_vari = gx_variant-variant.
endif.
endif.
Check out these sample program for illustration of above FM
http://www.sap-img.com/abap/alv-reporting-z-list-materials.htm
http://www.sap-img.com/abap/what-is-alv-programming.htm
Thanks
Seshu
‎2007 Jun 27 3:17 PM
at selection-screen on value-request for p_vari.
**-- Display all existing variants
call function 'REUSE_ALV_VARIANT_F4'
exporting
is_variant = g_variant
i_save = g_save
importing
e_exit = g_exit
es_variant = gx_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 g_exit = space.
p_vari = gx_variant-variant.
endif.
endif.
Check out these sample program for illustration of above FM
http://www.sap-img.com/abap/alv-reporting-z-list-materials.htm
http://www.sap-img.com/abap/what-is-alv-programming.htm
Thanks
Seshu
‎2007 Jun 27 3:25 PM
Hi,
You have the following EXPORTING parameters in my function module:
I_DEFAULT = 'X'
I_SAVE = 'A' "<=== this is to be global & user IS_VARIANT = VARIANT
VARIANT has the program's name in the REPORT field.
The "user-specific saving" needs a special authorization:
Authority-check object 'S_ALV_LAYO' id 'ACTVT' field '23', you can
avoid this authorization with IS_LAYOUT-NO_AUTHOR = 'X'.
Regards
Sudheer
‎2007 Jun 27 3:30 PM
Hello Javier,
This functionality is already existing with ALV.
In the application toll bar you can these three butoon for this option.
There is no need to implement new codes for this.
Vasanth