cancel
Showing results for 
Search instead for 
Did you mean: 

variant

Former Member
0 Kudos

whats the difference between a variant and a display variant.

thanks

Ganga

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

how do u save a display variant?

suresh_datti
Active Contributor
0 Kudos

You save it after executing the Varinat & can use it as a default or a sel scr option in the subsequent execution of the report. Once you exceute the report & the ALV is displayed,use the menu option

Settings>Layout> Change

choose the columns & set the filter & SAVE.

~Suresh

Former Member
0 Kudos

You can use as like below :

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

Answers (1)

Answers (1)

suresh_datti
Active Contributor
0 Kudos

Variant is where you store the values for some/all of the selection screen fields.

Dispaly Variant is the Layout of the ALV List that is displayed after the report is executed. You can choose to hide/sum/filter certain columns & use it as one of the Selection screen options.

~Suresh