Icon at selection screen
Hi All,
how i can add icon on the menu bar of selection screen and it should work as user command.
Hi Sandeep,
Please refer to the below help link:
http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba80935c111d1829f0000e829fbfe/frameset.htm
If you want to make it more complex (with icon):then using transaction SE41
Copy the PFSTATUS %_00 of program RSSYSTDB to PFSTATUS Z_00 and your program.
Then modify the PF status as you desire.
In your program:
AT SELECTION-SCREEN OUTPUT.
SET PF-STATUS 'Z_00'
Sorry forgot to add - then at
AT SELECTION-SCREEN.
event you can do
CASE SY-UCOMM. WHEN '<your_fcode>'. Do something .... ENDCASE.
Cheers,
Adi
Edited by: Aditya Laud on Apr 9, 2009 8:15 AM
Edited by: Aditya Laud on Apr 9, 2009 8:20 AM
Similar Messages
-
ALV-Freeze colums and Icon on Selection Screen
Dear All,
suppose i have 10 columns in an ALV Report and i want to freeze from my 3rd column onwards so that if I scroll to right my these 3three columns can still be seen.How to do this.
also how to display icon on selection screen.I remeber doing some copy pasting from icon table to my selection texts.
How to acheive these two.
Regards,
Rahul Bhat.Hi,
I hope the following links will help you,
how to freeze columns in table
how to freeze the selection column in the table control of the module pool.
Freeze Column
Regards,
Harish -
Is there any option to add icons to parameters/selection option fields. This can be done if screen is designed via Screen painter but looking for option if screen is defined using selection-screen option.
Thanks
anu>
hi singha wrote:
> report zrich_0001 .
>
> type-pools: icon.
>
> selection-screen begin of block b1 with frame title text-001.
> selection-screen begin of line.
> selection-screen comment 1(5) icon1.
> selection-screen comment 7(20) fld_lab.
> parameters: p_check.
> selection-screen end of line.
> selection-screen end of block b1.
>
> at selection-screen output.
>
> write icon_configuration as icon to icon1.
> fld_lab = 'This is the label'.
>
> start-of-selection.
ROTFL!!!
pk -
How to add program documentation icon on selection screen
Hi All,
Please let me know how to add program documentation icon on selection screen.
Thanks
JogTHis is pretty straight forward, in se38, enter program name, click change. Now click Go To, Documentation. Enter the documentation on this screen, save and activate, now run the program, the icon will be there.
REgards,
Rich Heilman -
Execute icon on selection screen
Dear Experts,
I am new to module pool programming and i have my selection screen as seen below, but from this screen i cannot execute as that icon is missing.
How can i get it?
SELECTION-SCREEN BEGIN OF SCREEN 1100 AS SUBSCREEN NO INTERVALS.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-010.
PARAMETERS: file TYPE rlgrap-filename.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN END OF SCREEN 1100.
SELECTION-SCREEN BEGIN OF SCREEN 1200 AS SUBSCREEN NO INTERVALS.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-020.
PARAMETERS: p_po TYPE ekko-ebeln.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN END OF SCREEN 1200.
CONTROLS mytabstrip TYPE TABSTRIP.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR file .
START-OF-SELECTION.
mytabstrip-activetab = 'BUTTON1'.
CALL SCREEN 100.
(this screen displays and i can input the values. But after that no execute button.)Hi Anushka,
If i got it right you require to create custom selection screen look alike in your module pool.
So for this you need to call your selection screen inside your module pool.
BR
Sumeet -
How to put icon in selection screen
Hello All,
Can any one tell how to put icons ICON_EXPAND and ICON_COLLAPSE in selection screen and to use.
Good Answers will be appreciated.
Thanks in advance.
Best Regards,
Sasidhar Reddy Matli.hi check his..
REPORT zalv_sel_screen .TABLES: mara.DATA: BEGIN OF i_alv OCCURS 0,
matnr TYPE mara-matnr,
mtart TYPE mara-mtart,
matkl TYPE mara-matkl,
groes TYPE mara-groes,
maktx TYPE makt-maktx,
END OF i_alv.DATA: alv_container TYPE REF TO cl_gui_docking_container.
DATA: alv_grid TYPE REF TO cl_gui_alv_grid.
DATA: layout TYPE lvc_s_layo.
DATA: fieldcat TYPE lvc_t_fcat.PARAMETERS: p_check.INITIALIZATION. PERFORM get_data.AT SELECTION-SCREEN OUTPUT. DATA: variant TYPE disvariant.
DATA: repid TYPE sy-repid. repid = sy-repid. variant-report = sy-repid.
variant-username = sy-uname. layout-zebra = 'X'.
layout-edit_mode = 'X'. CHECK alv_container IS INITIAL. CREATE OBJECT alv_container
EXPORTING repid = repid
dynnr = sy-dynnr
side = alv_container->dock_at_left
extension = 1500. CREATE OBJECT alv_grid
EXPORTING
i_parent = alv_container.* ALV Specific. Data selection.
Populate Field Catalog
PERFORM get_fieldcatalog. CALL METHOD alv_grid->set_table_for_first_display
EXPORTING
is_layout = layout
is_variant = variant
i_save = 'U'
i_structure_name = 'I_ALV'
CHANGING
it_outtab = i_alv[]
it_fieldcatalog = fieldcat[].
START-OF-SELECTION.
FORM GET_DATA
FORM get_data. SELECT * INTO CORRESPONDING FIELDS OF TABLE i_alv
FROM mara
INNER JOIN makt
ON maramatnr = maktmatnr
UP TO 100 ROWS
WHERE makt~spras = sy-langu. SORT i_alv ASCENDING BY matnr.ENDFORM. "get_data***************************************************************
Form Get_Fieldcatalog - Set Up Columns/Headers
FORM get_fieldcatalog. DATA: ls_fcat TYPE lvc_s_fcat.
REFRESH: fieldcat. CLEAR: ls_fcat.
ls_fcat-reptext = 'Material Number'.
ls_fcat-fieldname = 'MATNR'.
ls_fcat-ref_table = 'I_ALV'.
ls_fcat-outputlen = '18'.
ls_fcat-fix_column = 'X'.
ls_fcat-key = 'X'.
ls_fcat-col_pos = '1'.
APPEND ls_fcat TO fieldcat. CLEAR: ls_fcat.
ls_fcat-reptext = 'Material Type'.
ls_fcat-fieldname = 'MTART'.
ls_fcat-ref_table = 'I_ALV'.
ls_fcat-outputlen = '10'.
ls_fcat-fix_column = 'X'.
ls_fcat-key = 'X'.
ls_fcat-col_pos = '2'.
APPEND ls_fcat TO fieldcat. CLEAR: ls_fcat.
ls_fcat-reptext = 'Material Group'.
ls_fcat-fieldname = 'MATKL'.
ls_fcat-ref_table = 'I_ALV'.
ls_fcat-outputlen = '12'.
ls_fcat-col_pos = '3'.
APPEND ls_fcat TO fieldcat. CLEAR: ls_fcat.
ls_fcat-reptext = 'Size'.
ls_fcat-fieldname = 'GROES'.
ls_fcat-ref_table = 'I_ALV'.
ls_fcat-outputlen = '30'. ls_fcat-col_pos = '4'.
APPEND ls_fcat TO fieldcat. CLEAR: ls_fcat.
ls_fcat-reptext = 'Material Description'.
ls_fcat-fieldname = 'MAKTX'.
ls_fcat-ref_table = 'I_ALV'.
ls_fcat-outputlen = '40'. ls_fcat-col_pos = '5'.
APPEND ls_fcat TO fieldcat.ENDFORM. "get_fieldcatalog -
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 .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 -
Hi ,
How to have a icon for a pushbutton in application toolbar using selection-screen.
help me out.
Thanks.REPORT ytest.
TABLES: sscrfields .
INCLUDE <icon> .
SELECTION-SCREEN FUNCTION KEY 1 .
parameters: pc(1) .
INITIALIZATION .
CONCATENATE icon_next_object 'test button at applicatin toolbar'
INTO
sscrfields-functxt_01 .
AT SELECTION-SCREEN.
IF sscrfields-ucomm EQ 'FC01' .
break sy-uname .
ENDIF . -
Dynamic Selection option in the selection screen
Hi ,
I have a requirement like this ....
The user wants some fields to be default available in the selection screen. But they also want to be able to select the data based on additional fields (all the remaining fields ) which they want to see in the dynamic selection .
The basic list for selections should be limited to the fields listed in the specifications provided to me and the remaining fields should be made available through the dynamic selection option.
In the transaction FBL3N , this facility is provided.
Kindly help me with this..
thanks,
Sumit .Hi Sumit,
To include dynamic selection check this sample code.
TYPE POOLS DECLARATIONS FOR VALUE REQUEST MANAGER AND ICONS
TYPE-POOLS : vrm,
icon.
*SELECTION SCREEN FIELDS
TABLES : sscrfields.*GLOBAL DECLARATIONS
DATA : flag TYPE c,
tablename(10),
mmtable LIKE dd02l-tabname,
sdtable LIKE dd02l-tabname,
hrtable LIKE dd02l-tabname.*DECLARATIONS FOR SELECTION SCREEN STATUS
DATA it_ucomm TYPE TABLE OF sy-ucomm.***********SELECTION-SCREENS**********************
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME.*FOR DYNAMIC DISPLAY OF MODULES
PARAMETERS : pa RADIOBUTTON GROUP rad USER-COMMAND com MODIF ID mod,
pb RADIOBUTTON GROUP rad MODIF ID rad,
pc RADIOBUTTON GROUP rad MODIF ID cad.SELECTION-SCREEN SKIP.**TO INCLUDE DYNAMIC ICONS
SELECTION-SCREEN COMMENT 2(6) text_001.*DYNAMIC LIST BOX BASED ON USER SELECTIONS
PARAMETERS one AS LISTBOX VISIBLE LENGTH 20 MODIF ID mod.
PARAMETERS two AS LISTBOX VISIBLE LENGTH 20 MODIF ID rad.
PARAMETERS three AS LISTBOX VISIBLE LENGTH 20 MODIF ID cad.SELECTION-SCREEN END OF BLOCK blk1.*DISPLAY DYNAMIC PUSHBUTTON ON APP TOOLBAR ON USER CLICKS
SELECTION-SCREEN: FUNCTION KEY 1,
FUNCTION KEY 2,
FUNCTION KEY 3.**EVENT ON SELECTION SCREEN FOR OUTPUT DISPLAY
AT SELECTION-SCREEN OUTPUT.*CLICK OF FIRST RADIO BUTTON
IF pa = 'X'.
sscrfields-functxt_01 = 'Materials Management'.
WRITE icon_plant AS ICON TO text_001.
*CODE TO GET DYNAMICS BASED ON THE SELECTED RADIO
LOOP AT SCREEN.
IF screen-group1 = 'MOD'.
screen-intensified = '1'.
screen-active = 1.
screen-display_3d = '1'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'RAD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'CAD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.*CLICK OF SECOND RADIO
IF pb = 'X'.
sscrfields-functxt_02 = 'Sales And Distribution'.
WRITE icon_ws_ship AS ICON TO text_001.
LOOP AT SCREEN.
IF screen-group1 = 'RAD'.
screen-intensified = '1'.
screen-active = 1.
screen-display_3d = '1'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'MOD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'CAD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.*CLICK OF THIRD RADIO
IF pc = 'X'.
sscrfields-functxt_03 = 'Human Resources'.
WRITE icon_new_employee AS ICON TO text_001.
LOOP AT SCREEN.
IF screen-group1 = 'RAD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'MOD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'CAD'.
screen-intensified = '1'.
screen-active = 1.
screen-display_3d = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.*CUSTOMISING THE TOOLBARS OF THE SELECTION SCREEN
*WITH F8 BUTTON DISABLED APPEND : 'PRIN' TO it_ucomm,
'SPOS' TO it_ucomm,
'ONLI' TO it_ucomm. CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
p_status = sy-pfkey
TABLES
p_exclude = it_ucomm.
**EVENT ON THE SELECTION
AT SELECTION-SCREEN.* LIST BOX ONE VALUES
CASE one.
WHEN '1'.
mmtable = 'MARC'.
WHEN '2'.
mmtable = 'MARA'.
WHEN '3'.
mmtable = 'MARD'.
WHEN '4'.
mmtable = 'MARM'.
ENDCASE.* LIST BOX TWO VALUES
CASE two.
WHEN '1'.
sdtable = 'VBAK'.
WHEN '2'.
sdtable = 'VBAP'.
WHEN '3'.
sdtable = 'VBUK'.
WHEN '4'.
sdtable = 'VBUP'.
ENDCASE.* LIST BOX THREE VALUES
CASE three.
WHEN '1'.
hrtable = 'PA0001'.
WHEN '2'.
hrtable = 'PA0006'.
WHEN '3'.
hrtable = 'PA0022'.
WHEN '4'.
hrtable = 'PA0008'.
ENDCASE.*VALUES FOR CLICK OF THE PUSHBUTTON ON APP TOOLBAR
*AND ENABLING THE BUTTONS TO PERFORM F8
CASE sscrfields-ucomm.
WHEN 'FC01'.
tablename = mmtable.
sscrfields-ucomm = 'ONLI'.
WHEN 'FC02'.
tablename = sdtable.
sscrfields-ucomm = 'ONLI'.
WHEN 'FC03'.
tablename = hrtable.
sscrfields-ucomm = 'ONLI'.
ENDCASE.*INITIALIZATION EVENT
INITIALIZATION.*VALUES ASSIGNED TO DROPDOWNLISTS IN THE SUBROUTINES
PERFORM f4_value_request_pa.
PERFORM f4_value_request_pb.
PERFORM f4_value_request_pc.*START OF SELECTION EVENT
START-OF-SELECTION.*SUBROUTINE FOR OUTPUT
PERFORM output.*&----------------------------------------------------------------*
*& Form f4_value_request_PA
* text
*SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST1
FORM f4_value_request_pa. DATA: l_name TYPE vrm_id,
li_list TYPE vrm_values,
l_value LIKE LINE OF li_list. l_value-key = '1'.
l_value-text = 'Plant Data for Material'.
APPEND l_value TO li_list.
CLEAR l_value. l_value-key = '2'.
l_value-text = 'General Material Data'.
APPEND l_value TO li_list.
CLEAR l_value. l_value-key = '3'.
l_value-text = 'Storage Location Data for Material'.
APPEND l_value TO li_list.
CLEAR l_value. l_value-key = '4'.
l_value-text = 'Units of Measure for Material'.
APPEND l_value TO li_list.
CLEAR l_value.
l_name = 'ONE'. CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = l_name
values = li_list
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.ENDFORM. " f4_value_request_tabname*&----------------------------------------------------------------*
*& Form f4_value_request_PB
* text
*SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST2FORM f4_value_request_pb. DATA: l_name TYPE vrm_id,
li_list TYPE vrm_values,
l_value LIKE LINE OF li_list. l_value-key = '1'.
l_value-text = 'Sales Document: Header Data'.
APPEND l_value TO li_list.
CLEAR l_value. l_value-key = '2'.
l_value-text = 'Sales Document: Item Data'.
APPEND l_value TO li_list.
CLEAR l_value. l_value-key = '3'.
l_value-text = 'Sales Document:Header Status'.
APPEND l_value TO li_list.
CLEAR l_value. l_value-key = '4'.
l_value-text = 'Sales Document: Item Status'.
APPEND l_value TO li_list.
CLEAR l_value.
l_name = 'TWO'.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = l_name
values = li_list
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " f4_value_request_PB*&----------------------------------------------------------------*
*& Form f4_value_request_PC
* text
*SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST3FORM f4_value_request_pc. DATA: l_name TYPE vrm_id,
li_list TYPE vrm_values,
l_value LIKE LINE OF li_list. l_value-key = '1'.
l_value-text = 'HR Master :Infotype 0001 (Org. Assignment)'.
APPEND l_value TO li_list.
CLEAR l_value. l_value-key = '2'.
l_value-text = 'Address Infotype 0006'.
APPEND l_value TO li_list.
CLEAR l_value. l_value-key = '3'.
l_value-text = 'Education Infotype 0022'.
APPEND l_value TO li_list.
CLEAR l_value. l_value-key = '4'.
l_value-text = 'Basic Pay Infotype 0008'.
APPEND l_value TO li_list.
CLEAR l_value.
l_name = 'THREE'.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = l_name
values = li_list
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " f4_value_request_PC
*& Form OUTPUT
* text
* -->P_TABLENAME text
*fINAL OUTPUT
FORM output. DATA p_table(10). p_table = tablename.*popup to display teh selected table and
*Continue button is clicked
CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
EXPORTING
titel = 'User Selections '
textline1 = p_table
textline2 = 'is the Selected table'
start_column = 25
start_row = 6.*assigning the table value in p_table to the
* Table in SE16 transaction by explicitly calling
SET PARAMETER ID 'DTB' FIELD p_table.
CALL TRANSACTION 'SE16'.
ENDFORM. "OUTPUT
Regards,
Manoj Kumar P -
Push button in the selection screen
Hi folks,
I need to display a push button the selection screen.its not on the application tool bar..but in one of the selection block in the selection screen..could anybody guide how to do this...
Thanks in advance,
shyam.
Edited by: shyam prasad on Jan 15, 2009 7:34 AMHi Shyam,
Try the following code..
TABLES sscrfields.
TYPE-POOLS icon.
*SELECTION-SCREEN:
BEGIN OF SCREEN 500 AS WINDOW TITLE title,
PUSHBUTTON 2(10) but1 USER-COMMAND cli1,
PUSHBUTTON 28(30) but2 USER-COMMAND cli2
VISIBLE LENGTH 10.
END OF SCREEN 500.
AT SELECTION-SCREEN.
CASE sscrfields.
WHEN 'CLI1'.
WHEN 'CLI2'.
ENDCASE.
START-OF-SELECTION.
title = 'Push button'.
but1 = 'Button 1'.
CALL FUNCTION 'ICON_CREATE'
EXPORTING
name = icon_information
text = 'Button 2'
info = 'My Quickinfo'
IMPORTING
RESULT = but2
EXCEPTIONS
OTHERS = 0.
Hope it will be useful..
Regards,
Lakshman.
Edited by: Lakshman N on Jan 15, 2009 7:39 AM -
hi all,
i have 3 radio button and corresponding thier 3 input loist box . i just want to deactivate 2 list box on the click of one radio button.
please give the solution if possible .
Thanks and Regards
priyank dixitHi,
Check the following code:
TYPE-POOLS : vrm,
icon.
*SELECTION SCREEN FIELDS
TABLES : sscrfields.
*GLOBAL DECLARATIONS
DATA : flag TYPE c,
tablename(10),
mmtable LIKE dd02l-tabname,
sdtable LIKE dd02l-tabname,
hrtable LIKE dd02l-tabname.
*DECLARATIONS FOR SELECTION SCREEN STATUS
DATA it_ucomm TYPE TABLE OF sy-ucomm.
***********SELECTION-SCREENS*********************
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME.
*FOR DYNAMIC DISPLAY OF MODULES
PARAMETERS : pa RADIOBUTTON GROUP rad USER-COMMAND com MODIF ID mod,
pb RADIOBUTTON GROUP rad MODIF ID rad,
pc RADIOBUTTON GROUP rad MODIF ID cad.SELECTION-SCREEN SKIP.
**TO INCLUDE DYNAMIC ICONS
SELECTION-SCREEN COMMENT 2(6) text_001.
*DYNAMIC LIST BOX BASED ON USER SELECTIONS
PARAMETERS one AS LISTBOX VISIBLE LENGTH 20 MODIF ID mod.
PARAMETERS two AS LISTBOX VISIBLE LENGTH 20 MODIF ID rad.
PARAMETERS three AS LISTBOX VISIBLE LENGTH 20 MODIF ID cad.
SELECTION-SCREEN END OF BLOCK blk1.
*DISPLAY DYNAMIC PUSHBUTTON ON APP TOOLBAR ON USER CLICKS
SELECTION-SCREEN: FUNCTION KEY 1,
FUNCTION KEY 2,
FUNCTION KEY 3.
**EVENT ON SELECTION SCREEN FOR OUTPUT DISPLAY
AT SELECTION-SCREEN OUTPUT.
*CLICK OF FIRST RADIO BUTTON
IF pa = 'X'.
sscrfields-functxt_01 = 'Materials Management'.
WRITE icon_plant AS ICON TO text_001.
*CODE TO GET DYNAMICS BASED ON THE SELECTED RADIO
LOOP AT SCREEN.
IF screen-group1 = 'MOD'.
screen-intensified = '1'.
screen-active = 1.
screen-display_3d = '1'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'RAD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'CAD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
*CLICK OF SECOND RADIO
IF pb = 'X'.
sscrfields-functxt_02 = 'Sales And Distribution'.
WRITE icon_ws_ship AS ICON TO text_001.
LOOP AT SCREEN.
IF screen-group1 = 'RAD'.
screen-intensified = '1'.
screen-active = 1.
screen-display_3d = '1'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'MOD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'CAD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
*CLICK OF THIRD RADIO
IF pc = 'X'.
sscrfields-functxt_03 = 'Human Resources'.
WRITE icon_new_employee AS ICON TO text_001.
LOOP AT SCREEN.
IF screen-group1 = 'RAD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'MOD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'CAD'.
screen-intensified = '1'.
screen-active = 1.
screen-display_3d = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Regards,
Bhaskar -
Selection screen fields are not clearing..!
Hi all,
I have created one report which is having a selection screen with four select-options.
Now after executing the report, when i click on "back" icon the selection screen entries are not clearing even i refresh the select-options also.
Could any body please help me to resolve this issue??
Regards,
Joshu.Hi,
Use FREE MEMORY after the report is printed..
Check this example..
PARAMETERS: P_MATNR LIKE MARA-MATNR OBLIGATORY.
START-OF-SELECTION.
WRITE: / P_MATNR.
FREE MEMORY.
Thanks,
Naren -
Selection screen with radio button groups
hi experts,
i have 3 frames in selection screen. in first frame i have two radio buttons. if i select 1st radio button 2nd frame should be in active and 3rd frame should be disable mode. if i select 2nd radio button then 3rd frame should be in active and other 2nd frame should be disable mode. in which event i need to write the code.
can any one help me regarding this and give some sample code.
rgds,
nag.Here is the example which will explain it completely :
*& Report Z_sscr *
* Published at ****************
*&DYNAMIC Selection screen based on user clicks on the radiobutton*
REPORT zsscr.
*TYPE POOLS DECLARATIONS FOR VALUE REQUEST MANAGER AND ICONS
TYPE-POOLS : vrm,
icon.
*SELECTION SCREEN FIELDS
TABLES : sscrfields.
*GLOBAL DECLARATIONS
DATA : flag TYPE c,
tablename(10),
mmtable LIKE dd02l-tabname,
sdtable LIKE dd02l-tabname,
hrtable LIKE dd02l-tabname.
*DECLARATIONS FOR SELECTION SCREEN STATUS
DATA it_ucomm TYPE TABLE OF sy-ucomm.
***********SELECTION-SCREENS**********************
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME.
*FOR DYNAMIC DISPLAY OF MODULES
PARAMETERS : pa RADIOBUTTON GROUP rad USER-COMMAND com MODIF ID mod,
pb RADIOBUTTON GROUP rad MODIF ID rad,
pc RADIOBUTTON GROUP rad MODIF ID cad.
SELECTION-SCREEN SKIP.
**TO INCLUDE DYNAMIC ICONS
SELECTION-SCREEN COMMENT 2(6) text_001.
*DYNAMIC LIST BOX BASED ON USER SELECTIONS
PARAMETERS one AS LISTBOX VISIBLE LENGTH 20 MODIF ID mod.
PARAMETERS two AS LISTBOX VISIBLE LENGTH 20 MODIF ID rad.
PARAMETERS three AS LISTBOX VISIBLE LENGTH 20 MODIF ID cad.
SELECTION-SCREEN END OF BLOCK blk1.
*DISPLAY DYNAMIC PUSHBUTTON ON APP TOOLBAR ON USER CLICKS
SELECTION-SCREEN: FUNCTION KEY 1,
FUNCTION KEY 2,
FUNCTION KEY 3.
**EVENT ON SELECTION SCREEN FOR OUTPUT DISPLAY
AT SELECTION-SCREEN OUTPUT.
*CLICK OF FIRST RADIO BUTTON
IF pa = 'X'.
sscrfields-functxt_01 = 'Materials Management'.
WRITE icon_plant AS ICON TO text_001.
*CODE TO GET DYNAMICS BASED ON THE SELECTED RADIO
LOOP AT SCREEN.
IF screen-group1 = 'MOD'.
screen-intensified = '1'.
screen-active = 1.
screen-display_3d = '1'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'RAD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'CAD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
*CLICK OF SECOND RADIO
IF pb = 'X'.
sscrfields-functxt_02 = 'Sales And Distribution'.
WRITE icon_ws_ship AS ICON TO text_001.
LOOP AT SCREEN.
IF screen-group1 = 'RAD'.
screen-intensified = '1'.
screen-active = 1.
screen-display_3d = '1'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'MOD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'CAD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
*CLICK OF THIRD RADIO
IF pc = 'X'.
sscrfields-functxt_03 = 'Human Resources'.
WRITE icon_new_employee AS ICON TO text_001.
LOOP AT SCREEN.
IF screen-group1 = 'RAD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'MOD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'CAD'.
screen-intensified = '1'.
screen-active = 1.
screen-display_3d = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
*CUSTOMISING THE TOOLBARS OF THE SELECTION SCREEN
*WITH F8 BUTTON DISABLED
APPEND : 'PRIN' TO it_ucomm,
'SPOS' TO it_ucomm,
'ONLI' TO it_ucomm.
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
p_status = sy-pfkey
TABLES
p_exclude = it_ucomm.
**EVENT ON THE SELECTION
AT SELECTION-SCREEN.
* LIST BOX ONE VALUES
CASE one.
WHEN '1'.
mmtable = 'MARC'.
WHEN '2'.
mmtable = 'MARA'.
WHEN '3'.
mmtable = 'MARD'.
WHEN '4'.
mmtable = 'MARM'.
ENDCASE.
* LIST BOX TWO VALUES
CASE two.
WHEN '1'.
sdtable = 'VBAK'.
WHEN '2'.
sdtable = 'VBAP'.
WHEN '3'.
sdtable = 'VBUK'.
WHEN '4'.
sdtable = 'VBUP'.
ENDCASE.
* LIST BOX THREE VALUES
CASE three.
WHEN '1'.
hrtable = 'PA0001'.
WHEN '2'.
hrtable = 'PA0006'.
WHEN '3'.
hrtable = 'PA0022'.
WHEN '4'.
hrtable = 'PA0008'.
ENDCASE.
*VALUES FOR CLICK OF THE PUSHBUTTON ON APP TOOLBAR
*AND ENABLING THE BUTTONS TO PERFORM F8
CASE sscrfields-ucomm.
WHEN 'FC01'.
tablename = mmtable.
sscrfields-ucomm = 'ONLI'.
WHEN 'FC02'.
tablename = sdtable.
sscrfields-ucomm = 'ONLI'.
WHEN 'FC03'.
tablename = hrtable.
sscrfields-ucomm = 'ONLI'.
ENDCASE.
*INITIALIZATION EVENT
INITIALIZATION.
*VALUES ASSIGNED TO DROPDOWNLISTS IN THE SUBROUTINES
PERFORM f4_value_request_pa.
PERFORM f4_value_request_pb.
PERFORM f4_value_request_pc.
*START OF SELECTION EVENT
START-OF-SELECTION.
*SUBROUTINE FOR OUTPUT
PERFORM output.
*& Form f4_value_request_PA
* text
*SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST1
FORM f4_value_request_pa.
DATA: l_name TYPE vrm_id,
li_list TYPE vrm_values,
l_value LIKE LINE OF li_list.
l_value-key = '1'.
l_value-text = 'Plant Data for Material'.
APPEND l_value TO li_list.
CLEAR l_value.
l_value-key = '2'.
l_value-text = 'General Material Data'.
APPEND l_value TO li_list.
CLEAR l_value.
l_value-key = '3'.
l_value-text = 'Storage Location Data for Material'.
APPEND l_value TO li_list.
CLEAR l_value.
l_value-key = '4'.
l_value-text = 'Units of Measure for Material'.
APPEND l_value TO li_list.
CLEAR l_value.
l_name = 'ONE'.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = l_name
values = li_list
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " f4_value_request_tabname
*& Form f4_value_request_PB
* text
*SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST2
FORM f4_value_request_pb.
DATA: l_name TYPE vrm_id,
li_list TYPE vrm_values,
l_value LIKE LINE OF li_list.
l_value-key = '1'.
l_value-text = 'Sales Document: Header Data'.
APPEND l_value TO li_list.
CLEAR l_value.
l_value-key = '2'.
l_value-text = 'Sales Document: Item Data'.
APPEND l_value TO li_list.
CLEAR l_value.
l_value-key = '3'.
l_value-text = 'Sales Document:Header Status'.
APPEND l_value TO li_list.
CLEAR l_value.
l_value-key = '4'.
l_value-text = 'Sales Document: Item Status'.
APPEND l_value TO li_list.
CLEAR l_value.
l_name = 'TWO'.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = l_name
values = li_list
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " f4_value_request_PB
*& Form f4_value_request_PC
* text
*SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST3
FORM f4_value_request_pc.
DATA: l_name TYPE vrm_id,
li_list TYPE vrm_values,
l_value LIKE LINE OF li_list.
l_value-key = '1'.
l_value-text = 'HR Master :Infotype 0001 (Org. Assignment)'.
APPEND l_value TO li_list.
CLEAR l_value.
l_value-key = '2'.
l_value-text = 'Address Infotype 0006'.
APPEND l_value TO li_list.
CLEAR l_value.
l_value-key = '3'.
l_value-text = 'Education Infotype 0022'.
APPEND l_value TO li_list.
CLEAR l_value.
l_value-key = '4'.
l_value-text = 'Basic Pay Infotype 0008'.
APPEND l_value TO li_list.
CLEAR l_value.
l_name = 'THREE'.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = l_name
values = li_list
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " f4_value_request_PC
*& Form OUTPUT
* text
* -->P_TABLENAME text
*fINAL OUTPUT
FORM output.
DATA p_table(10).
p_table = tablename.
*popup to display teh selected table and
*Continue button is clicked
CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
EXPORTING
titel = 'User Selections '
textline1 = p_table
textline2 = 'is the Selected table'
start_column = 25
start_row = 6.
*assigning the table value in p_table to the
* Table in SE16 transaction by explicitly calling
SET PARAMETER ID 'DTB' FIELD p_table.
CALL TRANSACTION 'SE16'.
ENDFORM. "OUTPUT
Reward If found Helpful. -
hello experts
How can I put a button into a select screen,beside parametres and select option?
I know that is possible with screen painter, but in this case I can't use variant?
and I need variant for my program.
what is the solution
I need helpTry with this code:
REPORT ZTEST_NP.
tables: sscrfields.
include <icon>.
SELECTION-SCREEN:
PUSHBUTTON 2(10) but1 USER-COMMAND cli1,
PUSHBUTTON 12(30) but2 USER-COMMAND cli2
VISIBLE LENGTH 10.
AT SELECTION-SCREEN.
CASE sscrfields.
WHEN 'CLI1'.
WHEN 'CLI2'.
ENDCASE.
initialization.
but1 = 'Button 1'.
CALL FUNCTION 'ICON_CREATE'
EXPORTING
name = icon_information
text = 'Button 2'
info = 'My Quickinfo'
IMPORTING
RESULT = but2
EXCEPTIONS
OTHERS = 0.
Regards,
Naimesh Patel -
I need to get an icon on the selection screen as well as selection text .
HI ,
Can anybody please tell me how to get an icon in the selection-screen along with the selection texts written for select-options or parameters.
For Example:
Select-Options: S_WERKS For T001w-werks,
S_AUART For TVAKT-AUART,
S_ERDAT For LIKP-ERDAT.
IN THE SELECTION TEXTS:
FOR S_WERKS i write (WareHouse)
FOR S_AUART i write (OrderType)
FOR S_ERDAT i write (PlantDate)
I need to get the icons for this fields as well as selection texts written for these fields.
I will reward full points to the solution.
Mohan.Hi mohan,
<b>Run the below code</b>
Report zex33.
tables : t001w,
tvakt,
likp.
type-pools: icon.
selection-screen begin of line.
selection-screen comment 1(20) text_001.
select-options: S_WERKS For T001w-werks.
selection-screen end of line.
selection-screen begin of line.
selection-screen comment 1(20) text_002.
select-options :S_AUART For TVAKT-AUART.
selection-screen end of line.
selection-screen begin of line.
selection-screen comment 1(20) text_003.
select-options : S_ERDAT For LIKP-ERDAT.
selection-screen end of line.
initialization.
write ICON_WAREHOUSE as icon to text_001.
concatenate text_001 text-001 into text_001 separated by space.
write ICON_ORDER as icon to text_002.
concatenate text_002 text-002 into text_002 separated by space.
write ICON_PLANT as icon to text_003.
concatenate text_003 text-003 into text_003 separated by space.
*In text-001 -> Warehouse
*In text-002 -> Order Type
*In text-003 -> Plant Date
Maybe you are looking for
-
HP Color LaserJet Pro MFP M177fw Scanner Error 22
Purchased this product today. 3 scans later, Scanner Error 22 appears. I consulted the rudimentary troubleshooting guide. Unplugged product for 15+ seconds, no improvement. Updated firmware, no improvement. Very disheartening to purchase something an
-
how do i unauthorize all computers and reauthorize without fear of losing all data, personal, and account settings. Apple says I have five already as i count four and want to add another
-
Gray Startup Question Mark. I've tried everything!
Ok, so my Mac has been running slightly slow these past couple days, nothing I thought I should worry about, until today when I tried to restart it, it would not start up. It would come up with the gray screen and apple logo then just shut off. The
-
Revision: 14699 Revision: 14699 Author: [email protected] Date: 2010-03-11 06:20:06 -0800 (Thu, 11 Mar 2010) Log Message: Adding pop up children to the end of automation children array so that index of static children do not change due to these
-
How can create SEGMENTS and IDOC TYPE in BADI in ECC 6.0 version
Hi All, Can any one help, how to create SEGMENTS and IDOC TYPE in BADI in ECC 6.0 version.This is my task. Given BADI name was----VENDOR_ADD_DATA_BI . Thanks