<?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 Statement IF in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/statement-if/m-p/12643587#M2014444</link>
    <description>&lt;P&gt;HI I have question about my code...&lt;/P&gt;
  &lt;P&gt;i would like if one of my condition is true, i would it write the message with the variable is true&lt;/P&gt;
  &lt;P&gt;Thanks&lt;/P&gt;
  &lt;P&gt;IF P_LONG = 0 OR P_LARG = 0 OR P_HAUT = 0. &lt;BR /&gt; WRITE 'You can't put a 0'.&lt;BR /&gt; ELSE.&lt;BR /&gt; WRITE 'VALID'.&lt;BR /&gt;ENDIF.&lt;/P&gt;</description>
    <pubDate>Fri, 20 May 2022 16:14:09 GMT</pubDate>
    <dc:creator>d4xtian</dc:creator>
    <dc:date>2022-05-20T16:14:09Z</dc:date>
    <item>
      <title>Statement IF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/statement-if/m-p/12643587#M2014444</link>
      <description>&lt;P&gt;HI I have question about my code...&lt;/P&gt;
  &lt;P&gt;i would like if one of my condition is true, i would it write the message with the variable is true&lt;/P&gt;
  &lt;P&gt;Thanks&lt;/P&gt;
  &lt;P&gt;IF P_LONG = 0 OR P_LARG = 0 OR P_HAUT = 0. &lt;BR /&gt; WRITE 'You can't put a 0'.&lt;BR /&gt; ELSE.&lt;BR /&gt; WRITE 'VALID'.&lt;BR /&gt;ENDIF.&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 16:14:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/statement-if/m-p/12643587#M2014444</guid>
      <dc:creator>d4xtian</dc:creator>
      <dc:date>2022-05-20T16:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: Statement IF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/statement-if/m-p/12643588#M2014445</link>
      <description>&lt;P&gt;Thank
you for visiting SAP Community to get answers to your questions.&lt;/P&gt;

&lt;P&gt;Since you're asking a question here for the first time, I'd like
to recommend you with the following steps so you can get the most out of your
community membership:&lt;/P&gt;

&lt;UL&gt;
 &lt;LI&gt;Please
     see: &lt;A href="https://community.sap.com/resources/questions-and-answers"&gt;https://community.sap.com/resources/questions-and-answers&lt;/A&gt; as this
     resource page provides tips for preparing questions that draw responses
     from our members&lt;/LI&gt;
 &lt;LI&gt;Consider to take
     our Q&amp;amp;A tutorial at: &lt;A href="https://developers.sap.com/tutorials/community-qa.html" target="_blank"&gt;https://developers.sap.com/tutorials/community-qa.html&lt;/A&gt;. as that will
     help you when submitting questions to the community.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;I also recommend that you include a profile picture. By
personalizing your profile, you encourage readers to respond: &lt;A href="https://developers.sap.com/tutorials/community-profile.html" target="_blank"&gt;https://developers.sap.com/tutorials/community-profile.html&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;I hope you find this advice useful, and we're happy to have you
as part of SAP Community!&lt;/P&gt;

