<?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: Checking for different values with single var name. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-for-different-values-with-single-var-name/m-p/925656#M59808</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kranthi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want a method to set this property persistently via definitions made in DDIC, I do not know any way. If the values that the parameter can take are definite, then you can set up a check table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise, one should achieve this programatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i. &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
   IF name = &amp;lt;i&amp;gt;&amp;lt;prohibited_val1&amp;gt;&amp;lt;/i&amp;gt; OR
      name = &amp;lt;i&amp;gt;&amp;lt;prohibited_val2&amp;gt;&amp;lt;/i&amp;gt; OR
      name = &amp;lt;i&amp;gt;&amp;lt;prohibited_val3&amp;gt;&amp;lt;/i&amp;gt; OR
      name = &amp;lt;i&amp;gt;&amp;lt;prohibited_val4&amp;gt;&amp;lt;/i&amp;gt; OR
      name = &amp;lt;i&amp;gt;&amp;lt;prohibited_val5&amp;gt;&amp;lt;/i&amp;gt; .
     
*-- The rule is broken
   ENDIF .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ii. Define a range and check with it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TABLES mytable .
RANGES grn_namepval FOR mytable-name .

*-- Begin of block A
CLEAR grn_namepval .
grn_namepval-sign = 'I' .
grn_namepval-option = 'EQ' .
grn_namepval-low = &amp;lt;i&amp;gt;&amp;lt;prohibited_val1&amp;gt;&amp;lt;/i&amp;gt; .
APPEND grn_namepval .
*-- End of block A

*--Do block A for each prohibited value

IF name IN grn_name_pval .
*--Your rule is broken
ENDIF .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Serdar &amp;lt;a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d"&amp;gt;[ BC ]&amp;lt;/a&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 May 2005 18:35:48 GMT</pubDate>
    <dc:creator>ssimsekler</dc:creator>
    <dc:date>2005-05-17T18:35:48Z</dc:date>
    <item>
      <title>Checking for different values with single var name.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-for-different-values-with-single-var-name/m-p/925654#M59806</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 have a variable NAME which should not take 5 different values.&lt;/P&gt;&lt;P&gt; i want to check NAME againist these 5 values at run time. is there any way to check NAME againist these 5 values like NAME in X, where x contains these 5 values.&lt;/P&gt;&lt;P&gt;could someone let me know the syntax and approach to do that.&lt;/P&gt;&lt;P&gt;your help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;kranthi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: kranthi kumar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: kranthi kumar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2005 18:26:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-for-different-values-with-single-var-name/m-p/925654#M59806</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-17T18:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for different values with single var name.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-for-different-values-with-single-var-name/m-p/925655#M59807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure...check out this same code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001 .

data: t_name(30) type c.

ranges: r_name for t_name.

parameters: p_name like t_name.

initialization.
  clear r_name. refresh r_name.
  r_name-sign = 'I'.
  r_name-option = 'EQ'.
  r_name-low = 'RICH'.      append r_name.
  r_name-low = 'BRAD'.      append r_name.
  r_name-low = 'ANAND'.     append r_name.
  r_name-low = 'SERDAR'.    append r_name.
  r_name-low = 'SRINIVAS'.  append r_name.

at selection-screen.

  if not p_name in r_name.
    message e000(00).
  endif.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2005 18:33:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-for-different-values-with-single-var-name/m-p/925655#M59807</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-05-17T18:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for different values with single var name.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-for-different-values-with-single-var-name/m-p/925656#M59808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kranthi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want a method to set this property persistently via definitions made in DDIC, I do not know any way. If the values that the parameter can take are definite, then you can set up a check table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise, one should achieve this programatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i. &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
   IF name = &amp;lt;i&amp;gt;&amp;lt;prohibited_val1&amp;gt;&amp;lt;/i&amp;gt; OR
      name = &amp;lt;i&amp;gt;&amp;lt;prohibited_val2&amp;gt;&amp;lt;/i&amp;gt; OR
      name = &amp;lt;i&amp;gt;&amp;lt;prohibited_val3&amp;gt;&amp;lt;/i&amp;gt; OR
      name = &amp;lt;i&amp;gt;&amp;lt;prohibited_val4&amp;gt;&amp;lt;/i&amp;gt; OR
      name = &amp;lt;i&amp;gt;&amp;lt;prohibited_val5&amp;gt;&amp;lt;/i&amp;gt; .
     
*-- The rule is broken
   ENDIF .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ii. Define a range and check with it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TABLES mytable .
RANGES grn_namepval FOR mytable-name .

*-- Begin of block A
CLEAR grn_namepval .
grn_namepval-sign = 'I' .
grn_namepval-option = 'EQ' .
grn_namepval-low = &amp;lt;i&amp;gt;&amp;lt;prohibited_val1&amp;gt;&amp;lt;/i&amp;gt; .
APPEND grn_namepval .
*-- End of block A

*--Do block A for each prohibited value

IF name IN grn_name_pval .
*--Your rule is broken
ENDIF .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Serdar &amp;lt;a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d"&amp;gt;[ BC ]&amp;lt;/a&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2005 18:35:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-for-different-values-with-single-var-name/m-p/925656#M59808</guid>
      <dc:creator>ssimsekler</dc:creator>
      <dc:date>2005-05-17T18:35:48Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for different values with single var name.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-for-different-values-with-single-var-name/m-p/925657#M59809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your valuable input. my problem is solved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kranthi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2005 18:49:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-for-different-values-with-single-var-name/m-p/925657#M59809</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-17T18:49:21Z</dc:date>
    </item>
  </channel>
</rss>

