ADD_CHOICE to standard BUTTON_CHOICE in ALV Toolbar

Hello Experts,
I want to add additional choice to a standard Button_Choice in the ALV Toolbar.
I was able to get reference of the standard function (of type cl_salv_wd_function_std). However, to solve my purpose I would need the reference of the UI Element Button_Choice (perhaps of type CL_SALV_WD_FE_A_BUTTON_CHOICE) so that I can ADD_CHOICE.
Thanks and best regards,
Abir

Hi Abir,
For button choice help please refer this..
About cl_salv_wd_fe_button_choice........
Re: Help on Button Choice of alv tool bar
Cheers..
Kris.
Edited by: kissnas on Feb 23, 2011 2:03 PM

Similar Messages

  • How to display standard ALV toolbar function in Webdynpro ABAP

    Hi All,
    Could any one please let me know that how to display the standard ALV functions. What I tried is as follows:
    data :lr_config_table type ref to cl_salv_wd_config_table.
    data lr_function type ref to cl_salv_wd_function_std
    Got the reference by calling the get_model().
    Now tried to display a standard button say :
      CALL METHOD lr_config_table ->if_salv_wd_function_settings~get_function_std
        EXPORTING
          id    = 'SALV_WD_INPUT_INSERT_ROW'
        RECEIVING
          value = lr_function.
      CALL METHOD lr_function->set_visible
        EXPORTING
          value = cl_wd_uielement=>e_visible-visible.
    But I can't see the button added to my ALV toolbar! Could any one please help me out on this if I am missing something.
    Many Thanks!
    Somnath

    Hi..
    ALV report which when displayed normally allows users to insert and delete rows using the methods below from class Cl_Salv_Wd_Config_Table:
    I think add these lines to your code and check..
    IF_SALV_WD_TABLE_SETTINGS~SET_READ_ONLY (false)
    IF_SALV_WD_STD_FUNCTIONS~SET_EDIT_INSERT_ROW_ALLOWED (true).
    DATA: l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
      l_ref_cmp_usage =   wd_this->wd_cpuse_alv_basic( ).
      IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
        l_ref_cmp_usage->create_component( ).
      ENDIF.
      DATA l_salv_wd_table TYPE REF TO iwci_salv_wd_table.
      l_salv_wd_table = wd_this->wd_cpifc_alv_basic( ).
      DATA l_table TYPE REF TO cl_salv_wd_config_table.
      l_table = l_salv_wd_table->get_model( ).
      l_table->if_salv_wd_table_settings~set_read_only( abap_false ). 
      l_table->if_salv_wd_std_functions~set_edit_append_row_allowed( abap_false ).
      l_table->if_salv_wd_std_functions~set_edit_insert_row_allowed( abap_false ).
      l_table->if_salv_wd_std_functions~set_edit_delete_row_allowed( abap_false ).
    Cheers,
    Kris.

  • How to code in the standard refresh button in ALV toolbar

    Hi Experts,
    My ALV includes some standard toolbar buttons like refresh, select all, sort, and etc. How can I put logic into the refresh button such that when user click on the refresh button, I want to run some logic on my own?
    THanks in advance.

    Hi again,
    1. Further to my previous reply
    2. This code will make it clear.
    3. just copy paste
    a. Before that, copy the SALV Standard Toolbar to ABCD as suggested before.
    <b>Important & Relevant code has been marked in bold.</b>
    4.
    report abc.
    type-pools : slis.
    Data
    data : itab like t001 occurs 0 with header line.
    DATA : fc type SLIS_T_FIELDCAT_ALV.
    Logic
    select * from t001 into table itab.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
      EXPORTING
        I_PROGRAM_NAME         = sy-repid
        I_INTERNAL_TABNAME     = 'ITAB'
        I_INCLNAME             = SY-REPID
      CHANGING
        CT_FIELDCAT            = fc
      EXCEPTIONS
        INCONSISTENT_INTERFACE = 1
        PROGRAM_ERROR          = 2
        OTHERS                 = 3.
    Display
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
       I_CALLBACK_PROGRAM             =  SY-REPID
    <b>   I_CALLBACK_PF_STATUS_SET       = 'MYSTATUS '</b>
    <b>   I_CALLBACK_USER_COMMAND        = 'MYFORM'</b>   IT_FIELDCAT                    = FC
      TABLES
        T_OUTTAB                       = ITAB
    EXCEPTIONS
       PROGRAM_ERROR                  = 1
       OTHERS                         = 2
    <b>
    IMPORTANT
    This sets the PF Status on ALV Screen
    And not Selection screen
    FORM MYSTATUS USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'ABCD'.
    ENDFORM.                    "MYSTATUS
    IMPORTANT
    When Fcode is pressed on ALV Toolbar
    FORM MYFORM USING r_ucomm LIKE sy-ucomm
                                       rs_selfield TYPE slis_selfield.
      IF R_UCOMM = 'ZREFRESH'.
    *----CODE
      ENDIF.
    ENDFORM.                    "MYFORM</b>
    regards,
    amit m.

  • 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'.

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

  • ALV Toolbar related Query

    Hi,
    When using FM 'REUSE_ALV_GRID_DISPLAY'
    Exporting Parameters : I_CALLBACK_PF_STATUS_SET 
    in SET PF Status Creating additional Buttons.
    In ALV Report output addition  additional buttons are coming
    but Standard ALV Toolbar are missing like Sort Assending ,Descending,Total,Subtotal,
    Layouts.
    Please give any Suggestions for Standard toolbar as well as additional buttons to display
    by using FM 'REUSE_ALV_GRID_DISPLAY'.
    Thanks,
    Manish

    Hi,
    Check this subroutine in example program :
    BCALV_TEST_FULLSCREEN_CALLS
    form f01_event_pf_status_set using rt_extab type slis_t_extab.
      set pf-status 'STANDARD_FULLSCREEN' excluding rt_extab.
    endform.                   " f01_event_pf_status_set
    regards,
    Advait

  • 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

  • Column-clipping behavior of FIND from SAP-delivered ALV toolbar

    I have an ALV display whose rows start with three short columns followed by one pretty long column.
    The customers want to use the FIND button from the standard SAP ALV toolbar to search for substrings in the text that's in the long column.
    The find is working fine, but when the result is displayed, the layout is clipped so that only the long text column shows.  Furthermore, you can't window to see the three leading columns - it's like a different display.
    Is there an SAP-delivered parameter that will successfully tune this behavior so that the result of the FIND uses the original layout?
    If not, has anyone written a custom FIND implementation that will not behave this way ???
    Thanks
    djh

    I've learned that this can be eliminated by right-clicking the ALV container anywhere and selecting "optimize width".
    I've started a separate question about whether this option can be preset.
    Dave

  • Creation of icon in alv toolbar

    Hi All,
    i need to create a icon in alv toolbar.
    But i have not created any 'Z' program.
    i have created one function module, through that function module i am displaying the ALV grid.
    when i am copying the standard pf-status it is asking for program name. but i am using only the function module.
    pls help me on this for creating the icon in alv toolbar.
    thanks in advance.

    Hello Aishvarya,
    Perhaps the code below will help guide you along.
    FUNCTION z_alv_screen .
    *"*"Local Interface:
    *"  CHANGING
    *"     REFERENCE(ITAB) TYPE  ZSFLIGHT_TT
      DATA: gr_table TYPE REF TO cl_salv_table.
    * ALV
    *... Create Instance
      TRY.
          CALL METHOD cl_salv_table=>factory
            IMPORTING
              r_salv_table = gr_table
            CHANGING
              t_table      = itab[].
        CATCH cx_salv_msg.
      ENDTRY.
      gr_table->set_screen_status(
                  pfstatus      =  'SALV_STANDARD'
                  report        = 'SAPLZRAE'
                  set_functions = gr_table->c_functions_all ).
    *... Display Table
      gr_table->display( ).
    ENDFUNCTION.
    Edited by: Rae Ellen Woytowiez on Mar 21, 2011 5:17 PM

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

  • Add a button choice on alv toolbar in wda

    Hello Experts,
    I want add a button choice on alv toolbar. I already insert the choice button indeed I see the button correctly.
    Now I want insert the list of action with the following code:
    <<
    >>
    With this code my web-interface retuns this message: "500 SAO INTERNAL SERVER ERROR. ERROR ACCESS via null object reference not possible. (termination rabax_state)". The dump is in "cl_wdr_utilities=>construct_mime_url".
    Do you have any ideas? Do you have any examples?
    Thanks in advance.
    Best Regards,
    Marino

    Hello,
    the problem isn't "the line set_image_source". The problem was the order, the correct order is:
    <<
    CREATE OBJECT lr_button_choice.
         lr_button_choice->set_image_source( 'ICON_CHANGE' ).    "#EC *
         lr_button_choice->set_text( value = 'Modifica' ).
         lr_button_choice->set_tooltip( value = 'Modifica Attributi').
    CREATE OBJECT lr_menu_action_item
           EXPORTING
             id = 'MOD_NOTE'." TYPE REF TO cl_salv_wd_menu_action_item.
         lr_menu_action_item->set_text( 'Note').
         lr_button_choice->add_choice( EXPORTING  value = lr_menu_action_item ).
         CREATE OBJECT lr_menu_action_item
           EXPORTING
             id = 'MOD_CONTO'." TYPE REF TO cl_salv_wd_menu_action_item.
         lr_menu_action_item->set_text( 'Conto').
         lr_button_choice->add_choice( EXPORTING  value = lr_menu_action_item ).
         lr_function = wd_this->salv_incassi->if_salv_wd_function_settings~create_function( id = 'MOD')."creating the function for alv button
         lr_function->set_editor( lr_button_choice ).
    >>
    Thanks very much.
    Best Regards,
    Marino

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

  • Make self defined function on ALV toolbar invisible

    Hello Experts,
    I have defined a self defined function dropdown on standard ALV toolbar on the Lead select event  and defined the function too.
    But I want at some condition the dropdown should disappear. How can I set the drop down on the ALV toolbar to invisible.
    Please suggest.
    Thanks and Best Regards,
    Sahil

    While defining the drop down, just bind the visible property to a context node attribute of type WDUI_VISIBILITY and set it based on your requirement.
    Manas Dua

  • Read alv toolbar print button

    Hi SDNers,
    I would like to capture the ucomm when user clicks on print button which is on ALV grid toolbar(used classes to display alv).
    I can able to capture user defined button on alv tool bar, along with user defined, standard button are there. I need to read user command text when user clicked on print button on the alv toolbar.
    Kindly let me know which class and wher i need to use the same to read the print button.
    Thanks in advance,
    Regards,
    Sridhar

    hii
    Thanks for the reply yes i already seen that which does'nt match my requirement.Can you tell me anyother class.
    regards,
    Sri.

  • Adding a Pushbutton on ALV toolbar

    Hi ,
    I wanna add a pushbutton to my ALV report toolbar, I have tried by screen painter(se51) but its not working. That is when you open the screen painter its showing the  push button, but when you run the screen as transaction its not showing that button. 
    Any help is greatly appreciated.
    Regards
    Moderator Message: Please search before posting your question. Thread locked.
    Edited by: Suhas Saha on Oct 18, 2011 3:40 PM

    Hi Harsh,
    To add button in the ALV toolbar, follow the below steps :
    1. Open Functional group SALV in se80 and copy the GUI status 'STANDARD' in customer namespace ( for e.g. ZSTANDARD'  to your ALV report program.
    2. Once you copy the GUI status, open your ALV report program in se80 and modify it's GUI status 'ZSTANDARD' according to your requirement.
    3. Code accordingly in your ALV report program.
    Here is the below code for your reference.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = g_repid
          i_callback_pf_status_set = alv_status_set
          i_callback_user_command  = *alv_user_comm*
          i_grid_title             = grid_title
          i_save                   = g_save
          is_variant               = gs_variant
          is_layout                = alv_layout
          it_fieldcat              = alv_fieldcat[]
          it_events                = gt_events[]
          it_sort                  = alv_sort[]
        IMPORTING
          e_exit_caused_by_caller  = g_exit_caused_by_caller
          es_exit_caused_by_user   = gs_exit_caused_by_user
        TABLES
          t_outtab                 = it_final[].
      PERFORM *alv_user_comm* USING r_ucomm
                                  rs_selfield.
    FORM *alv_user_comm*  USING    r_ucomm     LIKE sy-ucomm
                                 rs_selfield TYPE slis_selfield.
    r_ucomm = sy-ucomm.
      CASE r_ucomm.
      ENDCASE.
    ENDFORM.
    Let us know if you still having some issues.
    Cheers
    VJ

Maybe you are looking for

  • How do I remove a "calendar" from the iPhone?

    I have a First Gen iPhone with up to date software. I recently deleted a calendar from my MacBookPro and that calendar won't delete from the iPhone. I used to have three calendars in iCal which synced to the iPhone. One was my home calendar, one was

  • Cd/mp3 player was not playing all tunes burned to disk

    Got my Mojo workin'. That's a TDK "Mojo" CD-MP3 Digital Jukebox. Sit back and relax while I tell of my Grand Journey of Exploration. (There is a question below too.) I had made a some iTunes playlists of MP3s, and decided to burn them on CD-R disks f

  • Blue screen only & doesn't recognise install CD

    Hi, It's been a bit of a saga so far, so a quick recap: Had problem with CD stuck in drive and operating system crash. Got CD out and operating system CD in (many thanks), but now it won't re-install. Get through all the process up until point of it

  • Cache measurement in proxy server.

    Hi How can i measure the cache ratio that the proxy is handling? Does WPS provides us with a tool for that? or should I use a third party tool Thanks

  • LV 7.1.1 PDA modules & excel issues

    Hey everybody, i've attached a VI i wrote, all it does is add a number and stores it into an array then i write to a file. I tried changing the extension to .xls for the type of file and then I try to open it with excel in the pda and i get an error