<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Problem with PARAMETERS and SELECT in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-parameters-and-select/m-p/5225597#M1208198</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shiva,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
parameters: p_carrid type spfli-carrid,
p_connid type spfli-connid.


data: ispfli type table of spfli with header line.

select * into table ispfli from spfli
where carrid eq p_carrid and
connid eq p_connid.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here it retrieves the values mentioned of p_carrid and p_connid , once check in spfli table whether there are any entries for condition carrid = AA . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In other case like give select-options &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select-options : s_carrid type spfli-carrid,
s_connid type spfli-connid.


data: ispfli type table of spfli with header line.

select * into table ispfli from spfli
where carrid in s_carrid and
connid in s_connid.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here if s_connid is space then it retrieves all the records .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if we give parameters we shud give the values . where as if we dont give ny values in select-options it retrieves all values . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS : check in debugging mode , you will get clear idea .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards ,&lt;/P&gt;&lt;P&gt;Aby&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 15 Feb 2009 10:19:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-02-15T10:19:04Z</dc:date>
    <item>
      <title>Problem with PARAMETERS and SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-parameters-and-select/m-p/5225595#M1208196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls have a look at the code below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**********&lt;/P&gt;&lt;P&gt;tables: spfli.&lt;/P&gt;&lt;P&gt;parameters: p_carrid type spfli-carrid,&lt;/P&gt;&lt;P&gt;            p_connid type spfli-connid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: ispfli type table of spfli with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select * into table ispfli from spfli&lt;/P&gt;&lt;P&gt;             where carrid eq p_carrid and&lt;/P&gt;&lt;P&gt;             connid eq p_connid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;****************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If in the parameters on the selection screen, we didnt give any values Iam not getting any data into internal table ISPFLI.&lt;/P&gt;&lt;P&gt;Even, if  I give 'AA'  for p_carrid in selection screen iam not getting any values into internal table ISPFLI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we use parameters, in the selection screen is it compulsory to give fill all the values into parameters to get values into internal table???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;Shivaa......&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Feb 2009 10:04:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-parameters-and-select/m-p/5225595#M1208196</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-15T10:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with PARAMETERS and SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-parameters-and-select/m-p/5225596#M1208197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Parameters are used to fetched exact data from table.&lt;/P&gt;&lt;P&gt;If you provide no input in the parameter field while using&lt;/P&gt;&lt;P&gt;where clause it searches for a blank entry in Database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In you codes:&lt;/P&gt;&lt;P&gt;If carrid = AA and Connid = No input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no specific record in database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here comes difference between Select-options and parameters:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If no input is provided on selection screen select-options will give you all recodrs of table&lt;/P&gt;&lt;P&gt;whereas paraameters will give no records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use Select-options as parameters:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options:s_carrid for spfli-carrid no-interval.(Hides upper limit)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * from spfli where carrid in p_carrid. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Gurpreet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Feb 2009 10:16:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-parameters-and-select/m-p/5225596#M1208197</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-15T10:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with PARAMETERS and SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-parameters-and-select/m-p/5225597#M1208198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shiva,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
parameters: p_carrid type spfli-carrid,
p_connid type spfli-connid.


data: ispfli type table of spfli with header line.

select * into table ispfli from spfli
where carrid eq p_carrid and
connid eq p_connid.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here it retrieves the values mentioned of p_carrid and p_connid , once check in spfli table whether there are any entries for condition carrid = AA . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In other case like give select-options &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select-options : s_carrid type spfli-carrid,
s_connid type spfli-connid.


data: ispfli type table of spfli with header line.

