Enable Hotkeys in ALV Toolbar buttons

Hello all..
As you know we can use Hotkeys for Toolbar buttons as described in the below link: http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/b951297a6d2d65e10000000a42189c/frameset.htm
I am not able to see any option in class for ALV Button in the Toolbar. So I just want to know that is there a work-around for enabling Hot-Keys for ALV-Buttons?
Thanks,
Sanket Sethi

Hi,
Even in Netweaver 7.4, the hot key support for ALV buttons were not provided and I don't think it will be added in coming future.
One work around could be, creating a button out side view container( with no text) and assigning the hotkey for that button and call the functionality of ALV on action of that button( which may not be possible for all cases).
Regards,
Kiran

Similar Messages

  • Applying ALV toolbar button funtionality in user developed button .

    Can any body tell me the step by step approch of getting  ALV toolbar button funtionality in user developed button in application toolbar ?  That is i develop one button on application toolbar and on click on this i want any one toolbar button  funtionality  on my developed button . how can i do this?

    Hi,
    To create a button on ALV list display, Like to create a "BACK" button on your ALV tool bar,, you need to first define & create a pf status then call it in your REUSE.. fm,,
    below code will explain you all the things,,
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
            i_callback_program       = sy-repid
            i_callback_pf_status_set = 'SET_PF_STATUS'   
            i_callback_user_command  = 'USER_COMMAND'
            i_grid_title             = text-001
            is_layout                = s_layout
            it_fieldcat              = i_fcat
            i_save                   = lf_save
            is_variant               = s_disvariant
          TABLES
            t_outtab                 = i_pernr[]
          EXCEPTIONS
            program_error            = 1
            OTHERS                   = 2.
    *       FORM USER_COMMAND                                             *
    FORM user_command USING ucomm LIKE sy-ucomm
    selfield TYPE slis_selfield.
      CASE ucomm.
        WHEN 'BACK'.
          leave to screen 0.
      ENDCASE.
    ENDFORM.                    "user_command                              " USER_COMMAND
    * Form Set_pf_status
    * Notes: Called by FM REUSE_ALV_GRID_DISPLAY
    FORM set_pf_status USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'BACK_BUTTON'.
    ENDFORM. "Set_pf_status
    First you shuld to create a GUI status for your screen dispalying the list (For this copy a GUI status from a standard program and paste it in 'BACK_BUTTON')
    then in Application Toolbar ,, Just create a button as BACK ,, Keep the FUNCTION CODE as BACK ..
    I think you got the idea, how to use any GUI for ALV list ..

  • Buttons on ALV toolbar

    Hi all,
    I have developed an ALV Grid with a button SAVE.
    The list that is displayed in ALV  will be saved to ZTABLE when user clicks the SAVE button.
    My requirement is after that , I need to add a DISPLAY to the same ALV GRID TOOLBAR.
    How can I do it? do I have to CALL METHOD g_grid->set_table_for_first_display again?
    Thanks
    MH

    Hello
    The sample report for dealing with ALV toolbar buttons is BCALV_GRID_05.
    I assume that as long as your ALV grid is editable the user should see the SAVE button. As soon as the user has saved the data the grid changes to Display-only (non-editable) and the DISPLAY button should appear.
    If so then you can use method go_grid->IS_READY_FOR_INPUT( ) within the event handler method handle_toolbar.
    The sample report explaining this method is BCALV_EDIT_01.
    Regards
      Uwe
    PS: There is no need to call go_grid->set_table_for_first_display again, simply use go_grid->refresh_table_display.

  • ALV Toolbar Runtime error

    Hi
          i am enhancing one report.i just added some fields like standard price,special procurement,safety stock.i'm displaying the
    report in ALV.my problem is report displaying is fine.but when i click any ALV toolbar buttons like export to local file,print preview.before enhancement,ALV tool bar is working fine.it is showing the runtime error like "The statement strlen(obj) the argument 'obj' can only take a character type data obj.in this case,the operand 'ob' has the non character type".i am unabale to find where exactly error is occuring.. when i start debugger in runtime error 'the cursor going to 'gs_out-hlplen = strlen( <field> ).when i click this one is is showing my standard price value of the first material in ALV like '3367.44'.can anyone suggest on this issue.
    Thanks
    Arjun

    Hi PranavJeeth,
                             this is my field catalog.i'm just showing one field.
                   PERFORM set_field USING:
                          FIELD   SHORT TEXT   LONG TEXT             OUTLEN  TYP FMT SUM HID
                          'STPRS' 'STD.PRICE ' 'STANDARD PRICE      ' '00011'    'P'   ' '        ' '     ' ',
    FORM set_field USING pv_fieldname TYPE c
                         pv_descr_s   TYPE c
                         pv_descr_m   TYPE c
                         pv_length    TYPE c
                         pv_inttype   TYPE c
                         pv_format    TYPE c
                         pv_sum       TYPE c
                         pv_hide      TYPE c.
      CLEAR gw_fieldcat.
      gw_fieldcat-fieldname = pv_fieldname.
      gw_fieldcat-seltext_s = pv_descr_s.
      gw_fieldcat-seltext_m = pv_descr_m.
      gw_fieldcat-outputlen = pv_length.
      gw_fieldcat-inttype   = pv_inttype.
      gw_fieldcat-no_out    = pv_hide.
    CASE pv_format.
    *-- Prices must have corresponding currency for format purposes
      If no currency field is needed (fixed currency), use
      GW_FIELDCAT-CURRENCY instead of GW_FIELDCAT-CFIELDNAME
        WHEN 'P'.                           " prices
          gw_fieldcat-currency   = 'MYR'.
          gw_fieldcat-do_sum     = pv_sum.
                                               when i excute report is ok.but when we clcik on alv toolbar runtime error occuring.when i run debugger,the code like this
    if gs_fc-tech_form ne 99.
    gs_out-hlplen = strlen( <field> ).
    endif.
       when i click on field the values like this
         <field> = 100
         gs_fc-tech_form  = 90.
                 please suggest on this issue.

  • How to trap Append row fcode from ALV toolbar in OOPS approache

    Hi
    1. I would like trap the function code for ALV toolbar button like APPEND row and Delete row etc. Please let the procedure for that or may be if somebody can tell me that how do what logic is being  followed while appending a line to the grid using "Insert Row" in BCALV_TEST_GRID_EDITABLE program.
    2. My is editable ALV grid, if i pressing the delete button from the keyboard then it is deleting the from the ALV.I would like to prevent from not deleting the rows.
    Thanks
    Suruchi

    how did you resolve it?
    thank in advance.

  • Enable User Defined toolbar button on click -  editable alv grid using oops

    Hi all,
    I  have created editable alv using  oops concept.
    created 2 user defined toolbar button save and print using method toolbar
      ls_toolbar-text      = 'Print'.                         "#EC NOTEXT
        ls_toolbar-quickinfo = space.
        ls_toolbar-checked   = space.
        APPEND ls_toolbar TO e_object->mt_toolbar.
    requirement is
    initially print button should be disabled, and save enabled
    when i click save button, print button should be enabled.
    I want coding in editable alv oops concept
    kindly help
    regards
    senthil kumar

    Halo Senthil,
    You should call set_toolbar_interactive method of cl_gui_alv_grid in the on_user_command( ie the event handler for event user command) .
    method on_user_command.
    case e_ucomm.
    when 'SAVE'. or whatever your function code is .
    my_save_flag = 'X'.
    call method grid->set_toolbar_interactive.
    endmethod.
    This triggers the toolbar event of the
    cl_gui_alv_grid. Inside the eventhandler method ( ie the on_toolbar method ) you should set the toolbar.
    if my_save_flag = 'X'.
    read table e_object->mt_toolbar
    clear l_toolbar-disabled.
    modify e_object->mt_toolbar.
    endif.
    e_ucomm will not have  the function code if the save button is not in the toolbar area.
    then you can set the my_save_flag in the data_changed event handler of the Cl_gui_alv_grid.
    Regards
    Arshad

  • In OO Alv toolbar, sum and subsum buttons are disable as default, WHY ?

    i want to enable sum and subsum buttons in alv toolbar. However, as default those buttons are disable. How can i solve ?

    i defined ref_table and ref_field for quantity field in fieldcat  such as  
    ls_fcat-ref_table = 'V03RB'.
    ls_fcat-ref_field = 'KWMENG'.
    so i solve it. thank you for your help.

  • Hotkeys for ALV Buttons?

    Hi experts (from SAP),
    I read the documentation about HOTKEYS (http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/b951297a6d2d65e10000000a42189c/frameset.htm) and I'm wondering why the HOTKEYS are not supported for ALVs respectively for Buttons which trigger ALV-Functions.
    In my mind i thought, that the implementing class of a button should be the same (which obviously is not), not dependig in which UI Element it is used?
    So my question is, is there a work-around for enabling Hot-Keys for ALV-Buttons and/or is SAP going to support HOTKEYS for ALVs in a later on release?
    Best regards.
    Volker

    Hello,
    I'm using this code in my program but still I'm getting error I get a null pointer exception. Is it that I forgot to reference any object or what. can you please help me
    wPanel is my JPanel
    hotKeyAction is my class where I have extended Abstract action
    JRootPane rootPane = wPanel.getRootPane();
    ActionMap parentActionMap = rootPane.getActionMap();
    ActionMap am = new ActionMap();
    am.setParent(parentActionMap);
    am.put("openClFrame",new hotKeyAction());
    rootPane.setActionMap(am);
    InputMap parentInputMap = rootPane.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
    ComponentInputMap im = new ComponentInputMap(wPanel.getRootPane());
    im.setParent(parentInputMap);
    im.put(KeyStroke.getKeyStroke("F1"), "openClFrame");
    rootPane.setInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, im);
    Best Regards,
    Sreedhar

  • Add on custom button to ALV toolbar in std tcode ME51N, ME52N and ME53N.

    Hi All,
    I have the requirement to add on the custom button to ALV toolbar in ITEM OVERVIEW for standard transaction ME51N, ME52N and ME53N. Does anyone know what enhancement point or user exit i should apply and how i can add on the custom button?
    Thanks.

    There are no user exits or badi's for COOIS. You may have to make copy of the PPIO_ENTRY to ZPPIO_ENTRY including all the varians without changing their names like copy SAP&COOIS to SAP&COOIS. Create a T-Code ZCOOIS and replace COOIS in variant SAP&COOIS to ZCOOIS not in the name of the variant but in the field "Check Authorization for".
    The PF-Status is found in the include LCOISOUTPUTF16 which is located in the function group COISOUTPUT you may have to copy that too. Finally you need to copy SAPLCOISOUTPUT with its GUI status GENERAL and add your custom button there.

  • Menu Button in ALV toolbar (multiple choices for a button)

    Hi abapers,
    I would like to have a button with multiple choices in the toolbar;
    at the moment I have created a menu button with just one function.
    Here is my code:
    CLASS lcl_event_receiver (Definition)
    CLASS lcl_event_receiver DEFINITION.
      PUBLIC SECTION.
        METHODS:
        handle_toolbar
            FOR EVENT toolbar OF cl_gui_alv_grid
                IMPORTING e_object e_interactive.
    ENDCLASS.                    "lcl_event_receiver DEFINITION
    CLASS lcl_event_receiver (Implementation)
    CLASS lcl_event_receiver IMPLEMENTATION.
      METHOD handle_toolbar.
        DATA: ls_toolbar  TYPE stb_button.
    *Separator
        CLEAR ls_toolbar.
        MOVE 3 TO ls_toolbar-butn_type.
        APPEND ls_toolbar TO e_object->mt_toolbar.
    *Button
        CLEAR ls_toolbar.
        MOVE 1 TO ls_toolbar-butn_type.
        MOVE 'EDIT' TO ls_toolbar-function.
        MOVE icon_change TO ls_toolbar-icon.
        MOVE ' Modifica'(l02) TO ls_toolbar-text.
        MOVE ' ' TO ls_toolbar-disabled.
        MOVE 'Modifica' TO ls_toolbar-quickinfo.
        APPEND ls_toolbar TO e_object->mt_toolbar.
      ENDMETHOD.                    "handle_toolbar
    ENDCLASS.                    "lcl_event_receiver IMPLEMENTATION

    hi,
    check this code and reward me if it helps you..
    TYPE-POOLS : slis,icon.
    *Structure declaration for tcodes
    TYPES : BEGIN OF ty_table,
            tcode TYPE tcode,
            pgmna TYPE progname,
            END OF ty_table.
    *Structure for tocde text
    TYPES : BEGIN OF ty_itext,
            tcode TYPE tcode,
            ttext TYPE ttext_stct,
            sprsl TYPE sprsl,
            END OF ty_itext.
    *Structure for output display
    TYPES : BEGIN OF ty_output,
            tcode TYPE tcode,
            pgmna TYPE progname,
            ttext TYPE ttext_stct,
           END OF ty_output.
    *internal table and work area declarations
    DATA : it_table TYPE STANDARD TABLE OF ty_table INITIAL SIZE 0,
           it_output TYPE STANDARD TABLE OF ty_output INITIAL SIZE 0,
           it_ittext TYPE STANDARD TABLE OF ty_itext INITIAL SIZE 0,
           wa_table TYPE ty_table,
           wa_output TYPE ty_output,
           wa_ittext TYPE ty_itext.
    *Class definition for ALV toolbar
    CLASS:      lcl_alv_toolbar   DEFINITION DEFERRED.
    *Declaration for toolbar buttons
    DATA : ty_toolbar TYPE stb_button.
    Data declarations for ALV
    DATA: c_ccont TYPE REF TO cl_gui_custom_container,   "Custom container object
          c_alvgd         TYPE REF TO cl_gui_alv_grid,   "ALV grid object
          it_fcat            TYPE lvc_t_fcat,            "Field catalogue
          it_layout          TYPE lvc_s_layo,            "Layout
          c_alv_toolbar    TYPE REF TO lcl_alv_toolbar,           "Alv toolbar
          c_alv_toolbarmanager TYPE REF TO cl_alv_grid_toolbar_manager.  "Toolbar manager
    *Initialization event
    INITIALIZATION.
    *Start of selection event
    START-OF-SELECTION.
    *Subroutine to get values from tstc table
      PERFORM fetch_data.
    *subroutine for alv display
      PERFORM alv_output.
          CLASS lcl_alv_toolbar DEFINITION
          ALV event handler
    CLASS lcl_alv_toolbar DEFINITION.
      PUBLIC SECTION.
    *Constructor
        METHODS: constructor
                   IMPORTING
                     io_alv_grid TYPE REF TO cl_gui_alv_grid,
    *Event for toolbar
        on_toolbar
           FOR EVENT toolbar
           OF  cl_gui_alv_grid
           IMPORTING
             e_object.
    ENDCLASS.                    "lcl_alv_toolbar DEFINITION
          CLASS lcl_alv_toolbar IMPLEMENTATION
          ALV event handler
    CLASS lcl_alv_toolbar IMPLEMENTATION.
      METHOD constructor.
      Create ALV toolbar manager instance
        CREATE OBJECT c_alv_toolbarmanager
          EXPORTING
            io_alv_grid      = io_alv_grid.
       ENDMETHOD.                    "constructor
      METHOD on_toolbar.
      Add customized toolbar buttons.
      variable for Toolbar Button
          ty_toolbar-icon      =  icon_generate.
        ty_toolbar-butn_type = 0.
        ty_toolbar-text = 'Button1'.
          APPEND ty_toolbar TO e_object->mt_toolbar.
          ty_toolbar-icon      =  icon_voice_output.
        ty_toolbar-butn_type = 0.
        ty_toolbar-text = 'Button2'.
           APPEND ty_toolbar TO e_object->mt_toolbar.
         ty_toolbar-icon      =  icon_phone.
        ty_toolbar-butn_type = 0.
        ty_toolbar-text = 'Button3'.
           APPEND ty_toolbar TO e_object->mt_toolbar.
         ty_toolbar-icon      =  icon_mail.
        ty_toolbar-butn_type = 0.
        ty_toolbar-text = 'Button4'.
           APPEND ty_toolbar TO e_object->mt_toolbar.
       ty_toolbar-icon      =  icon_voice_input.
        ty_toolbar-butn_type = 0.
        ty_toolbar-text = 'Button5'.
         APPEND ty_toolbar TO e_object->mt_toolbar.
      Call reorganize method of toolbar manager to
      display the toolbar
         CALL METHOD c_alv_toolbarmanager->reorganize
          EXPORTING
            io_alv_toolbar = e_object.
       ENDMETHOD.                    "on_toolbar
    ENDCLASS.                    "lcl_alv_toolbar IMPLEMENTATION
    *&      Form  fetch_data
          text
    -->  p1        text
    <--  p2        text
    FORM fetch_data .
    Select the tcodes upto 200 rows from TSTC
       SELECT   tcode
               pgmna
               FROM tstc
               INTO CORRESPONDING FIELDS OF TABLE it_table
               UP TO 200 ROWS
               WHERE dypno NE '0000'.
    *Select the tcode textx
       IF it_table[] IS NOT INITIAL.
         SELECT ttext
               tcode
               sprsl
               FROM tstct
               INTO CORRESPONDING FIELDS OF TABLE it_ittext
               FOR ALL ENTRIES IN it_table
               WHERE tcode = it_table-tcode
               AND sprsl = 'E'.
       ENDIF.
    Apppending the data to the internal table of ALV output
       LOOP AT it_table INTO wa_table.
        wa_output-tcode = wa_table-tcode.
        wa_output-pgmna = wa_table-pgmna.
       For texts
        READ TABLE it_ittext INTO wa_ittext WITH KEY tcode = wa_table-tcode.
        wa_output-ttext = wa_ittext-ttext.
         APPEND wa_output TO it_output.
        CLEAR wa_output.
       ENDLOOP.
       ENDFORM.                    " fetch_data
    *&      Form  alv_output
          text
    -->  p1        text
    <--  p2        text
    FORM alv_output .
    *Calling the ALV
      CALL SCREEN 0600.
      ENDFORM.                    " alv_output
    Calling the ALV screen with custom container
    On this statement double click  it takes you to the screen painter SE51.Enter the attributes
    *Create a Custom container and name it CC_CONT and OK code as OK_CODE.
    *Save check and Activate the screen painter.
    Now a normal screen with number 600 is created which holds the ALV grid. PBO of the actual screen , Here we can give a title and *customized menus
    *&      Module  STATUS_0600  OUTPUT
          text
    MODULE status_0600 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_0600  OUTPUT
    calling the PBO module ALV_GRID.
    *&      Module  ALV_GRID  OUTPUT
          text
    MODULE alv_grid OUTPUT.
    *create object for custom container
      CREATE OBJECT c_ccont
           EXPORTING
              container_name = 'CC_CONT'.
    *create object of alv grid
      CREATE OBJECT c_alvgd
          EXPORTING
              i_parent = c_ccont.
    create ALV event handler
      CREATE OBJECT c_alv_toolbar
        EXPORTING
          io_alv_grid = c_alvgd.
    Register event handler
      SET HANDLER c_alv_toolbar->on_toolbar FOR c_alvgd.
    Fieldcatalogue for ALV
       PERFORM alv_build_fieldcat.
    ALV attributes FOR LAYOUT
      PERFORM alv_report_layout.
       CHECK NOT c_alvgd IS INITIAL.
    Call ALV GRID
       CALL METHOD c_alvgd->set_table_for_first_display
        EXPORTING
          is_layout                     = it_layout
        CHANGING
          it_outtab                     = it_output
          it_fieldcatalog               = it_fcat
        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.
    ENDMODULE.                 " ALV_GRID  OUTPUT
    *&      Form  alv_build_fieldcat
          text
         <--P_IT_FCAT  text
    FORM alv_build_fieldcat.
       DATA lv_fldcat TYPE lvc_s_fcat.
      CLEAR lv_fldcat.
      lv_fldcat-row_pos   = '1'.
      lv_fldcat-col_pos   = '1'.
      lv_fldcat-fieldname = 'TCODE'.
      lv_fldcat-tabname   = 'IT_OUTPUT'.
      lv_fldcat-outputlen = 8.
      lv_fldcat-scrtext_m = 'TCODE'.
      APPEND lv_fldcat TO it_fcat.
      CLEAR lv_fldcat.
       lv_fldcat-row_pos   = '1'.
      lv_fldcat-col_pos   = '2'.
      lv_fldcat-fieldname = 'PGMNA'.
      lv_fldcat-tabname   = 'IT_OUTPUT'.
      lv_fldcat-outputlen = 15.
      lv_fldcat-scrtext_m = 'PROGNAME'.
      APPEND lv_fldcat TO it_fcat.
      CLEAR lv_fldcat.
      lv_fldcat-row_pos   = '1'.
      lv_fldcat-col_pos   = '3'.
      lv_fldcat-fieldname = 'TTEXT'.
      lv_fldcat-tabname   = 'IT_OUTPUT'.
      lv_fldcat-outputlen = 60.
      lv_fldcat-scrtext_m = 'Description'.
      APPEND lv_fldcat TO it_fcat.
      CLEAR lv_fldcat.
    ENDFORM.                    " alv_build_fieldcat
    *&      Form  alv_report_layout
          text
         <--P_IT_LAYOUT  text
    FORM alv_report_layout.
       it_layout-cwidth_opt = 'X'.
       it_layout-zebra = 'X'.
    ENDFORM.                    " alv_report_layout
    PAI module of the screen created. In case we use an interactive ALV or
    *for additional functionalities we can create OK codes
    *and based on the user command we can do the coding.
    *&      Module  USER_COMMAND_0600  INPUT
          text
    MODULE user_command_0600 INPUT.
    ENDMODULE.                 " USER_COMMAND_0600  INPUT
    thanks,
    gupta

  • Issue with custom toolbar button in alv and leave screen

    Hi,
    in one subscreen (say screen 100)i have an alv with custom ADD  toolbar button..so in the user_command event handler ,i call a antoher screen(dialogue)..like if i click on ADD button ,it should display dialogue screen(say 200) and after entering input in dialogue screen i click on CONINUE to retrun to screen 100..problem is for the first time i click on ADD button its working fine ,succesffyuly returned to screen 100...but for the second time i click on add button , i have to click on twice the CONTINUE button to retrun to screen 100..when debuggin i found the user_command event routin is executin twice ..any solution..
    Thanks,
    srini

    Apparently handler is set for every new ALV instance. This you get by executing CREATE OBJECT alv... every time PBO is raised. Ensure you are executing this statement only once duirng program lifetime. Then the system will match event handler only with one ALV instance (executing it once).
    if r_alv is not bound.
       CREATE OBJECT r_alv ...
       SET HANDLER ...
    endif.
    Regards
    Marcin

  • Add a button choice on alv toolbar in wd4a

    Hy everyone i've to add a button choice on alv toolbar. I create a node 'MY_TOOLBAR_FUNCTIONS' where add node and attributes to bind in external mapping in function_elements of alv interface controller.For button_choice I made a node 'CHOICE' and attribute 'WA_VALUE' type string. But the application dumps when create object lr_choice ; the error is WebDynpro Exception: IDs Can Only Contain Characters of Syntactical Character Set .
    May you help me? Thanks in advance.
    data:  ls_choice TYPE ig_componentcontroller=>element_choice,
              nd_choice TYPE REF TO if_wd_context_node,
    nd_choice = nd_my_functions->get_child_node( name = wd_this->wdctx_choice ).
      el_choice = nd_choice->get_element(  ).
    ls_choice-wa_value = '01'.
      APPEND ls_choice TO lt_choice.
      nd_choice->bind_table( lt_choice ).
      DATA:lr_button_choice TYPE REF TO cl_salv_wd_fe_button_choice.
      DATA:lr_choice TYPE REF TO cl_salv_wd_menu_action_item.
      lr_function = l_value->if_salv_wd_function_settings~create_function_right( id = 'MYBUTTONCHOICE' ).
      CREATE OBJECT lr_button_choice.
              EXPORTING
                sel_action_item_elementname = 'CHOICE.WA_VALUE'.
      lr_button_choice->set_text( value = 'Filter' ).
      lr_button_choice->set_tooltip( value = 'Filter').
      lr_button_choice->set_sel_action_itm_elementname( 'CHOICE.WA_VALUE' ).
      CREATE OBJECT lr_choice
        EXPORTING
          id = ls_CHOICE-WA_VALUE.
      lr_choice->set_text( 'Esito Positivo' ).
      lr_choice->set_image_source( value = 'ICON_GREEN_LIGHT').
      lr_button_choice->add_choice( lr_choice ).
      lr_function->set_editor( lr_button_choice ).

    in   CREATE OBJECT lr_choice the object id have to refer to name of node.
      CREATE OBJECT lr_choice
         EXPORTING
           id = 'CHOICE'.

  • Toolbar button/hotkey for "show cover page in two page view" in Acrobat X?

    In Acrobat X, how about make a toolbar button/hotkey for "show cover page in two page view"?  I find toggling this option to be useful for changing up the order of adjacent pages in magazines/books in which a two page spread has to match for a full large picture.  Due to frequent toggling, I would like a button/hotkey for this for easier access.

    Hotkeys for existing menu items are not modifiable, but you can add a scripted button which toggles it with the following code:
    if (layout.substr(-5)=="Right") layout = layout.replace("Right","Left");
    else layout = layout.replace("Left","Right");
    For info on how to add a button with a folder-level script, see the Acrobat SDK documentation. Scripted buttons will appear in a new panel on the tools pane in Acrobat X, not on the tool bar.

  • How to create multiple buttons in ALV Toolbar in Webdynpro ABAP

    Hi all,
    I am trying to create multiple buttons in Webdynpro  ALV toolbar, please go through the code.
    What happening is, second button is replacing the first one.
    DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
       lo_cmp_usage =   wd_this->wd_cpuse_alv_table( ).
       IF lo_cmp_usage->has_active_component( ) IS INITIAL.
         lo_cmp_usage->create_component( ).
       ENDIF.
       DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
       lo_interfacecontroller =   wd_this->wd_cpifc_alv_table( ).
        DATA lv_value TYPE REF TO cl_salv_wd_config_table.
       lv_value = lo_interfacecontroller->get_model(
       DATA lr_buttonui1 TYPE REF TO cl_salv_wd_fe_button.
       DATA lr_buttonui2 TYPE REF TO cl_salv_wd_fe_button.
       DATA button1 TYPE REF TO cl_salv_wd_function.
       DATA button2 TYPE REF TO cl_salv_wd_function.
    **First button
       CREATE OBJECT lr_buttonui1.
       lr_buttonui1->set_text('Button')."setting the text of the button on alv toolbar
       button1 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON')."creating the function for alv button
       button1->set_editor( lr_buttonui1 ).
    **Second button
       CREATE OBJECT lr_buttonui2.
         lr_buttonui2->set_text('Button1')."setting the text of the button on alv toolbar
       button2 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON' )."creating the function for alv button
       button2->set_editor( lr_buttonui2 ).
    How can I overcome this??
    Thanks
    Eshwar

    Hi Eshwar,
    The button Ids are same for both the buttons in your code. You need to change it as BUTTON1, BUTTON2.
    **First button
       CREATE OBJECT lr_buttonui1.
       lr_buttonui1->set_text('Button')."setting the text of the button on alv toolbar
       button1 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON1')."creating the function for alv button
       button1->set_editor( lr_buttonui1 ).
    **Second button
       CREATE OBJECT lr_buttonui2.
         lr_buttonui2->set_text('Button1')."setting the text of the button on alv toolbar
       button2 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON2' )."creating the function for alv button
       button2->set_editor( lr_buttonui2 ).

  • Handling the Standard Toolbar Button click of an ALV

    Hi Experts,
    I have created an ALV grid output using CL_GUI_ALV_GRID with standard buttons(default) on the toolbar. When I click on any of these standard buttons, say '+' button to insert records, my custom program is not hit.
    I know there is a protected event 'TOOLBAR_BUTTON_CLICK' which I tried to handle in my program but it did not work. However, I am able to handle the public event 'DOUBLE_CLICK' of the same class 'CL_GUI_ALV_GRID'.
    So..can anyone tell how to handle this protected event OR how to handle the STANDARD buttons on ALV toolbar so that they hit my custome code.
    Thanks very much.
    Regards,
    Rudresh

    Hello Rudresh
    The point is to "re-define" the standard ok-codes of toolbar buttons:
    " Make toolbar interactive
    CALL METHO go_grid->set_toolbar_interactive( ).  " raises event TOOLBAR
    " Event handler method
    METHOD handle_toolbar.
    * define local data
      DATA: ls_button    TYPE stb_button.
    " Redefine function code
      LOOP AT e_object->mt_toolbar INTO ls_button
                      WHERE ( function = cl_gui_alv_grid=>MC_FC_LOC_INSERT_ROW ).
        ls_button-function = 'MY_FCODE'.  " triggers USER_COMMAND
        MODIFY e_object->mt_toolbar FROM ls_button INDEX syst-tabix.
      ENDLOOP.
    ENDMETHOD.
    Regards
      Uwe

Maybe you are looking for

  • How to create an attribute dimension in Essbase Studio?

    I cannot figure out how to create an attribute dimension using Essbase Studio. The online help states that I need to "Find the Attribute settings grouping in the center" of the member properties dialog box. I suspect that I'm having a problem figurin

  • How do I disable iCloud from my broken iPhone?

    The screen of my iPhone 4 was destroyed and is now perminantly black - as a result I'm now using my old iPhone 3G. My question is - when my friends with iPhones send a text it still goes out to me as an 'iMessage' and because I'm on the 3G I never re

  • Migration questions

    Question no.1 Using GroupWise server migration utility, the default for the post office destination is /var/opt/novell/groupwise/mail. I have created home_ncp volume mounted at /home in Linux server and also mount a volume named GroupWise at /home wh

  • Disconnect user without GUI ?

    Hello, I'll like disconnect all of user in OBIEE during maintenance period. Is it possible to do it by web service, with the command nqcmd, etc? Thank! Edited by: 830315 on Nov 13, 2012 3:42 PM

  • In Pages:  How to change text direction in cell?

    in Pages, I'd like to change the direction of the text in a table I'm creating.  In the first column (one long column -- I've merged the cells) the work is reading left to right.  How do I make it read up and down? Thanks in advance!