2009 Feb 06 4:31 PM
Guru,
I am displaying on ALV using class. I have some toolbar in out put.
Could you pls tell me how to disable them.
Thanks,
Sandeep Garg
2009 Feb 06 4:34 PM
copy the standard PF-status "Standard" and make changes to it and use it in ur code..
2009 Feb 06 4:34 PM
copy the standard PF-status "Standard" and make changes to it and use it in ur code..
2009 Feb 06 5:06 PM
SET PF-STATUS 'XYZ' EXCLUDING 'WHAT BUTTON U WANT TO DISABLE(FUNCTION-CODE).
2009 Feb 06 5:13 PM
Hi,
Use this code to disable standard buttons from alv toolbar, its working:-
*FOR EXCLUDING STANDARD BUTTON FROM ALV TOOLBAR
DATA : it_exclude TYPE slis_t_extab,
wa_exclude TYPE slis_extab.
*&---------------------------------------------------------------------*
* FOR EXCLUDING STANDARD BUTTONS FROM ALV TOOLBAR
*&---------------------------------------------------------------------*
wa_exclude-fcode = '&OUP'.
APPEND wa_exclude TO it_exclude.
CLEAR wa_exclude.
wa_exclude-fcode = '&ODN'.
APPEND wa_exclude TO it_exclude.
CLEAR wa_exclude.
wa_exclude-fcode = '&OAD'.
APPEND wa_exclude TO it_exclude.
CLEAR wa_exclude.
wa_exclude-fcode = '&INFO'.
APPEND wa_exclude TO it_exclude.
CLEAR wa_exclude.
*--similarly append other function codes of the buttons that you want to exclude
*--and pass this internal table to FM REUSE_ALV_GRID_DISPLAY
*&---------------------------------------------------------------------*
* DISPLAY RECORDS IN ALV GRID
*&---------------------------------------------------------------------*
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = ' '
i_callback_program = rep_id
* i_callback_pf_status_set = 'PF'
i_callback_user_command = 'COMMAND'
i_callback_top_of_page = 'TOP'
* I_CALLBACK_HTML_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_END_OF_LIST = ' '
* I_STRUCTURE_NAME =
* I_BACKGROUND_ID = ' '
i_grid_title = wa_title
* I_GRID_SETTINGS =
is_layout = wa_layout
it_fieldcat = it_field
it_excluding = it_exclude "excule buttons
* IT_SPECIAL_GROUPS =
it_sort = it_sort
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT = 'X'
i_save = 'A'
is_variant = wa_variant
it_events = it_event
* IT_EVENT_EXIT =
* IS_PRINT =
* IS_REPREP_ID =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* I_HTML_HEIGHT_TOP = 0
* I_HTML_HEIGHT_END = 0
* IT_ALV_GRAPHICS =
* IT_HYPERLINK =
* IT_ADD_FIELDCAT =
* IT_EXCEPT_QINFO =
* IR_SALV_FULLSCREEN_ADAPTER =
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = it_ekpo
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
Hope this helps you.
Thanks & Regards,
Tarun Gambhir
2009 Feb 06 5:18 PM
hi,
Your requirement can be achieved this way too.
declare a internal table of type sy-ucomm.
Fill the table with function codes you want to exclude from displaying on the basic list.
Then set pf-status 'MYSTATUS' excluding <internal-table>.
Thanks
Sharath
2009 Feb 06 5:18 PM
Do u want to exclude some buttons in the ALV toolbar ?
Since u are using classes, u have to fill the table parameter IT_TOOLBAR_EXCLUDING
provide the buttons which u want to exclude.