Application Development 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: 

selection screen.

Former Member
0 Kudos

hi,

i created parameters and select-options on selection screen and now i want to display the icons before that field on selection screen....

one select-option is date and another is time and i was to use the standard icons..can anybody tell the code.

thanks in Advance.

6 REPLIES 6

Former Member
0 Kudos

open ur program in se51 . select the chkbox layout editor. once tht opens double click the element u want to assign icon then in the properties u can assign the icon.

0 Kudos

i want to display the icon on selection-screen by using using such as parameters and select options

0 Kudos

selection screens using select options and parameters can also be opened using se51. so try tht

former_member705122
Active Contributor
0 Kudos

Hi,

Check this sample code:

INCLUDE: <icon>.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT 01(04) v_text FOR FIELD s_date.
select-options  : s_date      for sy-datum.
SELECTION-SCREEN COMMENT 60(04) v_icon FOR FIELD s_date.

SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT  01(04) v_text1 FOR FIELD s_time.
select-options  : s_time      for sy-uzeit.
SELECTION-SCREEN COMMENT  60(04) v_icon1 FOR FIELD s_time.

SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b2.

INITIALIZATION.
  v_text = 'Date'.
  v_icon = '@1U@'.          "icon_date.

  v_text1 = 'Time'.
  v_icon1 = '@1T@'.         "icon_time.

Regards

Adil

Former Member
0 Kudos

there is a easy way of displaying icon on selection screen .

open ur program in se38

select

Goto -> text elements -> selection text.

here before giving text for ur parameter just give the name of icon like

@1T@ for time

@1U@ for date

you can find all the names & ids of standard icon in

type pool -> ICON (in SE11)

Former Member
0 Kudos

Hi Priya,

Check this url .

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2e71ce83-0b01-0010-11a4-98c28a33...

*----


*&&& Example code

*----


REPORT CREATION_OF_ACTIVE_ICON.

INITIALIZATION.

IMPORT mytab-activetab FROM MEMORY ID 'TABSTRIP'.

CASE mytab-activetab.

WHEN 'UCOMM1'.

mytab-dynnr = 100.

WHEN 'UCOMM2'.

mytab-dynnr = 200.

WHEN 'UCOMM3'.

mytab-dynnr = 300.

WHEN OTHERS.

tabb1-dynnr = 100.

ENDCASE.

START-OF-SELECTION.

EXPORT: tabb1-activetab TO MEMORY ID 'TABSTRIP'.

SHORT VERSION.INITIALIZATION.

IMPORT mytab FROM MEMORY ID 'TABSTRIP'.

START-OF-SELECTION.

EXPORT: mytab TO MEMORY ID 'TABSTRIP'.

SYNTAX FOR CREATING THE EXISTING CONTEXT MENU.::

FORM on_ctmenu_text USING menu TYPE REF TO cl_ctmenu.

CALL METHOD menu->load_gui_status

EXPORTING program = prog

status = 'CON_MENU'

= menu .

CALL METHOD menu->set_default_function

EXPORTING fcode = 'list'.

ENDFORM.

CREATING A NEW CONTEXT MENU::

FORM on_ctmenu_text USING menu TYPE REF TO cl_ctmenu.

DATA new_menu TYPE REF TO cl_ctmenu.

CREATE OBJECT new_menu.

CALL METHOD new_menu->add_function

EXPORTING fcode = 'list'

text = text-001.

CALL METHOD new_menu->add_function

EXPORTING fcode = 'add'

text = text-002.

CALL METHODnew_menu->add_function

EXPORTING fcode = 'delete'

text = text-003.

CALL METHOD new_menu->add_submenu

EXPORTING menu = new_menu

text = text-005.

ENDFORM

SYNTAX FOR STATUS ICON:

CALL FUNCTION 'ICON_CREATE' EXPORTING

NAME = 'icon name' TEXT = 'text to be displayed' INFO = 'tooltip text'u2022

Regards,

Muneesh Gitta.

Edited by: Muneesh Gitta on Jul 23, 2008 12:46 PM