<?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 How to retrieve DB values using select-options in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-retrieve-db-values-using-select-options/m-p/5926218#M1332395</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        I have problem to run this code for getting select option values in runtime.  Is there any function, methods or structure to know this?  I didnot get DB values when I click select-option button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        I would like to display DB field values when i click select-option pushbutton.  select-option values while programs working in runtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example Code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZBAPUSHBUTTON.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: lryrctno type ZLRYRCT-ZEBELN,&lt;/P&gt;&lt;P&gt;      LDRIVER_FN type ZLRYRCT-DRIVER_FN,&lt;/P&gt;&lt;P&gt;      LZDELDT TYPE ZLRYRCT-ZDELDT,&lt;/P&gt;&lt;P&gt;      LZLRYNO TYPE ZLRYRCT-ZLRYNO,&lt;/P&gt;&lt;P&gt;      LZDRIVERID type zlryrct-ZDRIVERID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: LRYRCT TYPE ZLRYRCT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN PUSHBUTTON 10(10) LB1 USER-COMMAND PB1.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN PUSHBUTTON 25(10) LB2 USER-COMMAND PB2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SELECTION-SCREEN BEGIN OF SCREEN 100 TITLE T1.&lt;/P&gt;&lt;P&gt;PARAMETERS: PLRYCTNO like lryrctno,&lt;/P&gt;&lt;P&gt;          PDR_FN LIKE LDRIVER_FN,&lt;/P&gt;&lt;P&gt;          PZDELDT LIKE LZDELDT,&lt;/P&gt;&lt;P&gt;          PZLRYNO LIKE LZLRYNO.&lt;/P&gt;&lt;P&gt; SELECTION-SCREEN END OF SCREEN 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF SCREEN 200 TITLE T2.&lt;/P&gt;&lt;P&gt;select-options: slryctno for lryrctno,&lt;/P&gt;&lt;P&gt;                sdr_fn for ldriver_fn,&lt;/P&gt;&lt;P&gt;                szdeldt for lzdeldt,&lt;/P&gt;&lt;P&gt;                szlryno for lzlryno,&lt;/P&gt;&lt;P&gt;                pzdrid for lzdriverid no intervals.&lt;/P&gt;&lt;P&gt; SELECTION-SCREEN END OF SCREEN 200.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; INITIALIZATION.&lt;/P&gt;&lt;P&gt; T1 = 'SELECT CHECK BOX AND RADIO BUTTON'.&lt;/P&gt;&lt;P&gt; T2 = 'SELECT PARAMETERS'.&lt;/P&gt;&lt;P&gt; LB1 = 'PARAMETER'.&lt;/P&gt;&lt;P&gt; LB2 = 'SELECT-OPTION'.&lt;/P&gt;&lt;P&gt; AT SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CASE SY-UCOMM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; WHEN 'PB1'.&lt;/P&gt;&lt;P&gt; CALL SELECTION-SCREEN 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; select single * from zlryrct into lryrct where zebeln = plryctno.&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      message 'primary key already exists. enter different lorry rect. no.' type 'W'.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LRYRCT-ZEBELN    = PLRYCTNO.&lt;/P&gt;&lt;P&gt;    LRYRCT-DRIVER_FN = PDR_FN .&lt;/P&gt;&lt;P&gt;    LRYRCT-ZDELDT    = PZDELDT.&lt;/P&gt;&lt;P&gt;    LRYRCT-ZLRYNO    = PZLRYNO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    INSERT INTO ZLRYRCT VALUES LRYRCT.&lt;/P&gt;&lt;P&gt;    if not sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      MESSAGE 'Insert not possible' TYPE 'W' .&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; WHEN 'PB2'.&lt;/P&gt;&lt;P&gt; CALL SELECTION-SCREEN 200.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    select * from zlryrct into lryrct where&lt;/P&gt;&lt;P&gt;             zebeln in slryctno and&lt;/P&gt;&lt;P&gt;             driver_fn in sdr_fn and&lt;/P&gt;&lt;P&gt;             zdeldt in szdeldt and&lt;/P&gt;&lt;P&gt;             zlryno in szlryno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      write: / lryrct-zebeln, LRYRCT-DRIVER_FN, LRYRCT-ZDELDT, LRYRCT-ZDELDT, LRYRCT-ZLRYNO .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ENDCASE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 18 Jul 2009 06:47:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-07-18T06:47:41Z</dc:date>
    <item>
      <title>How to retrieve DB values using select-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-retrieve-db-values-using-select-options/m-p/5926218#M1332395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        I have problem to run this code for getting select option values in runtime.  Is there any function, methods or structure to know this?  I didnot get DB values when I click select-option button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        I would like to display DB field values when i click select-option pushbutton.  select-option values while programs working in runtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example Code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZBAPUSHBUTTON.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: lryrctno type ZLRYRCT-ZEBELN,&lt;/P&gt;&lt;P&gt;      LDRIVER_FN type ZLRYRCT-DRIVER_FN,&lt;/P&gt;&lt;P&gt;      LZDELDT TYPE ZLRYRCT-ZDELDT,&lt;/P&gt;&lt;P&gt;      LZLRYNO TYPE ZLRYRCT-ZLRYNO,&lt;/P&gt;&lt;P&gt;      LZDRIVERID type zlryrct-ZDRIVERID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: LRYRCT TYPE ZLRYRCT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN PUSHBUTTON 10(10) LB1 USER-COMMAND PB1.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN PUSHBUTTON 25(10) LB2 USER-COMMAND PB2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SELECTION-SCREEN BEGIN OF SCREEN 100 TITLE T1.&lt;/P&gt;&lt;P&gt;PARAMETERS: PLRYCTNO like lryrctno,&lt;/P&gt;&lt;P&gt;          PDR_FN LIKE LDRIVER_FN,&lt;/P&gt;&lt;P&gt;          PZDELDT LIKE LZDELDT,&lt;/P&gt;&lt;P&gt;          PZLRYNO LIKE LZLRYNO.&lt;/P&gt;&lt;P&gt; SELECTION-SCREEN END OF SCREEN 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF SCREEN 200 TITLE T2.&lt;/P&gt;&lt;P&gt;select-options: slryctno for lryrctno,&lt;/P&gt;&lt;P&gt;                sdr_fn for ldriver_fn,&lt;/P&gt;&lt;P&gt;                szdeldt for lzdeldt,&lt;/P&gt;&lt;P&gt;                szlryno for lzlryno,&lt;/P&gt;&lt;P&gt;                pzdrid for lzdriverid no intervals.&lt;/P&gt;&lt;P&gt; SELECTION-SCREEN END OF SCREEN 200.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; INITIALIZATION.&lt;/P&gt;&lt;P&gt; T1 = 'SELECT CHECK BOX AND RADIO BUTTON'.&lt;/P&gt;&lt;P&gt; T2 = 'SELECT PARAMETERS'.&lt;/P&gt;&lt;P&gt; LB1 = 'PARAMETER'.&lt;/P&gt;&lt;P&gt; LB2 = 'SELECT-OPTION'.&lt;/P&gt;&lt;P&gt; AT SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CASE SY-UCOMM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; WHEN 'PB1'.&lt;/P&gt;&lt;P&gt; CALL SELECTION-SCREEN 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; select single * from zlryrct into lryrct where zebeln = plryctno.&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      message 'primary key already exists. enter different lorry rect. no.' type 'W'.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LRYRCT-ZEBELN    = PLRYCTNO.&lt;/P&gt;&lt;P&gt;    LRYRCT-DRIVER_FN = PDR_FN .&lt;/P&gt;&lt;P&gt;    LRYRCT-ZDELDT    = PZDELDT.&lt;/P&gt;&lt;P&gt;    LRYRCT-ZLRYNO    = PZLRYNO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    INSERT INTO ZLRYRCT VALUES LRYRCT.&lt;/P&gt;&lt;P&gt;    if not sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      MESSAGE 'Insert not possible' TYPE 'W' .&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; WHEN 'PB2'.&lt;/P&gt;&lt;P&gt; CALL SELECTION-SCREEN 200.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    select * from zlryrct into lryrct where&lt;/P&gt;&lt;P&gt;             zebeln in slryctno and&lt;/P&gt;&lt;P&gt;             driver_fn in sdr_fn and&lt;/P&gt;&lt;P&gt;             zdeldt in szdeldt and&lt;/P&gt;&lt;P&gt;             zlryno in szlryno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      write: / lryrct-zebeln, LRYRCT-DRIVER_FN, LRYRCT-ZDELDT, LRYRCT-ZDELDT, LRYRCT-ZLRYNO .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ENDCASE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Jul 2009 06:47:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-retrieve-db-values-using-select-options/m-p/5926218#M1332395</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-18T06:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve DB values using select-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-retrieve-db-values-using-select-options/m-p/5926219#M1332396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What you are looking for is called "search help" (SE11 transaction), you may reuse an existing one (it must be attached to data element, or structure component as foreign key, etc.) Please look at SAP documentation and forums. You may also program it yourself by using AT SELECTION-SCREEN ON VALUE-REQUEST FOR ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Jul 2009 22:12:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-retrieve-db-values-using-select-options/m-p/5926219#M1332396</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2009-07-18T22:12:46Z</dc:date>
    </item>
  </channel>
</rss>

