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

How to display icons on selection screen ,without using classes.

Hi Experts,

How can we display icons on the selection-screen ..?

one of the methods i heard frm my frnds was to use ->cl_gui_picture_viewer

but as a begginer i am not tht comfortable with classes .So is there a way around to display icons on my selection screen without using classes .

Thanx in Advance,

Regards ,

Rajesh .

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Apr 11, 2008 at 11:24 AM

    Hi Rajesh,

    Icons occupy 4 char spaces.......it starts with @ and ends with @ ex @01@ is an icon.....

    try the foll code

    write : '@01@','@02@'.

    Goto Icon table in SE16 der first column is icon rite...........

    select an icon and copy it (Ctr+c) paste it in ur abap editor ........u ll get the icon name in @XX@ format....

    To give texts for parameters in Sel-screens ull write the text goto-->selection texts rite....der wtite the desired icon name (in @XX@ format) followed by text.......

    Cheers,

    jose.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 11, 2008 at 10:44 AM

    check the code

    If you simply want an icon on the screen. You can do something like this.

    code

    report zrich_0001 .

    type-pools: icon.

    selection-screen begin of line.

    selection-screen comment 1(5) text_001.

    parameters: p_werks type marc-werks.

    selection-screen end of line.

    initialization.

    write ICON_PLANT as icon to text_001.

    [/code]

    one more Example

    Report zex33.

    type-pools: icon.

    selection-screen begin of line.

    selection-screen comment 1(20) text_001.

    parameters: p_werks type marc-werks.

    selection-screen end of line.

    selection-screen begin of line.

    selection-screen comment 1(20) text_002.

    parameters: p_whouse(10).

    selection-screen end of line.

    selection-screen begin of line.

    selection-screen comment 1(20) text_003.

    parameters: p_auart like vbak-auart.

    selection-screen end of line.

    initialization.

    write ICON_PLANT as icon to text_001.

    concatenate text_001 text-001 into text_001 separated by space.

    write ICON_WAREHOUSE as icon to text_002.

    concatenate text_002 text-002 into text_002 separated by space.

    write ICON_ORDER as icon to text_003.

    concatenate text_003 text-003 into text_003 separated by space.

    <REMOVED BY MODERATOR>

    Edited by: Alvaro Tejada Galindo on Apr 11, 2008 4:31 PM

    Add a comment
    10|10000 characters needed characters exceeded

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

    type-pools: icon.

    selection-screen begin of line.

    selection-screen comment 1(20) text_001.

    parameters: p_werks type marc-werks.

    selection-screen end of line.

    selection-screen begin of line.

    selection-screen comment 1(20) text_002.

    parameters: p_whouse(10).

    selection-screen end of line.

    selection-screen begin of line.

    selection-screen comment 1(20) text_003.

    parameters: p_auart like vbak-auart.

    selection-screen end of line.

    initialization.

    write ICON_PLANT as icon to text_001.

    concatenate text_001 text-001 into text_001 separated by space.

    write ICON_WAREHOUSE as icon to text_002.

    concatenate text_002 text-002 into text_002 separated by space.

    write ICON_ORDER as icon to text_003.

    concatenate text_003 text-003 into text_003 separated by space.

    <REMOVED BY MODERATOR>

    Edited by: Alvaro Tejada Galindo on Apr 11, 2008 4:32 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 11, 2008 at 10:53 AM

    Hi,

    You might read:

    /message/241245#241245 [original link is broken]

    Regards,

    Sudarsan

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 11, 2008 at 11:14 AM

    Hi,

    here a short example:

    REPORT Z_TEST2.

    *

    TABLES: SSCRFIELDS. "Felder auf Selektionsbildern

    *

    INCLUDE .

    *

    SELECTION-SCREEN: BEGIN OF BLOCK A01 WITH FRAME TITLE MELDUNG1.

    *

    SELECTION-SCREEN: SKIP 2.

    *

    *

    SELECTION-SCREEN: BEGIN OF LINE.

    SELECTION-SCREEN: COMMENT 10(04) T_ICON.

    SELECTION-SCREEN: END OF LINE.

    *

    SELECTION-SCREEN: SKIP.

    *

    SELECTION-SCREEN: BEGIN OF LINE.

    SELECTION-SCREEN: COMMENT 01(34) T_AUFSD.

    PARAMETERS: P_AUFSD AS CHECKBOX DEFAULT 'X'.

    SELECTION-SCREEN: END OF LINE.

    *

    SELECTION-SCREEN: BEGIN OF LINE.

    SELECTION-SCREEN: COMMENT 01(34) T_AUFCO.

    PARAMETERS: P_AUFCO AS CHECKBOX DEFAULT ' '.

    SELECTION-SCREEN: PUSHBUTTON 45(04) PB01 USER-COMMAND SALL.

    SELECTION-SCREEN: PUSHBUTTON 50(04) PB02 USER-COMMAND DALL.

    SELECTION-SCREEN: END OF LINE.

    *

    SELECTION-SCREEN: BEGIN OF LINE.

    SELECTION-SCREEN: COMMENT 01(34) T_AUFCS.

    PARAMETERS: P_AUFCS AS CHECKBOX DEFAULT ' '.

    SELECTION-SCREEN: END OF LINE.

    *

    SELECTION-SCREEN: BEGIN OF LINE.

    SELECTION-SCREEN: COMMENT 01(34) T_AUFPP.

    PARAMETERS: P_AUFPP AS CHECKBOX DEFAULT 'X'.

    SELECTION-SCREEN: PUSHBUTTON 45(15) PB03 USER-COMMAND INIT.

    SELECTION-SCREEN: END OF LINE.

    *

    SELECTION-SCREEN: SKIP 2.

    *

    SELECTION-SCREEN: BEGIN OF LINE.

    SELECTION-SCREEN: PUSHBUTTON 45(15) PB04 USER-COMMAND ONLI.

    SELECTION-SCREEN: END OF LINE.

    *

    SELECTION-SCREEN: SKIP 2.

    *

    SELECTION-SCREEN: END OF BLOCK A01.

    *

    **********************************************************************

    AT SELECTION-SCREEN.

    *

    IF SSCRFIELDS-UCOMM = 'SALL'. "alle selektieren

    P_AUFSD = 'X'.

    P_AUFCO = 'X'.

    P_AUFCS = 'X'.

    P_AUFPP = 'X'.

    ENDIF.

    *

    IF SSCRFIELDS-UCOMM = 'DALL'. "alle deselektieren

    P_AUFSD = ' '.

    P_AUFCO = ' '.

    P_AUFCS = ' '.

    P_AUFPP = ' '.

    ENDIF.

    *

    IF SSCRFIELDS-UCOMM = 'INIT'. "initialisiern

    P_AUFSD = 'X'.

    P_AUFCO = ' '.

    P_AUFCS = ' '.

    P_AUFPP = 'X'.

    ENDIF.

    *

    **********************************************************************

    INITIALIZATION.

    *

    MELDUNG1 = 'Datenbankselektion'.

    *

    T_ICON = ICON_PRINT.

    T_AUFSD = 'Kundenauftrag'.

    T_AUFCO = 'Innenauftrag'.

    T_AUFCS = 'Serviceauftrag'.

    T_AUFPP = 'Fertingungsauftrag'.

    *

    PB01 = ICON_SELECT_ALL.

    PB02 = ICON_DESELECT_ALL.

    CONCATENATE ICON_REFRESH 'Initial' INTO PB03.

    CONCATENATE ICON_EXECUTE_OBJECT 'Ausf├╝hren' INTO PB04.

    *

    **********************************************************************

    *

    START-OF-SELECTION.

    *

    write: / 'Test'.

    *

    END-OF-SELECTION.

    *

    **********************************************************************

    Regards, Dieter

    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.