<?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 Checking select option values. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-select-option-values/m-p/2222897#M477438</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys/Dolls&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an ABAP program that works ok but I would like to make it more flexible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The program populates a select option field on the INITILIZATION event but I need to check values entered are within valid range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I&amp;#146;m using &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHECK p0008-TRFGR EQ 'PROF' OR p0008-TRFGR EQ 'GRADE 09'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I&amp;#146;m sure there is a way to use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHECK p0008-TRFGR IN p_ps_grp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which is much more elegant but I don&amp;#146;t know how; if I use the above the program crashes and only way to resolve is not to populate it within the initilization section and to use a variant. Is there a solution out there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A snippet of my code is as follows:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT zh119rep LINE-SIZE 175 NO STANDARD PAGE HEADING.


* Define the Pay scale group range.
SELECT-OPTIONS p_ps_grp FOR p0008-trfgr.


* INITIALIZATION EVENT
INITIALIZATION.
* Set the Pay Scale Groups but 1st clear it.
  REFRESH p_ps_grp.
  p_ps_grp-low = 'PROF'.
  APPEND p_ps_grp.
  p_ps_grp-low = 'GRADE 09'.
  APPEND p_ps_grp.


GET pernr.

* Check to see if selected wage type is in range.
  CHECK p0008-TRFGR IN p_ps_grp.	&amp;#147; This crashes program
*  CHECK p0008-TRFGR EQ 'PROF' OR p0008-TRFGR EQ 'GRADE 09'. &amp;#147; This ok.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Raj&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Apr 2007 17:16:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-24T17:16:43Z</dc:date>
    <item>
      <title>Checking select option values.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-select-option-values/m-p/2222897#M477438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys/Dolls&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an ABAP program that works ok but I would like to make it more flexible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The program populates a select option field on the INITILIZATION event but I need to check values entered are within valid range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I&amp;#146;m using &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHECK p0008-TRFGR EQ 'PROF' OR p0008-TRFGR EQ 'GRADE 09'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I&amp;#146;m sure there is a way to use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHECK p0008-TRFGR IN p_ps_grp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which is much more elegant but I don&amp;#146;t know how; if I use the above the program crashes and only way to resolve is not to populate it within the initilization section and to use a variant. Is there a solution out there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A snippet of my code is as follows:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT zh119rep LINE-SIZE 175 NO STANDARD PAGE HEADING.


* Define the Pay scale group range.
SELECT-OPTIONS p_ps_grp FOR p0008-trfgr.


* INITIALIZATION EVENT
INITIALIZATION.
* Set the Pay Scale Groups but 1st clear it.
  REFRESH p_ps_grp.
  p_ps_grp-low = 'PROF'.
  APPEND p_ps_grp.
  p_ps_grp-low = 'GRADE 09'.
  APPEND p_ps_grp.


GET pernr.

* Check to see if selected wage type is in range.
  CHECK p0008-TRFGR IN p_ps_grp.	&amp;#147; This crashes program
*  CHECK p0008-TRFGR EQ 'PROF' OR p0008-TRFGR EQ 'GRADE 09'. &amp;#147; This ok.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Raj&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2007 17:16:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-select-option-values/m-p/2222897#M477438</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-24T17:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: Checking select option values.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-select-option-values/m-p/2222898#M477439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the following should work fine..&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT zh119rep LINE-SIZE 175 NO STANDARD PAGE HEADING.
 
 
* Define the Pay scale group range.
SELECT-OPTIONS p_ps_grp FOR p0008-trfgr.
 
 
* INITIALIZATION EVENT
INITIALIZATION.
* Set the Pay Scale Groups but 1st clear it.
  REFRESH p_ps_grp.
  p_ps_grp-sign = 'I'.
  p_ps_grp-option = 'EQ'.
  p_ps_grp-low = 'PROF'.
  APPEND p_ps_grp.
  p_ps_grp-low = 'GRADE 09'.
  APPEND p_ps_grp.
 
 
GET pernr.
 
* Check to see if selected wage type is in range.
  CHECK p0008-TRFGR IN p_ps_grp.	 

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~Suresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2007 17:23:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-select-option-values/m-p/2222898#M477439</guid>
      <dc:creator>suresh_datti</dc:creator>
      <dc:date>2007-04-24T17:23:20Z</dc:date>
    </item>
  </channel>
</rss>

