<?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: In Internal Table logic not matching in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221756#M1379263</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sravya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just go thorugh the code once more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here it is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT ITAB BY EQUNR SHIFT.&lt;/P&gt;&lt;P&gt;LOOP AT ITAB WHERE ITAB-EQUNR EQ 'ACM-P-01' OR ITAB-EQUNR EQ 'ACM-P-02' OR ITAB-EQUNR EQ 'ACM-P-03' OR ITAB-EQUNR EQ 'ACM-P-04' OR ITAB-EQUNR EQ 'ACM-P-05' OR ITAB-EQUNR EQ 'ACM-P-06' OR ITAB-EQUNR EQ 'ACM-P-07u2019 OR ITAB-EQUNR EQ 'ACM-P-08' OR ITAB-EQUNR EQ 'ACMA01' OR ITAB-EQUNR EQ 'ACMA02' OR ITAB-EQUNR EQ 'ACMA03'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF ITAB-SHIFT = u2018Au2019 OR ITAB-SHIFT = u2018Bu2019 OR ITAB-SHIFT = u2018Cu2019.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ITAB2-PRO1 = ITAB2-PRO1 + ITAB-PRO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AT END OF EQUNR&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND ITAB2. ( Here the new table will be appended)&lt;/P&gt;&lt;P&gt;CLEAR ITAB2. ( Here the sum for each machine will be cleared)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ENDAT.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;N.B. Assumption ITAB2 is internal table with headerline.&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;Smart Varghese&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Oct 2009 11:37:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-10-08T11:37:39Z</dc:date>
    <item>
      <title>In Internal Table logic not matching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221746#M1379253</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;There are 11 machines  and for each machine there are 3 shifts . i want to get sum of 3 shifts and write it into another internal table . with the code i have written in debugging mode .if i clear the data i am not getting the sum . if i dont clear it it is adding to next machine number .&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
LOOP AT ITAB  .
  IF ( ITAB-EQUNR EQ 'ACM-P-01' ) OR ( ITAB-EQUNR EQ 'ACM-P-02' ) OR
     ( ITAB-EQUNR EQ 'ACM-P-03' ) OR ( ITAB-EQUNR EQ 'ACM-P-04' ) OR
     ( ITAB-EQUNR EQ 'ACM-P-05' ) OR ( ITAB-EQUNR EQ 'ACM-P-06' ) OR
     ( ITAB-EQUNR EQ 'ACM-P-07' ) OR ( ITAB-EQUNR EQ 'ACM-P-08' ) OR
     ( ITAB-EQUNR EQ 'ACMA01' ) OR ( ITAB-EQUNR EQ 'ACMA02' ) OR ( ITAB-EQUNR EQ 'ACMA03') .

      CASE ITAB-SHIFT .
       when  'A'.
        MOVE ITAB-PRO TO  ACM1A.
       when  'B'.
        MOVE ITAB-PRO TO  ACM1B.
       WHEN  'C'.
        MOVE ITAB-PRO TO  ACM1C.
      ENDCASE.
  ENDIF.
  ITAB-PRO1 = ACM1A + ACM1B + ACM1C.
