05-06-2008 12:57 PM
Hello Gurus, i need to disable the "add new line button" in my editable OO ALV. Will reward points.
05-06-2008 1:28 PM
Hi,
You will need to exclude the functions. Here's how.
code
You need to add the functions to this table which
are to be excluded.
Then send this table thru the method.
DATA: LT_EXCLUDE TYPE UI_FUNCTIONS.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_PRINT.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
CALL METHOD ALV_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
IS_LAYOUT = LAYOUT
IT_TOOLBAR_EXCLUDING = LT_EXCLUDE
IS_VARIANT = VARIANT
I_SAVE = 'A'
I_STRUCTURE_NAME = 'IALV'
CHANGING
IT_OUTTAB = IALV[]
IT_FIELDCATALOG = FIELDCAT[].
Regards,
Shiva.
05-06-2008 1:23 PM
Call METHOD toolbar->delete_button
exporting fcode = 'xxxx'.
There is also on the set for first display..
* Display grid (First)
CALL METHOD grid_action_0108->set_table_for_first_display
EXPORTING
* I_BYPASSING_BUFFER =
* I_BUFFER_ACTIVE =
* I_CONSISTENCY_CHECK =
* I_STRUCTURE_NAME =
* IS_VARIANT =
* I_SAVE =
* I_DEFAULT = 'X'
is_layout = wa_layout_action_0108
* IS_PRINT =
* IT_SPECIAL_GROUPS =
* IT_TOOLBAR_EXCLUDING = "<== Note here.
* IT_HYPERLINK =
* IT_ALV_GRAPHICS =
* IT_EXCEPT_QINFO =
CHANGING
it_outtab = wt_zlmcont
it_fieldcatalog = it_fcat_action_0108
* IT_SORT =
* IT_FILTER =
* EXCEPTIONS
* INVALID_PARAMETER_COMBINATION = 1
* PROGRAM_ERROR = 2
* TOO_MANY_LINES = 3
05-06-2008 1:27 PM
Hi
Check out the program BCALV_EDIT_02 in the SLIS package
Regards
Fareedas
05-06-2008 1:28 PM
Hi,
You will need to exclude the functions. Here's how.
code
You need to add the functions to this table which
are to be excluded.
Then send this table thru the method.
DATA: LT_EXCLUDE TYPE UI_FUNCTIONS.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_PRINT.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
CALL METHOD ALV_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
IS_LAYOUT = LAYOUT
IT_TOOLBAR_EXCLUDING = LT_EXCLUDE
IS_VARIANT = VARIANT
I_SAVE = 'A'
I_STRUCTURE_NAME = 'IALV'
CHANGING
IT_OUTTAB = IALV[]
IT_FIELDCATALOG = FIELDCAT[].
Regards,
Shiva.
05-06-2008 2:29 PM
Thank you Shiva, but can you please tell me where do i find the function names ??
05-06-2008 2:42 PM
In your data area, double click on CL_GUI_ALV_GRID.
Then click on the Attributes Screen. They are listed there with many other things
05-06-2008 2:48 PM