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

Icon on Selection Screen tab

Former Member
0 Likes
1,095

Hi

I have 5 subscreens which are then called as follows:

SELECTION-SCREEN: BEGIN OF TABBED BLOCK mytab FOR 20 LINES,

tab (24) button1 USER-COMMAND push1

DEFAULT SCREEN 100,

TAB (24) button2 USER-COMMAND push2

DEFAULT SCREEN 200,

TAB (24) button3 USER-COMMAND push3

DEFAULT SCREEN 300,

TAB (24) button4 USER-COMMAND push4

DEFAULT SCREEN 400,

TAB (24) button5 USER-COMMAND push5

DEFAULT SCREEN 500,

END OF BLOCK mytab.

If users enter data on screen 100, I want to add icon_okay to the tab. However, if I call function module ICON_CREATE and return the values to button1 I only get the string value. Is it possible to tell the system that this is a pushbutton, but still have it as a tab ?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
856

Hi Jill,

Try some thing like following, Use SHOWICON report to find internal icon ids..

AT SELECTION-SCREEN OUTPUT.

button1 = '@0Y\Q@ Test1'.

button2 = 'Test2'.

button3 = 'Test3'.

button4 = 'Test4'.

button5 = 'Test5'.

I just tried the following example and it works,

REPORT zsritest.

SELECTION-SCREEN: BEGIN OF TABBED BLOCK mytab FOR 20 LINES,

TAB (24) button1 USER-COMMAND push1

DEFAULT SCREEN 100,

TAB (24) button2 USER-COMMAND push2

DEFAULT SCREEN 200,

TAB (24) button3 USER-COMMAND push3

DEFAULT SCREEN 300,

TAB (24) button4 USER-COMMAND push4

DEFAULT SCREEN 400,

TAB (24) button5 USER-COMMAND push5

DEFAULT SCREEN 500,

END OF BLOCK mytab.

SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.

SELECTION-SCREEN END OF SCREEN 100.

SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.

SELECTION-SCREEN END OF SCREEN 200.

SELECTION-SCREEN BEGIN OF SCREEN 300 AS SUBSCREEN.

SELECTION-SCREEN END OF SCREEN 300.

SELECTION-SCREEN BEGIN OF SCREEN 400 AS SUBSCREEN.

SELECTION-SCREEN END OF SCREEN 400.

SELECTION-SCREEN BEGIN OF SCREEN 500 AS SUBSCREEN.

SELECTION-SCREEN END OF SCREEN 500.

AT SELECTION-SCREEN OUTPUT.

button1 = '@0Y\Q@ Test1'.

button2 = 'Test2'.

button3 = 'Test3'.

button4 = 'Test4'.

Hope this helps..

Sri

Message was edited by: Srikanth Pinnamaneni

4 REPLIES 4
Read only

Former Member
0 Likes
856

Jill

Try the the following but not sure.

sample code:

selection-screen pushbutton 5(28)

crteIns user-command ONLI.

at selection-screen output.

write ICON_CREATE as icon to crteIns.

concatenate

crteIns

'Create Inspection Lot'

into crteIns

separated by space.

Thanks

Kam

Read only

Former Member
0 Likes
857

Hi Jill,

Try some thing like following, Use SHOWICON report to find internal icon ids..

AT SELECTION-SCREEN OUTPUT.

button1 = '@0Y\Q@ Test1'.

button2 = 'Test2'.

button3 = 'Test3'.

button4 = 'Test4'.

button5 = 'Test5'.

I just tried the following example and it works,

REPORT zsritest.

SELECTION-SCREEN: BEGIN OF TABBED BLOCK mytab FOR 20 LINES,

TAB (24) button1 USER-COMMAND push1

DEFAULT SCREEN 100,

TAB (24) button2 USER-COMMAND push2

DEFAULT SCREEN 200,

TAB (24) button3 USER-COMMAND push3

DEFAULT SCREEN 300,

TAB (24) button4 USER-COMMAND push4

DEFAULT SCREEN 400,

TAB (24) button5 USER-COMMAND push5

DEFAULT SCREEN 500,

END OF BLOCK mytab.

SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.

SELECTION-SCREEN END OF SCREEN 100.

SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.

SELECTION-SCREEN END OF SCREEN 200.

SELECTION-SCREEN BEGIN OF SCREEN 300 AS SUBSCREEN.

SELECTION-SCREEN END OF SCREEN 300.

SELECTION-SCREEN BEGIN OF SCREEN 400 AS SUBSCREEN.

SELECTION-SCREEN END OF SCREEN 400.

SELECTION-SCREEN BEGIN OF SCREEN 500 AS SUBSCREEN.

SELECTION-SCREEN END OF SCREEN 500.

AT SELECTION-SCREEN OUTPUT.

button1 = '@0Y\Q@ Test1'.

button2 = 'Test2'.

button3 = 'Test3'.

button4 = 'Test4'.

Hope this helps..

Sri

Message was edited by: Srikanth Pinnamaneni

Read only

0 Likes
856

Sorry, I don't think I explained the problem very well.

I am calling function module ICON_CREATE with icon_okay

but my tab is showing the string instead of the tick icon !

I'm sure I'm doing something daft.

Thanks

Jill

Read only

0 Likes
856

Hi,

I am saying instead of using ICON_CREATE fm use,

button1 = '@01\Q@ Test1'. "Here @01@ is for ICON_OKAY and \Q is to tell the system to concatenate with text.

It shows Icon in this case.

See my example in the last post and replace 0Y with 01.

ok here we go..

<b>

CALL FUNCTION 'ICON_CREATE'

EXPORTING

name = 'ICON_OKAY'

text = 'Test1'

  • INFO = ' '

add_stdinf = space

IMPORTING

result = button1

EXCEPTIONS

icon_not_found = 1

outputfield_too_short = 2

OTHERS = 3.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.</b>

<b>Pass SPACE to ADD_STDINF in the EXPORTING Parameters..</b>

Hope this helps..

Sri

Message was edited by: Srikanth Pinnamaneni

Message was edited by: Srikanth Pinnamaneni