<?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 Condition Types in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/condition-types/m-p/3295405#M788589</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could any one help in calculating:&lt;/P&gt;&lt;P&gt;Discount value:&lt;/P&gt;&lt;P&gt;sum of discounts used in standard price procedure &lt;/P&gt;&lt;P&gt;structure Z_INV_HEAD component KWERT, condition values ZTPR, ZTR1, ZCM5, ZEDI, ZDMG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using the below logic:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calculate sum of all discounts used in billing document &lt;/P&gt;&lt;P&gt;and write this sum into invoice layout. &lt;/P&gt;&lt;P&gt;All possible discount condition values which are used in our price procedures are at the moment ZTPR, ZTR1, ZCM5, ZEDI, ZDMG. &lt;/P&gt;&lt;P&gt;Take values from billing document header assigned to discount condition types: structure is KOMV, search by field KSCHL (which is condition type - find all condition types which are used in our concrete billing document from the ones above), find related values in fields KWERT and calculate sum of retrieved values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help me with some coding..... Thanks to all&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Jan 2008 15:52:16 GMT</pubDate>
    <dc:creator>bhaskar_pasupuleti</dc:creator>
    <dc:date>2008-01-16T15:52:16Z</dc:date>
    <item>
      <title>Condition Types</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/condition-types/m-p/3295405#M788589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could any one help in calculating:&lt;/P&gt;&lt;P&gt;Discount value:&lt;/P&gt;&lt;P&gt;sum of discounts used in standard price procedure &lt;/P&gt;&lt;P&gt;structure Z_INV_HEAD component KWERT, condition values ZTPR, ZTR1, ZCM5, ZEDI, ZDMG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using the below logic:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calculate sum of all discounts used in billing document &lt;/P&gt;&lt;P&gt;and write this sum into invoice layout. &lt;/P&gt;&lt;P&gt;All possible discount condition values which are used in our price procedures are at the moment ZTPR, ZTR1, ZCM5, ZEDI, ZDMG. &lt;/P&gt;&lt;P&gt;Take values from billing document header assigned to discount condition types: structure is KOMV, search by field KSCHL (which is condition type - find all condition types which are used in our concrete billing document from the ones above), find related values in fields KWERT and calculate sum of retrieved values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help me with some coding..... Thanks to all&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2008 15:52:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/condition-types/m-p/3295405#M788589</guid>
      <dc:creator>bhaskar_pasupuleti</dc:creator>
      <dc:date>2008-01-16T15:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Condition Types</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/condition-types/m-p/3295406#M788590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bhaskar&lt;/P&gt;&lt;P&gt;for calculating the totals: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if itab-kschl in ('ZTPR' , 'ZTR1', 'ZCM5', 'ZEDI', 'ZDMG')&lt;/P&gt;&lt;P&gt;lv_total = itab-value + lv_total.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KOMV/ KONV is a cluster table so you cannot join this table... so need to use for all entries, I guess KNUMV is the key in this table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select f1 f2 f3 from KOMV&lt;/P&gt;&lt;P&gt;      into table it_komv&lt;/P&gt;&lt;P&gt;      for all entires in itab&lt;/P&gt;&lt;P&gt;      where kschl in  ('ZTPR' , 'ZTR1', 'ZCM5', 'ZEDI', 'ZDMG')&lt;/P&gt;&lt;P&gt;      knumv = itab-knumv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont have access to R3, else I would have given you more details.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2008 16:12:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/condition-types/m-p/3295406#M788590</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2008-01-16T16:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: Condition Types</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/condition-types/m-p/3295407#M788591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;          Try this sample code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select kschl kbetr kawrt kposn kwert kherk kstat stunr&lt;/P&gt;&lt;P&gt;  from konv into corresponding fields of table it_konv&lt;/P&gt;&lt;P&gt;  where knumv = vbdkr-knumv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Discount for pricing conditions : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table it_konv with key kschl = 'ZTPR'&lt;/P&gt;&lt;P&gt;                           kposn = vbdpr-posnr.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0 .&lt;/P&gt;&lt;P&gt; move it_konv-kwert to wa_disc_ZTPR.&lt;/P&gt;&lt;P&gt; move it_konv-kbetr to ppu_ZTPR.&lt;/P&gt;&lt;P&gt; condense ppu_ZTPR.&lt;/P&gt;&lt;P&gt; condense wa_disc_ZTPR.&lt;/P&gt;&lt;P&gt; zkv1_disc_price =  wa_disc_price1 * wa_disc_ZTPR / 10000.&lt;/P&gt;&lt;P&gt; disc_price_ZTPR = wa_disc_zkv1 - zkv1_disc_price.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ADDITON:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_headercond into wa_conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;    case wa_conditions-flag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      when 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       add wa_conditions-kwert to subtotal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;..........................................&lt;/P&gt;&lt;P&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;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mohan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2008 16:19:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/condition-types/m-p/3295407#M788591</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-16T16:19:15Z</dc:date>
    </item>
  </channel>
</rss>

