Skip to Content
author's profile photo Former Member
Former Member

selection screen.

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 23, 2008 at 08:42 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 23, 2008 at 09:03 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 23, 2008 at 09:22 AM

    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)

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 23, 2008 at 10:45 AM

    Hi Priya,

    Check this url .

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

    *----


    *&&& 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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.