ALV change layout button in toolbar

Hi,
I have an ALV,which has a change layout option in its toolbar.I want to save layouts which r user specific.Please help me with this isse.
Thanks

The following is where a user can enter a display variant
the no display can be used if the grid output is not to
be controlled by the users variant.
PARAMETERS p_layout LIKE disvariant-variant.
  w_layout-grid_title = sy-title.
  w_layout-zebra      = 'X'
  w_layout-sel_mode   = 'B'.
  w_layout-cwidth_opt = 'X'
  w_variant-handle    = p_layout.
  w_variant-report    = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
       exporting
            i_callback_program      = gd_repid
            i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
            i_callback_user_command = 'USER_COMMAND'
*            i_grid_title           = outtext
            is_layout               = gd_layout
            it_fieldcat             = fieldcatalog[]
*            it_special_groups       = gd_tabgroup
            it_events               = gt_events 
            is_print                = gd_prntparams 
            i_save                  = 'X'
            is_variant = w_variant
      tables
            t_outtab                = it_ekko
       exceptions
            program_error           = 1
            others                  = 2.
  if sy-subrc <> 0.
Reward if this helps.

Similar Messages

  • How to add Change Layout Button to ALV Toolbar?

    Hi All,
    I am using a SAP GUI STATUS 'STANDARD' that has almost all the funcationality needed except for the change layout button.
    I have tried changing the GUI STATUS to 'STANDARD_FULLSCREEN' which has the button I am looking for but it does not show up.
    What am I missing to have the 'Change Layout' Button show on the toolbar?
    thank you

    I am using Classes.
    I did not specify any type of table of 'exclude' buttons.
    here is my code that display the ALV
    DATA gr_alv TYPE REF TO cl_salv_table.
    DATA gr_functions TYPE REF TO cl_salv_functions_list.
    DATA gr_selections TYPE REF TO cl_salv_selections.
    DATA gr_events TYPE REF TO cl_salv_events_table.
    DATA gr_settings TYPE REF TO cl_salv_display_settings.
    DATA gr_layout TYPE REF TO cl_salv_layout.
      TRY.
          cl_salv_table=>factory(
           IMPORTING r_salv_table = gr_alv
           CHANGING  t_table      = gt_rpt_details ).
          PERFORM f_display_settings.
          gr_alv->set_screen_status(
          "pfstatus = 'Z_STANDARD'
          pfstatus = 'ZSTANDARD_FULLSCREEN'
          report = sy-repid
          "i_save = 'A'
          set_functions = gr_alv->c_functions_all ).
          gr_events = gr_alv->get_event( ).
          "create layout object
          CREATE OBJECT gr_layout.
          gr_layout->get_current_layout( ).
          CREATE OBJECT event_handler.
          SET HANDLER event_handler->on_user_command FOR gr_events.
          gr_functions = gr_alv->get_functions( ).
          gr_functions->set_all('X').
          gr_functions->set_group_filter( value = if_salv_c_bool_sap=>false ).
    *       Set print preview
          gr_functions->set_print_preview( ).
          gr_alv->get_display_settings( ).
          gr_alv->display( ).

  • Hide 'Change Layout' button from alv toolbar

    Hello All,
    can anyone let me know how can we hide the change layout button or exclude the change layout button from the ALV tool bar using OOPS . what's the fcode for it.
    Thank You !
    Ravi

    Hi Ravi,
    Please refer to this [Program|http://www.saptechies.com/disable-some-standard-buttons-from-alv-display/].
    Hope this helps.
    Regards,
    Chandravadan

  • Change layout Button In ALV Grid

    Hi all,
    I have a requirement where I am creating Field Catalogue from Z Table(has 60 fields) for few(12) fields.
    The user would like to have the option to add more fields by changing the Layout. But I dont see the Fields in Hidden Column when I click the Change Layout Button in ALV Toolbar. It just displays the Field based on Field Catalogue defined.
    Is there a way I can maintain all the fields without being displayed in ALV initally and letting the user select the hidden fields as per their requirement. As happens in SE16 where we can select the fields to be displayed.
    Thanks for the support.

    Hi Abhilasha,
    In the reuse_alv function module we can see a field I_SAVE.If you pass this as 'X' then the option of saving the layout variants are available.
    Create a layout by,selecting just the fileds required for display and set it as the default variant.It can be made Global or user-specific.But  we need to declare all fields in the fieldcatalog.
    So if the default variant is set,everytime the program is run it shows only the fields selected in it but can select more form the change layout option.
    Hope it helps.
    Regards
    Byju

  • Hide Change Layout Button in ALV report o/p for MB52 Tcode

    Hi,
    Is it possible to Hide Change Layout Button in ALV output for Report MB52 using authoriztaion.
    We have created a layout in which we are hiding some coloumns which the user should not see.
    But if the change layout button is active then the user can add those coloumns to output.
    Is this possible through authorizations. I want to avoid doing any chnages to the std sap program.
    Thanks & Regards,
    Fawaz

    Check the object S_ALV_LAYO

  • What is the constant name for Change layout Button in ALV Grid ABAP Objects

    Dear All,
    I have one query please help me.
    what is the constant name for Change layout Button in ALV Grid ABAP Objects.
    With Rgds,
    Babu

    Halo Vinod,
    The consant name is cl_gui_alv_grid=>mc_fc_current_variant.
    Regards
    Arshad

  • Why miss change layout button in ALV report

    Hello Experts,
    I have strange problem, I run the same transaction two times, one I have the change layout button but another I miss it...
    Anything control this button?
    thanks a lot for your help!

    Hi,
    Is this standard Tcode or customized Tcode?
    If it is standard tcode, what is the tcode?
    If it is customized tcode, can you post some code for us to analyse?
    Thanks.
    Regards,
    Keng Haw

  • ALV Change layout before Content is displayed

    Hello expert,
    How can i call default button "change layout" before the alv content?. i want that when the alv appear, the initial screen is like below, where user can choose which column he want to be displayed.
    any help please?

    Hi Hassim,
    Miantain in the Reuse Alv Grid display Layout as Save options below
       i_save                           = 'A'
    Example :
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
           i_callback_program                = sy-repid
           i_callback_top_of_page            = 'TOP_OF_PAGE'
           is_layout                         = layout_h
           i_callback_user_command           = 'USER_COMMAND'
           it_fieldcat                       = it_fieldcat
            i_save                           = 'A'
         TABLES
           t_outtab                          = it_final
    *   EXCEPTIONS
    *     PROGRAM_ERROR                     = 1
    *     OTHERS                            = 2
       IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF.

  • Save Layout and change Layout button.

    Hi Guys,
                Im calling the below method of class: cl_gui_alv_grid.
        gs_variant_lic-report = sy-repid.
        gs_variant_lic-username = sy-uname.
          CALL METHOD gi_alv_lic->set_table_for_first_display
            EXPORTING
              i_structure_name         = 'Z_STRUC'
              is_variant                    = gs_variant_lic
              i_save                        = 'A'
              is_layout                    = ls_layout
    However, the Select layout and Save Layout button dont appear.
    Instead i get the button 'Choose Layout'.
    If i dont pass gs_variant, i get single button 'Change Layout'.
    My requirement is to get 3 buttons: 'Change Layout', 'Select Layout' and 'Save Layout'.
    How can i achieve that?
    Thanks,
    Rohit.

    Please share how did u solved it?

  • Change layout button in ALV Grids

    Hi Experts,
    I have displayed 2 ALV grids in a single screen using OOPS concepts and I have activated the Save Layout option for both the Lists.
    Now whenever I will save the layout for the 1st list then automatically it is taken into consideration for the common fields in the second list as well.
    Please help me on how I can avoid changing the 2nd list if I will change the 1st list if possible.
    Thanks in advance..
    Regards,
    Srinivas
    Edited by: Srinivas Hari on Jun 23, 2009 10:07 AM

    Hello,
    I think u can achieve that by populating
    HANDLE
    LOG_GROUP fields of Disvariant structure in u r program.
    Regards

  • Create Change Layout in ALV list report

    Hi,
    i have create my own change layout button at my alv list report, my problem is i don't know what coding can be used to activate the change layout function in my own button. Who have sample programming for this function please share it....
    tq.

    Hi,
    By default if you're using the ALV List Display function module, there's no need for you to code the 'Change Layout' function, the standard function will be there, unless there's something you want and the standard 'Change Layout' function could not provide.
    Go to Abap Editor and look for program with 'BALV*'. You'll get a whole list of DEMO program on ALV.

  • Change Layout in ALV

    HI,
    In my alv report(developed using ABAP OO), i need to exclude few buttons .
    Here i need to exclude Change Layout button.
    Can anyone pls help whats the attribut for change layout icon.
    Like for Print we have MC_FC_PRINT?.  what will be for "Change Layout"?
    Pls help
    Thanks

    Hi,
    Check the constants in the public attributes of the class ..where you can find the focde for the change layout button..
    Thanks
    Naren

  • Standard buttons not displaying ALV when added button by creating PF status

    Hi  All,
    I have added a button(using SE41) in application toolbar for ALV grid using Factory method.But the problem is I am unable to see the standard tool bar buttons(Layout,Download,Mail etc).
    Even I tried adding buttons(using standard FCODES) to the PFstatus.Now the buttons are visible but the functionality is not working for all buttons.Its working only for Graphic and Change layout buttons.
    Can any one suggest...??
    -Phaniram

    Disregard DKS's response...that's the older stuff and you're using NetWeaver ALV.
    In SALV you can cause those buttons to appear, but you may need to copy the SALV_STANDARD GUI from one of the SALV* named program using SE80...sounds like you have that part, but you may need to turn functions ON...
    Perhaps something like this would help:
    data:  gr_f_list  type ref to cl_salv_functions_list,
             gr_alv     type ref to cl_salv_table,
    SALV toolbar & GUI functions
      gr_f_list = gr_alv->get_functions( ).     "Get Toolbar functions
      gr_f_list->set_all( abap_true ).          "All On
      gr_f_list->set_view_lotus( abap_false ).  "Lotus 123 off
      gr_f_list->set_view_excel( abap_false ).  "Excel in Place Off
      gr_f_list->set_graphics( abap_false ).    "Graph tool off
    For undesired buttons, set each tool OFF after turning all ON.

  • How to Insert Fields in ColumnSet of Change Layout Buttonof ALVgrid Output?

    Hi Guys,
                Can anybody tell me how to insert columns in Column Set of Change Layout Button.My Reuireemnt is i Have to display the Basic Layout and have to provide the other fields in the "Columnset" in Change Layout which will be displayed when u clcik the Change Layout button in the ALV Grid Output screen. so that user can select based on their usage.
              Please Very Urgent.
    Thanks,
    Gopi.

    You can try this ... which field you dont want to show in the fieldcatalog you can use
    fieldcat-fieldname = 'F1'.
    fieldcat-no_out  = 'X'
    ( suppose F1 field you dont want to show).
    But it will appear when user click on the change layout button.
    regards
    shiba prasad dutta

  • In ALV- Save layout is not holding sorting values..

    hello expert.
    in ALV-> Change Layout -> filter Material -> 89* and save as default.
    but not working when i execute the 2nd time from starting onwards..!
    my alv is able to save screen but not filtering values .
    my alv unable to hold filter value as default setting.
    could you please help me out.
    thank you,
    with best regards
    srinivas rathod

    Hi
    Save personalization is for saving variables not for saving layout. If you are doing any changes to layout you can directly save by clicking save button.
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/45/6f6b52f5981c91e10000000a11466f/frameset.htm
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/01/42c73c13b0ce5be10000000a114084/frameset.htm
    Regards
    Ravi
    Edited by: Ravi Naalla on Apr 3, 2009 3:47 AM
    Edited by: Ravi Naalla on Apr 3, 2009 3:49 AM

Maybe you are looking for

  • Upload file without using upoad ui elem

    HI, I have requirement where in I will have the file links in the table.On selecting the file link and clicking on a button, file content should be uploaded. e.g. I have file lins as 1) c:/docs/test.doc                                    2)c:/docs/te

  • Yesterday all web sites were fine, now some websites are fine, some are slow, some do not look correctly

    I am using a Dell inspiron 1525, running Windows XP, Firefox 5.0 both OS and Firefox have the latest patches and fixes applied. Yesterday all websites were loading, responding and appearing properly. Today some are working properly and some are slow

  • Administrator role

    Hi, I have just installed Contribute CS3 a day ago, and have been getting to grips with it. I won't need any other 'writers' or 'publishers', just the one Administrator role, but I would like it to ask for a password sometime before it allows me (or

  • Update Boot Image Issues

    Environment:  SCCM 2012 SP1 CU3 Issue:  errors when trying to update distribution points (Driver Additions) Error Message:   Error: Boot image to update: • Microsoft Windows PE (x64)   Error: Actions to perform: • Add ConfigMgr binaries • Disable Win

  • WRT54G Problems with internet, help, used to be fine on old router

    Hello, I've bought this router yesterday and have 4 major problems with it ( I've had a cheap router before this and all these problems didn't occur when I use that old router again): 1: I can't access some sites like gamershell or nvidia.com, while