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

where condition

Former Member
0 Likes
1,042

what is the need of writing selection screen parameter in where condition.

11 REPLIES 11
Read only

Former Member
0 Likes
1,009

well, to restrict the entries to be selected (if you are using WHERE in SELECT) based on user input parameter value.

Read only

Former Member
0 Likes
1,009

Hi,

In Where condition the parameter is mentioned to restrict fetching records.

i.e Records will be fetched from database table that match with the given value in Selection-screen parameter.

Check the link, you get to know-

http://help.sap.com/saphelp_nw04/helpdata/en/62/10a423384746e8bf5f15ccdd36e8b1/content.htm

Read only

Former Member
0 Likes
1,009

hi,

You can use Selection screen parameters in where condition when the filtering values and criteria can be supplied by the user.

By providing selection screen fields we give a great flexibility to the user to select the filtering criteria.

Regards

Sumit Agarwal

Read only

Former Member
0 Likes
1,009

A where condition is used to filter columns by a search condition, parameters allows the user to filter the data, as it restrict the data .

With luck,

Pritam.

Read only

Former Member
0 Likes
1,009

so that the output should be according to the parameters which are entered by the user..

e.g. date parmaeter: the output will be acc. to the period which the user gives in the selection screen and the where clause in select will do this!!!!!

with regards

pardeep sharma

Read only

learnsap
Active Participant
0 Likes
1,009

Hi Prasad,

We use the Selection screen parameter in the where condition of a select query is to restrict the data retrieval from the table based on the parameter. i.e. to retrieve the data that is requested by the user through the selection screen parameter.

Regards,

Ramesh

Read only

Former Member
0 Likes
1,009

Hi Prasad,

In order to reduce the database hits and to increase the performance of the program we will use this where condition and we can get only the required fields.

Regards,

Suresh.S

Read only

Former Member
0 Likes
1,009

hi if there is no whre condition then it will fetch all the records from the database table .......if there is a need to get particular records from the database table we can done with the where conditon .....and we can restricting the values in fetching the data fron the databse table...means if you want to get the values from 1000 to 2000 then we can specify there in the where condition

Read only

Former Member
0 Likes
1,009

Hi Prasad,

WHERE is used to select the records from a database table based on a condition, ie., if we need only specific records to be selected we give the condition in WHERE clause.

Eg:

SELECT carrid connid
    FROM sflight
    INTO t_sflight
   WHERE carrid EQ 'AA'.

Here we get the carrid connid values only for carrid AA. So, here we are restricting the data based on the condition.

Regards,

Chandra Sekhar

Read only

Former Member
0 Likes
1,009

For example:

tables: kna1.
select-options: s_kunnr for kna1-kunnr.
data: gt_kna1 type table of kna1,
        gs_kna1 type kna1.

select kunnr name1 from kna1 into table gt_kna1
where kunnr in s_kunnr.

loop at gt_kna1 into gs_kna1.
write: gs_kna1-kunnr,
        / gs_kna1-name1.
endloop.

Here s_kunnr refers to the field on the selection-screen.

if you give any values for kunnr in the selection screen suppose 1 to 10. It returns only the customers 1 to 10.

For further info, go through this links:

http://help.sap.com/saphelp_nw70/helpdata/en/9f/dba87e35c111d1829f0000e829fbfe/content.htm

http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_StructureOfWhereClause.asp

Regards,

Shailaja

Read only

Former Member
0 Likes
1,009

Hi Prasad,

Based on the selection statement table all the data from the table get selected and so the condition is given in where clause, so that u can choose the data which u prefer as output.

Where clause in Select Query is used for giving the condition on which Data has be retrieved from data base table.

In Where clause you mention the the Condition.

Check this link-

http://help.sap.com/saphelp_nw04/helpdata/en/a8/4953eba3ad4cad9543dc2fac064308/content.htm

Regards

Nani.