‎2007 Sep 21 1:19 PM
Hi Experts,
I require a small help regarding ALV grid display.
In CL_GUI_ALV_GRID , in the tool bar , when I move from one grid to another for dispalying the output, I want to Exclude the <b> Append</b> and <b>Duplicate</b> row buttons.
As in the case of Subtotals,
<b>ls_exclude = cl_gui_alv_grid=>mc_fc_subtot.
append ls_exclude to pt_exclude.</b>
I require the <b>UI</b> function for <b>APPEND</b> and <b>DUPLICATE</b> rows.
Please treat it as very urgent and important.
I expect valuable suggestions.
Regards
Nagaraj
‎2007 Sep 21 1:27 PM
use the following code to remove the buttons from toolbars......
CREATE OBJECT GV_ALVGRID
EXPORTING
I_PARENT = GV_HISTORYCONTAINER.
CALL METHOD GV_ALVGRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_SAVE = 'X'
IS_LAYOUT = GS_HIST_LAYOUT
IT_TOOLBAR_EXCLUDING = GT_EXCLUDE
CHANGING
IT_OUTTAB = GIT_HISTORY
IT_FIELDCATALOG = GT_HIST_FLDCAT
IT_SORT = GT_SORT_ALV
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.
FORM REMOVE_BUTTONS.
DATA LS_EXCLUDE TYPE UI_FUNC.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_MAXIMUM .
APPEND LS_EXCLUDE TO GT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_MINIMUM .
APPEND LS_EXCLUDE TO GT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_SUBTOT .
APPEND LS_EXCLUDE TO GT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_SUM .
APPEND LS_EXCLUDE TO GT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_AVERAGE .
APPEND LS_EXCLUDE TO GT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_MB_SUM .
APPEND LS_EXCLUDE TO GT_EXCLUDE.
ENDFORM. "REMOVE_BUTTONS
‎2007 Sep 21 1:42 PM
Hi Naresh,
I have the following code prior to this post. I require code only for removing the APPEND ROW and DUPLICATE ROW .
Can u plz. guide me in this regard.
Regards
Nagaraj
‎2007 Sep 22 1:28 PM
Hi Experts,
I have found the UI function for APPEND ROW which is
<b>ls_exclude = cl_gui_alv_grid=>mc_fc_appendrow.
append ls_exclude to pt_exclude.</b>
Similarly, I want the code for <b>DUPLICATE ROW</b>.
Plz. help me in this regard.
Regards
Nagaraj
‎2008 Feb 26 2:41 PM
HI Nagaraj,
Looking at the attributes of class CL_GUI_ALV_GRID I think the attribute for Copy Row is MC_FC_LOC_COPY_ROW.
Your code would look like:
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_copy_row.
append ls_exclude to pt_exclude
Regards,
Roy