<?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 update routine - date difference need to be calculated in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-routine-date-difference-need-to-be-calculated/m-p/2459684#M551766</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;update routine - date difference need to be calculated&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a report for which I need to add 6 keyfigure fields. &lt;/P&gt;&lt;P&gt;I need abap code to add to my update routine &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They are:&lt;/P&gt;&lt;P&gt;Early &amp;#150; ZEARLYDT&lt;/P&gt;&lt;P&gt;On Time &amp;#150; ZONTIME&lt;/P&gt;&lt;P&gt;Late &amp;#150; ZLATEDT&lt;/P&gt;&lt;P&gt;Early%&lt;/P&gt;&lt;P&gt;On Time%&lt;/P&gt;&lt;P&gt;Late%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The is what the scenario is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Completion Date (ZCOMP_DT) &amp;lt; Request Date (ZRQEND_DT) then, &lt;/P&gt;&lt;P&gt;Early = 1, OnTime = 0, Late = 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Completion Date (ZCOMP_DT) = Request Date (ZRQEND_DT) then,&lt;/P&gt;&lt;P&gt;Early = 0, On Time = 1, Late = 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Completion Date (ZCOMP_DT) &amp;gt; Request Date (ZRQEND_DT) then,&lt;/P&gt;&lt;P&gt;Early = 0, On Time = 0, Late = 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Early = 1, Early% = 100% &lt;/P&gt;&lt;P&gt;If Early = 0, Early% = 0%&lt;/P&gt;&lt;P&gt;If On Time = 1, On Time% = 100%&lt;/P&gt;&lt;P&gt;If On Time = 0, On Time% = 0%&lt;/P&gt;&lt;P&gt;If Late = 1, Late% = 100%&lt;/P&gt;&lt;P&gt;If Late = 0, late% = 0%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QMMA/JCDS &amp;#150; Source Table(s) for "Complete Date"&lt;/P&gt;&lt;P&gt;"PETER" &amp;#150; Source Field for "Complete Date"&lt;/P&gt;&lt;P&gt;QMEL &amp;#150; Source Table for "Request Date"&lt;/P&gt;&lt;P&gt;LTRMN &amp;#150; Source Field for "Request Date" &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Jul 2007 00:48:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-06T00:48:12Z</dc:date>
    <item>
      <title>update routine - date difference need to be calculated</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-routine-date-difference-need-to-be-calculated/m-p/2459684#M551766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;update routine - date difference need to be calculated&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a report for which I need to add 6 keyfigure fields. &lt;/P&gt;&lt;P&gt;I need abap code to add to my update routine &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They are:&lt;/P&gt;&lt;P&gt;Early &amp;#150; ZEARLYDT&lt;/P&gt;&lt;P&gt;On Time &amp;#150; ZONTIME&lt;/P&gt;&lt;P&gt;Late &amp;#150; ZLATEDT&lt;/P&gt;&lt;P&gt;Early%&lt;/P&gt;&lt;P&gt;On Time%&lt;/P&gt;&lt;P&gt;Late%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The is what the scenario is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Completion Date (ZCOMP_DT) &amp;lt; Request Date (ZRQEND_DT) then, &lt;/P&gt;&lt;P&gt;Early = 1, OnTime = 0, Late = 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Completion Date (ZCOMP_DT) = Request Date (ZRQEND_DT) then,&lt;/P&gt;&lt;P&gt;Early = 0, On Time = 1, Late = 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Completion Date (ZCOMP_DT) &amp;gt; Request Date (ZRQEND_DT) then,&lt;/P&gt;&lt;P&gt;Early = 0, On Time = 0, Late = 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Early = 1, Early% = 100% &lt;/P&gt;&lt;P&gt;If Early = 0, Early% = 0%&lt;/P&gt;&lt;P&gt;If On Time = 1, On Time% = 100%&lt;/P&gt;&lt;P&gt;If On Time = 0, On Time% = 0%&lt;/P&gt;&lt;P&gt;If Late = 1, Late% = 100%&lt;/P&gt;&lt;P&gt;If Late = 0, late% = 0%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QMMA/JCDS &amp;#150; Source Table(s) for "Complete Date"&lt;/P&gt;&lt;P&gt;"PETER" &amp;#150; Source Field for "Complete Date"&lt;/P&gt;&lt;P&gt;QMEL &amp;#150; Source Table for "Request Date"&lt;/P&gt;&lt;P&gt;LTRMN &amp;#150; Source Field for "Request Date" &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2007 00:48:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-routine-date-difference-need-to-be-calculated/m-p/2459684#M551766</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-06T00:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: update routine - date difference need to be calculated</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-routine-date-difference-need-to-be-calculated/m-p/2459685#M551767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Deva,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you should first write the ABAP code and if you face some problem then we can suggest you the solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2007 00:50:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-routine-date-difference-need-to-be-calculated/m-p/2459685#M551767</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-06T00:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: update routine - date difference need to be calculated</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-routine-date-difference-need-to-be-calculated/m-p/2459686#M551768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I need Abap code for this scenario. Need help writing it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2007 16:28:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-routine-date-difference-need-to-be-calculated/m-p/2459686#M551768</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-06T16:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: update routine - date difference need to be calculated</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-routine-date-difference-need-to-be-calculated/m-p/2459687#M551769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have included the following update routine which is supposed to give me results for ZEARLYDT, ZONTIME and ZLATE as either 1 or 0. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, I am receiving all kinds of numbers in there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;Are there any changes that I need to make to the below code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; For Scheduled orders if Completed dt is le Required end dt&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; then met req dt is 1&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF LT_DATA_PACKAGE-NOT_TYPE = 'Z3' OR LT_DATA_PACKAGE-NOT_TYPE = 'Z4'&lt;/P&gt;&lt;P&gt;   OR LT_DATA_PACKAGE-NOT_TYPE = 'Z5' OR LT_DATA_PACKAGE-NOT_TYPE = 'Z6'&lt;/P&gt;&lt;P&gt;  OR LT_DATA_PACKAGE-NOT_TYPE = 'Z7' OR LT_DATA_PACKAGE-NOT_TYPE = 'Z8'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF LT_DATA_PACKAGE-/BIC/ZCOMP_DT LE LT_DATA_PACKAGE-/BIC/ZRQEND_DT .&lt;/P&gt;&lt;P&gt;       LT_DATA_PACKAGE-/BIC/ZMETREQDT = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    IF LT_DATA_PACKAGE-/BIC/ZCOMP_DT LT LT_DATA_PACKAGE-/BIC/ZRQEND_DT.&lt;/P&gt;&lt;P&gt;       LT_DATA_PACKAGE-/BIC/ZEARLYDT = 1.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    IF LT_DATA_PACKAGE-/BIC/ZCOMP_DT EQ LT_DATA_PACKAGE-/BIC/ZRQEND_DT.&lt;/P&gt;&lt;P&gt;	LT_DATA_PACKAGE-/BIC/ZONTIME = 1.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    IF LT_DATA_PACKAGE-/BIC/ZCOMP_DT GT LT_DATA_PACKAGE-/BIC/ZRQEND_DT.&lt;/P&gt;&lt;P&gt;       LT_DATA_PACKAGE-/BIC/ZLATEDT = 1.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    LT_DATA_PACKAGE-/BIC/ZDATDIFF = LT_DATA_PACKAGE-CALDAY -&lt;/P&gt;&lt;P&gt;                                  LT_DATA_PACKAGE-/BIC/ZRQEND_DT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIf.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2007 15:00:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-routine-date-difference-need-to-be-calculated/m-p/2459687#M551769</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-11T15:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: update routine - date difference need to be calculated</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-routine-date-difference-need-to-be-calculated/m-p/2459688#M551770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;code is correct &lt;/P&gt;&lt;P&gt;problem solved&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Jul 2007 22:25:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-routine-date-difference-need-to-be-calculated/m-p/2459688#M551770</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-15T22:25:57Z</dc:date>
    </item>
  </channel>
</rss>

