<?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 Select statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2790312#M650903</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am fetching the Records from GLPCA TABLE according to selection-criteria as well as&lt;/P&gt;&lt;P&gt;for all entries in it_mara internal table(code given below).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but data base table having 18 records(as per selection criteria) my internal table having 14 records, the remaining four records are duplicate records in data base table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there are four records with all field values are equal. but only one record is  coming into internal table. remaining three are not coming&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and there are two records with all field values are equal but only one record is coming into internal table. remaining one is not coming&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I awant that duplicate records also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if any body know please give me the answer.&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;Shashikumar.G&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT a~matnr&lt;/P&gt;&lt;P&gt;         b~maktx&lt;/P&gt;&lt;P&gt;         INTO TABLE it_mara&lt;/P&gt;&lt;P&gt;         FROM mara AS a&lt;/P&gt;&lt;P&gt;         INNER JOIN makt AS b&lt;/P&gt;&lt;P&gt;         ON b&lt;SUB&gt;matnr = a&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;         AND b~spras = sy-langu&lt;/P&gt;&lt;P&gt;         WHERE mtart = 'RAW'&lt;/P&gt;&lt;P&gt;         AND matkl IN ('101', '102','103','104','105','106').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF it_mara IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SORT: it_mara BY matnr.&lt;/P&gt;&lt;P&gt;    SELECT rrcty&lt;/P&gt;&lt;P&gt;           matnr&lt;/P&gt;&lt;P&gt;           stagr&lt;/P&gt;&lt;P&gt;           ksl&lt;/P&gt;&lt;P&gt;           msl&lt;/P&gt;&lt;P&gt;           INTO TABLE it_glpca&lt;/P&gt;&lt;P&gt;           FROM glpca AS a&lt;/P&gt;&lt;P&gt;           FOR ALL ENTRIES IN it_mara&lt;/P&gt;&lt;P&gt;           WHERE matnr = it_mara-matnr&lt;/P&gt;&lt;P&gt;           AND kokrs = p_kokrs&lt;/P&gt;&lt;P&gt;           AND   rbukrs = p_bukrs&lt;/P&gt;&lt;P&gt;           AND   gsber = p_gsber&lt;/P&gt;&lt;P&gt;           AND   rprctr = p_prctr&lt;/P&gt;&lt;P&gt;           AND   poper = p_period.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 01 Sep 2007 08:35:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-01T08:35:59Z</dc:date>
    <item>
      <title>Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2790312#M650903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am fetching the Records from GLPCA TABLE according to selection-criteria as well as&lt;/P&gt;&lt;P&gt;for all entries in it_mara internal table(code given below).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but data base table having 18 records(as per selection criteria) my internal table having 14 records, the remaining four records are duplicate records in data base table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there are four records with all field values are equal. but only one record is  coming into internal table. remaining three are not coming&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and there are two records with all field values are equal but only one record is coming into internal table. remaining one is not coming&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I awant that duplicate records also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if any body know please give me the answer.&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;Shashikumar.G&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT a~matnr&lt;/P&gt;&lt;P&gt;         b~maktx&lt;/P&gt;&lt;P&gt;         INTO TABLE it_mara&lt;/P&gt;&lt;P&gt;         FROM mara AS a&lt;/P&gt;&lt;P&gt;         INNER JOIN makt AS b&lt;/P&gt;&lt;P&gt;         ON b&lt;SUB&gt;matnr = a&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;         AND b~spras = sy-langu&lt;/P&gt;&lt;P&gt;         WHERE mtart = 'RAW'&lt;/P&gt;&lt;P&gt;         AND matkl IN ('101', '102','103','104','105','106').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF it_mara IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SORT: it_mara BY matnr.&lt;/P&gt;&lt;P&gt;    SELECT rrcty&lt;/P&gt;&lt;P&gt;           matnr&lt;/P&gt;&lt;P&gt;           stagr&lt;/P&gt;&lt;P&gt;           ksl&lt;/P&gt;&lt;P&gt;           msl&lt;/P&gt;&lt;P&gt;           INTO TABLE it_glpca&lt;/P&gt;&lt;P&gt;           FROM glpca AS a&lt;/P&gt;&lt;P&gt;           FOR ALL ENTRIES IN it_mara&lt;/P&gt;&lt;P&gt;           WHERE matnr = it_mara-matnr&lt;/P&gt;&lt;P&gt;           AND kokrs = p_kokrs&lt;/P&gt;&lt;P&gt;           AND   rbukrs = p_bukrs&lt;/P&gt;&lt;P&gt;           AND   gsber = p_gsber&lt;/P&gt;&lt;P&gt;           AND   rprctr = p_prctr&lt;/P&gt;&lt;P&gt;           AND   poper = p_period.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Sep 2007 08:35:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2790312#M650903</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-01T08:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2790313#M650904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi..Shasikumar..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;You have to fetch the Keyfield GL_SIRID of the Table GLPCA.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;So add this field in  your Itab also...&lt;/P&gt;&lt;P&gt;Then it will give all those records .. otherwise it will return the distinct records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF it_mara IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT: it_mara BY matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;SELECT &lt;/P&gt;&lt;P&gt;GL_SIRID &amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;rrcty&lt;/P&gt;&lt;P&gt;matnr&lt;/P&gt;&lt;P&gt;stagr&lt;/P&gt;&lt;P&gt;ksl&lt;/P&gt;&lt;P&gt;msl&lt;/P&gt;&lt;P&gt;INTO TABLE it_glpca&lt;/P&gt;&lt;P&gt;FROM glpca AS a&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN it_mara&lt;/P&gt;&lt;P&gt;WHERE matnr = it_mara-matnr&lt;/P&gt;&lt;P&gt;AND kokrs = p_kokrs&lt;/P&gt;&lt;P&gt;AND rbukrs = p_bukrs&lt;/P&gt;&lt;P&gt;AND gsber = p_gsber&lt;/P&gt;&lt;P&gt;AND rprctr = p_prctr&lt;/P&gt;&lt;P&gt;AND poper = p_period.&lt;/P&gt;&lt;P&gt;endif. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;reward if Helpful.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Sep 2007 08:42:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2790313#M650904</guid>
      <dc:creator>varma_narayana</dc:creator>
      <dc:date>2007-09-01T08:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2790314#M650905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Varma,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem was solved with ur answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Shashikumar.G&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Sep 2007 09:00:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2790314#M650905</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-01T09:00:09Z</dc:date>
    </item>
  </channel>
</rss>