&lt;P&gt;All the best,&lt;BR /&gt;
-Alex&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 16:14:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/statement-if/m-p/12643588#M2014445</guid>
      <dc:creator>AlexGourdet</dc:creator>
      <dc:date>2022-05-20T16:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: Statement IF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/statement-if/m-p/12643589#M2014446</link>
      <description>&lt;P&gt;What your code does, is what you read: if one of the three is zero then "you can't put a 0", else "valid".&lt;/P&gt;&lt;P&gt;Could you explain your question please?&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 16:24:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/statement-if/m-p/12643589#M2014446</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-05-20T16:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: Statement IF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/statement-if/m-p/12643590#M2014447</link>
      <description>&lt;P&gt;Have a little read about &lt;A href="https://en.wikipedia.org/wiki/Boolean_algebra" target="_blank"&gt;boolean logic&lt;/A&gt;, as you're making a common error by people who don't understand it.&lt;BR /&gt;&lt;BR /&gt;Maybe AND would be your friend.&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 17:05:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/statement-if/m-p/12643590#M2014447</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2022-05-20T17:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: Statement IF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/statement-if/m-p/12643591#M2014448</link>
      <description>&lt;P&gt;I as the user to enter numerical data to make a calulation, and i don't want him to be able to put 0 in on of the field, and i would like to return error message to him in indicating the field or fiels where where he field in 0&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 20:42:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/statement-if/m-p/12643591#M2014448</guid>
      <dc:creator>d4xtian</dc:creator>
      <dc:date>2022-05-20T20:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: Statement IF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/statement-if/m-p/12643592#M2014449</link>
      <description>&lt;P&gt;Or maybe you don't understand the concept of Types. Did you define P_LONG, P_LARG and P_HAUT with a numeric type? If not, probably your code won't work well.&lt;/P&gt;</description>
      <pubDate>Sat, 21 May 2022 09:48:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/statement-if/m-p/12643592#M2014449</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-05-21T09:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: Statement IF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/statement-if/m-p/12643593#M2014450</link>
      <description>&lt;P&gt;sorry Sarah, i haven’t post the Declaration part, i did it, declare it.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Data : P_LONG type i,&lt;/P&gt;&lt;P&gt;           P_LARGE type i,&lt;/P&gt;&lt;P&gt;           P_HAUT type i.&lt;/P&gt;</description>
      <pubDate>Sun, 22 May 2022 18:24:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/statement-if/m-p/12643593#M2014450</guid>
      <dc:creator>d4xtian</dc:creator>
      <dc:date>2022-05-22T18:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: Statement IF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/statement-if/m-p/12643594#M2014451</link>
      <description>&lt;P&gt;So, yes, it's numeric type.&lt;/P&gt;&lt;P&gt;So, your code is correct, it corresponds to what you want to do.&lt;/P&gt;</description>
      <pubDate>Sun, 22 May 2022 19:07:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/statement-if/m-p/12643594#M2014451</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-05-22T19:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: Statement IF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/statement-if/m-p/12643595#M2014452</link>
      <description>&lt;P&gt;Yes but i want the message error gave me the name of the field and the field that has the '0'.&lt;/P&gt;&lt;P&gt;IF P_LONG = 0 OR P_LARG = 0 OR P_HAUT = 0.&lt;BR /&gt;WRITE P_LONG ' can't HAVE a 0'.&lt;BR /&gt;ELSE.&lt;BR /&gt;WRITE 'VALID'.&lt;BR /&gt;ENDIF.&lt;/P&gt;&lt;P&gt; The message i have is &lt;/P&gt;&lt;P&gt;' 0 You can't put 0'&lt;/P&gt;&lt;P&gt;I have declare the name of the field in "Text Elements"&lt;/P&gt;</description>
      <pubDate>Sun, 22 May 2022 23:27:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/statement-if/m-p/12643595#M2014452</guid>
      <dc:creator>d4xtian</dc:creator>
      <dc:date>2022-05-22T23:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: Statement IF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/statement-if/m-p/12643596#M2014453</link>
      <description>&lt;P&gt;So you have to test separatly each field :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF p_long eq 0.&lt;BR /&gt;  write |P_LONG can't have a 0|.&lt;BR /&gt;ELSE.&lt;BR /&gt;  IF p_larg eq 0.&lt;BR /&gt;    write |P_LONG can't have a 0|.&lt;BR /&gt;  ELSE.&lt;BR /&gt;    IF p_haut eq 0.&lt;BR /&gt;      write |P_LONG can't have a 0|.&lt;BR /&gt;    ENDIF.&lt;BR /&gt;  ENDIF.&lt;BR /&gt;ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 May 2022 05:31:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/statement-if/m-p/12643596#M2014453</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2022-05-23T05:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: Statement IF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/statement-if/m-p/12643597#M2014454</link>
      <description>&lt;P&gt;or you could create a table of variables &lt;/P&gt;&lt;P&gt;something like (not tested).&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA(ma_jolie_table) = VALUE ...( ( fieldname = 'P_LONG' ) (fieldname = 'P_LARG' ....).&lt;BR /&gt;LOOP AT ma_jolie_table&lt;BR /&gt;     INTO DATA(ls_ma_jolie_ligne).&lt;BR /&gt;  ASSIGN (ls_ma_jolie_ligne-fieldname) to field-symbol(&amp;lt;field&amp;gt;).&lt;BR /&gt;  CHECK &amp;lt;field&amp;gt; IS ASSIGN.&lt;BR /&gt;  IF &amp;lt;field&amp;gt; eq 0.&lt;BR /&gt;    write /1 |{ ls_ma_jolie_table-fieldname } can't have a 0|.&lt;BR /&gt;  ENDIF.&lt;BR /&gt;ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 May 2022 05:35:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/statement-if/m-p/12643597#M2014454</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2022-05-23T05:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: Statement IF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/statement-if/m-p/12643598#M2014455</link>
      <description>&lt;P&gt;OK. Your question was not clear. You'd better give example of what you expect, like if user enters 0 in P_LONG, how to write:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;P_LONG can't have a 0&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 May 2022 06:22:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/statement-if/m-p/12643598#M2014455</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-05-23T06:22:25Z</dc:date>
    </item>
  </channel>
</rss>

