<?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: Dynamic IF condition in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-if-condition/m-p/7173152#M1517504</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mayank,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of this you can just append 'NE' , 'EQ' , 'CP' into a range table and do it.&lt;/P&gt;&lt;P&gt;in the &lt;STRONG&gt;if condition&lt;/STRONG&gt; always use &lt;STRONG&gt;in&lt;/STRONG&gt; statement and build the others in range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you got it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Aug 2010 14:49:59 GMT</pubDate>
    <dc:creator>kesavadas_thekkillath</dc:creator>
    <dc:date>2010-08-09T14:49:59Z</dc:date>
    <item>
      <title>Dynamic IF condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-if-condition/m-p/7173149#M1517501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I want to know is it possible to create Dynamic IF condition.&lt;/P&gt;&lt;P&gt;My requirement is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF 'incomin_ph1' (ls_zsales_pln-PH1_OP)  lt_ph_r1 
           ENDIF. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here ls_zsales_pln-PH1_OP will have values as IN or NOT IN but it gives me compilation error as it is not Supported.&lt;/P&gt;&lt;P&gt;Is there any other way we can bulit dynamic IF condition..&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;Mayank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Aug 2010 13:50:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-if-condition/m-p/7173149#M1517501</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-09T13:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic IF condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-if-condition/m-p/7173150#M1517502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi mayank,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this what you meant ?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA:BEGIN OF wa,
     matnr TYPE matnr,
     END OF wa.

DATA:BEGIN OF wa1,
     matnr TYPE matnr,
     END OF wa1.

DATA:lv_string TYPE char255.
FIELD-SYMBOLS:&amp;lt;fs&amp;gt; TYPE ANY.

DO 2 TIMES.
  IF sy-index = 1.
    wa-matnr = 'A'.
    lv_string = 'WA'.
    CONCATENATE lv_string '-MATNR' INTO lv_string.
    CONDENSE lv_string.
    ASSIGN (lv_string) TO &amp;lt;fs&amp;gt;.
  ELSE.
    wa1-matnr = 'B'.
    lv_string = 'WA1'.
    CONCATENATE lv_string '-MATNR' INTO lv_string.
    CONDENSE lv_string.
    ASSIGN (lv_string) TO &amp;lt;fs&amp;gt;.
  ENDIF.
  IF &amp;lt;fs&amp;gt; = 'A'.
    WRITE 'entered WA'.
  ELSE.
    SKIP 1.
    WRITE 'entered WA1'.
  ENDIF.
ENDDO.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Aug 2010 14:27:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-if-condition/m-p/7173150#M1517502</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-08-09T14:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic IF condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-if-condition/m-p/7173151#M1517503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Keshav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is i want to Bulit Relationship Operator Dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like,&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; IF VAR1 IN it_tab1
            endif.
IF VAR1 NOT IN it_tab1
            endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here, i want to replace IN or NOT IN Operator  with a variable which is giving syntax error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Aug 2010 14:45:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-if-condition/m-p/7173151#M1517503</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-09T14:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic IF condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-if-condition/m-p/7173152#M1517504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mayank,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of this you can just append 'NE' , 'EQ' , 'CP' into a range table and do it.&lt;/P&gt;&lt;P&gt;in the &lt;STRONG&gt;if condition&lt;/STRONG&gt; always use &lt;STRONG&gt;in&lt;/STRONG&gt; statement and build the others in range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you got it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Aug 2010 14:49:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-if-condition/m-p/7173152#M1517504</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-08-09T14:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic IF condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-if-condition/m-p/7173153#M1517505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you shoul fill the range lt_ph_r1 according to your request:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;lt_ph_r1-sign = 'I'. "  including .... for IN  lt_ph_r1 . 

lt_ph_r1-sign = 'E'. "  excluding .... for  NOT IN  lt_ph_r1. 
.....
and your If should be

IF 'incomin_ph1' IN  lt_ph_r1 


  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Aug 2010 14:52:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-if-condition/m-p/7173153#M1517505</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-09T14:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic IF condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-if-condition/m-p/7173154#M1517506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Keshav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actaully , i will be getting these operator values IN,NOT IN from a Z table , at run time i dont know what &lt;/P&gt;&lt;P&gt;operator i am getting.&lt;/P&gt;&lt;P&gt;So i want to built this IF condition on the basis of whatever operator value i get from Z table.&lt;/P&gt;&lt;P&gt;And, also In Z table operator values can be IN and NOT IN only&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;Mayank Verdia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Aug 2010 15:13:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-if-condition/m-p/7173154#M1517506</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-09T15:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic IF condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-if-condition/m-p/7173155#M1517507</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;You can check this example.If the z table contains &lt;STRONG&gt;not in&lt;/STRONG&gt; then build it with &lt;STRONG&gt;NE&lt;/STRONG&gt; , if it contains &lt;STRONG&gt;in&lt;/STRONG&gt; then build it with &lt;STRONG&gt;EQ&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
do 2 times.
wa1-field1 = 'B'.
clear rt1[].

if sy-index = 1.
ra-sign = 'I'.
ra-option = 'NE'. "&amp;lt;---
ra-low = 'A'.
append ra to rt1.
endif.

if sy-index = 2.
ra-sign = 'I'.
ra-option = 'EQ'. "&amp;lt;---
ra-low = 'B'.
append ra to rt1.
endif.

if wa1-field1 in rt1.
write 'True'.
skip 1.
else.
write 'false'.
endif.

enddo.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Aug 2010 15:20:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-if-condition/m-p/7173155#M1517507</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-08-09T15:20:42Z</dc:date>
    </item>
  </channel>
</rss>

