<?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 Trivial Problem With Select-option in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/trivial-problem-with-select-option/m-p/2467620#M554338</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Folks,&lt;/P&gt;&lt;P&gt;        i am using ABAP-OO and i have not defined Select-option on selection screen rather i have defined parameters.Now once i get input from user i wrote this code to convert parameters into select-option (in internal table).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
wa_It_brd_selopt-sign = 'I'.
  wa_It_brd_selopt-option = 'BT'.
  wa_It_brd_selopt-LOW = Stru_Cn_Selcrtr-ca_brand.
  wa_It_brd_selopt-HIGH = Stru_Cn_Selcrtr-ca_brand.
  APPEND wa_It_brd_selopt TO It_brd_selopt.


  wa_It_slsrl_selopt-sign = 'I'.
  wa_It_slsrl_selopt-option = 'BT'.
  wa_It_slsrl_selopt-LOW = Stru_Cn_Selcrtr-ca_slsrl.
  wa_It_slsrl_selopt-HIGH  = Stru_Cn_Selcrtr-ca_slsrl.
  APPEND wa_It_slsrl_selopt TO It_slsrl_selopt.

  wa_It_crtby_selopt-sign = 'I'.
  wa_It_crtby_selopt-option = 'BT'.
  wa_It_crtby_selopt-LOW = Stru_Cn_Selcrtr-ca_crtby.
  wa_It_crtby_selopt-HIGH = Stru_Cn_Selcrtr-ca_crtby.
  APPEND wa_It_crtby_selopt  TO It_crtby_selopt.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inthis way i got select option internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select * from ZNSLVWHDIMMD_LCL
             into corresponding fields of table IT_VIEW
             WHERE SALESRLNO in  It_slsrl_selopt
             and   CREATEDBY in It_crtby_selopt
             and   BRANDID   in It_brd_selopt.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but when i give input to  SALESRLNO ,CREATEDBY  and BRANDID   then and then this selection statement runs and sy-subrc = 0.If i dont give only 2 input it does not work..i dont know why it is happening.It is because its ABAP-OO.I dont have any clue.Please help.Points will be rewarded.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Jun 2007 21:40:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-20T21:40:11Z</dc:date>
    <item>
      <title>Trivial Problem With Select-option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trivial-problem-with-select-option/m-p/2467620#M554338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Folks,&lt;/P&gt;&lt;P&gt;        i am using ABAP-OO and i have not defined Select-option on selection screen rather i have defined parameters.Now once i get input from user i wrote this code to convert parameters into select-option (in internal table).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
wa_It_brd_selopt-sign = 'I'.
  wa_It_brd_selopt-option = 'BT'.
  wa_It_brd_selopt-LOW = Stru_Cn_Selcrtr-ca_brand.
  wa_It_brd_selopt-HIGH = Stru_Cn_Selcrtr-ca_brand.
  APPEND wa_It_brd_selopt TO It_brd_selopt.


  wa_It_slsrl_selopt-sign = 'I'.
  wa_It_slsrl_selopt-option = 'BT'.
  wa_It_slsrl_selopt-LOW = Stru_Cn_Selcrtr-ca_slsrl.
  wa_It_slsrl_selopt-HIGH  = Stru_Cn_Selcrtr-ca_slsrl.
  APPEND wa_It_slsrl_selopt TO It_slsrl_selopt.

  wa_It_crtby_selopt-sign = 'I'.
  wa_It_crtby_selopt-option = 'BT'.
  wa_It_crtby_selopt-LOW = Stru_Cn_Selcrtr-ca_crtby.
  wa_It_crtby_selopt-HIGH = Stru_Cn_Selcrtr-ca_crtby.
  APPEND wa_It_crtby_selopt  TO It_crtby_selopt.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inthis way i got select option internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select * from ZNSLVWHDIMMD_LCL
             into corresponding fields of table IT_VIEW
             WHERE SALESRLNO in  It_slsrl_selopt
             and   CREATEDBY in It_crtby_selopt
             and   BRANDID   in It_brd_selopt.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but when i give input to  SALESRLNO ,CREATEDBY  and BRANDID   then and then this selection statement runs and sy-subrc = 0.If i dont give only 2 input it does not work..i dont know why it is happening.It is because its ABAP-OO.I dont have any clue.Please help.Points will be rewarded.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2007 21:40:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trivial-problem-with-select-option/m-p/2467620#M554338</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-20T21:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: Trivial Problem With Select-option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trivial-problem-with-select-option/m-p/2467621#M554339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It does not work because it is searching for blank values.&lt;/P&gt;&lt;P&gt;What you can do is, you can put a condition whether the parameter contains any value or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And i assume that it_brd_selopt is a range variable here.&lt;/P&gt;&lt;P&gt;If not, then plz make it a range variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not Stru_Cn_Selcrtr-ca_brand is initial.&lt;/P&gt;&lt;P&gt;wa_It_brd_selopt-sign = 'I'.&lt;/P&gt;&lt;P&gt;  wa_It_brd_selopt-option = 'BT'.&lt;/P&gt;&lt;P&gt;  wa_It_brd_selopt-LOW = Stru_Cn_Selcrtr-ca_brand.&lt;/P&gt;&lt;P&gt;  wa_It_brd_selopt-HIGH = Stru_Cn_Selcrtr-ca_brand.&lt;/P&gt;&lt;P&gt;  APPEND wa_It_brd_selopt TO It_brd_selopt.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like wise keep condition for all of them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And one more thing,&lt;/P&gt;&lt;P&gt;rather than using 'BT', you can use 'EQ' like this:&lt;/P&gt;&lt;P&gt;if not Stru_Cn_Selcrtr-ca_brand is initial.&lt;/P&gt;&lt;P&gt;wa_It_brd_selopt-sign = 'I'.&lt;/P&gt;&lt;P&gt;  wa_It_brd_selopt-option = 'EQ'.&lt;/P&gt;&lt;P&gt;  wa_It_brd_selopt-LOW = Stru_Cn_Selcrtr-ca_brand.&lt;/P&gt;&lt;P&gt;  APPEND wa_It_brd_selopt TO It_brd_selopt.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2007 21:43:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trivial-problem-with-select-option/m-p/2467621#M554339</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-20T21:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: Trivial Problem With Select-option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trivial-problem-with-select-option/m-p/2467622#M554340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You shouldn't be using regular internal tables as select options. (I'm surprised it doesn't give a syntax error.) Use range tables instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2007 21:43:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trivial-problem-with-select-option/m-p/2467622#M554340</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-20T21:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: Trivial Problem With Select-option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trivial-problem-with-select-option/m-p/2467623#M554341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to check for initial values before you fill the select options.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
