<?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: can any one write code for this in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-any-one-write-code-for-this/m-p/1560038#M253353</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Populate the start and end date into sdate range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT sum(ZHRT_PR_TRAN_002-ZZGLAZED_QTY) into lfired&lt;/P&gt;&lt;P&gt;from ZHRT_PR_TRAN_002&lt;/P&gt;&lt;P&gt;where zzdate in sdate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT Count(ZZDecision) into lfaults&lt;/P&gt;&lt;P&gt;from zppt_tran_002&lt;/P&gt;&lt;P&gt;where zdoentry in sdate&lt;/P&gt;&lt;P&gt;and zzdecision in ('REF','REW','PIT') and&lt;/P&gt;&lt;P&gt;zkode1 in ('WAVY','THIN','SPAN','CRAW').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lfperc = lfaults / lfired.&lt;/P&gt;&lt;P&gt;lfperc = lfperc * 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for the second part you can read the data into internal table and use the CASE statement on lfperc field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Anurag Bankley&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Oct 2006 16:29:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-16T16:29:31Z</dc:date>
    <item>
      <title>can any one write code for this</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-any-one-write-code-for-this/m-p/1560037#M253352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i am new to abap, plz help me&lt;/P&gt;&lt;P&gt;if u can write select statement.&lt;/P&gt;&lt;P&gt;=========Logic for calculating daily production glazer fault incentive =========&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;===== === Calculate the total no. of piece fired in the month by glazing dept ========&lt;/P&gt;&lt;P&gt;Total No. Of Piece Fired = sum (ZHRT_PR_TRAN_002-ZZGLAZED_QTY) from ZHRT_PR_TRAN_002 for ZHRT_PR_TRAN_002-ZZDATE within Start Date and End Date from the Screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Total No. of faults = COUNT(ZPPT_TRAN_002-ZZDECISION = &amp;#145;REF&amp;#146;,&amp;#146;REW&amp;#146;,&amp;#146;PIT&amp;#148; &amp;amp;&amp;amp;&lt;/P&gt;&lt;P&gt;ZPPT_TRAN_002-ZKODE1 = &amp;#145;WAVY&amp;#146;,&amp;#146;THIN&amp;#146;,&amp;#146;SPAN&amp;#146;,&amp;#146;CRAW&amp;#146;) from ZPPT_TRAN_002 for &lt;/P&gt;&lt;P&gt;ZPPT_TRAN_002-VERID = &amp;#145;1001&amp;#146; or &amp;#145;1002&amp;#146;and ZPPT_TRAN_002-ZDOENTRY within Start Date and End Date from the Screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dept Fault% = Total No. of faults/ Total No. Of Piece Fired*100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;===========Pick the Fault Slab Amount from ZHRT_MAST_006 ==============&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If ZHRT_MAST_006- ZZDEPT =&amp;#146;GLAZING&amp;#146; and ZHRT_MAST_006- ZZEMP_CATEGORY = &amp;#145;GLAZER&amp;#146; then &lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;if Dept Fault% &amp;gt;= ZHRT_MAST_006-ZZSLAB1L &amp;amp;&amp;amp; &amp;lt;= ZHRT_MAST_006- ZZSLAB1H&lt;/P&gt;&lt;P&gt;then &lt;/P&gt;&lt;P&gt;Fault Incentive Per Day = ZHRT_MAST_006- ZZSLAB1_AMT&lt;/P&gt;&lt;P&gt;Else if &lt;/P&gt;&lt;P&gt;Dept Fault% &amp;gt;= ZHRT_MAST_006-ZZSLAB2L &amp;amp;&amp;amp; &amp;lt;= ZHRT_MAST_006- ZZSLAB2H&lt;/P&gt;&lt;P&gt;then &lt;/P&gt;&lt;P&gt;Fault Incentive Per Day = ZHRT_MAST_006- ZZSLAB2_AMT&lt;/P&gt;&lt;P&gt;Else if &lt;/P&gt;&lt;P&gt;Dept Fault% &amp;gt;= ZHRT_MAST_006- ZZSLAB3L &amp;amp;&amp;amp; &amp;lt;= ZHRT_MAST_006- ZZSLAB3H&lt;/P&gt;&lt;P&gt;then &lt;/P&gt;&lt;P&gt;Fault Incentive Per Day = ZHRT_MAST_006- ZZSLAB3_AMT&lt;/P&gt;&lt;P&gt;Else if &lt;/P&gt;&lt;P&gt;Dept Fault% &amp;gt;= ZHRT_MAST_006- ZZSLAB4L &amp;amp;&amp;amp; &amp;lt;= ZHRT_MAST_006- ZZSLAB4H&lt;/P&gt;&lt;P&gt;then &lt;/P&gt;&lt;P&gt;Fault Incentive Per Day = ZHRT_MAST_006- ZZSLAB4_AMT&lt;/P&gt;&lt;P&gt;Else if &lt;/P&gt;&lt;P&gt;Dept Fault% &amp;gt;= ZHRT_MAST_006- ZZSLAB5L &amp;amp;&amp;amp; &amp;lt;= ZHRT_MAST_006- ZZSLAB5H&lt;/P&gt;&lt;P&gt;then &lt;/P&gt;&lt;P&gt;Fault Incentive Per Day = ZHRT_MAST_006- ZZSLAB5_AMT&lt;/P&gt;&lt;P&gt;Else if&lt;/P&gt;&lt;P&gt;Dept Fault% &amp;gt;= ZHRT_MAST_006- ZZSLAB6L &lt;/P&gt;&lt;P&gt;then &lt;/P&gt;&lt;P&gt;Fault Incentive Per Day = ZHRT_MAST_006- ZZSLAB6_AMT&lt;/P&gt;&lt;P&gt;Else&lt;/P&gt;&lt;P&gt;Fault Incentive Per Day = 0&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Oct 2006 16:21:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-any-one-write-code-for-this/m-p/1560037#M253352</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-16T16:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: can any one write code for this</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-any-one-write-code-for-this/m-p/1560038#M253353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Populate the start and end date into sdate range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT sum(ZHRT_PR_TRAN_002-ZZGLAZED_QTY) into lfired&lt;/P&gt;&lt;P&gt;from ZHRT_PR_TRAN_002&lt;/P&gt;&lt;P&gt;where zzdate in sdate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT Count(ZZDecision) into lfaults&lt;/P&gt;&lt;P&gt;from zppt_tran_002&lt;/P&gt;&lt;P&gt;where zdoentry in sdate&lt;/P&gt;&lt;P&gt;and zzdecision in ('REF','REW','PIT') and&lt;/P&gt;&lt;P&gt;zkode1 in ('WAVY','THIN','SPAN','CRAW').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lfperc = lfaults / lfired.&lt;/P&gt;&lt;P&gt;lfperc = lfperc * 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for the second part you can read the data into internal table and use the CASE statement on lfperc field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Anurag Bankley&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Oct 2006 16:29:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-any-one-write-code-for-this/m-p/1560038#M253353</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-16T16:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: can any one write code for this</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-any-one-write-code-for-this/m-p/1560039#M253354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see it as to be done for all the records in the table&lt;/P&gt;&lt;P&gt;plz help me in declearing the loop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2006 04:56:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-any-one-write-code-for-this/m-p/1560039#M253354</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-17T04:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: can any one write code for this</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-any-one-write-code-for-this/m-p/1560040#M253355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The select statement would sum all the records in the table. As for loop do you mean the second part of your requirement ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anurag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2006 07:57:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-any-one-write-code-for-this/m-p/1560040#M253355</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-17T07:57:43Z</dc:date>
    </item>
  </channel>
</rss>

