<?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: need abap coding help in start routine in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-abap-coding-help-in-start-routine/m-p/2247701#M485434</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do you not have an abap-er at your disposal? i don't imagine this to be quick &amp;amp; dirty that can be written without access to your system! some analysis work may also be required before the actual coding can be done...so I wouldn't post the entire functional spec (business requirement) here hoping for a solution; that would be too weird.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 May 2007 02:51:24 GMT</pubDate>
    <dc:creator>Sougata</dc:creator>
    <dc:date>2007-05-21T02:51:24Z</dc:date>
    <item>
      <title>need abap coding help in start routine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-abap-coding-help-in-start-routine/m-p/2247700#M485433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need help in writting Start Routine in update rule of Data Load from ODS 1 to ODS 2.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Now in ODS 1 data is available at daily level (i.e., Cal Date as lowest level of granularity)&lt;/P&gt;&lt;P&gt;in ODS 2 data is available at monthly level (i.e., aggregated/suppressed to Fiscal Period level)&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------------" /&gt;&lt;P&gt;In ODS 1 the data is available in the following form:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Visit Date         Fisc Period        Customer      Product      Question      Answer     Counter&lt;/P&gt;&lt;P&gt;01.01.2007        001.2007            C1                  P1                Q1                Yes             1&lt;/P&gt;&lt;P&gt;20.01.2007        001.2007            C2                  P1                Q1                Yes             1&lt;/P&gt;&lt;P&gt;20.01.2007        001.2007            C1                  P1                Q1                 No              1&lt;/P&gt;&lt;P&gt;15.02.2007        002.2007            C3                  P1                Q1                Yes             1&lt;/P&gt;&lt;P&gt;15.02.2007        002.2007            C4                  P1                Q1                 No              1&lt;/P&gt;&lt;P&gt;(the key fields are: Visit Date + Fiscal Period + Customer + Product + Question)&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------------" /&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------------" /&gt;&lt;P&gt;In ODS 2 the data is available in the following form:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Fiscal Period    Customer    Product      Question      Answer     Measure      Cust-Last Visit Date&lt;/P&gt;&lt;P&gt;001.2007            C2                 P1              Q1                Yes            1                 20.01.2007&lt;/P&gt;&lt;P&gt;001.2007            C1                 P1              Q1                 No             1                 20.01.2007&lt;/P&gt;&lt;P&gt;002.2007            C3                 P1              Q1                Yes            1                 15.02.2007&lt;/P&gt;&lt;P&gt;002.2007            C4                 P1              Q1                 No             1                 15.02.2007&lt;/P&gt;&lt;P&gt;(the key fields are: Fiscal Period + Customer + Product + Question)&lt;/P&gt;&lt;P&gt;Customer-Last Visit Date is available as an attribute of Customer, not as part of transaction data since data in ODS 2 is at monthly level.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------------" /&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;We have Run Date = Load/System Date, which is 22.02.2007 in this scenario/example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Normal Load would mean converting the &amp;#147;daily level&amp;#148; data to &amp;#147;fiscal period level&amp;#148;. If data exists for that fiscal period in the target ODS, then overwrite it, and change the Cust-Last Visit Date(ODS 2) = Visit Date (ODS 1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, the logic for start routine starts as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 &amp;amp;#61664; IF &amp;#147;Visit Date&amp;#148; (ODS 1) &amp;lt; Run Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Processing Record = Incoming Record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2 &amp;amp;#61664;  Loop  If  Processing Record-Fiscal Period &amp;lt;= (less than or eq to) Run Date-Fiscal Period&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;	Get the Record (from ODS 2) in an internal table, based on the key (Fiscal Period + Customer + Product + Question) of Processing Record from ODS 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;		IF Processing Record-Visit Date &amp;gt; Cust-Last Visit Date (ODS 2)&lt;/P&gt;&lt;P&gt;			Update ODS 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3 &amp;amp;#61664;			IF Processing Record-Fiscal Period &amp;lt; Run Date-Fiscal Period&lt;/P&gt;&lt;P&gt;				Copy Processing Record to next Fiscal Period as well.&lt;/P&gt;&lt;P&gt;				(i.e, Processing Record-Fiscal Period = Processing Record-Fiscal Period + 1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3 &amp;amp;#61664;			Endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;		Else&lt;/P&gt;&lt;P&gt;			Do not process the processing record (i.e., SKIP Processing Record)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;			END LOOP&lt;/P&gt;&lt;P&gt;		Endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2 &amp;amp;#61664; End Loop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 &amp;amp;#61664; Else&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Normal Load&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 &amp;amp;#61664; EndIf&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot in advance&lt;/P&gt;&lt;P&gt;JP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 May 2007 00:49:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-abap-coding-help-in-start-routine/m-p/2247700#M485433</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-21T00:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: need abap coding help in start routine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-abap-coding-help-in-start-routine/m-p/2247701#M485434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do you not have an abap-er at your disposal? i don't imagine this to be quick &amp;amp; dirty that can be written without access to your system! some analysis work may also be required before the actual coding can be done...so I wouldn't post the entire functional spec (business requirement) here hoping for a solution; that would be too weird.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 May 2007 02:51:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-abap-coding-help-in-start-routine/m-p/2247701#M485434</guid>
      <dc:creator>Sougata</dc:creator>
      <dc:date>2007-05-21T02:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: need abap coding help in start routine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-abap-coding-help-in-start-routine/m-p/2247702#M485435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i understand sougata.. i just need the start.. not the entire code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 May 2007 03:01:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-abap-coding-help-in-start-routine/m-p/2247702#M485435</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-21T03:01:11Z</dc:date>
    </item>
  </channel>
</rss>

