How to add 'Save Layout' button when use OO ALV?

thx

Hi,
Try passing this parameter :
<b>
wa_variant-report     = sy-repid.</b>
*-- Display Report
  CALL METHOD o_alvgrid->set_table_for_first_display
    EXPORTING
      it_toolbar_excluding    = lt_excl_func
<b>      is_variant                   = wa_variant</b>
      i_save                        = c_a
      is_layout                    = p_layout
    CHANGING
      it_outtab                     = p_output[]
      it_fieldcatalog               = p_fieldcat[]
    EXCEPTIONS
      invalid_parameter_combination = 1
      program_error                         = 2
      too_many_lines                      = 3
      OTHERS                               = 4.
  IF sy-subrc <> 0.
    MESSAGE i050 WITH text-004.    " Error in Displaying
    LEAVE LIST-PROCESSING.
  ENDIF.

Similar Messages

  • 'Reuse_alv_grid_display' - how to enable save layout button

    Hi,
    am not getting the option 'save layout' button in my ALV. I have tried the following code.
    s_layout-colwidth_optimize = c_on.
    s_layout-zebra = c_on.
    s_variant-report = sy-repid.
    s_variant-username = sy-uname.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    is_layout = s_layout
    it_fieldcat = t_fieldcat
    is_variant = s_variant
    is_save = 'A'
    TABLES
    t_outtab = rt_final
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    Please help.

    Dear Arvind,
    If you are using "REUSE_ALV_GRID_DISPLAY" and not passing "I_CALLBACK_PROGRAM = SY-REPID", You will not be able to save layout.
    So I request all to pass following parameters to save layout.
       CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM = SY-REPID
          IS_LAYOUT                     = WA_LAYOUT
          IT_FIELDCAT                   = IT_FIELDCAT
          I_SAVE                           = 'X'
          IS_VARIANT                    = 'X'
        TABLES
          T_OUTTAB                      = IT_DATA
        EXCEPTIONS
          PROGRAM_ERROR        = 1
          OTHERS                         = 2.
      IF SY-SUBRC <> 0.
    * Implement suitable error handling here
      ENDIF.
    With Regards,
    Tushar Trivedi.

  • 'Save layout' button missing in the ALV report layout screen

    Hi Friends,
         In one of our ALV report the 'save layout' button is missing in the report output screen.i have used the OO concept for creating the ALV output and not the function module.I have attached the code below used for creating the ALV grid.
    CREATE OBJECT alv_grid
          EXPORTING i_parent = g_container_2.
    CALL METHOD alv_grid->set_table_for_first_display
         exporting
                   i_structure_name = 'PA0002'
                   is_layout =
           CHANGING
                     it_outtab = gt_outtab
                     it_fieldcatalog = wa_fieldcat.
    But i'm not able to trace why the 'save layout' button is missing in the output.Can anyone of you help me in sorting out this problem.
    Thanks and Regards,
    Vadivel.

    Pass <u><i><b>A to I_SAVE</b></i></u> parameter. That will give the options to the user to save the layout outs.
    I_SAVE = SPACE
    Layouts cannot be saved.
    I_SAVE = 'U'
    Only user-defined layouts can be saved.
    I_SAVE = 'X'
    Only global layouts can be saved.
    I_SAVE = 'A'
    Both user-defined and global layouts can be saved.
    Regards,
    Ravi
    Note : Please mark all the helpful answers
    Message was edited by: Ravikumar Allampallam

  • 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( ).

  • Save layout Button in Object Oriented ALV

    Hi  gurus,
    I am working on Object Oriented ALV. I am facing one problem when the outpput get shown on the screen the save layout and select layout buttons are not appearing on the application toolbar of alv.
    TRY .
          cl_salv_table=>factory( IMPORTING r_salv_table = g_alv_out
                                   CHANGING t_table      = i_alv ).
        Set status GUI
          g_alv_out->set_screen_status(
              pfstatus      = 'STANDARD'
              report        = sy-repid
              set_functions = g_alv_out->C_FUNCTIONS_ALL ).
           g_columns = g_alv_out->get_columns( ).
        Set new description texts for columns
          PERFORM f_set_column_name USING:
                'LTEXT' text-001 text-001 text-001 space,
                'NAME1' text-002 text-002 text-002 space,
                'TXZ01' text-003 text-007 text-007 space,
                'KWERT' text-004 text-004 text-004 space,
                'WEMNG' text-005 text-010 text-011 space,
                'BALNC' text-012 text-013 text-014 space,
                'AFNAM' text-006 text-008 text-009 space.
          PERFORM f_set_column_name USING 'WEMNG'
                  space space space 'WAERS'.
          PERFORM f_set_column_name USING 'KWERT'
                  space space space 'WAERS'.
        Set column as hotspot
          g_column ?= g_columns->get_column( 'EBELN' ).
          g_column->set_cell_type( g_column->hotspot ).
          g_events = g_alv_out->get_event( ).
          CREATE OBJECT gr_events .
          SET HANDLER gr_events->on_double_click FOR g_events.
        Display report
          g_alv_out->display( ).
        CATCH cx_salv_msg.
      ENDTRY.
    where in the Status  STANDARD I have entered all the buttons includeing these two buttons
    Can you please Help me in solving this issue.
    thanks,
    Vinod.
    Edited by: vinod parhad on Jul 2, 2010 1:35 PM

    data: gr_layout  type ref to cl_salv_layout,
    gr_alv     type ref to cl_salv_table,
    gs_key     type salv_s_layout_key,
    * in your SALV routine.... after FACTORY call
    gs_key-report = sy-repid.
    * User can save layout.
      gr_layout  = gr_alv->get_layout( ). "layouts
      gr_layout->set_key( gs_key ).  "Pass Program Name
      gr_layout->set_save_restriction( cl_salv_layout=>restrict_none ). "User can save
    See also Rich Heilman's excellent tutorials on SALV by searching for SALV Tutorial,
    See also programs named: SALV* for demonstrations of SALV outputs and how to code.
    Edited by: BreakPoint on Jul 2, 2010 1:46 PM add references for tutorials

  • How to add a push button(download) to my ALV Report to download report data

    Hi,
    I developed a normal alv report and now i want to add a push button ex.. download in the report output and then whwnever I am clicking this download button then download functionality will work.Please don't take it as simple from my point of view it is very imp. for me please help me.
    Thanks.

    Hi,
    Please check the below thread
    Re: ADD button to ALV Grid
    Thanks
    Arul

  • How to suppress Save As dialog when using the Close button on an editable pdf

    Environment: Windows 7, SDK 9, Adobe Acrobat Pro X, Visual Studio 2010 Professional
    Summary: when a document is opened for editing using automation, edited, then closed using the "Close" button, the confirmation dialog appears, "yes" is selected and then the "Save As" dialog appears.  It should save without the "Save As" dialog in the same way it does were the document opened from Adobe Acrobat directly.  My question is, is there any flag to set which governs whether the "Save As" dialog appears as part of the close document process.  It is behaving as if the document is read-only upon close. (it isn't)
    This is how the document is opened from C++:
    if(SUCCEEDED(hr = ::CoCreateInstance(__uuidof(Adobe9::Acrobat::CAcroAVDoc), 0, CLSCTX_ALL, IID_IUnknown, (void**)&pUnk))){
    hr = OleRun(pUnk);
    if (SUCCEEDED(hr)){
    if (SUCCEEDED(hr = pUnk->QueryInterface(&pAVDoc))){
    hr = pAVDoc->Open((BSTR)CComBSTR(strPath), strDocName, &bRet);
    Even when the plugin is removed from the plug_ins\AcrobatSDK directory, the behaviour is the same.
    Another reproduction is running the BasicIacVC sample, commenting out all lines from gAcroPdDoc->Close(); in InitInstance() and returning TRUE.  If an editable document is opened using the sample, edited then closed using the "X" button, the confirmation dialog is followed by a "Save As" dialog as if it were a read-only document which it is not.
    Any suggestions would be appreciated.
    Regards,
    Evan

    Yes, it does.  (as long as the pdf has been opened via a COM interface)

  • Please can you explain how to add adobe flash player when using Mozilla ?

    I cannot view videos without them constantly stopping.
    I have been told that I need to use adobe flash player.
    When I try to load this, though, the download will not work.
    A message apprears to say I must turn Mozilla Firefox off.
    Please can you explain how I can get around this ?
    Please note, I am not very good with computers, so it would be good if you can make the instructions as basic as possible.
    Many thanks !
    Trev Stafford
    <sub>edit: removed your mail address from public display, since the only thing it will attract are spam bots. you will be notified per mail once somebody replies to the thread. (philipp)</sub>

    Download the non-IE version of Adobe Flash for your system here:
    https://support.mozilla.org/en-US/kb/keep-flash-up-to-date-and-troubleshoot-problems
    Close the browser, and temporarily disable your anti-virus
    Install the non-IE version of Adobe Flash
    Re-enable anti-virus
    See that you have the current version here
    http://www.adobe.com/software/flash/about/
    replaced unofficial third-party download site link.

  • Oracle Text: How to add/get stopwords list when using Oracle Text world lexer?

    I have a use case that we currently use Oracle Text World Lexer to index and search multilingual documents. As we know that World Lexer does the language auto detection. I would like to know the following questions:
    Is there anyway I can get the current document's language that Oracle Text detected?
    Is there anyway to get the language's stopwords list?
    Any thoughts and points will be appreciated.
    - Charles

    1. If you're using 12c, you can use ctx_doc.policy_languages. (https://docs.oracle.com/database/121/CCREF/cdocpkg011.htm#CCREF24102)
    2. If you want multiple stoplists based on each document's language, you have to use the multi-lexer. For world_lexer, there is one stoplist; since the stoplists are somewhat dynamic (you can add but not remove them), the most accurate way to fetch the list is using ctx_report.describe_index or ctx_report.create_index_script and parse the report.

  • How to add field length constraints when using an existing JavaBean model

    Within our current project we used a O/R mapping tool to generate our JavaBean model. For e.g.
    <b>public class Person{
      private String name; ...getName() ...setName(...)
    }</b>
    The whole model is used within our Web Dynpro project. Now it's a requirement to implement field length constraints. Normally this is no problem using ISimpleType like the following:
    <b>attributeInfo = wdContext.nodePerson().getNodeInfo().getAttribute
    (IPrivate...IPersonElement.NAME);
    ISimpleTypeModifiable type = attributeInfo.getModifiableSimpleType();
    type.setLength(60);</b>
    But we've got an runtime exception that it is not allowed to modify the models datatype:
    com.sap.tc.webdynpro.progmodel.context.ContextException: AttributeInfo
    <b>(Basics.Person.name): must not modify the datatype of a mapped attribute</b>
        at
    com.sap.tc.webdynpro.progmodel.context.AttributeInfo.getModifiableSimpleType
    (AttributeInfo.java:337)
    The question is how could a workaround look like. Or is there nothing like that and we have to build a dictionary type tier upon our JavaBean model. Any ideas ?
    thx,
    s.w.

    Sabine,
    You may:
    1. Import JavaBeans model
    2. Create DDIC type with necessary constarints (string-based, max. length 60)
    3. Open editor for target model class and change type of property.
    See my blog /people/valery.silaev/blog/2005/06/29/apojo--almostplain-old-java-objects-as-model (section "Tweaking model classes") for details.
    Valery Silaev
    EPAM Systems
    http://www.NetWeaverTeam.com

  • How to add a mute button without using the default skin?

    I want to use a mute/unmute button for my current project which does not use the default skin.  I searched the web and found the following solution.
    http://kb2.adobe.com/cps/163/2ed9f163.html
    I followed the instruction and it works fine on single slide. The problem is that it does not carry through the whole project.  If I mute the first slide, the audio is on again on the next slide. My mute/unmute setting doesn't go to the next slide.
    Any one have a solution to this problem? Any help or tips are greatly appreciated.

    Hi there
    Did you pay close attention to step 4?
    Click image to see larger...
    Addtionally, your post reads as if you feel the mute button is only avaliable with the Default playback control set. Note that there are all sorts of options with the supplied playback controls that offer enabling a mute button.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • HOW TO ADD GROUP BY CLAUSE WHEN USING Jbo:Datatable

    Would like to know if there are any provisions for adding a Group by clause so the data shown using DataTable Component cn be grouped.
    eg:
    Currently using DataTable component shows data as shown below.
    Dept Name
    10 ABC
    10 DEF
    10 PQR
    20 XYZ
    20 QQQ
    Can this be done as shown bewlow
    Dept Name
    10 ABC
    DEF
    PQR
    20 XYZ
    QQQ
    Thanks

    Hi Sashi,
    For a bc4j view object, the shape of the result set needs to be consistent. So, there can not be a groupby directly in the result set.
    However, that does not prevent you from inserting a calculated column that performs a similar calculation.
    Another mechanism might be to consider a master detail arrangement of the views where the master contains an aggregation of data from its children. You are then free to access and display this data as you choose.
    Hope this helps,
    Pete

  • How to enable the SAVE LAYOUT button?

    When using CALL METHOD G_ALVGRID_HDR->SET_TABLE_FOR_FIRST_DISPLAY, how do I enable the SAVE LAYOUT push button?
    It shows the Change layout button but does not allow me to save the layout as the SAVE LAYOUT button is not available.
    I am using the following code but it does not show the SAVE LAYOUT button.
      CALL METHOD G_ALVGRID_HDR->SET_TABLE_FOR_FIRST_DISPLAY
        EXPORTING
          I_SAVE                        = L_SAVE
          IS_VARIANT                    = LS_VARIANT
          IS_LAYOUT                     = LS_LAYOUT
          IS_PRINT                      = LS_PRINT
          IT_TOOLBAR_EXCLUDING          = I_EXCLUDE
        CHANGING
          IT_SORT                       = I_SORT_HDR
          IT_OUTTAB                     = I_OUTTAB_HDR[]
          IT_FIELDCATALOG               = I_FCAT_HDR
        EXCEPTIONS
          INVALID_PARAMETER_COMBINATION = 1
          PROGRAM_ERROR                 = 2
          OTHERS                        = 3.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                   WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Pl advise.
    Thanks,
    Ven

    pass the variant and enable is_save = 'A'.
    in my case I had to upgrade the gui also.

  • How to add Change Layout, savelayout, select layout Button to ALV Toolba

    How to add Change Layout, savelayout, select layout Button to ALV Toolbar?
    Moderator message: please (re)search yourself before asking.
    [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers]
    locked by: Thomas Zloch on Sep 10, 2010 10:57 AM

    Variant
    CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
           EXPORTING
                is_variant          = gs_variant
                i_save              = c_save
              it_default_fieldcat =
           IMPORTING
                e_exit              = gf_exit
                es_variant          = gs_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 gf_exit = space.
          cf_varia = gs_variant-variant.
        ENDIF.
      ENDIF.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
        EXPORTING
          i_save        = c_save
        CHANGING
          cs_variant    = gs_variant
        EXCEPTIONS
          wrong_input   = 1
          not_found     = 2
          program_error = 3
          OTHERS        = 4.
      IF sy-subrc NE 0.
        cf_subrc = sy-subrc.
      ENDIF.
    Change Layout, savelayout, select layout Button  pass the value which is in BOLD
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                =  gd_repid
         i_callback_user_command           =  'U_COMMAND'
         i_callback_top_of_page            = 'TOP-OF-PAGE'
                         is_layout                    =  fld_lay
           it_fieldcat                  =  fieldcatalog[]
                       IT_EXCLUDING                  =
                       IT_SPECIAL_GROUPS             =
                       IT_SORT                        =  it_sort[]
         i_default                      = 'X'
         i_save                         = 'A'
         is_variant                     = gs_variant
         it_events                      =  it_event[]
        TABLES
          t_outtab                      =    it_sales
                     EXCEPTIONS
                       PROGRAM_ERROR                     = 1
                       OTHERS                            = 2
    Annasaheb

  • How to add a custom button in WD screen to call a workflow in siebel?

    Hi All,
    We have a requirement to have a custom button at the summary screen(after the rule execution) "Create Opportunity", on clicking on it a new opportunity record should be created in Siebel. As we know the "Save" link calls "PolicyAutomationSaveSession" inbound web service method and saves the information in session table and we can modify the PreSession and PostSession workflows. But we are not sure how it calls the service method and where is the mapping defined.
    Can you please help me on how to add a custom button and how to invoke a workflow in siebel side to implement this requirement?
    Also is there any document which can help me to add a custom button in screen and to add the code behind the button?
    Thanks in advance!!
    Regards,
    Subhradeep

    Subhradeep,
    Closing a Web Determinations window is essentially the same as closing any HTML window. It involves javascript, which you would have to add to the Web Determinations templates.
    Essentially the javascript command to close a window is {{window.close}} or {{top.close}}
    For timing, you might be able to use the setTimeout function of Javascript (see: http://www.w3schools.com/jsref/met_win_settimeout.asp)
    At the risk of exposing exactly how bad my javascript skills are, I have attached a super-simple html fragment, a page that closes itself after 3 seconds. It may help you get started in the right direction. In general closing a window is a fairly dubious activity and is often not permitted by certain browsers. This html page at least works in Internet Explorer.
    <html>
         <head>
         <script language="JavaScript">
              setTimeout(closeMe, 3000);
              function closeMe() {
                   alert("This window will close");
                   top.close();
         </script>
         </head>
         <body><B>This window will close in three seconds</B></body>
    </html>
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • Filter Routine in DTP

    Hi, I created a filter routine in DTP based on Calendar Month but the data selection didn't get filtered when I execute the DTP. Basically I just need to see current month's data. I am not familiar in writting the filter routine. Can someone share wi

  • Iphone 5 screen size , does not expand

    when watching video's etc , it dose'nt expand to full size screen . Some new apps for iphone 5 fill the screen , but old apps don't . Will Apple be updating this issue ? .......... Phil

  • PL/SQL Permission Denied Error

    I am trying to learn how to automate some SQL and in general just new PL/SQL things. Here is my code and the error, what am I doing something wrong ? The code compiled right, and I was able to save the Proc on the server; but when I execute I get err

  • Can you accelerate depreciation on a whole class of fixed assets ?

    Can you accelerate depreciation on a whole class of Fixed Assets, so that they are written down to final Residual Value in one go?

  • I can't find my internal louspeaker in the system, what can I do?

    I have a Mac Book Air from 2009 and I can also not listen to music by earphones