Include a field in selection options
Hi,
In my selection screen i want an output like this...
a _______ to ________
b _______ to ________
c ____________
a and b will have a low and high but c needs to be just an input box.
how to define this ??
selection-screen begin of screen 0100 as subscreen.
selection-screen begin of block b4.
select-options: a for MARA-MATNR
how to define c ???
selection-screen end of block b4.
Actually the syntax would be like so. You can also add the NO- EXTENSION to the end to get rid of the "Multiple Selection" box.
select-options: c for sy-datum no intervals no-EXTENSION.
Regards,
Rich Heilman
Similar Messages
-
Innput field with Select option on custom screen
Hi,
I need to create an Input field with Select Option(No interval) button on Custom dialog screen .
Is there any idea how can I create it on screen ?
Thanks
Sachincreate a normal inputfield and place an icon next to it. then in the pai on click of that button use the following code.
data: wf_tab_field like rstabfield occurs 0 with header line ,
wf_exl_opt like rsoptions .
refresh: wf_tab_field .
move: 'KOSTL' to wf_tab_field-fieldname ,
'CSKS' to wf_tab_field-tablename .
append wf_tab_field .
clear wf_tab_field .
move: 'X' to wf_exl_opt-bt ,
'X' to wf_exl_opt-cp ,
'X' to wf_exl_opt-ge ,
'X' to wf_exl_opt-gt ,
'X' to wf_exl_opt-le ,
'X' to wf_exl_opt-lt ,
'X' to wf_exl_opt-nb ,
'X' to wf_exl_opt-np .
call function 'COMPLEX_SELECTIONS_DIALOG'
exporting
title = 'Select Cost Centers'
text = 'Cost Center'
* SIGNED = 'X'
* LOWER_CASE = ' '
* NO_INTERVAL_CHECK = ' '
* JUST_DISPLAY = ' '
* JUST_INCL = ' '
excluded_options = wf_exl_opt
* DESCRIPTION =
help_field = 'CSKS-KOSTL'
* SEARCH_HELP = 'KOST'
tab_and_field = wf_tab_field
tables
range = r_kostl
exceptions
no_range_tab = 1
cancelled = 2
internal_error = 3
invalid_fieldname = 4
others = 5
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
if not r_kostl[] is initial .
read table r_kostl index 1 .
if sy-subrc eq 0 .
move: r_kostl-low to wf_t_kostl .
endif .
endif .
wf_t_kostl is the screen field name.
Raja -
Search help for A field in select option which doesnt have search help in c
u have table in QM which is QMFE in whihc field FECOD which doesnt have search help , but my requirement is that in select option in report to have users to see its search help, anyone there to help me
Hi sridhar loganathan,
For this goto SE11 and create a ZFECOD Search help for that field. In Defination Tab enter table name
QMFE and Enter Z_F4_FECOD_EXIT in Search help Exit.
Then create a FM in SE37 as Z_F4_FECOD_EXIT under a FG. And then write code as follows for example:
FUNCTION Z_F4_REG_EXIT.
""Local Interface:
*" TABLES
*" SHLP_TAB TYPE SHLP_DESCR_TAB_T
*" RECORD_TAB STRUCTURE SEAHLPRES
*" CHANGING
*" VALUE(SHLP) TYPE SHLP_DESCR_T
*" VALUE(CALLCONTROL) LIKE DDSHF4CTRL STRUCTURE DDSHF4CTRL
TYPES: begin of ty_code,
dam_code type QMFE-FECOD ,
end of ty_code.
DATA : tw_code type ty_code,
ta_code type table of ty_code.
IF "callcontrol-step <> 'SELONE' AND
callcontrol-step <> 'SELECT' AND
callcontrol-step <> 'DISP'.
EXIT.
ENDIF.
IF callcontrol-step = 'SELECT'.
CALL FUNCTION 'F4UT_PARAMETER_ALLOCATE'
EXPORTING
PARAMETER = 'FECOD'
TABLES
SHLP_TAB = shlp_tab
RECORD_TAB = record_tab
CHANGING
SHLP = shlp
CALLCONTROL = callcontrol
EXCEPTIONS
OTHERS = 3.
ENDIF.
IF callcontrol-step = 'DISP'.
Get the Region
CALL FUNCTION 'F4UT_PARAMETER_VALUE_GET'
EXPORTING
PARAMETER = 'FECOD'
FIELDNAME = 'FECOD'
TABLES
SHLP_TAB = shlp_tab
RECORD_TAB = record_tab
RESULTS_TAB = ta_code
CHANGING
SHLP = shlp
CALLCONTROL = callcontrol
EXCEPTIONS
PARAMETER_UNKNOWN = 1
OTHERS = 2.
IF SY-SUBRC = 0.
SORT TA_CODE BY DAM_CODE.
Deleting duplicate damage codes in Internal Table ta_code
DELETE ADJACENT DUPLICATES FROM TA_CODE COMPARING DAM_CODE.
Passing changed Internal table to FM
CALL FUNCTION 'F4UT_PARAMETER_RESULTS_PUT'
EXPORTING
PARAMETER = 'REGION'
FIELDNAME = 'REGION'
TABLES
SHLP_TAB = shlp_tab
RECORD_TAB = record_tab
SOURCE_TAB = ta_code
CHANGING
SHLP = shlp
CALLCONTROL = callcontrol
EXCEPTIONS
PARAMETER_UNKNOWN = 1
OTHERS = 2.
ENDIF.
ENDIF.
ENDFUNCTION.
Revert me for any clarifications.
Regards,
Suneel G. -
F4 help for PO number field with SELECT OPTIONS
Hi all,
I have a field (PO no) using SELECT OPTIONS on my selection screen.I need F4 help for this field.How shud i declare it?
I have declared it as follows:
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
select-options sel_po for ZPO_LOI-zobject_id obligatory .
SELECTION-SCREEN END OF BLOCK b1.
ZPO_LOI is a table view with a z data element ZOBJECT_ID to which i have attached a search help which displays the required values for the PO field in the selection screen.But now the problem is i cant see the F4 icon for the field on the sel screen.
Please help.Hi I have a sapmle code for this.
*& AT SELECTION SCREEN ON VALUE REQUEST
*-- F4 help for IDOC numbers
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_docnum-low.
PERFORM value_request_status USING 'S_DOCNUM-LOW'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_docnum-high.
PERFORM value_request_status USING 'S_DOCNUM-HIGH'.
*& Form value_request_status
text
-->fp_field dynpro field that gets the return value
FORM value_request_status USING fp_field TYPE dynfnam.
STATICS tl_values TYPE STANDARD TABLE OF tp_value.
IF tl_values IS INITIAL.
SELECT docnum FROM edidc UP TO 500 ROWS INTO TABLE tl_values
WHERE credat IN s_credat
AND cretim IN s_cretim.
IF sy-subrc eq 0.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'DOCNUM'
dynpprog = syst-repid
dynpnr = syst-dynnr
dynprofield = fp_field
value_org = 'S'
TABLES
value_tab = tl_values
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc IS NOT INITIAL.
MESSAGE i999(zz) WITH 'No values found'(004).
ENDIF.
ENDIF.
ENDIF.
ENDFORM. " value_request_status
Regards,
Amit. -
"WHERE field IN select-options" alternative
I currently have a report that uses
SELECT-OPTIONS so_num FOR qmih-qmnum.
SELECT * FROM qmih INTO TABLE t_qmih
WHERE qmnum IN so_num.
Now, this works fine unless the user selects a large number of individual items in the select options, e.g. 7,000 individual qmnums, in which case I get an ABAP error.
The dump contains the following helpful information:
How to correct the error
The SAP Open SQL statement must be divided into several smaller units.
If the problem occurred due to the use of an excessively large table
in an IN itab construct, you can use the addition FOR ALL ENTRIES
instead.
When you use this addition, the statement is split into smaller units
according to the restrictions of the database system used.
You may able to find an interim solution to the problem
in the SAP note system. If you have access to the note system yourself,
use the following search criteria:
Could anyone give me an idea of how I could fix this?Hi Chandrasekhar,
very interesting statement but not necessarily correct.
Select-options declares a range-type internal table with header line. The number of table rows is limited by the system memory storage available.
Oracle database has a fixed limit of 32KB for the length of the select statement. The open SQL database interface will resolve the range table resulting in the right number of comparison expressions.
If the user puts too many values into select-options, he will probably copy single values which are represented by SIGN = 'I' and OPTION = 'EQ'.
Try this (example):
select-options:
s_matnr for mara-matnr.
data:
lt_value like hashed table of s_matnr-low with unique key table_line. "avoid duplicates
fiels-symbols:
<any> type any,
<value> type any.
loop at s_matnr assigning <any>
where sign = 'I' and option = 'EQ'.
assign component 'LOW' of structure <any> to <field>.
insert <field> into table t_value.
delete s_matnr.
endloop.
select ...
into table ...
from ...
for all entries in lt_value
where matnr = lt_value-table_line.
if lines( s_matnr ) > 0.
select ...
appending table ...
from ...
where matnr in s_matnr.
endif.
Now you've got them all.
Regards,
Clemens -
Finding a field in select options
I am using select options WD component in my WD component. I have added some fields in the select options component using add_selection_field method.
Is there any method using which I can check if i give an id of a particular field, the method should return if the field with that id already exists or not.
Thanks,
ReenaHi Reena,
just go thru this thread, you may goet some useful infm regarding your query. I m noty sure but just go thru it once
WD ABAP - Search help using Selection-options
thnks -
Controlling the space between label and Input field in SELECT-OPTION
Hi ,
I am using WDR_SELECT_OPTIONS as a used component in order to dynamically generate the Select option in my WD Component.
Can any one tell me if there is a way to control the spacing between Label and Input field? This is because rest of the UI elements are in one particular order but for this dynamically generated UI.
Please help me.
Thanks,
KavithaHi Kavitha,
The label is required for accessibility reasons. It's not possible to remove it and to use your own label from outside the component to point to it. Labels cannot point to targets across views (and hence acress component) boundaries.
Best regards,
Thomas -
Making to-field in select-option mandatory
hi experts
I defined an OBLIGATORY select-option with no-extension option. but the user wants not only the "from" field is OBLIGATORY but also the "to" filed.
I know I can do it if I define 2 parameters in the same line. but is there any other option if using select-option
many thanks
Edited by: Thomas Zloch on Nov 4, 2010 9:54 AM - subject changedUse the FM [SELECT_OPTIONS_RESTRICT|http://www.sdn.sap.com/irj/scn/advancedsearch?query=select_options_restrict#sdn_content_category_value_wiki] in the initialization of the report, and only allow "I/BT" records types.
FORM restrict_select.
* Local data
DATA: restrict TYPE sscr_restrict,
opt_list TYPE sscr_opt_list,
*** TYPE sscr_***.
* Create Options
* - Option ALL : any selection allowed
CLEAR opt_list.
MOVE 'ALL' TO opt_list-name.
MOVE 'X' TO: opt_list-options-bt,
opt_list-options-cp,
opt_list-options-eq,
opt_list-options-ge,
opt_list-options-gt,
opt_list-options-le,
opt_list-options-lt,
opt_list-options-nb,
opt_list-options-ne,
opt_list-options-np.
APPEND opt_list TO restrict-opt_list_tab.
* - Option RNG only ranges of values
CLEAR opt_list.
MOVE 'RNG' TO opt_list-name.
MOVE 'X' TO: opt_list-options-bt.
APPEND opt_list TO restrict-opt_list_tab.
* Affect Options to actual select-options
* - ALL by default
CLEAR ***.
MOVE: 'A' TO ***-kind,
'*' TO ***-sg_main,
'ALL' TO ***-op_main.
APPEND *** TO restrict-***_tab.
* RNG to a single select-option
CLEAR ***.
MOVE: 'S' TO ***-kind,
'SO_FIELD' TO ***-name,
'I' TO ***-sg_main,
'RNG' TO ***-op_main.
APPEND *** TO restrict-***_tab.
* Execute
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
EXPORTING
restriction = restrict
EXCEPTIONS
OTHERS = 0.
ENDFORM. " restrict_select
Regards,
Raymond -
Hide Selection Field in Select-Option
Hi,
Is there any way to hide a selection field (not to delete and not to set as read only) in select-option component?
AviadHi,
I have several fields on the select-option view.
One of those fields has a search help attached to it.
The search-help needs additional data in order to filter unwanted results.
If I add two more fields to the select-option view and bind them using the search-help structure (in all three fields) I can see only the desired results.
The user, on the other hand, dos not need to see the additional fields, so I wish to hide them.
Aviad -
Comparing field with select-option
HI
i have one slect option
s_bukrs for coas-bukrs.
and
loop..
if w_bukrs eq s_bukrs"here is the problem,w_bukrs is
"holding single value and s_bukrs a range,so in such
"case how i can do comaprison
endif.
endloopHi Sanju,
Just use IN as said..
if w_bukrs <b>IN</b> s_bukrs
in case you want to compare a single value use..
if w_bukrs <b>EQ</b> s_bukrs-low or
if w_bukrs <b>EQ</b> s_bukrs-high
regards
satesh -
Select-options for input field
hi,
Is it possible to use 'Select-options' in web dynpro for the input field like we use in abap?
Ex. material is the input field. i want to select range also for this input field using 'Select-options'
I have tried only with ovs(f4 help) for the input field. can u pls tel me how to use if it is possible ?
Thanks,
Aishwarya.DATA: LT_RANGE_TABLE TYPE REF TO DATA,
RT_RANGE_TABLE TYPE REF TO DATA,
READ_ONLY TYPE ABAP_BOOL,
TYPENAME TYPE STRING. DATA: LR_COMPONENTCONTROLLER TYPE REF
TO IG_COMPONENTCONTROLLER,
L_REF_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.
create the used component
L_REF_CMP_USAGE = WD_THIS->WD_CPUSE_SELECT_OPTIONS( ).
IF L_REF_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.
L_REF_CMP_USAGE->CREATE_COMPONENT( ).
ENDIF.
WD_THIS->M_WD_SELECT_OPTIONS = WD_THIS->WD_CPIFC_SELECT_OPTIONS( ).
init the select screen
WD_THIS->M_HANDLER =
WD_THIS->M_WD_SELECT_OPTIONS->INIT_SELECTION_SCREEN( ).
WD_THIS->M_HANDLER->SET_GLOBAL_OPTIONS(
I_DISPLAY_BTN_CANCEL = ABAP_FALSE
I_DISPLAY_BTN_CHECK = ABAP_FALSE
I_DISPLAY_BTN_RESET = ABAP_FALSE
I_DISPLAY_BTN_EXECUTE = ABAP_FALSE ).
*create a range table that consists of this new data element
LT_RANGE_TABLE = WD_THIS->M_HANDLER->CREATE_RANGE_TABLE(
I_TYPENAME = 'matnr' ).
add a new field to the selection
WD_THIS->M_HANDLER->ADD_SELECTION_FIELD(
I_ID = 'matnr'
IT_RESULT = LT_RANGE_TABLE
I_READ_ONLY = READ_ONLY ).
This is my code followed by saptechnical. but when i exec, am getting err like the type matnr is invalid. -
Select -options (fields as mandatory) and alv
Hi all,
i have 5 fields in select options and alv table , based on selection criteria values will display in alv table. now i want to make 2 fields as mandatory in select-options. without entering values in those two fields it should not allow the values to display iin alv table , it should rise a message..
(i have not created node for select-options ,i have directly used data type in wddoinit for select-options and for alv table i have created node)
thanks allHi,
In wddoinit while creating select options by ADD_SELECTION_FIELD method ,it has a parameter called I_OBLIGATORY. Set it as X and thus the field becomes mandatory.
Regards
Karthiheyan M -
Providing input in one field should activate the req select -options field
in mpool-pgming ,say i have 10 selct options in the selction screen of an application
but first only one input field(one select-option) should be active i.e should be displayed
and all should be inactive(invisible),on providing input inthat the remaining select options
should get displayed,for this how to write code and in which event? is it PBO or PAI?
please provide me the coding ,am in desperate need.Hi Kudala,
You have to give a loop
loop at screen.
if screen-group2 eq value1
screen-active = 1.
screen-invisible = 0.
elseif screen-group2 eq value2.
screen-active = 0.
screen-invisible = 1.
endif.
modify screen.
endloop.
where value1 and value2 are the ids you have defined for the text field in the layout editor.
reward points if it helps -
Select-options in Dynpro program
hi ,guys,
now i want add a screen field in my dynpro program, the field should be like the the select-options in a normal report's selection-screen's field of select-options which can hold multiple inputs, batween a range and use can choose the operators.
pls help.You need to create subscreen in the module pool program and need to write select options logic in separate include.
Please check [this link|https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/select-options%252bin%252bmodule%252bpool%252bprogramming]
Edited by: Satya suresh Donepudi on Mar 8, 2009 10:03 PM -
Hiding of Select Options in screen based on selection in selection list box
Hi People,
I have a screen where i have put a selection list box, it is pre-filled with values, Now based on the value which user selects, I want to show/hide some select-options fields. I have declared the select options in the top include of my program,
SELECT-OPTIONS: so_user FOR ls_rsp_user-user_id MODIF ID 222,
so_userg FOR ls_rsp_usergrp-user_grp_id MODIF ID 333,
so_ccode FOR ls_vdmp-bukrs MODIF ID 444,
then in the PBO of my screen, I have written a module, set screen in which I loop over screen & check the group id's
LOOP AT SCREEN.
IF screen-group1 = '111'.
IF gv_hier_resp_fields_flag IS NOT INITIAL.
screen-active = 1.
ELSE.
screen-active = 0.
ENDIF.
ELSEIF screen-group1 = '222'.
IF gv_user_fields_flag IS NOT INITIAL.
screen-active = 1.
ELSE.
screen-active = 0.
ENDIF.
ELSEIF screen-group1 = '333'.
IF gv_user_group_fields_flag IS NOT INITIAL.
screen-active = 1.
ELSE.
screen-active = 0.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
I am setting some flags based on the value which user selects in the selection list box, When I debugged I found that the flags were being set correctly, but the screen group value never set to '222' or '333', these are id's i have used for select options. Hence I am unable to hide/show the select options fields. Kindly suggest some solutions for this.
Thanks & Regards,
Deepakthen in the PBO of my screen
Your SELECT-OPTIONS are defined in a SELECTION-SCREEN so the PBO actions must be maintained in a AT SELECTION-SCREEN OUTPUT block.
I suppose the selection-screen is a subscreen, if you dont want to get unwanted interactions with a main selection-screen of the report, check sy-dynnr
AT SELECTION-SCREEN OUTPUT.
CASE sy-dynnr.
WHEN '1000'. " main screen of report
WHEN '0100'. " selection-screen defined as subscreen
LOOP AT SCREEN.
CASE SCREEN-GROUP1.
WHEN '111'.
ENDCASE.
ENDLOOP.
ENDCASE.
Regards,
Raymond
Maybe you are looking for
-
Error with RSA Auth Manager 9.1.0.7 User Recon OIM11g R1
Hi, i'm trying to run the job RSA Auth Manager User Recon but i see this error : oracle.iam.connectors.common.ConnectorException: and in the server log i seee this : [2013-03-06T18:46:37.994-05:00] [oim_server1] [ERROR] [] [OIMCP.RSAM] [tid: OIMQuart
-
am BRAND SPANKING NEW to java and I have a site (created by someone else obviously) which shows 2 text boxes dynamically depending on a number that is entered into the "NumAdults" box. So if you enter "2", you get: age.text box, tripcost.text box, ag
-
Can I use an OEM version of windows for bootcamp?
Is windows 7 professional 64-bit (OEM) okay for bootcamp?
-
Hi, I have 10 line items in a table. i would like to display first 5 line item in first page of Adobe form and remaining 5 line item in 2nd page of Adobe form. How to do that?Since i have more space in first page itself it is showing all the items in
-
How do you free memory when applet ends?
I have an applet that uses 4 jframes. Any of the frames are set to call both stop() and destroy() whenever user clicks "Exit" or "X" in upper right corner of a frame. The applet destroy() method does the following: myAOS32001Frame = null; myAOS32002F