<?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: query about the Selection condition. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-about-the-selection-condition/m-p/2286849#M498460</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Post your code, and the output you wanted, i can give you the corrected code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 May 2007 22:18:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-17T22:18:12Z</dc:date>
    <item>
      <title>query about the Selection condition.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-about-the-selection-condition/m-p/2286848#M498459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi to all ,&lt;/P&gt;&lt;P&gt;Please can u give me the code for this logic.&lt;/P&gt;&lt;P&gt;i am not getting any out put with my logic .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go to VBRK with VBRK-VBELN = ITAN1-VBELN and get from field KNUMV the condition record number. Then for each ITAB1-POSNR of this ITAB1-VBELN go to KONV with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KONV-KNUMV = VBRK-KNUMV&lt;/P&gt;&lt;P&gt;KONV-KPOSN = ITAB1-POSNR&lt;/P&gt;&lt;P&gt;KONV-KSCHL = the condition selected from /GIL/ZGTYPCODE_V for this Sales org and FUNCTION = 'WICREV'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get from field KBETR the condition rate from KPEIN the pricing unit and from KUMZA and KUMNE the conversion factors. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calculate then the selling price per 1000 PUs as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(KBETR / KPEIN) x 1000 x (KUMNE/KUMZA) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Update with the calculated value ITAB1-KBETR for the the related line of ITAB1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2007 04:13:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-about-the-selection-condition/m-p/2286848#M498459</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-17T04:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: query about the Selection condition.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-about-the-selection-condition/m-p/2286849#M498460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Post your code, and the output you wanted, i can give you the corrected code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2007 22:18:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-about-the-selection-condition/m-p/2286849#M498460</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-17T22:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: query about the Selection condition.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-about-the-selection-condition/m-p/2286850#M498461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Rough logic for the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;declare the internal table for condition types i_kschl , i_price&lt;/P&gt;&lt;P&gt;and the i_vbrk with the necessary fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select  kschl into table i_kschl&lt;/P&gt;&lt;P&gt;from /GIL/ZGTYPCODE_V  where vkorg = &amp;lt;value&amp;gt; and FUNCTION = 'WICREV'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not itan1[] is initial.&lt;/P&gt;&lt;P&gt; select a&lt;SUB&gt;vbeln a&lt;/SUB&gt;knumv  b~posnr into table i_vbrk&lt;/P&gt;&lt;P&gt; from vbrk as a join vbrp as b on a&lt;SUB&gt;vbeln = b&lt;/SUB&gt;vbeln&lt;/P&gt;&lt;P&gt; for all entries in itan1&lt;/P&gt;&lt;P&gt; where vbeln = itan1-vbeln.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;if not i_vbrk{} is initial.&lt;/P&gt;&lt;P&gt; select knumv kposn kbetr KPEIN KUMZA KUMNE  from &lt;/P&gt;&lt;P&gt; konv into table i_price&lt;/P&gt;&lt;P&gt;for all entries in i_vbrk&lt;/P&gt;&lt;P&gt;where knumv = i_vbrk-knumv and&lt;/P&gt;&lt;P&gt;          kposn = i_vbrk-posnr.&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;loop at itan1.&lt;/P&gt;&lt;P&gt;  Read the internal tables  i_price and update the prices value into the corresponding field with the formula &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(KBETR / KPEIN) x 1000 x (KUMNE/KUMZA) &lt;/P&gt;&lt;P&gt;Modify the itan1 index sy-tabix transporting &amp;lt;field&amp;gt;.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2007 02:00:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-about-the-selection-condition/m-p/2286850#M498461</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-18T02:00:17Z</dc:date>
    </item>
  </channel>
</rss>