APPEND ITAB2.

ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sravya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2009 10:25:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221746#M1379253</guid>
      <dc:creator>sravya_ch</dc:creator>
      <dc:date>2009-10-08T10:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: In Internal Table logic not matching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221747#M1379254</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;Please look at the code below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT ITAB BY EQUNR SHIFT.&lt;/P&gt;&lt;P&gt;LOOP AT ITAB WHERE ITAB-EQUNR EQ 'ACM-P-01' OR ITAB-EQUNR EQ 'ACM-P-02' OR ITAB-EQUNR EQ 'ACM-P-03' OR ITAB-EQUNR EQ 'ACM-P-04' OR ITAB-EQUNR EQ 'ACM-P-05' OR ITAB-EQUNR EQ 'ACM-P-06' OR ITAB-EQUNR EQ 'ACM-P-07u2019 OR ITAB-EQUNR EQ 'ACM-P-08' OR ITAB-EQUNR EQ 'ACMA01' OR ITAB-EQUNR EQ 'ACMA02' OR ITAB-EQUNR EQ 'ACMA03'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF ITAB-SHIFT = u2018Au2019 OR ITAB-SHIFT = u2018Bu2019 OR ITAB-SHIFT = u2018Cu2019.&lt;/P&gt;&lt;P&gt; ITAB2-PRO1 = ITAB2-PRO1 + ITAB-PRO.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT END OF EQUNR.&lt;/P&gt;&lt;P&gt;APPEND ITAB2.&lt;/P&gt;&lt;P&gt;CLEAR ITAB2.&lt;/P&gt;&lt;P&gt;ENDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help you.&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;Smart Varghese&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2009 10:49:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221747#M1379254</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-08T10:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: In Internal Table logic not matching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221748#M1379255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi smartvarghese &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;actually its a useful answer but i am not getting the sum .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ThankQ&lt;/P&gt;&lt;P&gt;Sravya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2009 11:07:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221748#M1379255</guid>
      <dc:creator>sravya_ch</dc:creator>
      <dc:date>2009-10-08T11:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: In Internal Table logic not matching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221749#M1379256</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;You have to display the sum for each individual machine or for a combination of any of the 11 machines?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vikranth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2009 11:10:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221749#M1379256</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-08T11:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: In Internal Table logic not matching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221750#M1379257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you want to sum the total for all the  machines for one shift?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;why dont you use collect?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;sort itab by shift.

loop at itab.
 itab2-total = itab2-total + itab-pro.

 at end of shift.
   itab2-shift = itab-shift.
  append itab2.
 endat.

endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2009 11:12:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221750#M1379257</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-08T11:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: In Internal Table logic not matching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221751#M1379258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vikranth.Reddy  &lt;/P&gt;&lt;P&gt; sum of each machine.&lt;/P&gt;&lt;P&gt;Sravya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2009 11:15:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221751#M1379258</guid>
      <dc:creator>sravya_ch</dc:creator>
      <dc:date>2009-10-08T11:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: In Internal Table logic not matching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221752#M1379259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Soumyaprakash Mishra&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code which u have give is not working &lt;/P&gt;&lt;P&gt;Thankq  i will try it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2009 11:15:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221752#M1379259</guid>
      <dc:creator>sravya_ch</dc:creator>
      <dc:date>2009-10-08T11:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: In Internal Table logic not matching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221753#M1379260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;Hi Sravya,
Try this way.
&lt;PRE&gt;&lt;CODE&gt;

SORT itab BY equnr.
LOOP AT itab  .
  CASE itab-shift .
    WHEN  'A'.
      MOVE itab-pro TO  acm1a.
    WHEN  'B'.
      MOVE itab-pro TO  acm1b.
    WHEN  'C'.
      MOVE itab-pro TO  acm1c.
  ENDCASE.
  itab2-pro1 = acm1a + acm1b + acm1c.
  AT END OF equnr.
    IF ( itab-equnr EQ 'ACM-P-01' ) OR ( itab-equnr EQ 'ACM-P-02' ) OR
       ( itab-equnr EQ 'ACM-P-03' ) OR ( itab-equnr EQ 'ACM-P-04' ) OR
       ( itab-equnr EQ 'ACM-P-05' ) OR ( itab-equnr EQ 'ACM-P-06' ) OR
       ( itab-equnr EQ 'ACM-P-07' ) OR ( itab-equnr EQ 'ACM-P-08' ) OR
       ( itab-equnr EQ 'ACMA01' )   OR ( itab-equnr EQ 'ACMA02' )   OR
       ( itab-equnr EQ 'ACMA03') .
      APPEND itab2.
      CLEAR itab2.
    ENDIF.
  ENDAT.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;

