Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Re:SAP-HR

Former Member
0 Likes
644

Hi,

How to include icons-- statu,delete and insert in the ALV's display

5 REPLIES 5
Read only

Former Member
0 Likes
610

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

Read only

0 Likes
610

how to set icons, can u tell me the process.

Regards,

Sravanthi

Read only

0 Likes
610

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

Read only

0 Likes
610

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

Read only

Former Member
0 Likes
610

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...