<?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: select logic. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-logic/m-p/6953244#M1489001</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 can use select-options instead of parameter and use no-extension, no intervals.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options:  origin for (dataelemet) no-extension no intervals.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT atnam&lt;/P&gt;&lt;P&gt;atinn&lt;/P&gt;&lt;P&gt;FROM cabn&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE lt_cabn&lt;/P&gt;&lt;P&gt;WHERE atnam in origin&lt;/P&gt;&lt;P&gt;and  (other selection screen input)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think it will help u&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Arul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Jun 2010 07:06:16 GMT</pubDate>
    <dc:creator>arul_murugan</dc:creator>
    <dc:date>2010-06-21T07:06:16Z</dc:date>
    <item>
      <title>select logic.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-logic/m-p/6953240#M1488997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi masters,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am bit confused with my logic and need bit your assistence.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a selection screen with 8 parameters.&lt;/P&gt;&lt;P&gt;they all are characteristics.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if user inputs on any of the above parameters  ex : parameters : origin -07122.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have written select statement like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT origin1 IS INITIAL.&lt;/P&gt;&lt;P&gt;    SELECT atnam&lt;/P&gt;&lt;P&gt;           atinn&lt;/P&gt;&lt;P&gt;           FROM cabn&lt;/P&gt;&lt;P&gt;           INTO CORRESPONDING FIELDS OF TABLE lt_cabn&lt;/P&gt;&lt;P&gt;           WHERE atnam = origin.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which is fine...but if the user enters values on all 8 parameters how could be the  select statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you,&lt;/P&gt;&lt;P&gt;pasala.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 06:56:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-logic/m-p/6953240#M1488997</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-21T06:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: select logic.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-logic/m-p/6953241#M1488998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can i know the variable is origin or orgin1?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 07:02:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-logic/m-p/6953241#M1488998</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-21T07:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: select logic.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-logic/m-p/6953242#M1488999</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;Just want to know all the fields are from the CABN table? . If so you can pass all the parameters to the same selection query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just replace that corresponding fields into table with proper internal table . That will give you performance issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters : a type (anything),&lt;/P&gt;&lt;P&gt;                     b type (anything),&lt;/P&gt;&lt;P&gt;                     c type (anything),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------" /&gt;&lt;P&gt;i type (anything).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select (fields) from table into (internal table) where (this ) = a and&lt;/P&gt;&lt;P&gt;                                                                                (this ) = b and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&gt;&lt;P&gt;  (this ) = i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Regards,&lt;/P&gt;&lt;P&gt;Sumodh.P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 07:04:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-logic/m-p/6953242#M1488999</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-21T07:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: select logic.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-logic/m-p/6953243#M1489000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi  ,&lt;/P&gt;&lt;P&gt;it should be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT origin1 IS INITIAL.&lt;/P&gt;&lt;P&gt;SELECT atnam&lt;/P&gt;&lt;P&gt;atinn&lt;/P&gt;&lt;P&gt;FROM cabn&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE lt_cabn&lt;/P&gt;&lt;P&gt;WHERE atnam = origin and/or&lt;/P&gt;&lt;P&gt;                atnam = origin2 and/or&lt;/P&gt;&lt;P&gt;                atnam = origin3 and/or&lt;/P&gt;&lt;P&gt;                ...&lt;/P&gt;&lt;P&gt;                ...&lt;/P&gt;&lt;P&gt;                atnam = origin7 and/or&lt;/P&gt;&lt;P&gt;                atnam = origin8.&lt;/P&gt;&lt;P&gt;                &lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its very basic question , but just to assist you , have replied.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is helpful,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Uma Dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 07:05:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-logic/m-p/6953243#M1489000</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-21T07:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: select logic.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-logic/m-p/6953244#M1489001</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 can use select-options instead of parameter and use no-extension, no intervals.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options:  origin for (dataelemet) no-extension no intervals.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT atnam&lt;/P&gt;&lt;P&gt;atinn&lt;/P&gt;&lt;P&gt;FROM cabn&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE lt_cabn&lt;/P&gt;&lt;P&gt;WHERE atnam in origin&lt;/P&gt;&lt;P&gt;and  (other selection screen input)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think it will help u&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Arul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 07:06:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-logic/m-p/6953244#M1489001</guid>
      <dc:creator>arul_murugan</dc:creator>
      <dc:date>2010-06-21T07:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: select logic.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-logic/m-p/6953245#M1489002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Uma,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have 12 parameters, like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 desti  2 origin 3 ccode 4 citem  5 tcatg 6 using  7status 8custm 9reqdat 10expid 11 impld  .12 sapnu &lt;/P&gt;&lt;P&gt;they all are characteristics.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if the user enters values on any of the above parameters it should go to CABN and fetch and store in LT_CABN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the initial stage all of them will have values as they are characteristics.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what i have done was i have created 12 variables where their will be no value unless user enters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so that ...is the reason i have given the select statement like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT origin1 IS INITIAL.&lt;/P&gt;&lt;P&gt;    SELECT atnam&lt;/P&gt;&lt;P&gt;           atinn&lt;/P&gt;&lt;P&gt;           FROM cabn&lt;/P&gt;&lt;P&gt;           INTO CORRESPONDING FIELDS OF TABLE lt_cabn&lt;/P&gt;&lt;P&gt;           WHERE atnam = origin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; elseIF NOT ccode1 IS INITIAL.&lt;/P&gt;&lt;P&gt;    SELECT atnam&lt;/P&gt;&lt;P&gt;           atinn&lt;/P&gt;&lt;P&gt;           FROM cabn&lt;/P&gt;&lt;P&gt;           INTO CORRESPONDING FIELDS OF TABLE lt_cabn&lt;/P&gt;&lt;P&gt;           WHERE atnam =  ccode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but if any of the above parameter is successfull it does not look at the below as i have given ELSEIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i write the logic to look at all the parameters.. i hope i make sense here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 07:17:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-logic/m-p/6953245#M1489002</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-21T07:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: select logic.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-logic/m-p/6953246#M1489003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All of them refer to the same field? That is the atnam field , then instead of using parameters u can use select-options. U can enter multiple values like 8 values there itself and use the query for atnam in Select-options. it will solve ur problem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 07:28:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-logic/m-p/6953246#M1489003</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-21T07:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: select logic.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-logic/m-p/6953247#M1489004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bhaskar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;parameters : a type atnam, 
           .b type atnam . " etc

