2007 Jan 30 1:15 PM
hi friends,
i hav got an urgent issue.
in my alv grid report, i have some unnecessary push buttons in the application tool bar which i need to remove now.
plz note i'm using func modules not OOP.
can you please suggest me something.
Thanks,
Praveen
2007 Jan 30 1:19 PM
hi carry on the declarations like this and in the end when you are declaring ALV GRID display using Function module use IT_EXCLUDING and give the internal table name.
This will solve your problem, dont forget to award points if found helpful
DATA: WA_FCODE TYPE SLIS_EXTAB, "FUN CODE
I_FCODE_EXTAB TYPE SLIS_T_EXTAB,
FORM CHANGE_FCODE.
WA_FCODE = 'PRNT'.
APPEND WA_FCODE TO I_FCODE_EXTAB.
WA_FCODE = '&OAD'.
APPEND WA_FCODE TO I_FCODE_EXTAB.
WA_FCODE = '&AVE'.
APPEND WA_FCODE TO I_FCODE_EXTAB.
WA_FCODE = '&EB9'.
APPEND WA_FCODE TO I_FCODE_EXTAB.
WA_FCODE = '&SUM'.
APPEND WA_FCODE TO I_FCODE_EXTAB.
WA_FCODE = '&UMC'.
APPEND WA_FCODE TO I_FCODE_EXTAB.
WA_FCODE = '&XPA'.
APPEND WA_FCODE TO I_FCODE_EXTAB.
WA_FCODE = '&OMP'.
APPEND WA_FCODE TO I_FCODE_EXTAB.
ENDFORM. "CHANGE_FCODE
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IS_LAYOUT = LAYOUT
IT_FIELDCAT = IT_FIELDCAT
IT_SORT = IT_SORT
I_CALLBACK_PF_STATUS_SET = 'STATUS'
<b> IT_EXCLUDING = I_FCODE_EXTAB </b>
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IT_EVENTS = IT_EVENTS[]
TABLES
T_OUTTAB = IT_VBAK.
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
hi friends,
i hav got an urgent issue.
in my alv grid report, i have some unnecessary push buttons in the application tool bar which i need to remove now.
plz note i'm using func modules not OOP.
can you please suggest me something.
Thanks,
Praveen
2007 Jan 30 1:19 PM
hi carry on the declarations like this and in the end when you are declaring ALV GRID display using Function module use IT_EXCLUDING and give the internal table name.
This will solve your problem, dont forget to award points if found helpful
DATA: WA_FCODE TYPE SLIS_EXTAB, "FUN CODE
I_FCODE_EXTAB TYPE SLIS_T_EXTAB,
FORM CHANGE_FCODE.
WA_FCODE = 'PRNT'.
APPEND WA_FCODE TO I_FCODE_EXTAB.
WA_FCODE = '&OAD'.
APPEND WA_FCODE TO I_FCODE_EXTAB.
WA_FCODE = '&AVE'.
APPEND WA_FCODE TO I_FCODE_EXTAB.
WA_FCODE = '&EB9'.
APPEND WA_FCODE TO I_FCODE_EXTAB.
WA_FCODE = '&SUM'.
APPEND WA_FCODE TO I_FCODE_EXTAB.
WA_FCODE = '&UMC'.
APPEND WA_FCODE TO I_FCODE_EXTAB.
WA_FCODE = '&XPA'.
APPEND WA_FCODE TO I_FCODE_EXTAB.
WA_FCODE = '&OMP'.
APPEND WA_FCODE TO I_FCODE_EXTAB.
ENDFORM. "CHANGE_FCODE
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IS_LAYOUT = LAYOUT
IT_FIELDCAT = IT_FIELDCAT
IT_SORT = IT_SORT
I_CALLBACK_PF_STATUS_SET = 'STATUS'
<b> IT_EXCLUDING = I_FCODE_EXTAB </b>
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IT_EVENTS = IT_EVENTS[]
TABLES
T_OUTTAB = IT_VBAK.
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
2007 Jan 30 1:35 PM
2007 Jan 30 1:47 PM
Hi ,
you can try following steps.
1. First step is to copy the STANDARD GUI status of the standard program SAPLKKBL using SE90 transaction.
2. Execute the transaction and the next screen will show the STANDARD GUI status with a checkbox corresponding to it. Select the checkbox and click on GUI STATUS-> Copy.
3. The third step is to enter the Z Program and the name of the GUI status which will be the copy of the STANDARD one and click on COPY button. Now a GUI status will be created for the Program you have entered.
4. We can edit the status to add/remove icons .
6. In order to add/remove the functionality of the Icon added/removed, we pass the status YICON when we call the 'REUSE_ALV_GRID_DISPLAY' along with the callback_user_command USER_COMMAND_REF.
DATA: ws_title TYPE lvc_title, Grid Title
wa_layout TYPE slis_layout_alv. Grid Layout
DATA: i_fieldcat TYPE slis_t_fieldcat_alv. Grid Fieldcat
*---I_FINAL is an internal table which contains the values to be
*---displayed in the ALV Grid
*----
Display ALV GRID
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_REF'
i_grid_title = ws_title
is_layout = wa_layout
it_fieldcat = i_fieldcat
TABLES
t_outtab = i_final[]
EXCEPTIONS
program_error = 1
OTHERS = 2.
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 set_pf_status.
FORM set_pf_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'YICON'.
ENDFORM. " set_pf_status
*----
Form user_command_ref.
FORM user_command_ref USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
DATA: lws_okcode TYPE sy-ucomm.
IF r_ucomm EQ .
ENDIF.
CLEAR lws_okcode.
lws_okcode = sy-ucomm.
*----
BACK
CASE lws_okcode.
WHEN '&F03'.
SET SCREEN 0.
LEAVE SCREEN.
ENDCASE.
ENDFORM. " user_command_ref
2007 Jan 30 1:56 PM
sorry friends,
you didn't understand the question.
i need to change the code to fulfil this.
Plz help...
Thanx.....
2007 Jan 30 2:31 PM
Hi praveen,
i do it like this:
WA_EXTAB TYPE SLIS_EXTAB,
EXTAB TYPE SLIS_T_EXTAB,
*
WA_EXTAB-FCODE = '&ETA'.
APPEND WA_EXTAB TO EXTAB.
WA_EXTAB-FCODE = '&SUM'.
APPEND WA_EXTAB TO EXTAB.
*
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = PROGNAME
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
IS_LAYOUT = LAYOUT
IT_FIELDCAT = FIELDCAT
IT_EXCLUDING = EXTAB
IT_SORT = SORT
I_SAVE = 'A'
IT_EVENTS = GT_EVENTS
IT_EVENT_EXIT = EVENT
IS_PRINT = PRINT
TABLES
T_OUTTAB = ITAB
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
*
if it's not your real problem, can you tell wich codes/buttons you will
have to dissaperead?
regards, Dieter
2007 Feb 06 10:42 AM
got that thru the parameter callback_status in the FM reuse_alv_grid_display
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |