Application Development and Automation 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: 
Read only

How to Create VARIENTS in Module Pool Programing

Former Member
0 Likes
467

hi Firend,

i have a module pool program which needs to be created . using the set pf-status i have created a save button.but the requirement is that when we click the save button a variant needs to be created that saves the values that are present in the selection screen.kindly help me out if there are any function modules and display out put based on values that are save in variant in ALV Grid format....Plz if Possible Send Any CODE related to these..

Thanks & Regards

Venkatesh

Edited by: venkatesh m on Feb 17, 2009 11:23 AM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
432

 data:   w_lay type disvariant,
            w_layout type lvc_s_layo.
 
 w_layout-sel_mode = 'A'.
 w_lay-report = syst-cprog.
   w_lay-username = sy-uname.
  w_lay-handle = handle.
 
  call method g_alv_grid3->set_table_for_first_display
      exporting
        is_layout                     = w_layout
        is_variant                    = w_lay
        i_save                        = 'U'
 changing
        it_outtab                     =  t_itab
        it_fieldcatalog               = w_fieldcat
      exceptions
        invalid_parameter_combination = 1
        program_error                 = 2
        too_many_lines                = 3
        others                        = 4.
 
2 REPLIES 2
Read only

Former Member
0 Likes
433

 data:   w_lay type disvariant,
            w_layout type lvc_s_layo.
 
 w_layout-sel_mode = 'A'.
 w_lay-report = syst-cprog.
   w_lay-username = sy-uname.
  w_lay-handle = handle.
 
  call method g_alv_grid3->set_table_for_first_display
      exporting
        is_layout                     = w_layout
        is_variant                    = w_lay
        i_save                        = 'U'
 changing
        it_outtab                     =  t_itab
        it_fieldcatalog               = w_fieldcat
      exceptions
        invalid_parameter_combination = 1
        program_error                 = 2
        too_many_lines                = 3
        others                        = 4.
 
Read only

Former Member
0 Likes
432

Hi,

Use LVC_VARIANT_* Series FM in your code as per your requirment.

-Rick