<?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: doubt in using if condition in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-using-if-condition/m-p/1730587#M318150</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One addition ot this what you can do is use the CHECK statement to find the value of KTAB-KSCHL. Here you can specify whether it is JMOP or JEC1. If it not there it will exit from the loop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Dec 2006 13:58:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-18T13:58:48Z</dc:date>
    <item>
      <title>doubt in using if condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-using-if-condition/m-p/1730581#M318144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;Hi i have a got a problem like this in which i have to add the following fields to ED and after that i have to add that filed ED  to ED1 and now i have followed the following code by which i'm able to get ED value when JEC1 is not declared but when the JEC1 is declared as below then i'm not able to get the value of ED1 can u suggest me any solution plzzzzz&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If KONH-KSCHL=JMOP, then put this value and KONH-KNUMH in KONP-KNUMH, and obtain KONP-KBETR (this is for ED)&lt;/P&gt;&lt;P&gt;Calculate ED as KONP-KBETR/10 * EKPO-NETWR						&lt;/P&gt;&lt;P&gt;If KONH-KSCHL=JEC1, then put this value and KONH-KNUMH in KONP-KNUMH, and obtain KONP-KBETR (this is for ECess)						&lt;/P&gt;&lt;P&gt;Calculate ED1 as KONP-KBETR/10 * ED	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;for this conditions i had followed the following steps&amp;lt;/b&amp;gt; 					&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT JTAB.&lt;/P&gt;&lt;P&gt;                 concatenate  JTAB-werks JTAB-lifnr JTAB-matnr&lt;/P&gt;&lt;P&gt;                 into val.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                SELECT SINGLE KONH&lt;SUB&gt;KNUMH KONH&lt;/SUB&gt;KSCHL  FROM KONH INTO&lt;/P&gt;&lt;P&gt;                CORRESPONDING FIELDS OF&lt;/P&gt;&lt;P&gt;                KTAB  WHERE KONH~VAKEY = VAL .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                IF  KTAB-KSCHL = 'JMOP' .&lt;/P&gt;&lt;P&gt; .&lt;/P&gt;&lt;P&gt;                    SELECT SINGLE KONP~KBETR FROM KONP INTO KBTAB WHERE&lt;/P&gt;&lt;P&gt;                    KONP&lt;SUB&gt;KNUMH = KTAB-KNUMH AND KONP&lt;/SUB&gt;KSCHL = KTAB-KSCHL&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                    ED = KBTAB-KBETR / 10 * JTAB-NETWR .&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                   ED1 = KBTAB-KBETR / 10 *  ED.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                IF  KTAB-KSCHL = 'JEC1' .&lt;/P&gt;&lt;P&gt;                    SELECT SINGLE KONP~KBETR FROM KONP INTO KBTAB WHERE&lt;/P&gt;&lt;P&gt;                    KONP&lt;SUB&gt;KNUMH = KTAB-KNUMH AND KONP&lt;/SUB&gt;KSCHL = KTAB-KSCHL&lt;/P&gt;&lt;P&gt;.                   ED1 = KBTAB-KBETR / 10 *  ED.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Dec 2006 12:35:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-using-if-condition/m-p/1730581#M318144</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-18T12:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: doubt in using if condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-using-if-condition/m-p/1730582#M318145</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 USING CASE AND ENDCASE .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg.&lt;/P&gt;&lt;P&gt;case KTAB-KSCHL.&lt;/P&gt;&lt;P&gt;when 'JMOP' .&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;SELECT SINGLE KONP~KBETR FROM KONP INTO KBTAB WHERE&lt;/P&gt;&lt;P&gt;KONP~KNUMH = KTAB-KNUMH AND KONP~KSCHL = KTAB-KSCHL&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ED = KBTAB-KBETR / 10 * JTAB-NETWR .&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ED1 = KBTAB-KBETR / 10 * ED.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;when 'JEC1' .&lt;/P&gt;&lt;P&gt;SELECT SINGLE KONP~KBETR FROM KONP INTO KBTAB WHERE&lt;/P&gt;&lt;P&gt;KONP~KNUMH = KTAB-KNUMH AND KONP~KSCHL = KTAB-KSCHL&lt;/P&gt;&lt;P&gt;. ED1 = KBTAB-KBETR / 10 * ED.&lt;/P&gt;&lt;P&gt;when ''.&lt;/P&gt;&lt;P&gt;*for null value check.&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Dec 2006 12:42:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-using-if-condition/m-p/1730582#M318145</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-18T12:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: doubt in using if condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-using-if-condition/m-p/1730583#M318146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mr. Vickram&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;I have tried by using your code even though it was only calculating for ED but not for ED1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Dec 2006 12:49:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-using-if-condition/m-p/1730583#M318146</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-18T12:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: doubt in using if condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-using-if-condition/m-p/1730584#M318147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi pavan,&lt;/P&gt;&lt;P&gt;How would it calculate ED1 when the line is commented out?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ED1 = KBTAB-KBETR / 10 * ED.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Dec 2006 12:53:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-using-if-condition/m-p/1730584#M318147</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-18T12:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: doubt in using if condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-using-if-condition/m-p/1730585#M318148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mr . Ramana &lt;/P&gt;&lt;P&gt;I think u have seen the upper statement in which i had declared for JMOP  in which i had tried to add ED and ED1 at the same time but even though it was not working so i had commented that&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Dec 2006 13:00:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-using-if-condition/m-p/1730585#M318148</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-18T13:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: doubt in using if condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-using-if-condition/m-p/1730586#M318149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As per your code you would get the value of ED1 as zero since the value of ED has not been calculated. I think try and change the code as below and see if it fits your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT JTAB.&lt;/P&gt;&lt;P&gt;concatenate JTAB-werks JTAB-lifnr JTAB-matnr&lt;/P&gt;&lt;P&gt;into val.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refresh KTAB.&lt;/P&gt;&lt;P&gt;SELECT KONH&lt;SUB&gt;KNUMH KONH&lt;/SUB&gt;KSCHL FROM KONH INTO&lt;/P&gt;&lt;P&gt;CORRESPONDING FIELDS OF TABLE&lt;/P&gt;&lt;P&gt;KTAB WHERE KONH~VAKEY = VAL .&lt;/P&gt;&lt;P&gt;sort ktab by kschl descending.&lt;/P&gt;&lt;P&gt;Loop at KTAB.&lt;/P&gt;&lt;P&gt;IF KTAB-KSCHL = 'JMOP' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE KONP~KBETR FROM KONP INTO KBTAB WHERE&lt;/P&gt;&lt;P&gt;KONP&lt;SUB&gt;KNUMH = KTAB-KNUMH AND KONP&lt;/SUB&gt;KSCHL = KTAB-KSCHL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ED = KBTAB-KBETR / 10 * JTAB-NETWR .&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF KTAB-KSCHL = 'JEC1' .&lt;/P&gt;&lt;P&gt;SELECT SINGLE KONP~KBETR FROM KONP INTO KBTAB WHERE&lt;/P&gt;&lt;P&gt;KONP&lt;SUB&gt;KNUMH = KTAB-KNUMH AND KONP&lt;/SUB&gt;KSCHL = KTAB-KSCHL.&lt;/P&gt;&lt;P&gt;ED1 = KBTAB-KBETR / 10 * ED.&lt;/P&gt;&lt;P&gt;ENDIF. &lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Dec 2006 13:22:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-using-if-condition/m-p/1730586#M318149</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-18T13:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: doubt in using if condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-using-if-condition/m-p/1730587#M318150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One addition ot this what you can do is use the CHECK statement to find the value of KTAB-KSCHL. Here you can specify whether it is JMOP or JEC1. If it not there it will exit from the loop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Dec 2006 13:58:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-in-using-if-condition/m-p/1730587#M318150</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-18T13:58:48Z</dc:date>
    </item>
  </channel>
</rss>

