‎2005 Aug 05 11:07 AM
Hai guys,
I want to place a icon in selection screen , this is my client requirement .
will you suggest.
Thanks in advance.
T.balaji.
‎2005 Aug 05 11:22 AM
Hi,
or try:
create text-element exp
(e.g. with @45@ for icon_tools)
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(5) text-exp.
parameters t123.
SELECTION-SCREEN END OF LINE.Andreas
‎2005 Aug 05 11:15 AM
Hi,
try that:
1) TABLES sscrfields.
2) SELECTION-SCREEN FUNCTION KEY 1.
3) initialization.
WRITE icon_tools TO sscrfields-functxt_01 AS ICON.
MOVE text-123 TO sscrfields-functxt_01+5.
4) AT SELECTION-SCREEN.
CASE sy-ucomm.
WHEN 'FC01'.
....
regards Andreas
Andreas
‎2005 Aug 05 11:15 AM
Hi balaji,
below links might help you.
http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db9e7135c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_erp2004/helpdata/en/f5/933938d780f205e10000009b38f8cf/frameset.htm
regards,
venu
‎2005 Aug 05 11:22 AM
Hi,
or try:
create text-element exp
(e.g. with @45@ for icon_tools)
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(5) text-exp.
parameters t123.
SELECTION-SCREEN END OF LINE.Andreas
‎2005 Aug 05 12:05 PM
Hi,
Andreas solution is working perfectly.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(5) text-exp.
parameters t123.
SELECTION-SCREEN END OF LINE.
Just double click text-exp and type @45@ and then activate it with the program.
Then you can see the selection screen with ICON and text.
‎2005 Aug 05 11:27 AM
Add buttons with icon to selection screen
The following code demonstrates how to add user defined push buttons which contain icons to a standard
report selection screen.Push buttons are used to trigger user functions with in the program to make them
interactive with the user. The example below shows how buttons can allow you to dynamically alter a
selection screen depending on which button is pressed. But they can be used for many other applications
from displaying a window to
calling other reports.
*&---------------------------------------------------------------------*
*& Report ZSSCRBUTTONS2 *
*& *
*&---------------------------------------------------------------------*
*& Adds buttons to selection screen. *
*& Demonstrates alteration of selection screen layout depending on *
*& which button is pressed. *
*& *
*& Additional Info: *
*& TEXT-FY1 = 'Fiscal Year' *
*& Selection text for SO_DATES = 'Date Period' *
*&---------------------------------------------------------------------*
REPORT zsscrbuttons2.
TABLES: sscrfields.
DATA: gd_ucomm TYPE sy-ucomm.
SELECTION-SCREEN BEGIN OF BLOCK period WITH FRAME TITLE text-t02.
SELECT-OPTIONS: so_dates FOR sy-datum NO-EXTENSION.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 01(20) text-fy1. "= Fiscal Year
SELECTION-SCREEN POSITION 33.
PARAMETERS: p_period LIKE qppnp-pabrp.
SELECTION-SCREEN POSITION 36.
PARAMETERS: p_year LIKE qppnp-pabrj.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN PUSHBUTTON /01(29) but1 USER-COMMAND but1.
SELECTION-SCREEN PUSHBUTTON /01(29) but2 USER-COMMAND but2.
SELECTION-SCREEN END OF BLOCK period.
************************************************************************
*INITIALIZATION.
INITIALIZATION.
* MOVE 'Fiscal Year' TO BUT1.
MOVE 'Date Period' TO but2.
DATA: icon_name TYPE iconname,
button_text(20) TYPE c,
quickinfo LIKE smp_dyntxt-quickinfo,
icon_str(255) TYPE c.
* Setup button 1 (Fiscal year)
icon_name = 'ICON_ARROW_RIGHT'. " 'ICON_DISPLAY_MORE'.
button_text = 'Fiscal Year'.
CONCATENATE button_text text-akt
INTO quickinfo
SEPARATED BY space.
CALL FUNCTION 'ICON_CREATE'
EXPORTING
name = icon_name
text = button_text
info = quickinfo
* ADD_STDINF = 'X'
IMPORTING
RESULT = icon_str
EXCEPTIONS
OTHERS = 0. "not interested in errors
* place text and icon on button
but1 = icon_str.
* Setup button 2 (Date period)
icon_name = 'ICON_ARROW_LEFT'. " 'ICON_DISPLAY_MORE'.
button_text = 'Date Period'.
CONCATENATE button_text text-akt
INTO quickinfo
SEPARATED BY space.
CALL FUNCTION 'ICON_CREATE'
EXPORTING
name = icon_name
text = button_text
info = quickinfo
* ADD_STDINF = 'X'
IMPORTING
RESULT = icon_str
EXCEPTIONS
OTHERS = 0. "not interested in errors
* place text and icon on button
but2 = icon_str.
************************************************************************
*AT SELECTION-SCREEN.
AT SELECTION-SCREEN.
* Check if buttons have been
IF sscrfields-ucomm EQ 'BUT1'.
gd_ucomm = 'BUT1'.
ELSEIF sscrfields-ucomm EQ 'BUT2'.
gd_ucomm = 'BUT2'.
ENDIF.
************************************************************************
*AT SELECTION-SCREEN.
AT SELECTION-SCREEN OUTPUT.
IF gd_ucomm IS INITIAL.
LOOP AT SCREEN.
IF screen-name CS 'P_PERIOD' OR
screen-name CS 'P_YEAR' OR
screen-name CS 'FY1' OR
screen-name EQ 'BUT2'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSEIF gd_ucomm EQ 'BUT1'.
LOOP AT SCREEN.
IF screen-name CS 'P_PERIOD' OR
screen-name CS 'P_YEAR' OR
screen-name CS 'FY1' OR
screen-name EQ 'BUT2'.
screen-active = 1.
MODIFY SCREEN.
ENDIF.
IF screen-name CS 'SO_DATES' OR
screen-name EQ 'BUT1'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSEIF gd_ucomm EQ 'BUT2' .
LOOP AT SCREEN.
IF screen-name CS 'P_PERIOD' OR
screen-name CS 'P_YEAR' OR
screen-name CS 'FY1' OR
screen-name EQ 'BUT2'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
IF screen-name CS 'SO_DATES' OR
screen-name EQ 'BUT1'.
screen-active = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.Hope this link.
‎2005 Aug 05 11:43 AM
Hai guys,
i need simply a icon and then a text field.
in selection screen.
regards,
T.Balaji.
‎2005 Aug 05 12:19 PM
Hi,
Just combine in one line:
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(10) TEXT-ICO. "Icon
SELECTION-SCREEN COMMENT 12(50) TEXT-C01. "Text
SELECTION-SCREEN END OF LINE.
John.
‎2005 Aug 05 1:36 PM
Hi balaji,
i think, your problem is solved.
so pls reward points and close this thread.
thanks and regards
Andreas