<?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 logic needed for a requirement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-needed-for-a-requirement/m-p/4783277#M1120470</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the table EKEH I need the max value of ABRUF by passing the ebeln and ebelp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the ebeln and ebelp is in one internal table. my problem is when i using the select query with all entries the aggrigate function like MAX(ABRUF) cannot be used and i need to avoid the select statement inside the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So is there any other way to get the max value of ABRUF by passing the ebeln and ebelp from an internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;sai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Dec 2008 09:48:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-12-03T09:48:03Z</dc:date>
    <item>
      <title>logic needed for a requirement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-needed-for-a-requirement/m-p/4783277#M1120470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the table EKEH I need the max value of ABRUF by passing the ebeln and ebelp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the ebeln and ebelp is in one internal table. my problem is when i using the select query with all entries the aggrigate function like MAX(ABRUF) cannot be used and i need to avoid the select statement inside the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So is there any other way to get the max value of ABRUF by passing the ebeln and ebelp from an internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;sai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Dec 2008 09:48:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-needed-for-a-requirement/m-p/4783277#M1120470</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-03T09:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: logic needed for a requirement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-needed-for-a-requirement/m-p/4783278#M1120471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The alternative for all the records with a single select will  be &lt;/P&gt;&lt;P&gt;    -&lt;/P&gt;&lt;HR originaltext="-------" /&gt;&lt;P&gt;select all records----&lt;/P&gt;&lt;HR originaltext="------------------" /&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;    select * from EKEH  into  table int_XXX for ebeln and ebelp for all entries.....      &lt;/P&gt;&lt;P&gt;    -&lt;/P&gt;&lt;HR originaltext="-------" /&gt;&lt;P&gt;based on location in code where max value needs to be read----&lt;/P&gt;&lt;HR originaltext="-------------" /&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;    take a single ebeln &amp;amp; ebelp&lt;/P&gt;&lt;P&gt;      refresh int_ABRUF .  &lt;/P&gt;&lt;P&gt;    -&lt;/P&gt;&lt;HR originaltext="------" /&gt;&lt;P&gt;Read max value----&lt;/P&gt;&lt;HR originaltext="------------------------------------" /&gt;&lt;P&gt;    loop at int_XXX where ebeln &amp;amp; ebelp = required ebeln &amp;amp; ebelp.&lt;/P&gt;&lt;P&gt;        append int_XXX to int_ABRUF.&lt;/P&gt;&lt;P&gt;     endloop.&lt;/P&gt;&lt;P&gt;     sort int_ABRUF by ABRUF  descending.&lt;/P&gt;&lt;P&gt;     read table int_ABRUF index 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but again select max() can be used if there are less ebeln+ebelp combinations and number of select calls in the logic comparitively less..otherwise try the above suggestion&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Byju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Dec 2008 10:01:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-needed-for-a-requirement/m-p/4783278#M1120471</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-03T10:01:07Z</dc:date>
    </item>
  </channel>
</rss>