IF Stru_Cn_Selcrtr-ca_brand IS NOT INITIAL.
 wa_It_brd_selopt-sign = 'I'.
  wa_It_brd_selopt-option = 'BT'.
  wa_It_brd_selopt-LOW = Stru_Cn_Selcrtr-ca_brand.
  wa_It_brd_selopt-HIGH = Stru_Cn_Selcrtr-ca_brand.
  APPEND wa_It_brd_selopt TO It_brd_selopt.
ENDIF.
IF Stru_Cn_Selcrtr-ca_slsrl IS INITIAL.
  wa_It_slsrl_selopt-sign = 'I'.
  wa_It_slsrl_selopt-option = 'BT'.
  wa_It_slsrl_selopt-LOW = Stru_Cn_Selcrtr-ca_slsrl.
  wa_It_slsrl_selopt-HIGH  = Stru_Cn_Selcrtr-ca_slsrl.
  APPEND wa_It_slsrl_selopt TO It_slsrl_selopt.
ENDIF.
IF Stru_Cn_Selcrtr-ca_crtby IS NOT INITIAL.
  wa_It_crtby_selopt-sign = 'I'.
  wa_It_crtby_selopt-option = 'BT'.
  wa_It_crtby_selopt-LOW = Stru_Cn_Selcrtr-ca_crtby.
  wa_It_crtby_selopt-HIGH = Stru_Cn_Selcrtr-ca_crtby.
  APPEND wa_It_crtby_selopt  TO It_crtby_selopt.
ENDIF. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2007 21:48:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trivial-problem-with-select-option/m-p/2467623#M554341</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-20T21:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: Trivial Problem With Select-option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trivial-problem-with-select-option/m-p/2467624#M554342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Folks,&lt;/P&gt;&lt;P&gt;        If u search  data dictionary then u must have found that if field r empty althoug we get perfect ouput.I want he same..i used the 'EQ' instead of 'BT' and can anyone has code to show how to use range table in ABAP-OO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nirad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2007 02:36:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trivial-problem-with-select-option/m-p/2467624#M554342</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-21T02:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: Trivial Problem With Select-option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trivial-problem-with-select-option/m-p/2467625#M554343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nirad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use ranges Here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RANGES &amp;lt;rangetab&amp;gt; FOR &amp;lt;f&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement is simply a shortened form of the following statements:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF &amp;lt;rangetab&amp;gt; OCCURS 0,&lt;/P&gt;&lt;P&gt;         sign(1) TYPE c,&lt;/P&gt;&lt;P&gt;         option(2) TYPE c,&lt;/P&gt;&lt;P&gt;         low  LIKE &amp;lt;f&amp;gt;,&lt;/P&gt;&lt;P&gt;         high LIKE &amp;lt;f&amp;gt;,&lt;/P&gt;&lt;P&gt;      END OF &amp;lt;rangetab&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget to reward  for all useful answers...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2007 02:52:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trivial-problem-with-select-option/m-p/2467625#M554343</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-21T02:52:29Z</dc:date>
    </item>
  </channel>
</rss>

