<?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 Report Logic in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/report-logic/m-p/2949432#M695440</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;I have a internal table with fields and data as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;salesoffice, coordinator, invoicetype , invoice_dt, order_creation dt&lt;/P&gt;&lt;P&gt;london         AA            001              26/01/2007 25/01/2007&lt;/P&gt;&lt;P&gt;london         AA            001              23/01/2007 22/01/2007&lt;/P&gt;&lt;P&gt;london         BB            003              11/01/2007 01/01/2007&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the summarized  report in this format&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sales_office, coordinator, inv_type,  wk1, wk2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;london          AA             001           2     0&lt;/P&gt;&lt;P&gt;                    BB             003          0     1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where wk1 is the diff between invoice_dt and order creation date. if the diff is &amp;lt;=7 it counts the number of records and put in wk1, simmilarly for wk2 i.e if diff is &amp;lt;=14.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if any body can help me with this that will be great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;AJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Oct 2007 10:30:02 GMT</pubDate>
    <dc:creator>anupam_srivastava2</dc:creator>
    <dc:date>2007-10-16T10:30:02Z</dc:date>
    <item>
      <title>Report Logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/report-logic/m-p/2949432#M695440</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;I have a internal table with fields and data as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;salesoffice, coordinator, invoicetype , invoice_dt, order_creation dt&lt;/P&gt;&lt;P&gt;london         AA            001              26/01/2007 25/01/2007&lt;/P&gt;&lt;P&gt;london         AA            001              23/01/2007 22/01/2007&lt;/P&gt;&lt;P&gt;london         BB            003              11/01/2007 01/01/2007&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the summarized  report in this format&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sales_office, coordinator, inv_type,  wk1, wk2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;london          AA             001           2     0&lt;/P&gt;&lt;P&gt;                    BB             003          0     1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where wk1 is the diff between invoice_dt and order creation date. if the diff is &amp;lt;=7 it counts the number of records and put in wk1, simmilarly for wk2 i.e if diff is &amp;lt;=14.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if any body can help me with this that will be great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;AJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 10:30:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/report-logic/m-p/2949432#M695440</guid>
      <dc:creator>anupam_srivastava2</dc:creator>
      <dc:date>2007-10-16T10:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: Report Logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/report-logic/m-p/2949433#M695441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) define a data-el. type i wk1 and wk2 in another internal table ztab without invoice_dt and  order_creation dt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) fill wk,  wk2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;z = invoice_dt - order_creation dt.

if z between 8 and 14.
 wk2 = z.
elseif z le 7
 wk1 = z.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) use collect command&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Andreas Mann&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 10:36:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/report-logic/m-p/2949433#M695441</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2007-10-16T10:36:13Z</dc:date>
    </item>
    <item>
      <title>Re: Report Logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/report-logic/m-p/2949434#M695442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi AJ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from your subject it is hard to guess what is your question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you do not need fields wK1, wk2,...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use a field wk type integer.&lt;/P&gt;&lt;P&gt;and a count type integer value 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at the intarnal table and compute wk = ( invoice_dt - order_creation dt) div 7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wk = 0 means &amp;lt;= 7 days, wk = 1 is &amp;lt;= 14 days and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COLLECT the results, the count will add up accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 10:41:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/report-logic/m-p/2949434#M695442</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2007-10-16T10:41:30Z</dc:date>
    </item>
  </channel>
</rss>

