<?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: String Comparison with selection-options in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-comparison-with-selection-options/m-p/8231271#M1629231</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mandy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this look fine. What is the exact definition of your P_402, P_403 and P_403 parameters. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are they type FLAG  or c(1) ? Are they defines as checkbox ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While debugging, which one is marked, or do you mark all of them ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Klaus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Oct 2011 08:19:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-10-10T08:19:35Z</dc:date>
    <item>
      <title>String Comparison with selection-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-comparison-with-selection-options/m-p/8231266#M1629226</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;&lt;/P&gt;&lt;P&gt;I am now developing a program which needs comparison to string. There are  several checkbox on the selection screen, when the checkbox is checked, data contains certain string needed to pass the authority checking. Here are my codes: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: data type : lifnr_c type c(10). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  if ( P_402 = 'X' and inven_data-lifnr_c CS '402' )  or
     ( P_403 = 'X' and inven_data-lifnr_c CS '403' ) or  
     ( P_410 = 'X' and inven_data-lifnr_c CS '410' ).
       allow = 'X'.
  endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all, does the code correct syntax-wise? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I am sure there are some data contains '402', '403' or '410', however, I can get no result in this case, what will be possible errors?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &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;Mandy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Oct 2011 05:00:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-comparison-with-selection-options/m-p/8231266#M1629226</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-10T05:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: String Comparison with selection-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-comparison-with-selection-options/m-p/8231267#M1629227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Syntax wise the code is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;if ( P_402 = 'X' and inven_data-lifnr_c CS '402' )  or
     ( P_403 = 'X' and inven_data-lifnr_c CS '403' ) or  
     ( P_410 = 'X' and inven_data-lifnr_c CS '410' ).
       allow = 'X'.
  endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Here for two condition you have put AND operator so both should be true, in any of the three conditions.  Then only you will get result. For eg: suppose inven_data-lifnr_c CS '402' is true and checkbox you have selected is P_410. Then no result will come.  Check in debugging.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try like below also.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;if ( P_402 = 'X' and inven_data-lifnr_c CS '402 ' )  or
     ( P_403 = 'X' and inven_data-lifnr_c CS '403 ' ) or  
     ( P_410 = 'X' and inven_data-lifnr_c CS '410 ' ).
       allow = 'X'.
  endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If this is not working, try with string operator CP.  Check this [link |http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3516358411d1829f0000e829fbfe/content.htm] for more details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;if ( P_402 = 'X' and inven_data-lifnr_c CP '*402* ' )  or
     ( P_403 = 'X' and inven_data-lifnr_c CP '*403*' ) or  
     ( P_410 = 'X' and inven_data-lifnr_c CP '*410*' ).
       allow = 'X'.
  endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Oct 2011 06:16:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-comparison-with-selection-options/m-p/8231267#M1629227</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-10T06:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: String Comparison with selection-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-comparison-with-selection-options/m-p/8231268#M1629228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mandy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the issue  may be caused by field &lt;STRONG&gt;inven_data-lifnr&lt;/STRONG&gt; ! What is the content of the field while debugging your code ? Is &lt;STRONG&gt;inven_data&lt;/STRONG&gt; a structure or the header line of an internal table ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Klaus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Oct 2011 06:48:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-comparison-with-selection-options/m-p/8231268#M1629228</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-10T06:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: String Comparison with selection-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-comparison-with-selection-options/m-p/8231269#M1629229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried, but both doesn't work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Oct 2011 06:54:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-comparison-with-selection-options/m-p/8231269#M1629229</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-10T06:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: String Comparison with selection-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-comparison-with-selection-options/m-p/8231270#M1629230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Klaus, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The INVEN_DATA is declare as follow:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;INVEN_DATA type ZABC occurs 0 with header line,&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While ZABC is the customized table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When runniing the debug mode the data type : char (10) &lt;/P&gt;&lt;P&gt;value '0000004021',  '0000004031' or  '0000004101'&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;Mandy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Mandy Au on Oct 10, 2011 10:01 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Oct 2011 07:11:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-comparison-with-selection-options/m-p/8231270#M1629230</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-10T07:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: String Comparison with selection-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-comparison-with-selection-options/m-p/8231271#M1629231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mandy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this look fine. What is the exact definition of your P_402, P_403 and P_403 parameters. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are they type FLAG  or c(1) ? Are they defines as checkbox ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While debugging, which one is marked, or do you mark all of them ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Klaus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Oct 2011 08:19:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-comparison-with-selection-options/m-p/8231271#M1629231</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-10T08:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: String Comparison with selection-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-comparison-with-selection-options/m-p/8231272#M1629232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Klaus, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All are checkbox:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS: p_datum type sy-datum default sy-datum OBLIGATORY ,
            p_402   AS CHECKBOX DEFAULT 'X',
            p_403   AS CHECKBOX DEFAULT 'X',
            p_410   AS CHECKBOX DEFAULT 'X'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All parameters return 'X' when the program is run. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Mandy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Oct 2011 08:35:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-comparison-with-selection-options/m-p/8231272#M1629232</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-10T08:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: String Comparison with selection-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-comparison-with-selection-options/m-p/8231273#M1629233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mandy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In which event have you written this IF ... ENDIF block? (For e.g., AT SELECTION-SCREEN, START-OF-SELECTION etc.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also in your code you're accessing the header-line of the internal table, are you looping on the internal table as well?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: Avoid using internal table with HEADER LINE!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Oct 2011 08:47:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-comparison-with-selection-options/m-p/8231273#M1629233</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2011-10-10T08:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: String Comparison with selection-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-comparison-with-selection-options/m-p/8231274#M1629234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Suhas, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the process after all selection ends. &lt;/P&gt;&lt;P&gt;After the END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know, however, this is some enhancement that I have no choice but an intenral table with header line. &amp;gt;.&amp;lt;&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;Mandy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Oct 2011 08:54:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-comparison-with-selection-options/m-p/8231274#M1629234</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-10T08:54:14Z</dc:date>
    </item>
  </channel>
</rss>

