Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

how can i get Variant Change Button and Variant save button to toolbar?

Former Member
0 Kudos

Here is my code part as you see There are no variant save and variant change buttons ?

Can you help me ?

Thanks & Regards

CALL METHOD r_grid->set_table_for_first_display

    EXPORTING

           i_save                         = 'X'

      "    is_variant                     = gv_variant

           is_layout                      = LVC_S_LAYOUT

     CHANGING

       it_outtab                      =  GET_ITAB[]

       it_fieldcatalog                =  SAVE_FCAT[]

       it_sort                       =   GET_SORT[]

     EXCEPTIONS

       invalid_parameter_combination = 1

       program_error                 = 2

       too_many_lines                = 3

       OTHERS                        = 4.

   IF sy-subrc <> 0.

    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

   ENDIF.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Burak,

While calling your method for ALV display, pass 2 exporting parameters as:

is_variant = gv_varaint.

I_SAVE = 'A'.

Regards,

Ganesh Lathi

3 REPLIES 3

former_member196651
Contributor
0 Kudos

Hi Burak,

For I_SAVE give 'A'. I think this will solve your issue.

Regards,

Abijith

Former Member
0 Kudos

Hi Burak,

While calling your method for ALV display, pass 2 exporting parameters as:

is_variant = gv_varaint.

I_SAVE = 'A'.

Regards,

Ganesh Lathi

raymond_giuseppi
Active Contributor
0 Kudos

You must also pass is_variant, with at least report subfield filled. You should also pass i_default = 'X';

Sample :


is_variant-report = sy-repid.

is_variant-variant = p_variant.

IF p_variant+0(1) NE '/'.

  is_variant-username = sy-uname.

ENDIF.

Regards,

Raymond