<?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 select-options no editable in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-no-editable/m-p/4534382#M1071447</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I want to create a SELECT-OPTION field that will have different default values, NON EDITABLE, in selection screen depending on transaction that calls the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please give me some advices to complete this work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT_OPTIONS: P_DEP for DBTAB-DBFIELD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case sy-tcode.&lt;/P&gt;&lt;P&gt;when 'ZT1'.&lt;/P&gt;&lt;P&gt;P_DEP = 'VALUE1'.&lt;/P&gt;&lt;P&gt;when 'ZT2'.&lt;/P&gt;&lt;P&gt;P_DEP = 'VALUE2'.&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Diana.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Sep 2008 12:18:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-25T12:18:10Z</dc:date>
    <item>
      <title>select-options no editable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-no-editable/m-p/4534382#M1071447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I want to create a SELECT-OPTION field that will have different default values, NON EDITABLE, in selection screen depending on transaction that calls the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please give me some advices to complete this work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT_OPTIONS: P_DEP for DBTAB-DBFIELD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case sy-tcode.&lt;/P&gt;&lt;P&gt;when 'ZT1'.&lt;/P&gt;&lt;P&gt;P_DEP = 'VALUE1'.&lt;/P&gt;&lt;P&gt;when 'ZT2'.&lt;/P&gt;&lt;P&gt;P_DEP = 'VALUE2'.&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Diana.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Sep 2008 12:18:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-no-editable/m-p/4534382#M1071447</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-25T12:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: select-options no editable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-no-editable/m-p/4534383#M1071448</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;A select option is set as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;p_dep-sign = 'EQ'.
p_dep-option = 'I'.
p_dep-low = 'VALUE1'.
append p_dep.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To make them output only use the at selection-screen output event and loop at screen.&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;Darren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Sep 2008 12:21:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-no-editable/m-p/4534383#M1071448</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-25T12:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: select-options no editable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-no-editable/m-p/4534384#M1071449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Diana,&lt;/P&gt;&lt;P&gt;  First question is if you are trying to create a select-option or parameter on the selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to check the difference between the two please refer to the below link:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-basis-abap.com/abap/difference-between-select-options-and-parameters.htm" target="test_blank"&gt;http://www.sap-basis-abap.com/abap/difference-between-select-options-and-parameters.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You code should work if you are creating parameters on the selection screen but if you are creating select-options you have to populate low and high values like below :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT_OPTIONS: P_DEP for DBTAB-DBFIELD.

at selection-screen output.
case sy-tcode.
when 'ZT1'.
P_DEP-low = 'VALUE1'.
when 'ZT2'.
P_DEP-high = 'VALUE2'.
endcase.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;To make the fields non-editable you have to use the below code.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

loop at screen.
if screen-name = 'P_DEP-low' or screen-name = 'P_DEP-high '.
screen input = 0.
modify screen.
endif.
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Also this has to be done at the event at selection-screen output.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Sep 2008 12:27:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-no-editable/m-p/4534384#M1071449</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-25T12:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: select-options no editable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-no-editable/m-p/4534385#M1071450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Diana,&lt;/P&gt;&lt;P&gt;  First question is if you are trying to create a select-option or parameter on the selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to check the difference between the two please refer to the below link:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-basis-abap.com/abap/difference-between-select-options-and-parameters.htm" target="test_blank"&gt;http://www.sap-basis-abap.com/abap/difference-between-select-options-and-parameters.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You code should work if you are creating parameters on the selection screen but if you are creating select-options you have to populate low and high values like below :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT_OPTIONS: P_DEP for DBTAB-DBFIELD.

at selection-screen output.
case sy-tcode.
when 'ZT1'.
P_DEP-low = 'VALUE1'.
when 'ZT2'.
P_DEP-high = 'VALUE2'.
endcase.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also this has to be done at the event at selection-screen output.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Sep 2008 12:27:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-no-editable/m-p/4534385#M1071450</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-25T12:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: select-options no editable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-no-editable/m-p/4534386#M1071451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TABLES: sbook.

SELECTION-SCREEN BEGIN OF BLOCK bl01.
SELECT-OPTIONS: p_sel1 FOR sbook-carrid MODIF ID so1,
  p_sel2 FOR sbook-connid MODIF ID so2.
SELECTION-SCREEN END OF BLOCK bl01.

INITIALIZATION.
  p_sel1-low = 'AA'.
  p_sel1-high = 'BB'.
  APPEND p_sel1.

AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF screen-group1 = 'SO1'.
      screen-input = 0.
    ENDIF.
    MODIFY SCREEN.
  ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Sep 2008 12:29:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-no-editable/m-p/4534386#M1071451</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-25T12:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: select-options no editable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-no-editable/m-p/4534387#M1071452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select options is like a range table having four fields &lt;/P&gt;&lt;P&gt;sign &lt;/P&gt;&lt;P&gt;option &lt;/P&gt;&lt;P&gt;low &lt;/P&gt;&lt;P&gt;high&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so, first populate the work area(like line of select option) and then append it to select option..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Secondly to keep it display only u can set the screen-input = 0 by looping at screen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Sep 2008 12:31:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-no-editable/m-p/4534387#M1071452</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-25T12:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: select-options no editable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-no-editable/m-p/4534388#M1071453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much,&lt;/P&gt;&lt;P&gt;Diana.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Sep 2008 13:00:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-no-editable/m-p/4534388#M1071453</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-25T13:00:13Z</dc:date>
    </item>
  </channel>
</rss>