data : r_atnam type range of atnam with header line.

refresh r_atnam.
clear r_atnam.

r_atnam-sign = 'I'.
r_atnam-option = 'EQ'.
r_atnam-low = a.
append r_atnam.
clear r_atnam-low. " Clear only LOW
r_atnam-low = B.
append r_atnam.
clear r_atnam-low. "
r_atnam-low = C. "Etc
append r_atnam.
clear r_atnam-low. " Clear only LOW
                    
"or
you can directly take single select-option
tables cabn.
select-options s_atnam for cabn-atnam.
now 

select atinn atnam
from cabn into corresponding fields of table lt_cabn
where atnam in r_atnam. " If you take SELECT-OPTINS replace r_atnam with s_atnam

Then when you want the values
read table lt_cabn into wa_cabn with key atnam = A " The value entered in Parameter
read table lt_cabn into wa_cabn with key atnam = B " Etc&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Cheerz&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 07:29:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-logic/m-p/6953247#M1489004</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-21T07:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: select logic.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-logic/m-p/6953248#M1489005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this logic:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
ranges: r_atnam for cabn-atnam.
r_atnam-sign = 'I'.
r_atnam-option = 'EQ'.
if not desti is initial.
  r_atnam-low = desti. append r_atnam.
endif.
if not origin is initial.
  r_atnam-low = origin. append r_atnam.
endif.
*" and so on for other parameters
SELECT atnam
atinn
FROM cabn
INTO CORRESPONDING FIELDS OF TABLE lt_cabn
WHERE atnam in r_atnam. " in ranges. You write only one SELECT
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 07:30:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-logic/m-p/6953248#M1489005</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-21T07:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: select logic.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-logic/m-p/6953249#M1489006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pasalabasker,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try to explain ur requirement , Its not clear to me now.&lt;/P&gt;&lt;P&gt;Please elaborate broadly so that I can help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If all the 12 parameters are declared as select option then you can compare them one by one in 1 select query as shopwn in my previous post.&lt;/P&gt;&lt;P&gt;If they are not present on your selection screen , then&lt;/P&gt;&lt;P&gt;create a range and populate these 12 values in that range and then use that range in select query.  &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;Uma Dave.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: UmaDave on Jun 21, 2010 10:04 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 08:03:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-logic/m-p/6953249#M1489006</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-21T08:03:48Z</dc:date>
    </item>
  </channel>
</rss>

