<?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: at selection-screen on value-request in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-at-selection-screen-on-value-request/m-p/1588274#M265011</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two select-options fields, S_WERKS, S_AUFNR such that the values of one field is dependent on the values of the other field in the select-options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the "at selection-screen on value-request event on" to populate the select-options field, S_AUFNR, that is dependent on the other field, S_WERKS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code I am using.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

SELECT-OPTIONS: S_WERKS FOR RESB-WERKS,
                S_AUFNR FOR RESB-AUFNR.

at selection-screen on value-request for s_aufnr-low.
  data: begin of ihelp_proc_ord occurs 0,
        AUFNR like resb-aufnr,
        WERKS  like aufk-werks,
        end of ihelp_proc_ord.


  select DISTINCT aufnr werks
  into corresponding fields of table ihelp_proc_ord
  from RESB 
  where WERKS IN S_WERKS.

  call function 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield    = 'AUFNR'
      dynprofield = 'S_AUFNR'
      dynpprog    = sy-cprog
      dynpnr      = sy-dynnr
      value_org   = 'S'
    TABLES
      value_tab   = ihelp_proc_ord.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Somehow the VALUE-REQUEST for 'S_AUFNR' does not work with the above code. The above code returns all the values in the table and does not limit the selection criterion by 'S_WERKS'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue is for some reason the value S_WERKS, which is the criterion based on which I have to do the select clause, is always blank, even though I have entered values for this field in the select-options field. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would anybody have a snippet of code that is already working for the case where the values in one field are dependent on the values entered in another field of the select-options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the help.&lt;/P&gt;&lt;P&gt;Sumit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Sep 2006 20:51:51 GMT</pubDate>
    <dc:creator>former_member192818</dc:creator>
    <dc:date>2006-09-18T20:51:51Z</dc:date>
    <item>
      <title>select-options: at selection-screen on value-request</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-at-selection-screen-on-value-request/m-p/1588274#M265011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two select-options fields, S_WERKS, S_AUFNR such that the values of one field is dependent on the values of the other field in the select-options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the "at selection-screen on value-request event on" to populate the select-options field, S_AUFNR, that is dependent on the other field, S_WERKS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code I am using.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

SELECT-OPTIONS: S_WERKS FOR RESB-WERKS,
                S_AUFNR FOR RESB-AUFNR.

