Skip to Content
author's profile photo Former Member
Former Member

Dont know the name of a cl_gui_alv_grid toolbar button !?

Hello to all

I am new to SAP so i have a task to make an additional method to hide these buttons in the picture. The problem is that I dont know the names of these three buttons in the toolbar of the cl_gui_alv_grid. I looked in the attributes of the cl_gui_alv_grid and i was able to find the names for the other buttons (ascending (mc_fc_sort_asc) , descending, export) but not for these three buttons. When i move the mouse over these buttons one of these button is named as "Add Address" and others are insert and remove buttons but they are not the same as insert row or delete rows buttons.

Any suggestion or tip the would really help me. Thank you in advance.

J.

12.JPG (49.2 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Dec 06, 2013 at 04:43 PM

    Hi,

    Set break point after set_table_for_first_display and look in to MT_TOOLBAR attribute of grid , it gives function codes and icon like below

    So from function code and icon we can find name and hide it.

    Regards,

    Sreenivas.


    Capture.PNG (24.2 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 06, 2013 at 04:27 PM

    Hi John,

    DATA: LT_EXCLUDE TYPE UI_FUNCTIONS.

    Hi create one Internal table PT_EXCLUDE and

    LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_COPY_ROW.

    APPEND LS_EXCLUDE TO PT_EXCLUDE.

    LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_DELETE_ROW.

    APPEND LS_EXCLUDE TO PT_EXCLUDE.

    LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_APPEND_ROW.

    APPEND LS_EXCLUDE TO PT_EXCLUDE.

    LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_INSERT_ROW.

    APPEND LS_EXCLUDE TO PT_EXCLUDE.

    LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_MOVE_ROW.

    APPEND LS_EXCLUDE TO PT_EXCLUDE.

    LS_EXCLUDE = '&EXCLALLFC'. " For exclude all the toolbar at once.

    APPEND LS_EXCLUDE TO PT_EXCLUDE.

    CALL METHOD ALV_GRID->SET_TABLE_FOR_FIRST_DISPLAY

    EXPORTING

    IS_LAYOUT = LAYOUT

    IS_VARIANT = VARIANT

    I_SAVE = 'U'

    I_STRUCTURE_NAME = 'I_ALV'

    it_toolbar_excluding = lt_exclude " Pass the excluding table

    CHANGING

    IT_OUTTAB = I_ALV[]

    IT_FIELDCATALOG = FIELDCAT[].

    Regards.

    Nishant Bansal

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 06, 2013 at 04:16 PM

    Will this help you any?

    Neal

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.