Thanks
Venkat.O&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2009 11:17:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221753#M1379260</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2009-10-08T11:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: In Internal Table logic not matching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221754#M1379261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sravya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i guess this code will help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;  ITAB-PRO1 = ACM1A + ACM1B + ACM1C + itab-pro1.&lt;/P&gt;&lt;P&gt; modify itab transporting pro1.&lt;/P&gt;&lt;P&gt;clear: itab,&lt;/P&gt;&lt;P&gt;          acm1a,&lt;/P&gt;&lt;P&gt;          acm1b,&lt;/P&gt;&lt;P&gt;          acm1c.&lt;/P&gt;&lt;P&gt;APPEND ITAB2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2009 11:21:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221754#M1379261</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-08T11:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: In Internal Table logic not matching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221755#M1379262</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;the code that is give by smartvarghese  is ok but here i am getting the sum of all the machines .but i want sum of each machine .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

SORT ITAB BY EQUNR SHIFT.
LOOP AT ITAB WHERE EQUNR EQ 'ACM-P-01' OR EQUNR EQ 'ACM-P-02' OR
                   EQUNR EQ 'ACM-P-03' OR EQUNR EQ 'ACM-P-04' OR
                   EQUNR EQ 'ACM-P-05' OR EQUNR EQ 'ACM-P-06' OR
                   EQUNR EQ 'ACMA01' OR EQUNR EQ 'ACMA02' OR EQUNR EQ 'ACMA03'
                   or EQUNR EQ 'ACM-P-07' OR EQUNR EQ 'ACM-P-08'.

IF ITAB-SHIFT = 'A' OR ITAB-SHIFT = 'B' OR ITAB-SHIFT = 'C'.
ITAB2-PRO1 = ITAB2-PRO1 + ITAB-PRO.
ENDIF.

AT END OF shift.
APPEND ITAB2.

ENDAT.

ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sravya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2009 11:24:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221755#M1379262</guid>
      <dc:creator>sravya_ch</dc:creator>
      <dc:date>2009-10-08T11:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: In Internal Table logic not matching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221756#M1379263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sravya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just go thorugh the code once more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here it is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT ITAB BY EQUNR SHIFT.&lt;/P&gt;&lt;P&gt;LOOP AT ITAB WHERE ITAB-EQUNR EQ 'ACM-P-01' OR ITAB-EQUNR EQ 'ACM-P-02' OR ITAB-EQUNR EQ 'ACM-P-03' OR ITAB-EQUNR EQ 'ACM-P-04' OR ITAB-EQUNR EQ 'ACM-P-05' OR ITAB-EQUNR EQ 'ACM-P-06' OR ITAB-EQUNR EQ 'ACM-P-07u2019 OR ITAB-EQUNR EQ 'ACM-P-08' OR ITAB-EQUNR EQ 'ACMA01' OR ITAB-EQUNR EQ 'ACMA02' OR ITAB-EQUNR EQ 'ACMA03'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF ITAB-SHIFT = u2018Au2019 OR ITAB-SHIFT = u2018Bu2019 OR ITAB-SHIFT = u2018Cu2019.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ITAB2-PRO1 = ITAB2-PRO1 + ITAB-PRO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AT END OF EQUNR&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND ITAB2. ( Here the new table will be appended)&lt;/P&gt;&lt;P&gt;CLEAR ITAB2. ( Here the sum for each machine will be cleared)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ENDAT.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;N.B. Assumption ITAB2 is internal table with headerline.&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;Smart Varghese&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2009 11:37:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221756#M1379263</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-08T11:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: In Internal Table logic not matching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221757#M1379264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi smartvarghese &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to get here sum of each machine . and then append it .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but here it is getting shift data and appending . but its doing the sum of all the machines . i think there will be small change where we can get sum according to machine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sravya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2009 11:45:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221757#M1379264</guid>
      <dc:creator>sravya_ch</dc:creator>
      <dc:date>2009-10-08T11:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: In Internal Table logic not matching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221758#M1379265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sravya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per the code you have written, the sum will be calculated when the if condition satisfies any of the 11 machines. If you have to calculate the sum for individual machines, you will have to write 11 if conditions. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
