<?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: Analyzing ABAP Code! in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/analyzing-abap-code/m-p/983290#M72459</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For all entries returns only the unique records use in select statement..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg&lt;/P&gt;&lt;P&gt;SELECT AUFNR CHARG FROM AFPO&lt;/P&gt;&lt;P&gt;INTO TABLE I_AFPO&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN I_DATA_TEMP&lt;/P&gt;&lt;P&gt;WHERE AUFNR = I_DATA_TEMP-AUFNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this will give the unique records of AUFNR CHARG ..&lt;/P&gt;&lt;P&gt;since AUFNR and posnr are keys &amp;amp; u hv used only AUFNR in select stmt u will only unique records of AUFNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u want to get unique records from table better u specify all the keys in select stmt whether u use or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT AUFNR POSNR CHARG FROM AFPO&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE I_AFPO&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN I_DATA_TEMP&lt;/P&gt;&lt;P&gt;WHERE AUFNR = I_DATA_TEMP-AUFNR.&lt;/P&gt;&lt;P&gt;now this will give unique records of AUFNR POSNR .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Sep 2005 02:47:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-09-16T02:47:41Z</dc:date>
    <item>
      <title>Analyzing ABAP Code!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/analyzing-abap-code/m-p/983284#M72453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can anyone please tell what this does......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   SELECT AUFNR CHARG FROM AFPO&lt;/P&gt;&lt;P&gt;   INTO TABLE I_AFPO&lt;/P&gt;&lt;P&gt;   FOR ALL ENTRIES IN I_DATA_TEMP&lt;/P&gt;&lt;P&gt;   WHERE AUFNR = I_DATA_TEMP-AUFNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AFPO is a table and has a primary key of AUFNR(order number) and POSNR(order item).  My question is how is it retrieving unique records from AFPO when I am supplying only Order number in AUFNR = I_DATA_TEMP-AUFNR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I_DATA_TEMP is an internal table and has Order numbers and some other fields.&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;Sabrina.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Sep 2005 16:39:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/analyzing-abap-code/m-p/983284#M72453</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-15T16:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: Analyzing ABAP Code!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/analyzing-abap-code/m-p/983285#M72454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sabrina,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason why you are seeing only unique values is that the option 'INTO TABLE' works that way. It eliminates any duplicates by default. If you want all the records, including duplicates, then you need to add POSNR to the internal table I_AFPO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Sep 2005 16:44:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/analyzing-abap-code/m-p/983285#M72454</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-15T16:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: Analyzing ABAP Code!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/analyzing-abap-code/m-p/983286#M72455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi the select will get all entries of AUFNE for rows in I_DATA_TEMP . &lt;/P&gt;&lt;P&gt;It will be similar to ( just for understanding )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT AUFNR CHARG FROM AFPO&lt;/P&gt;&lt;P&gt;INTO TABLE I_AFPO&lt;/P&gt;&lt;P&gt;WHEREAUFNR = I_DATA_TEMP(1)-AUFNR&lt;/P&gt;&lt;P&gt;or AUFNR = I_DATA_TEMP(2)-AUFNR.&lt;/P&gt;&lt;P&gt;or AUFNR = I_DATA_TEMP(3)-AUFNR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;Upto no of rows in I_DATA_TEMP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Sep 2005 16:44:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/analyzing-abap-code/m-p/983286#M72455</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-15T16:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: Analyzing ABAP Code!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/analyzing-abap-code/m-p/983287#M72456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In our system, there is only ever one AFPO record per production order,  do you have multple?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Sep 2005 16:45:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/analyzing-abap-code/m-p/983287#M72456</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-09-15T16:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: Analyzing ABAP Code!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/analyzing-abap-code/m-p/983288#M72457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rich, thanks for getting back to me. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did check in AFPO table, the process orders are unique and all the order items have a value of one.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Sep 2005 16:50:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/analyzing-abap-code/m-p/983288#M72457</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-15T16:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: Analyzing ABAP Code!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/analyzing-abap-code/m-p/983289#M72458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SAbrina&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you tried to use the statament&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT DISTINCT * FROM &amp;lt;TABLE&amp;gt;....?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a piece of SAP help:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DISTINCT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Duplicate entries in the result set are automatically deleted. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT DISTINCT AUFNR CHARG FROM AFPO into table I_AFPO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: max bianchi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Sep 2005 16:57:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/analyzing-abap-code/m-p/983289#M72458</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-15T16:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Analyzing ABAP Code!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/analyzing-abap-code/m-p/983290#M72459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For all entries returns only the unique records use in select statement..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg&lt;/P&gt;&lt;P&gt;SELECT AUFNR CHARG FROM AFPO&lt;/P&gt;&lt;P&gt;INTO TABLE I_AFPO&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN I_DATA_TEMP&lt;/P&gt;&lt;P&gt;WHERE AUFNR = I_DATA_TEMP-AUFNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this will give the unique records of AUFNR CHARG ..&lt;/P&gt;&lt;P&gt;since AUFNR and posnr are keys &amp;amp; u hv used only AUFNR in select stmt u will only unique records of AUFNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u want to get unique records from table better u specify all the keys in select stmt whether u use or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT AUFNR POSNR CHARG FROM AFPO&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE I_AFPO&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN I_DATA_TEMP&lt;/P&gt;&lt;P&gt;WHERE AUFNR = I_DATA_TEMP-AUFNR.&lt;/P&gt;&lt;P&gt;now this will give unique records of AUFNR POSNR .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Sep 2005 02:47:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/analyzing-abap-code/m-p/983290#M72459</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-16T02:47:41Z</dc:date>
    </item>
  </channel>
</rss>

