‎2006 Aug 10 9:47 AM
Hi,
How to include icons-- statu,delete and insert in the ALV's display
‎2006 Aug 10 9:48 AM
hi,
in PF-status you have to set the Icons...
handle that icos like this ::
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
I_CALLBACK_PROGRAM = V_REPID
I_CALLBACK_PF_STATUS_SET = 'FRM_PF_STATUS'
I_CALLBACK_USER_COMMAND = 'FRM_USR_COMMAND'
* I_STRUCTURE_NAME =
IS_LAYOUT = WA_LAYOUT
IT_FIELDCAT = IT_FLDCAT[]
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
* IT_SORT =
* IT_FILTER =
* IS_SEL_HIDE =
* i_default = 'X'
* i_save = 'A'
* IS_VARIANT = ' '
* it_events =
* IT_EVENT_EXIT =
* IS_PRINT =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = IT_FINAL_SCMPO
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
*---------------------------------------------------------------------*
* FORM FRM_PF_STATUS *
*---------------------------------------------------------------------*
FORM FRM_PF_STATUS USING T_EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'ZPO' EXCLUDING T_EXTAB .
ENDFORM.Regards
Ashok P
Message was edited by: Ashok Parupalli
‎2006 Aug 10 9:54 AM
‎2006 Aug 10 10:00 AM
Hi, Jami!
You need to have a field in output table of type character 4 (you can use the data element STATUSICON in your structure).
Then you need to declare at the beginning of the program:
INCLUDE <icon>.and you assign value to the field in your output table like:
s_outtab-statusicon = icon_change.If you want to skip this INCLUDE, you run the report SHOWICON to see the codes for particular icon, and then assign value of this code directly, like:
s_outtab-statusicon = '@0Z@'.You can also see the codes if you double-click the <icon> in the INCLUDE <icon> statement.
HTH
Regards,
Igor
‎2006 Aug 10 10:02 AM
if u r using classes then make use of methods as suggested...
to set icons
wa_stb_button-butn_type = 3.
APPEND wa_stb_button TO e_object->mt_toolbar.
the above lines to be included under methods.
and declare
DATA: wa_stb_button TYPE stb_button
‎2006 Aug 10 9:53 AM
try this....
include <icon>
you can use method handle_toolbar...
METHOD handle_toolbar.
wa_stb_button-function = 'DELETE'.
wa_stb_button-icon = icon_delete.
wa_stb_button-quickinfo = 'Delete'.
wa_stb_button-disabled = space.
wa_stb_button-butn_type = 0.
APPEND wa_stb_button TO e_object->mt_toolbar.
CLEAR wa_stb_button.
ENDMETHOD.
similarly for other icons too...