at selection-screen on value-request for s_aufnr-low.
  data: begin of ihelp_proc_ord occurs 0,
        AUFNR like resb-aufnr,
        WERKS  like aufk-werks,
        end of ihelp_proc_ord.


  select DISTINCT aufnr werks
  into corresponding fields of table ihelp_proc_ord
  from RESB 
  where WERKS IN S_WERKS.

  call function 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield    = 'AUFNR'
      dynprofield = 'S_AUFNR'
      dynpprog    = sy-cprog
      dynpnr      = sy-dynnr
      value_org   = 'S'
    TABLES
      value_tab   = ihelp_proc_ord.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Somehow the VALUE-REQUEST for 'S_AUFNR' does not work with the above code. The above code returns all the values in the table and does not limit the selection criterion by 'S_WERKS'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue is for some reason the value S_WERKS, which is the criterion based on which I have to do the select clause, is always blank, even though I have entered values for this field in the select-options field. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would anybody have a snippet of code that is already working for the case where the values in one field are dependent on the values entered in another field of the select-options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the help.&lt;/P&gt;&lt;P&gt;Sumit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Sep 2006 20:51:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-at-selection-screen-on-value-request/m-p/1588274#M265011</guid>
      <dc:creator>former_member192818</dc:creator>
      <dc:date>2006-09-18T20:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: select-options: at selection-screen on value-request</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-at-selection-screen-on-value-request/m-p/1588275#M265012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    MOVE: 'S_WERKS-LOW' TO T_DYNFIELDTAB-FIELDNAME.
    APPEND T_DYNFIELDTAB.

    CALL FUNCTION 'DYNP_VALUES_READ'
      EXPORTING
        DYNAME                         = SY-REPID
        DYNUMB                         = SY-DYNNR
      TABLES
        DYNPFIELDS                     = T_DYNFIELDTAB
      EXCEPTIONS
        INVALID_ABAPWORKAREA           = 1
        INVALID_DYNPROFIELD            = 2
        INVALID_DYNPRONAME             = 3
        INVALID_DYNPRONUMMER           = 4
        INVALID_REQUEST                = 5
        NO_FIELDDESCRIPTION            = 6
        INVALID_PARAMETER              = 7
        UNDEFIND_ERROR                 = 8
        DOUBLE_CONVERSION              = 9
        STEPL_NOT_FOUND                = 10
        OTHERS                         = 11
              .
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Sep 2006 21:00:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-at-selection-screen-on-value-request/m-p/1588275#M265012</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-18T21:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: select-options: at selection-screen on value-request</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-at-selection-screen-on-value-request/m-p/1588276#M265013</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;  I believe you have to hit enter before pressing F4 on S_AUFNR..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Sep 2006 21:00:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-at-selection-screen-on-value-request/m-p/1588276#M265013</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-18T21:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: select-options: at selection-screen on value-request</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-at-selection-screen-on-value-request/m-p/1588277#M265014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi check this code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if it helps..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: mara, makt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;matnr like mara-matnr,&lt;/P&gt;&lt;P&gt;end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of btab occurs 0,&lt;/P&gt;&lt;P&gt;maktx like makt-maktx,&lt;/P&gt;&lt;P&gt;end of btab.&lt;/P&gt;&lt;P&gt;DATA : return like ddshretval occurs 0 with header line.&lt;/P&gt;&lt;P&gt;parameters: p_matnr like mara-matnr,&lt;/P&gt;&lt;P&gt;p_maktx like makt-maktx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Initialization.&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_matnr.&lt;/P&gt;&lt;P&gt;REFRESH ITAB.&lt;/P&gt;&lt;P&gt;SELECT matnr FROM mara INTO TABLE ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'F4IF_INT_TABLE_VALUE_REQUEST'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;retfield = 'MATNR '&lt;/P&gt;&lt;P&gt;dynprofield = 'P_MATNR '&lt;/P&gt;&lt;P&gt;dynpprog = sy-REPID&lt;/P&gt;&lt;P&gt;dynpnr = sy-dynnr&lt;/P&gt;&lt;P&gt;value_org = 'S'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;value_tab = ITAB&lt;/P&gt;&lt;P&gt;return_tab = return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p_matnr = return-fieldval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refresh return.&lt;/P&gt;&lt;P&gt;clear return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_maktx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select maktx from makt into table btab where matnr = p_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'F4IF_INT_TABLE_VALUE_REQUEST'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;retfield = 'MAKTX'&lt;/P&gt;&lt;P&gt;dynprofield = 'P_MAKTX'&lt;/P&gt;&lt;P&gt;dynpprog = sy-REPID&lt;/P&gt;&lt;P&gt;dynpnr = sy-dynnr&lt;/P&gt;&lt;P&gt;value_org = 'S'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;value_tab = BTAB&lt;/P&gt;&lt;P&gt;return_tab = return.&lt;/P&gt;&lt;P&gt;p_maktx = return-fieldval.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Sep 2006 21:42:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-at-selection-screen-on-value-request/m-p/1588277#M265014</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-18T21:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: select-options: at selection-screen on value-request</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-at-selection-screen-on-value-request/m-p/1588278#M265015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Michael.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Sep 2006 22:13:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-at-selection-screen-on-value-request/m-p/1588278#M265015</guid>
      <dc:creator>former_member192818</dc:creator>
      <dc:date>2006-09-18T22:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: select-options: at selection-screen on value-request</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-at-selection-screen-on-value-request/m-p/1588279#M265016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Narendran, that does work, but I have decided to use the other pieces of code as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Sep 2006 22:14:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-at-selection-screen-on-value-request/m-p/1588279#M265016</guid>
      <dc:creator>former_member192818</dc:creator>
      <dc:date>2006-09-18T22:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: select-options: at selection-screen on value-request</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-at-selection-screen-on-value-request/m-p/1588280#M265017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Srinu.&lt;/P&gt;&lt;P&gt;Sumit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Sep 2006 22:14:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-at-selection-screen-on-value-request/m-p/1588280#M265017</guid>
      <dc:creator>former_member192818</dc:creator>
      <dc:date>2006-09-18T22:14:31Z</dc:date>
    </item>
  </channel>
</rss>