select * into table ispfli from spfli
where carrid in s_carrid and
connid in s_connid.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here if s_connid is space then it retrieves all the records .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if we give parameters we shud give the values . where as if we dont give ny values in select-options it retrieves all values . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS : check in debugging mode , you will get clear idea .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards ,&lt;/P&gt;&lt;P&gt;Aby&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Feb 2009 10:19:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-parameters-and-select/m-p/5225597#M1208198</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-15T10:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with PARAMETERS and SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-parameters-and-select/m-p/5225598#M1208199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If u r using parameters and if u dont mention any values it is consider as BLANK..So it wont fetch any data from spfli...&lt;/P&gt;&lt;P&gt;And for the second condition,u mentioned the first field with AA and second field u left with blank...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * into table ispfli from spfli&lt;/P&gt;&lt;P&gt;where carrid eq p_carrid and&lt;/P&gt;&lt;P&gt;connid eq p_connid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In above select query u mentioned carrid eq p_carrid and connid eq p_connid&lt;/P&gt;&lt;P&gt;...u mentioned AND condition...if bothe statements true then it fetches the values into internal table and also there is no record like BLANK inthe SPFLI table...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thats y it isu r not getting any records&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Feb 2009 03:57:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-parameters-and-select/m-p/5225598#M1208199</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-16T03:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with PARAMETERS and SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-parameters-and-select/m-p/5225599#M1208200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: spfli.&lt;/P&gt;&lt;P&gt;parameters: p_carrid type spfli-carrid,&lt;/P&gt;&lt;P&gt;p_connid type spfli-connid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: ispfli type table of spfli with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * into table ispfli from spfli&lt;/P&gt;&lt;P&gt;where carrid eq p_carrid and&lt;/P&gt;&lt;P&gt;connid eq p_connid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case u canu2019t use u2018ANDu2019 . because  u2018ANDu2019 means to satisfy both the condition.&lt;/P&gt;&lt;P&gt;U give carrid u2018AAu2019.so the second condition was false. So u r internal table have none of the  record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;ARUN.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Feb 2009 04:15:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-parameters-and-select/m-p/5225599#M1208200</guid>
      <dc:creator>former_member224008</dc:creator>
      <dc:date>2009-02-16T04:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with PARAMETERS and SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-parameters-and-select/m-p/5225600#M1208201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options:s_carrid for spfli-carrid no-interval no-extension. " display just like a parameter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * from spfli where carrid in p_carrid. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Feb 2009 04:24:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-parameters-and-select/m-p/5225600#M1208201</guid>
      <dc:creator>dev_parbutteea</dc:creator>
      <dc:date>2009-02-16T04:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with PARAMETERS and SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-parameters-and-select/m-p/5225601#M1208202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You didnot get any output because u have used 'AND' condition.&lt;/P&gt;&lt;P&gt;If you want ur condition to be checked against all those u gave in query,then use 'AND' else use 'OR'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bcoz, 'AND' checks for all conditions,only if all are true ,will it gives the corresponding record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With select-options ,if u dont give any input,it fetches all records.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Feb 2009 04:31:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-parameters-and-select/m-p/5225601#M1208202</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-16T04:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with PARAMETERS and SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-parameters-and-select/m-p/5225602#M1208203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get the data from database table for both carrid and connid. You can use select-options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check with this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables:&lt;/P&gt;&lt;P&gt;spfli.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options:&lt;/P&gt;&lt;P&gt;s_carrid for spfli-carrid,&lt;/P&gt;&lt;P&gt;s_connid for spfli-connid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: ispfli TYPE TABLE OF spfli WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SELECT *  FROM spfli INTO CORRESPONDING FIELDS OF  TABLE ispfli&lt;/P&gt;&lt;P&gt;WHERE carrid in s_carrid AND&lt;/P&gt;&lt;P&gt;connid in s_connid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rajani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Feb 2009 04:36:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-parameters-and-select/m-p/5225602#M1208203</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-16T04:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with PARAMETERS and SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-parameters-and-select/m-p/5225603#M1208204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hii...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ITS A WORKING CODE......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: spfli.&lt;/P&gt;&lt;P&gt;parameters: p_carrid type spfli-carrid,&lt;/P&gt;&lt;P&gt;p_connid type spfli-connid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: ispfli type table of spfli with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from spfli into table ispfli&lt;/P&gt;&lt;P&gt;      where carrid eq p_carrid and&lt;/P&gt;&lt;P&gt;                  connid eq p_connid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you dont give both the parameter filled with value ...you will not get any value as result of the selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**************************************but if you go like this......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: spfli.&lt;/P&gt;&lt;P&gt;select-options: p_carrid type spfli-carrid,&lt;/P&gt;&lt;P&gt;p_connid type spfli-connid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: ispfli type table of spfli with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from spfli into table ispfli&lt;/P&gt;&lt;P&gt;      where carrid in p_carrid and&lt;/P&gt;&lt;P&gt;                  connid in p_connid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but if you go like thiis even if you dont give any value for select option it will return you all records....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so you can go like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: spfli.&lt;/P&gt;&lt;P&gt;parameters: p_carrid type spfli-carrid obligatory,&lt;/P&gt;&lt;P&gt;p_connid type spfli-connid obligatory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: ispfli type table of spfli with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from spfli into table ispfli&lt;/P&gt;&lt;P&gt;      where carrid eq p_carrid and&lt;/P&gt;&lt;P&gt;                  connid eq p_connid.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Feb 2009 04:40:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-parameters-and-select/m-p/5225603#M1208204</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-16T04:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with PARAMETERS and SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-parameters-and-select/m-p/5225604#M1208205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;   Parameters you can not keep blank,&lt;/P&gt;&lt;P&gt;   And as far as AA is concerned, there may not be any data with AA  as Carrid. &lt;/P&gt;&lt;P&gt;   If you will remove the other Parameter i.e. p_connid you will definately get some data in the Internal table .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;   And use "Select * from table into i_table &lt;/P&gt;&lt;P&gt;                              where carrid = p_carrid and&lt;/P&gt;&lt;P&gt;                                       connid = p_connid  ". and give inputs on the Selection Screen to both the parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this will help u,&lt;/P&gt;&lt;P&gt;If I am wrong please let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Suraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Feb 2009 04:42:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-parameters-and-select/m-p/5225604#M1208205</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-16T04:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with PARAMETERS and SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-parameters-and-select/m-p/5225605#M1208206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I would suggest you one more option:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Follow the same code you are using, but try including two more statements above the select query and use like in the select query.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
