<?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 Statement..SQL in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-sql/m-p/4111551#M983020</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Varun &lt;/P&gt;&lt;P&gt;try with follows,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT fieldnm
FROM YRDBFH010
WHERE fieldnm NOT IN (SELECT b.fieldnm
FROM YRDBFH010 a, RSOSFIELDMAP b
where 1=1
and a.SOURCESYSTEM = b.LOGSYS
and a.datasource = b.oltpsource
and b.objvers = 'A'
and rtrim(a.sourcesystem)||rtrim(a.datasource) = :p_src_ds and a.psa_id like :p_psa_id
and b.iobjnm in ('0MATL_TYPE','0STOR_LOC','0SALESORG','0SHIP_TO', '0MATERIAL', 'YRDBMUG1', '0PLANT', '0COMP_CODE', '0SOLD_TO', '0DISTR_CHAN', '0DIVISION'))

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I DONT HAVE YOUR FIELDS AND TABLE &lt;/P&gt;&lt;P&gt;SELECT WHAT YOU WANT IN THE TABLE AND USE WHERE CONDITION WITH &lt;STRONG&gt;NOT IN&lt;/STRONG&gt; THEN PUT YOUR SELECT STATEMENT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REWARDS IF HELPFUL&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Jul 2008 10:24:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-08T10:24:06Z</dc:date>
    <item>
      <title>Select Statement..SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-sql/m-p/4111550#M983019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any one tell me how to &lt;/P&gt;&lt;P&gt;print the exception list of fields for which a match is not found in the below select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT b.fieldnm&lt;/P&gt;&lt;P&gt;FROM YRDBFH010 a, RSOSFIELDMAP b&lt;/P&gt;&lt;P&gt;where 1=1&lt;/P&gt;&lt;P&gt;and a.SOURCESYSTEM = b.LOGSYS&lt;/P&gt;&lt;P&gt;and a.datasource = b.oltpsource&lt;/P&gt;&lt;P&gt;and b.objvers = 'A'&lt;/P&gt;&lt;P&gt;and rtrim(a.sourcesystem)||rtrim(a.datasource) = :p_src_ds and a.psa_id like :p_psa_id&lt;/P&gt;&lt;P&gt;and b.iobjnm in ('0MATL_TYPE','0STOR_LOC','0SALESORG','0SHIP_TO', '0MATERIAL', 'YRDBMUG1', '0PLANT', '0COMP_CODE', '0SOLD_TO', '0DISTR_CHAN', '0DIVISION')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Points will be rewarded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Varun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2008 10:09:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-sql/m-p/4111550#M983019</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-08T10:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement..SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-sql/m-p/4111551#M983020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Varun &lt;/P&gt;&lt;P&gt;try with follows,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT fieldnm
FROM YRDBFH010
WHERE fieldnm NOT IN (SELECT b.fieldnm
FROM YRDBFH010 a, RSOSFIELDMAP b
where 1=1
and a.SOURCESYSTEM = b.LOGSYS
and a.datasource = b.oltpsource
and b.objvers = 'A'
and rtrim(a.sourcesystem)||rtrim(a.datasource) = :p_src_ds and a.psa_id like :p_psa_id
and b.iobjnm in ('0MATL_TYPE','0STOR_LOC','0SALESORG','0SHIP_TO', '0MATERIAL', 'YRDBMUG1', '0PLANT', '0COMP_CODE', '0SOLD_TO', '0DISTR_CHAN', '0DIVISION'))

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I DONT HAVE YOUR FIELDS AND TABLE &lt;/P&gt;&lt;P&gt;SELECT WHAT YOU WANT IN THE TABLE AND USE WHERE CONDITION WITH &lt;STRONG&gt;NOT IN&lt;/STRONG&gt; THEN PUT YOUR SELECT STATEMENT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REWARDS IF HELPFUL&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2008 10:24:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-sql/m-p/4111551#M983020</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-08T10:24:06Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement..SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-sql/m-p/4111552#M983021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Still I am not able to understand..could u please explain me still more clearly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2008 10:50:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-sql/m-p/4111552#M983021</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-08T10:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement..SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-sql/m-p/4111553#M983022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If i understand correctly...your requirement is to run a select statement....and then after the execution, you want to know for which fields did you select statement did not find a match and failed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can't know this directly from the select statement. Probably the best way to do it will be to select the data in the program (in an internal table) and then loop on that internal table (or read it as the case may be) to see if it contains the values you want to check. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if this is not your requirement...request you to please re-phrase it and make it a bit clearer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2008 10:59:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-sql/m-p/4111553#M983022</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-08T10:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement..SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-sql/m-p/4111554#M983023</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;Try this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT b.fieldnm&lt;/P&gt;&lt;P&gt;FROM YRDBFH010 a, RSOSFIELDMAP b  &lt;STRONG&gt;into wa_fieldnm&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;where 1=1&lt;/P&gt;&lt;P&gt;and a.SOURCESYSTEM = b.LOGSYS&lt;/P&gt;&lt;P&gt;and a.datasource = b.oltpsource&lt;/P&gt;&lt;P&gt;and b.objvers = 'A'&lt;/P&gt;&lt;P&gt;and rtrim(a.sourcesystem)||rtrim(a.datasource) = :p_src_ds and a.psa_id like :p_psa_id&lt;/P&gt;&lt;P&gt;and b.iobjnm in ('0MATL_TYPE','0STOR_LOC','0SALESORG','0SHIP_TO', '0MATERIAL', 'YRDBMUG1', '0PLANT', '0COMP_CODE', '0SOLD_TO', '0DISTR_CHAN', '0DIVISION')&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if sy-subrc &amp;lt;&amp;gt; 0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;append wa_fieldnm.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;endif.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;endselect.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where wa_fieldnm has a field which is of type b.fieldnm&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Abaper&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2008 11:10:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-sql/m-p/4111554#M983023</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-08T11:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement..SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-sql/m-p/4111555#M983024</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;Try this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT b.fieldnm&lt;/P&gt;&lt;P&gt;FROM YRDBFH010 a, RSOSFIELDMAP b &lt;STRONG&gt;into wa_fieldnm&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;where 1=1&lt;/P&gt;&lt;P&gt;and a.SOURCESYSTEM = b.LOGSYS&lt;/P&gt;&lt;P&gt;and a.datasource = b.oltpsource&lt;/P&gt;&lt;P&gt;and b.objvers = 'A'&lt;/P&gt;&lt;P&gt;and rtrim(a.sourcesystem)||rtrim(a.datasource) = :p_src_ds and a.psa_id like :p_psa_id&lt;/P&gt;&lt;P&gt;and b.iobjnm in ('0MATL_TYPE','0STOR_LOC','0SALESORG','0SHIP_TO', '0MATERIAL', 'YRDBMUG1', '0PLANT', '0COMP_CODE', '0SOLD_TO', '0DISTR_CHAN', '0DIVISION')&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if sy-subrc &amp;lt;&amp;gt; 0 .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;append wa_fieldnm.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;endif.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;endselect.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where wa_fieldnm has a field which is of type b.fieldnm&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Abaper&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2008 11:18:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-sql/m-p/4111555#M983024</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-08T11:18:11Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement..SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-sql/m-p/4111556#M983025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Still not getting anything..Please help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Varun prasad on Jul 8, 2008 1:44 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2008 11:44:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-sql/m-p/4111556#M983025</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-08T11:44:17Z</dc:date>
    </item>
  </channel>
</rss>

