Select-options and Parameters, when to use what?
Hi gurus,
I have been using Parameters for long. Now I want to choose a range of values, which I need to retrieve from database.
I tried using select-options. Can't I use 2 parameters that is parameter1 and parameter2 and mention query BETWEEN para1 AND
para2, and when I use NO INTERVALS and NO EXTENSION together, it behaves same like parameter, then why did SAP gave these
extensions.
Hi friend,
Simple differences between Select-options and parameters.
Select-Options Uses keyword 'for'
Parameters Uses keywords 'like', 'type'
Select-Options Uses operator 'in'
Parameters Uses operator '='
Select-Options Provides ranges for selection
Parameters No ranges only single value
Select-Options Creates selection table
Parameters No selection table
Select-Options When i/p blank all records selected
Parameters When i/p blank none is selected
Note:
Select options can act as parameters by using 'no-extension' 'no intervals', but all records will be selected when i/p is blank unlike parameters.
Might be helpful..
Thanks...
Edited by: Guest77 on Feb 10, 2009 5:44 AM
Similar Messages
-
hi,
In How many ways we can define select-options and parameters.hi uday,
Usually we use PARAMETERS for single value input and
SELECT-OPTIONS is used to give a range of input values for a single field
SELECT-OPTIONS implicitly consists of internal table with fields
OPTIONS
LOW
HIGH
SIGN
eg:
DATA: G_VBELN TYPE VBAK-VBELN.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
PARAMETERS : P_VBELN LIKE VBAK-VBELN.
SELECT-OPTIONS: S_VBELN FOR G_VBELN.
SELECTION-SCREEN END OF BLOCK B1.
o/p:
P_VBELN: _________________.
S_VBELN:___________ TO ____________.
reward if helpful
regards.
shashikanth naram. -
HI major diffrence in select-options and parameters
Hi,
Can any one explain me the major diffrence between select options and parameters.
I know that in select options we can give a range of values and in parameter one value.
ThanksHello Hari,
I would see following differences:
1. As you have mentioned, many values/ranges can be given in the SELECT-OPTIONS. However, the parameter can hold only one value.
2. In the run time, we see the data w.r.t a select option as an Internal table and Parameter may be accessed as a global variable.
3. Consider following statements:
a. select-options: s_matnr for mara-matnr no-extension no intervals.
b. parameters: P_MATNR like mara-matnr.
Both the statements look same on the selection screen.
consider the SQLs:
<b>select * into corresponding fields of table g_t_mara
from mara
where
matnr in s_matnr.</b>
and
<b>select * into corresponding fields of table g_t_mara
from mara
where
matnr eq p_matnr.</b>
both the SQLs give the same output if the user gives a material number on Selection screen.
If the user does NOT give any input in selection screen, the first SQL will fetch all data from DB, whereas the SQL with the PARAMETER will fail.
So I think we should keep in mind the requirement and code accordingly.
I hope this helps you.
Best Regards,
Murugesh AS -
Symaltaneous use of select-option and parameters in smartforms .
hello Abaper,
I am design a smartforms . we have given some input. when we use only parameters it works properly. as same when we use select-option only its works .
But when i use both parameter and select option at that time error generate .
Actually call function is not works .
So please give me proper idea how to solve this problem .
Regards
kamal kishoreHi ,
Still problem is not solved.
i want to call following fields but function modules show run time error. IF separately i call only parameter its run properly.
in the same way if i call only select option is runs properly.
please suggest me how can i call both the things.
PARAMETERS: P_BUKRS TYPE BSEG-BUKRS OBLIGATORY,
P_GJAHR TYPE BSEG-GJAHR OBLIGATORY.
parameters: P_SECCO type SECCODE-SECCODE OBLIGATORY.
*SELECT-OPTIONS : P_SECCO FOR SECCODE-SECCODE OBLIGATORY.
PARAMETERS: P_QSCOD TYPE J_1IEWTNUMGR-QSCOD OBLIGATORY.
SELECT-OPTIONS: P_BUDAT FOR BKPF-BUDAT OBLIGATORY,
P_BLART FOR BKPF-BLART,
P_J_HLN FOR J_1IEWTCHLN-J_1IEXTCHLN,
P_J_HDT FOR J_1IEWTCHLN-J_1IEXTCHDT OBLIGATORY,
P_LIFNR FOR LFB1-LIFNR.
regards
kamal
Edited by: kamal_kishore_sah on Apr 12, 2011 7:44 AM -
Select option and parameter.
I have select options and parameters in my selection screen. While extracting the data I am using both the select option and a parameter in where condition. But that select statement is not returning any data. Could any body tell me what might be the reason.
Thanks,
bsv.Hi,
See this example code it works.
tables spfli.
parameters p_carrid type spfli-carrid obligatory.
select-options s_connid for spfli-connid.
data itab type table of spfli with header line.
select *
from spfli into table itab
where carrid eq p_carrid
and connid in s_connid.
loop at itab.
write: / itab-carrid,
itab-connid.
endloop.
Note : Dont leave blank for parameters because it take as space and when you select from table it is unsuccessful.
Plzz Reward if it is useful,
Mahi. -
How to set a select option's item as invisible (using a method code)
Hi there,
I need to hide parameters and select option fields, but Iu2019m using the select_option component to add all items to the layout using just one View Container Element.
I could use to hide the View Container Element setting the property visible, but I need to hide fields with certain conditions. I also could add one View Container Element for each select option, but I have many... I wish I could make in other way.
Iu2019ve checked the Definitions of the Interface IF_WD_SELECT_OPTIONS and the Ulli Hoffmannu2019s book and I have found no help at all.
Thanks in advance,
Filipe Torres
Edited by: Filipe Torres on Sep 15, 2008 12:34 AMThank you, this helps but will solve just part of my problem. I'm using many views and to pass the values from those select options and parameters I just declare them in the first view... The other answer helps me more that shows how to remove one element. I was looking for a hide feature and not remove, but seems that I have to remove.
-
How to create a selection option or parameters in a subarea of the screen
Hi Experts,
My program have a screen 1001 and it is splited into two parts: the first is a Subarea for selection option, and the last is a table control. Now I want to create some selection option and parameters in the first subarea just like we do in screen 1000. Do we have any convenient way to do that?
Thanks in advance
JoeHi Joe,
Yes ,it can be done like below code:
TABLES : mara.
SELECTION-SCREEN BEGIN OF SCREEN 1001 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_matnr FOR mara-matnr,
s_matkl FOR mara-matkl,
s_mtart FOR mara-mtart.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN END OF SCREEN 1001.
DATA: number(4) TYPE n VALUE '1001'.
START-OF-SELECTION.
CALL SCREEN 100.
in screen flow logic .write below statements.
first declare the subscreen area 'AREA' in screen.
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
CALL SUBSCREEN area INCLUDING sy-repid number.
PROCESS AFTER INPUT.
CALL SUBSCREEN area.
MODULE USER_COMMAND_0100.
Reward if useful,
Regards,
Talwinder -
What are the configuration need between R3 and XI when we use RFC sync adap
hi,
What are the configuration need between R3 and XI when we use RFC sync adapter.
Regards
siva.if its the sender adapter ref:
RFC adapter
Sender- /people/michal.krawczyk2/blog/2005/03/29/configuring-the-sender-rfc-adapter--step-by-step
Receiver;
http://help.sap.com/saphelp_nw04/helpdata/en/c8/e80440a832e369e10000000a155106/content.htm
Also;
trouble shooting rfc/soap -
/people/shabarish.vijayakumar/blog/2008/01/08/troubleshooting--rfc-and-soap-scenarios-updated-on-20042009 -
How to create a Select-option and a pushbutton together
Hi Experts,
I have defined a selection screen in my module pool program and I am including this screen in my Module pool Dynpro. Now, my problem is that if I write the following piece of code to define my selection screen, it gives me an error that "Error when generating the selection screen "1010" of report "ZTESTHIM_MOD" ".
SELECTION-SCREEN BEGIN OF SCREEN 1010 AS SUBSCREEN.
SELECT-OPTIONS: s_matnr FOR mara-matnr NO INTERVALS,
s_matkl FOR mara-matkl NO INTERVALS,
s_mtart FOR mara-mtart NO INTERVALS,
s_ersda FOR mara-ersda NO INTERVALS.
SELECTION-SCREEN PUSHBUTTON 10(5) pubu USER-COMMAND test.
SELECTION-SCREEN END OF SCREEN 1010.
Please help me whats the reason for this.
Also, if I define the select-options within a block and pushbutton outside it, the code is working fine.
The problem is that I want a select-option and a pushbutton in the same line.
Please help me out.
Useful answers will be duly rewarded.
Thanks in advance.
Regards,
Himanshu
nullHi,
You have declared so many select options in one line and also you want to include a push button in the same line, this is not possible.
Since the visible lenght of the line is less than the number of fields you want to display this will not be possible.
What you can do is instead group then using
SELECTIOn-SCREEN BEGIN OF BLOCK b1.
here use lines
SELECTION-SCREEN END OF BLOCK b1
Regards,
Sesh -
Select options and radio button problem
Hi All,
In selection screen I have a select option and two radio button default is disable when I input value on select option, it will enable radio button. How can I do this?
Thanks.
mlaiPlease go through the below code and reward points if u find it useful:
tables : pa0000.
selection-screen begin of block b1 with frame title text-001.
select-options : s_pernr for pa0000-pernr.
parameters : r1 radiobutton group g1 modif id abc.
parameters : r2 radiobutton group g1 modif id abc.
selection-screen end of block b1.
at selection-screen output.
if s_pernr[] is initial.
loop at screen.
if screen-group1 = 'ABC'.
screen-invisible = 1.
modify screen.
endif.
endloop.
else.
loop at screen.
if screen-group1 = 'ABC'.
screen-invisible = 0.
modify screen.
endif.
endloop.
endif.
Thanks
Vasu -
Pass select option and parameter with submit
Hello,
I have two programs and what i have to do is to use the selection screen information from program A and submit it to program B so that this second program will generate a report with this information.
After program B is executed it creates some files in a server, which i will have to use later in program A. I cannot modify the program B since its not part of the requirement.
But the thing is that i am having problems when submiting a select option and a parameter together.
It would be really useful if someone could give some examples of this.
Example of what i want to do:
SUBMIT PROGRAM_B
WITH S_MATNR EQ S_MATNR ->pass all the values from a select option.
WITH P_WERKS EQ P_WERKS ->pass a single value from a parameter.
AND RETURN
Regards,
RobertoHi,
Try this for select-options:
SUBMIT PROGRAM_B
WITH S_MATNR *IN* S_MATNR ->pass all the values from a select option.
WITH P_WERKS EQ P_WERKS ->pass a single value from a parameter.
AND RETURN
Hope it helps.
Regards,
Gilberto Li
Edited by: Gilberto Li on Feb 2, 2009 10:24 PM
Edited by: Gilberto Li on Feb 2, 2009 10:33 PM
Edited by: Gilberto Li on Feb 2, 2009 10:33 PM -
Hi all,
Belated Happy Holi.
Can u explain me the difference between
Select-options and ranges?
When, where and how to use them ?
I know the basic differences, but i need to know in deep .
could u give me the informatin with a scenario please ?
Thanks in advance
RaviHI
<u>SELECT-OPTIONS:</u> Declare an internal table that is also linked to input fields on a selection screen
<u>RANGES:</u> Declare an internal table with the same structure as in select-options, but without linking it to a selection screen.
FOR FURTHER DOCUMENTATION PLEASE GO THROUGH THE LINK
<a href="http://72.14.203.104/search?q=cache:btyoj86smhEJ:www.sap-img.com/abap/difference-between-select-options-ranges.htmSelect-optionsandrangesIN+ABAP&hl=en&gl=in&ct=clnk&cd=1">Difference Between Select-Options & Ranges</a>
<a href="http://72.14.203.104/search?q=cache:EJgiHLpghDEJ:help.sap.com/saphelp_nw04/helpdata/en/fc/eb3034358411d1829f0000e829fbfe/content.htmSelect-optionsandrangesIN+ABAP&hl=en&gl=in&ct=clnk&cd=4">Statical Declaration</a>
<a href="http://72.14.203.104/search?q=cache:VWS1erlabRIJ:help.sap.com/saphelp_nw04/helpdata/en/9f/dba71f35c111d1829f0000e829fbfe/content.htmSelect-optionsandrangesIN+ABAP&hl=en&gl=in&ct=clnk&cd=5">Selection tables</a>
REGARDS
ANOOP
Message was edited by: ANOOP R.S -
SELECT-OPTIONS and data collection
Hi All,
I have one inputfield (say users) via SELECT-OPTIONS and it goes to an internal table called "userlist" with values USER1, USER2 etc...(Example)
Now, when I query the database with "userlist" as the input, I'm not able to do so because SELECT-OPTIONS contains an Internal table with values LOW, HIGH etc...
So my input value goes like this IEQUSER1, IEQUSER2 etc......
Could anyone tell me what should I do in order to get USER1, USER2 etc.
Thanks in advance,
PradeepHi All,
Sorry. I'm getting the error: 'Line structure of table USERLIST is incorrect'.
My coding is as follows:
tables : usr02.
data: begin of users,
users type XUBNAME,
end of users.
data : it_usr02 like table of usr02.
data : l_userlist type xubname, "This is a data elemnt thats already in the system of type BNAME
p_userlist like l_userlist.
select-options: userlist for users.
loop at userlist into l_userlist.
select * from usr02 into corresponding fields of table it_usr02 where bname in userlist.
endloop.
ENDFUNCTION.
Could you please help?
Thanks and Regards, Pradeep -
Passing SELECT-OPTIONS and Internal Tables to SUBROUTINES
Hi Guys
In the code below my colleague has created her own table types in order to pass a select option and internal tables to her subroutine. Is there an easier way of making them known to the subroutine.
data : v_vbeln type vbeln_vf,
it_bdoc type table of vbrp,
it_t006 type table of t006a,
wa_bdoc type vbrp,
wa_t006 type t006a,
it_bdoc2 type table of zsswathi_st_vbeln,
wa_bdoc2 type zsswathi_st_vbeln
select-options s_vbeln for v_vbeln matchcode object zswathi_vbeln obligatory.
start-of-selection.
perform bdoc using s_vbeln[]
changing it_bdoc
it_bdoc2
it_t006.
loop at it_bdoc2 into wa_bdoc2.
form bdoc using f_s_vbeln type ZSWATHI_ST_SELECT_OPTION_TA_TY " all these are table types. for select options, a structure is created and then a table type for it is created.
changing f_it_bdoc type zswathi_vbrp_ty_ta
f_it_bdoc2 type zswathi_vbeln_ty_ta
f_it_t006 type ZSWATHI_T006_TA_TY.
select * from vbrp into table f_it_bdoc where vbeln in f_s_vbeln.
if f_it_bdoc is not initial.
select vbeln sum( netwr ) prsdt from vbrp into table f_it_bdoc2 where vbeln in f_s_vbeln group by vbeln prsdt.
sort f_it_bdoc2 by vbeln.
"select * from t006a into table it_t006 for all entries in it_bdoc where msehi = it_bdoc-vrkme.
select * from t006a into table f_it_t006 for all entries in f_it_bdoc where msehi = f_it_bdoc-vrkme.
endif.
endform.Hi Brett,
1. you can use a select-options-range in a FORM subroutine also without passing it as a parameter because parameters and select-option range tables are global fields in their program.
2. If you need a parameter, declare it as type table or type standard table or type any table. You do not need any special table type.
Regards
Clemens -
Web Dynpro ABAP - Select Option and ALV Component Usage
Hi,
I'm new in ABAP Web Dynpro and i was trying to follow the SDN tutorial
Web Dynpro ABAP - Select Option and ALV Component Usage
In this video, we create a new Web Dynpro ABAP component that uses both Select Options and ALV. Developers can learn the basic mechanisms for working with both of these reusable components.
Following the link: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/39c54fe7-0b01-0010-0eb6-d63ac2bdd637
I implemented and generated the web dynpro with success but when i execute a test i get a dump on select-option definition.
Note
The following error text was processed in the system ECD : Exception condition "TYPE_NOT_FOUND" raised.
The error occurred on the application server ITAWSECCS01D_ECD_00 and in the work process 0 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: DESCRIBE_BY_NAME of program CL_ABAP_TYPEDESCR=============CP
I went in debug and the piece of code dumping is:
lt_range_table =
wd_this->m_handler->create_range_table( i_typename = 'S_PROJ' ).
Is there someone who can help me?
Thanks in advance,
Stefano.Hi,
I'm new in ABAP Web Dynpro and i was trying to follow the SDN tutorial
Web Dynpro ABAP - Select Option and ALV Component Usage
In this video, we create a new Web Dynpro ABAP component that uses both Select Options and ALV. Developers can learn the basic mechanisms for working with both of these reusable components.
Following the link: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/39c54fe7-0b01-0010-0eb6-d63ac2bdd637
I implemented and generated the web dynpro with success but when i execute a test i get
an error as
Note
The following error text was processed in the system EI6 : Exception condition "TYPE_NOT_FOUND" raised.
The error occurred on the application server EC6IDES_EI6_01 and in the work process 0 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: DESCRIBE_BY_NAME of program CL_ABAP_TYPEDESCR=============CP
I have created a table zmy_table and trying to make USERID field as a select-options.I've written the code as shown below .
data: itab type standard table of zmy_table,
wa type zmy_table.
data:
node_employee type ref to if_wd_context_node,
elem_employee type ref to if_wd_context_element,
stru_employee type wd_this->element_employee ,
item_userid like stru_employee-userid.
navigate from <CONTEXT> to <EMPLOYEE> via lead selection
node_employee = wd_context->get_child_node( name = wd_this->wdctx_employee ).
@TODO handle not set lead selection
if ( node_employee is initial ).
endif.
get element via lead selection
elem_employee = node_employee->get_element( ).
@TODO handle not set lead selection
if ( elem_employee is initial ).
endif.
alternative access via index
Elem_Employee = Node_Employee->get_Element( Index = 1 ).
@TODO handle non existant child
if ( Elem_Employee is initial ).
endif.
get single attribute
elem_employee->get_attribute(
exporting
name = `USERID`
importing
value = item_userid ).
select *
from zmy_table
into table itab
where userid = item_userid.
node_employee = wd_context->get_child_node( 'EMPLOYEE' ).
node_employee->bind_elements( itab ).
Is there someone who can help me and can tell am i doing wrong?
Thanks in advance,
Dheeraj
Maybe you are looking for
-
Many problems with my Mac since I downloaded Adobe Illustrator.
Hi, I have had my MacBook Pro for almost two years. And have never experienced these problems. Here are the specs in case you would like to know. - Mac OS X Version 10.7.5 - Processor 2.3 GHz Intel COre i5 - Memory 4 GB 1333 MHz ddR3 - I also use a
-
Modified CR2 files in ACR and changes were not saved
I have a directory with 1400 CR2 files in it. I have a stack of picks that I am working with. I went through and for 6 hours adjusted all the images by opening them in Camera Raw and making changes to White Balance, Fill light, etc... When I was done
-
Folders and duplicates everywhere; empty folders... a mess in the Library
I am tired of iPhoto's difficulty to use as soon as you modify pix and try to move pix from a computer to another. It creates tones of duplicates files, empty folders and doesn't even recognize px it already imported. I have the same pix floating eve
-
WSIFException: No Method Found
We are very interested in implementing the WSIF call from BPEL and I have been following the samples (anthony reynold's blog) very carefully and I cannot get around this error. I have a very simple interaction and I am hoping someone may have some in
-
SDDM DDL dependency generation options
In SDDM 3.2 will there be way to tell the DDL generator which objects are dependent on which objects? Oracle Designer DDL generator made a pretty guess at the order of generation for database objects. SDDM doesn't do a very good job. Sequences can go