tables: spfli.
parameters: p_carrid type spfli-carrid,
p_connid type spfli-connid.

data: ispfli type table of spfli with header line.

if p_carrid is initial.
p_carrid = '%'.
endif.

if p_connid is initial.
p_connid = '%'.
endif.

select * into table ispfli from spfli
where carrid like p_carrid and
connid like p_connid.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hope this will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Swarna Munukoti.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Swarna Munukoti on Feb 16, 2009 5:54 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Feb 2009 04:53:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-parameters-and-select/m-p/5225605#M1208206</guid>
      <dc:creator>former_member217544</dc:creator>
      <dc:date>2009-02-16T04:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with PARAMETERS and SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-parameters-and-select/m-p/5225606#M1208207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Shiva,&lt;/P&gt;&lt;P&gt;When p_carrid AND p_connid contain value, then the records are retrieved, or else it is not fetched.&lt;/P&gt;&lt;P&gt;Anyways, that can be very well handled by SELECT-OPTIONS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just try it, &lt;/P&gt;&lt;P&gt;[Select-Options and Parameters|&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1228685"&gt;&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS and PARAMETERS look similar, but behave differently.&lt;/P&gt;&lt;P&gt;For example,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS:
  p_field1 TYPE vbap-vbeln,
  p_filed2 TYPE vbap-vbeln.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now , we'll a select query,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT vbeln
             matnr
             posnr
             matkl
FROM  vbap
INTO TABLE I_TAB
WHERE vbeln IS BETWEEN p_field1 AND p_field2.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If p_field1 and p_field2 contain no value, then no records are fetched.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whereas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:
  w_vbeln TYPE vbap-vbeln.
 
SELECT-OPTIONS:
  s_vbeln FOR w_vbeln NO-EXTENSION NO INTERVALS.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now, we'll run a select query using select-options,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT vbeln
             matnr
             posnr
             matkl
FROM  vbap
INTO TABLE I_TAB
WHERE vbeln IN s_vbeln.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If s_vbeln is NULL, I_TAB contains * all records of VBAP*.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just, try it out, you'll experience the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks: Zahack&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Feb 2009 05:49:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-parameters-and-select/m-p/5225606#M1208207</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-16T05:49:14Z</dc:date>
    </item>
  </channel>
</rss>

