<?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: how to code ..simple if loop statement ? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-simple-if-loop-statement/m-p/9353322#M1731530</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF EKPO-PSTYP EQ 1 and EKPO-KONNR is not equal to NULL .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category = C1 .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elseif EKPO-KONNR is&amp;nbsp; equal to NULL .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category = C2 .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF EKPO-PSTYP ne 1 and EKPO-KONNR is&amp;nbsp; equal to NULL .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category = C3.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elseif EKPO-KONNR is not&amp;nbsp; equal to NULL .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category = C4 .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elseif EBAN-ESTKZ = R.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category = C5 &lt;/P&gt;&lt;P&gt;endif..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Apr 2013 12:32:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2013-04-03T12:32:08Z</dc:date>
    <item>
      <title>how to code ..simple if loop statement ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-simple-if-loop-statement/m-p/9353320#M1731528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI ABAP gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to determine the category field based on these conditions. can anyone suggest the code for the same ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;category = C1&amp;nbsp; if EKPO-PSTYP is equal to 1 and EKPO-KONNR is not equal to NULL. &lt;/P&gt;&lt;P&gt;category = c2 if EKPO-PSTYP is equal to 1 and EKPO-KONNR is qual to NULL. &lt;/P&gt;&lt;P&gt;category = C3 if EKPO-PSTYP is not equal to 1 and EKPO-KONNR is equal to NULL&amp;nbsp; &lt;/P&gt;&lt;P&gt;Category = C4 if EKPO-PSTYP is not equal to 1 and EKPO-KONNR is not qual to NULL and&lt;/P&gt;&lt;P&gt;category = C5 if EBAN-ESTKZ = R.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All these C1 to C5 will be populated in a single field based on the above conditions. I need to write a code for this category field. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont know how to handle the if and endif and else if in a single statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can try, please correct it gurus. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if EKPO-PSTYP is equal to 1 and EKPO-KONNR is not equal to NULL then category = C1 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if EKPO-PSTYP is equal to 1 and EKPO-KONNR is qual to NULL then category = C2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else if &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if EKPO-PSTYP is not equal to 1 and EKPO-KONNR is equal to NULL then category = C3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if EKPO-PSTYP is not equal to 1 and EKPO-KONNR is not qual to NULL then category = C4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else if &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EBAN-ESTKZ =&amp;nbsp; R then category = C5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure about these if and endif concept. Please correct my code and suggest the original code in ABAP please. I appreciate it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank You,&lt;/P&gt;&lt;P&gt;DR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Apr 2013 12:19:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-simple-if-loop-statement/m-p/9353320#M1731528</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-03T12:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: how to code ..simple if loop statement ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-simple-if-loop-statement/m-p/9353321#M1731529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; There will be only only if and endif rest everything will be in elseif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if&amp;nbsp; EKPO-PSTYP eq 1 and EKPO-KONNR is not initial.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; category = c1.&lt;/P&gt;&lt;P&gt;elseif EKPO-PSTYP eq 1 and EKPO-KONNR is initial.&lt;/P&gt;&lt;P&gt; category = C2.&lt;/P&gt;&lt;P&gt;elseif EKPO-PSTYP ne 1 and EKPO-KONNR is initial.&lt;/P&gt;&lt;P&gt; category = C3.&lt;/P&gt;&lt;P&gt;elseif EKPO-PSTYP ne 1 and EKPO-KONNR is not initial.&lt;/P&gt;&lt;P&gt; category = C4.&lt;/P&gt;&lt;P&gt;elseif EBAN-ESTKZ =&amp;nbsp; R.&lt;/P&gt;&lt;P&gt; category = C5.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Apr 2013 12:25:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-simple-if-loop-statement/m-p/9353321#M1731529</guid>
      <dc:creator>former_member282823</dc:creator>
      <dc:date>2013-04-03T12:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: how to code ..simple if loop statement ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-simple-if-loop-statement/m-p/9353322#M1731530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF EKPO-PSTYP EQ 1 and EKPO-KONNR is not equal to NULL .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category = C1 .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elseif EKPO-KONNR is&amp;nbsp; equal to NULL .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category = C2 .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF EKPO-PSTYP ne 1 and EKPO-KONNR is&amp;nbsp; equal to NULL .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category = C3.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elseif EKPO-KONNR is not&amp;nbsp; equal to NULL .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category = C4 .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elseif EBAN-ESTKZ = R.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category = C5 &lt;/P&gt;&lt;P&gt;endif..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Apr 2013 12:32:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-simple-if-loop-statement/m-p/9353322#M1731530</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-03T12:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to code ..simple if loop statement ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-simple-if-loop-statement/m-p/9353323#M1731531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank You so much Ramesh. I appreciate it. You are the best. I wanna add you and post my ABAP queries to you. You can suggest if you are free. Is that OK &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1353/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;DR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Apr 2013 12:41:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-simple-if-loop-statement/m-p/9353323#M1731531</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-03T12:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to code ..simple if loop statement ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-simple-if-loop-statement/m-p/9353324#M1731532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh my god another smart answer. You guys are too fast. I wanna learn ABAP....and I am trying. ...but its tough for a new bee guys.....so just a question....can i use either of the code's or any suggestions....just a question.....do i need to put skip or exit after the first endif.....so that it wont check for c3,c4,c5 when one of the first condition is met or not needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;DR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Apr 2013 12:43:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-simple-if-loop-statement/m-p/9353324#M1731532</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-03T12:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: how to code ..simple if loop statement ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-simple-if-loop-statement/m-p/9353325#M1731533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;IF &lt;/SPAN&gt;ekpo&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;pstyp &lt;SPAN class="L0S52"&gt;EQ &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;1&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;IF &lt;/SPAN&gt;ekpo&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;konnr &lt;SPAN class="L0S52"&gt;IS &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;NOT &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;INITIAL&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;c1&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;ELSEIF &lt;/SPAN&gt;ekpo&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;konnr &lt;SPAN class="L0S52"&gt;IS &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;NOT &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;INITIAL&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;c2&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;ENDIF&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;ELSEIF &lt;/SPAN&gt;ekpo&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;pstyp &lt;SPAN class="L0S52"&gt;NE &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;1&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;IF &lt;/SPAN&gt;ekpo&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;konnr &lt;SPAN class="L0S52"&gt;IS &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;NOT &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;INITIAL&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;c3&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;ELSEIF &lt;/SPAN&gt;ekpo&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;konnr &lt;SPAN class="L0S52"&gt;IS &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;NOT &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;INITIAL&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;c4&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;ENDIF&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;ENDIF&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;Jyoti.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Apr 2013 13:28:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-simple-if-loop-statement/m-p/9353325#M1731533</guid>
      <dc:creator>jyotirmaya_mallick</dc:creator>
      <dc:date>2013-04-03T13:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: how to code ..simple if loop statement ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-simple-if-loop-statement/m-p/9353326#M1731534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find sample code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at it_mara into wa_mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if wa_mara-material = 'XYX'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do something.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do something&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Apr 2013 14:05:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-simple-if-loop-statement/m-p/9353326#M1731534</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-03T14:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to code ..simple if loop statement ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-simple-if-loop-statement/m-p/9353327#M1731535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jyoti,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How about C5 ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Apr 2013 00:42:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-simple-if-loop-statement/m-p/9353327#M1731535</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-04T00:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to code ..simple if loop statement ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-simple-if-loop-statement/m-p/9353328#M1731536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;thanks for the compliment..you can ask me if you have any questions regarding ABAP queries...Incase if i am not available in SDN you can send me mail @&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:rameshkrishnamani@gmail.com"&gt;rameshkrishnamani@gmail.com&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ramesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Apr 2013 05:32:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-simple-if-loop-statement/m-p/9353328#M1731536</guid>
      <dc:creator>former_member282823</dc:creator>
      <dc:date>2013-04-04T05:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: how to code ..simple if loop statement ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-simple-if-loop-statement/m-p/9353329#M1731537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Daniel, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I guess there are many ways to write If and endif but as a Standard Coding Practice they'll always suggest you to modularise things.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If EKPO-PSTYP = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; If EKPO-KONNR = null.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category = c2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Else.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category = C1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; endif.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Elseif EKPO-PSTYP &amp;lt;&amp;gt; 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; If EKPO-KONNR = null.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category = c3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Else.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category = C4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Endif. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Elseif EBAN-ESTKZ = R.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; category = C5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Apr 2013 07:20:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-simple-if-loop-statement/m-p/9353329#M1731537</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-04T07:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: how to code ..simple if loop statement ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-simple-if-loop-statement/m-p/9353330#M1731538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;oh looks like missed some...sorry for that.&lt;/P&gt;&lt;P&gt;for C5 you have to add another elseif statement. Here the example code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;IF &lt;/SPAN&gt;ekpo&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;-&lt;/SPAN&gt;pstyp &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;EQ &lt;/SPAN&gt;&lt;SPAN class="L0S32" style="font-style: inherit; font-family: inherit;"&gt;1&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;IF &lt;/SPAN&gt;ekpo&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;-&lt;/SPAN&gt;konnr &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;IS &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;NOT &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;INITIAL&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category &lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;= &lt;/SPAN&gt;c1&lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;ELSEIF &lt;/SPAN&gt;ekpo&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;-&lt;/SPAN&gt;konnr &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;IS &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;NOT &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;INITIAL&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category &lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;= &lt;/SPAN&gt;c2&lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;ENDIF&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;ELSEIF &lt;/SPAN&gt;ekpo&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;-&lt;/SPAN&gt;pstyp &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;NE &lt;/SPAN&gt;&lt;SPAN class="L0S32" style="font-style: inherit; font-family: inherit;"&gt;1&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;IF &lt;/SPAN&gt;ekpo&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;-&lt;/SPAN&gt;konnr &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;IS &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;NOT &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;INITIAL&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category &lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;= &lt;/SPAN&gt;c3&lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;ELSEIF &lt;/SPAN&gt;ekpo&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;-&lt;/SPAN&gt;konnr &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;IS &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;NOT &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;INITIAL&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category &lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;= &lt;/SPAN&gt;c4&lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;ENDIF&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;ELSEIF&lt;/SPAN&gt; eban-esktz IS NOT INITIAL.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; category &lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;c5&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;ENDIF&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;Jyoti.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Apr 2013 09:20:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-simple-if-loop-statement/m-p/9353330#M1731538</guid>
      <dc:creator>jyotirmaya_mallick</dc:creator>
      <dc:date>2013-04-04T09:20:32Z</dc:date>
    </item>
  </channel>
</rss>

