<?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 Internal table value checking in custom table using SQL... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-value-checking-in-custom-table-using-sql/m-p/1073205#M95470</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a table which has following fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;X1 TABLE (ZCONfig table)      X2 TABLE: (Internal table)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LIFNR  land1                    LIFNR:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;123      br                      234&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;234      br                      567&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;456      br                      123 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;567      Gr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to see if all the field values of LIFNR in internal table X2 (X2-LIFNR) are present in X1 or not. &lt;/P&gt;&lt;P&gt;Raise error if it is not.&lt;/P&gt;&lt;P&gt;How do I do this using SQL ? I guess I have to use read statement.&lt;/P&gt;&lt;P&gt;Please help. Points will be awarded.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Dec 2005 07:43:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-12-23T07:43:08Z</dc:date>
    <item>
      <title>Internal table value checking in custom table using SQL...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-value-checking-in-custom-table-using-sql/m-p/1073205#M95470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a table which has following fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;X1 TABLE (ZCONfig table)      X2 TABLE: (Internal table)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LIFNR  land1                    LIFNR:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;123      br                      234&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;234      br                      567&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;456      br                      123 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;567      Gr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to see if all the field values of LIFNR in internal table X2 (X2-LIFNR) are present in X1 or not. &lt;/P&gt;&lt;P&gt;Raise error if it is not.&lt;/P&gt;&lt;P&gt;How do I do this using SQL ? I guess I have to use read statement.&lt;/P&gt;&lt;P&gt;Please help. Points will be awarded.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Dec 2005 07:43:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-value-checking-in-custom-table-using-sql/m-p/1073205#M95470</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-23T07:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table value checking in custom table using SQL...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-value-checking-in-custom-table-using-sql/m-p/1073206#M95471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;select *
       from ztable
       into table it_ztable.
if sy-subrc = 0.
loop at it_x2table.
read table it_ztable with key lifnr = it_x2table-lifnr.
if sy-subrc &amp;lt;&amp;gt; 0.
raise error.....
endif.
endloop.

endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Dec 2005 07:50:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-value-checking-in-custom-table-using-sql/m-p/1073206#M95471</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-23T07:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table value checking in custom table using SQL...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-value-checking-in-custom-table-using-sql/m-p/1073207#M95472</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;As Vijay suggested,you can do.But with slight modififcation.Instead of raising error message every time,just collect the error message in an internal table and then display it finally.That will be good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types : begin of ty,&lt;/P&gt;&lt;P&gt;        message(20) type c,&lt;/P&gt;&lt;P&gt;        end of ty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : itab type standard table of ty,&lt;/P&gt;&lt;P&gt;       wa type ty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select *&lt;/P&gt;&lt;P&gt;       from ztable&lt;/P&gt;&lt;P&gt;       into table it_ztable.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;loop at it_x2table.&lt;/P&gt;&lt;P&gt;read table it_ztable with key lifnr = it_x2table-lifnr.&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;concatenate it_x2table-lifnr  not present ' into wa-message.&lt;/P&gt;&lt;P&gt;append wa to itab.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop. &lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab into wa.&lt;/P&gt;&lt;P&gt;write : / wa-message.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Dec 2005 09:30:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-value-checking-in-custom-table-using-sql/m-p/1073207#M95472</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2005-12-23T09:30:24Z</dc:date>
    </item>
  </channel>
</rss>