sort itab by equnr.

loop at itab.
IF ITAB-EQUNR EQ 'ACM-P-01' .
CASE ITAB-SHIFT .
       when  'A'.
        MOVE ITAB-PRO TO  ACM1A.
       when  'B'.
        MOVE ITAB-PRO TO  ACM1B.
       WHEN  'C'.
        MOVE ITAB-PRO TO  ACM1C.
      ENDCASE.
 ITAB2-PRO1 = ACM1A + ACM1B + ACM1C.
APPEND ITAB2.
CLEAR: ACM1A, ACM1B, ACM1C.
  ENDIF.

IF ITAB-EQUNR EQ 'ACM-P-02' .
CASE ITAB-SHIFT .
       when  'A'.
        MOVE ITAB-PRO TO  ACM1A.
       when  'B'.
        MOVE ITAB-PRO TO  ACM1B.
       WHEN  'C'.
        MOVE ITAB-PRO TO  ACM1C.
      ENDCASE.
 ITAB2-PRO1 = ACM1A + ACM1B + ACM1C.
APPEND ITAB2.
CLEAR: ACM1A, ACM1B, ACM1C.
  ENDIF.

.
.
.
.
.
"Until the end of all 11 machines
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vikranth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2009 11:49:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221758#M1379265</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-08T11:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: In Internal Table logic not matching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221759#M1379266</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;ya i am aware of that i was trying that i can reduce the code line &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thankq&lt;/P&gt;&lt;P&gt;Sravya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2009 11:51:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221759#M1379266</guid>
      <dc:creator>sravya_ch</dc:creator>
      <dc:date>2009-10-08T11:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: In Internal Table logic not matching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221760#M1379267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please check the order of the fields in your internal table.&lt;/P&gt;&lt;P&gt;It should be in the order EQUNR and then SHIFT.&lt;/P&gt;&lt;P&gt;N.B. the first field of the internal table should be EQUNR and second one SHIFT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have a different order for your internal table , the AT END OF will never give the desired or correct result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Smart Varghese&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2009 11:55:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221760#M1379267</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-08T11:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: In Internal Table logic not matching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221761#M1379268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I dont think using OR or AND conditions you can reduce the code with the same logic for getting the sum for different machines. if you want to reduce the code lines you can put the case statements which are repititive in a perform and call the form&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
sort itab by equnr.
 
loop at itab.
IF ITAB-EQUNR EQ 'ACM-P-01' .
perform sum using itab-shift.
 ENDIF.
 
IF ITAB-EQUNR EQ 'ACM-P-02' .
perform sum using itab-shift.
ENDIF.
.
.
.

endloop.

form sum using itab-shift.
CASE ITAB-SHIFT .
       when  'A'.
        MOVE ITAB-PRO TO  ACM1A.
       when  'B'.
        MOVE ITAB-PRO TO  ACM1B.
       WHEN  'C'.
        MOVE ITAB-PRO TO  ACM1C.
      ENDCASE.
 ITAB2-PRO1 = ACM1A + ACM1B + ACM1C.
APPEND ITAB2.
CLEAR: ACM1A, ACM1B, ACM1C.
endform.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vikranth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2009 11:57:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221761#M1379268</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-08T11:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: In Internal Table logic not matching</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221762#M1379269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt; it was not the first field there are fileds like date ,time ,equnr,text,dcnr,shift,dur,pro&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If any one change the logic also no problem please give your ideas.no need to send according to code existing .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sravya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2009 12:02:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/in-internal-table-logic-not-matching/m-p/6221762#M1379269</guid>
      <dc:creator>sravya_ch</dc:creator>
      <dc:date>2009-10-08T12:02:20Z</dc:date>
    </item>
  </channel>
</rss>

