<?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: dynamic select-option in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select-option/m-p/939737#M62920</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to use the only the reports not a dialog.&lt;/P&gt;&lt;P&gt;Could you give me some examples ?&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;Harsha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Sep 2005 09:53:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-09-08T09:53:01Z</dc:date>
    <item>
      <title>dynamic select-option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select-option/m-p/939732#M62915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to write a report in which select fields and select-option should be dynamic. i.e user selects the&lt;/P&gt;&lt;P&gt;number of fields from the list (checkbox). Then I have to&lt;/P&gt;&lt;P&gt;put the ticked fields in an internal table and show it&lt;/P&gt;&lt;P&gt;as select-options in the next list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EX : itab has 4 rows avm_nr,pos_nr,erfdate,erfuser.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My select-option should have avm_nr for jhak-avm_nr,&lt;/P&gt;&lt;P&gt;                             pos_nr for jhaea-pos_nr,&lt;/P&gt;&lt;P&gt;                             erfdate for jhak-erfdate,&lt;/P&gt;&lt;P&gt;                             erfuser for jhak-erfuser.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anybody give me some clue on how to go about it.&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;Harsha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2005 04:53:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select-option/m-p/939732#M62915</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-31T04:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic select-option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select-option/m-p/939733#M62916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Harsha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you sure about the fields in the selection screen, this can be achieved using the following logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Create a selection screen with all the fields&lt;/P&gt;&lt;P&gt;2. You get the selected fields from the user&lt;/P&gt;&lt;P&gt;3. In the event 'AT SELECTION-SCREEN OUTPUT', loop through this internal table and use the SCREEN structure to deactivate the non selected fields. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN OUTPUT. &lt;/P&gt;&lt;P&gt;  LOOP AT SCREEN. &lt;/P&gt;&lt;P&gt;    READ TABLE ITAB WITH KEY FIELD = 'ABCD'. " ABCD is the name of the field in the selection screen&lt;/P&gt;&lt;P&gt;    IF SY-SUBRC = 0 AND&lt;/P&gt;&lt;P&gt;       ITAB-SEL IS INITIAL.   "Field is not selected&lt;/P&gt;&lt;P&gt;      SCREEN-ACTIVE = '0'. &lt;/P&gt;&lt;P&gt;      MODIFY SCREEN. &lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDLOOP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Vinod&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2005 07:29:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select-option/m-p/939733#M62916</guid>
      <dc:creator>Vinod_Chandran</dc:creator>
      <dc:date>2005-08-31T07:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic select-option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select-option/m-p/939734#M62917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;U can refer to this link too&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/reporting/selscr/selscrhome.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/reporting/selscr/selscrhome.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2005 07:36:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select-option/m-p/939734#M62917</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-31T07:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic select-option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select-option/m-p/939735#M62918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use module prog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use field f1 module m1. and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then on the basis of selected values, create the ranges in corresponding modules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;assign these ranges to select options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2005 07:45:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select-option/m-p/939735#M62918</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-31T07:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic select-option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select-option/m-p/939736#M62919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;also check out FM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FREE_SELECTIONS_INIT and do a where used list to see how it is used.&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;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2005 07:49:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select-option/m-p/939736#M62919</guid>
      <dc:creator>athavanraja</dc:creator>
      <dc:date>2005-08-31T07:49:24Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic select-option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select-option/m-p/939737#M62920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to use the only the reports not a dialog.&lt;/P&gt;&lt;P&gt;Could you give me some examples ?&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;Harsha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2005 09:53:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select-option/m-p/939737#M62920</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-08T09:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic select-option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select-option/m-p/939738#M62921</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;read F1 for SELECT-OPTIONS SELDYN FOR (FNAME)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select-options s1 for (f1) .

INITIALIZATION. 
  f1 = 'T001-BUKRS'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2005 11:17:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select-option/m-p/939738#M62921</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2005-09-08T11:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic select-option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select-option/m-p/939739#M62922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This program will give the user to select the field on which he/she wants the selection and can include the where condition with out a typing a single word.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;N.B. Please always use non-numeric fields for selection( for the time being )&lt;/P&gt;&lt;P&gt;*********************************&lt;/P&gt;&lt;P&gt;REPORT  ZMART_SELECTION_SCREEN_NEW                  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE-POOLS: VRM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: dref TYPE REF TO DATA,tab type ref to data.&lt;/P&gt;&lt;P&gt;DATA : ndref TYPE REF TO DATA,ntab TYPE REF TO DATA,fref type ref to data.&lt;/P&gt;&lt;P&gt;field-symbols :  &amp;lt;f&amp;gt; TYPE any,&amp;lt;fcd&amp;gt;,&amp;lt;fc&amp;gt; type any,&amp;lt;ft&amp;gt; type standard table,&amp;lt;fn&amp;gt; TYPE STANDARD TABLE.&lt;/P&gt;&lt;P&gt;DATA : FIELDTAB LIKE DFIES OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA : DOM(30).&lt;/P&gt;&lt;P&gt;DATA : DFEY TYPE DFIES OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : FIRST(30),SECOND(70),THIRD(70).&lt;/P&gt;&lt;P&gt;DATA : CH.&lt;/P&gt;&lt;P&gt;DATA: NAME  TYPE VRM_ID,&lt;/P&gt;&lt;P&gt;LIST  TYPE VRM_VALUES,&lt;/P&gt;&lt;P&gt;      VALUE LIKE LINE OF LIST.&lt;/P&gt;&lt;P&gt;DATA : NUM TYPE I VALUE 1.&lt;/P&gt;&lt;P&gt;DATA : WA_ZMART LIKE ZMART_ST_MAIN-NAME.&lt;/P&gt;&lt;P&gt;DATA : scrtab TYPE dynpread OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF OPTIONS OCCURS 0,&lt;/P&gt;&lt;P&gt;       SIGN TYPE ZSIGN,&lt;/P&gt;&lt;P&gt;       END OF OPTIONS.&lt;/P&gt;&lt;P&gt;DATA : WA LIKE  OPTIONS.&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF ptab OCCURS 0,&lt;/P&gt;&lt;P&gt;       scode LIKE DD03L-FIELDNAME,&lt;/P&gt;&lt;P&gt;       END OF ptab.&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF T_TAB OCCURS 0,&lt;/P&gt;&lt;P&gt;       THIS TYPE DD03L-FIELDNAME,&lt;/P&gt;&lt;P&gt;       END OF T_TAB.&lt;/P&gt;&lt;P&gt;DATA : VAL(30).&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK MAIN WITH FRAME.&lt;/P&gt;&lt;P&gt;PARAMETERS : TABNAME TYPE DD03L-TABNAME MODIF ID COM.&lt;/P&gt;&lt;P&gt;PARAMETERS : ORDINARY  RADIOBUTTON GROUP RAD1 USER-COMMAND ABC.&lt;/P&gt;&lt;P&gt;PARAMETERS : WHERE  RADIOBUTTON GROUP RAD1.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK MAIN .&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK FIRST WITH FRAME TITLE TEXT-001.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF LINE.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN COMMENT 3(5) TEXT-002.&lt;/P&gt;&lt;P&gt;PARAMETERS : FIELD(30) MODIF ID OPT.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN COMMENT 45(5) TEXT-003.&lt;/P&gt;&lt;P&gt;PARAMETERS : OPTION(2) MODIF ID OPT.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN COMMENT 65(5) TEXT-004.&lt;/P&gt;&lt;P&gt;PARAMETERS : THIS(10) AS LISTBOX visible length 10  MODIF ID OPT.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF LINE.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK FIRST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*constants c1 type c value text-005.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : CONT(40).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN OUTPUT.&lt;/P&gt;&lt;P&gt;LOOP AT SCREEN.&lt;/P&gt;&lt;P&gt;  IF WHERE = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF SCREEN-GROUP1 = 'OPT'.&lt;/P&gt;&lt;P&gt;       IF FIELD IS NOT INITIAL AND OPTION IS NOT INITIAL AND THIS IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;        SCREEN-INPUT = '0'.&lt;/P&gt;&lt;P&gt;       ENDIF.&lt;/P&gt;&lt;P&gt;        SCREEN-ACTIVE = '1'.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;      IF SCREEN-GROUP1 = 'COM'.&lt;/P&gt;&lt;P&gt;        SCREEN-INPUT = '0'.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;      IF SCREEN-GROUP1 = 'OPT'.&lt;/P&gt;&lt;P&gt;        SCREEN-ACTIVE = '0'.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;      IF SCREEN-GROUP1 = 'COM'.&lt;/P&gt;&lt;P&gt;         SCREEN-INPUT = '1'.&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;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MODIFY SCREEN.&lt;/P&gt;&lt;P&gt; ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF tabname IS NOT INITIAL AND FIELD IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;LOOP AT FIELDTAB WHERE FIELDNAME = FIELD.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MOVE FIELDTAB-DOMNAME TO DOM.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CREATE DATA dref TYPE (TABNAME).&lt;/P&gt;&lt;P&gt;  ASSIGN dref-&amp;gt;* TO &amp;lt;f&amp;gt;.&lt;/P&gt;&lt;P&gt;  create data tab like table of &amp;lt;f&amp;gt;.&lt;/P&gt;&lt;P&gt;  assign tab-&amp;gt;* to &amp;lt;ft&amp;gt;.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; CREATE DATA NDREF TYPE (DOM).&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CONCATENATE '(TABNAME)' 'FIELDNAME' INTO CONT SEPARATED BY '-'.&lt;/P&gt;&lt;P&gt;   CREATE DATA NDREF LIKE CONT.&lt;/P&gt;&lt;P&gt;  ASSIGN NDREF-&amp;gt;* TO &amp;lt;FCD&amp;gt;.&lt;/P&gt;&lt;P&gt;  CREATE DATA NTAB LIKE TABLE OF &amp;lt;FCD&amp;gt;.&lt;/P&gt;&lt;P&gt;  ASSIGN NTAB-&amp;gt;* TO &amp;lt;fn&amp;gt;.&lt;/P&gt;&lt;P&gt;  CLEAR LIST[].CLEAR THIS.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'DDIF_FIELDINFO_GET'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      tabname              = TABNAME&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    FIELDNAME            = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    LANGU                = SY-LANGU&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    LFIELDNAME           = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    ALL_TYPES            = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    GROUP_NAMES          = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    UCLEN                =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    X030L_WA             =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    DDOBJTYPE            =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    DFIES_WA             =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    LINES_DESCR          =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   TABLES&lt;/P&gt;&lt;P&gt;     DFIES_TAB            = DFEY&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    FIXED_VALUES         =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    NOT_FOUND            = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    INTERNAL_ERROR       = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    OTHERS               = 3&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            .&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt; READ TABLE DFEY INDEX 1.&lt;/P&gt;&lt;P&gt; MOVE DFEY-INTTYPE TO CH.&lt;/P&gt;&lt;P&gt; IF CH = 'C'.&lt;/P&gt;&lt;P&gt; CLEAR CH.CLEAR DFEY[].&lt;/P&gt;&lt;P&gt; SELECT  (FIELD)  INTO table &amp;lt;fn&amp;gt; from (TABNAME).&lt;/P&gt;&lt;P&gt; loop at &amp;lt;fn&amp;gt; into &amp;lt;fcd&amp;gt;.&lt;/P&gt;&lt;P&gt; value-key = &amp;lt;fcd&amp;gt;.&lt;/P&gt;&lt;P&gt; value-text = &amp;lt;fcd&amp;gt;.&lt;/P&gt;&lt;P&gt; append value to list.&lt;/P&gt;&lt;P&gt; endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; NAME = 'THIS'.&lt;/P&gt;&lt;P&gt; CALL FUNCTION 'VRM_SET_VALUES' EXPORTING ID = NAME VALUES = LIST.&lt;/P&gt;&lt;P&gt; ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR FIELD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT FIELDNAME FROM DD03L INTO TABLE ptab WHERE TABNAME = tabname.&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               = 'FIELD'&lt;/P&gt;&lt;P&gt;     dynpprog               = sy-cprog&lt;/P&gt;&lt;P&gt;     dynpnr                 = sy-dynnr&lt;/P&gt;&lt;P&gt;     dynprofield            = 'FIELD'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     value_org              = 'S'&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;      value_tab              = ptab&lt;/P&gt;&lt;P&gt;            .&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR OPTION.&lt;/P&gt;&lt;P&gt;&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               = 'SIGN'&lt;/P&gt;&lt;P&gt;     dynpprog               = sy-cprog&lt;/P&gt;&lt;P&gt;     dynpnr                 = sy-dynnr&lt;/P&gt;&lt;P&gt;     dynprofield            = 'OPTION'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     value_org              = 'S'&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;      value_tab              = OPTIONS&lt;/P&gt;&lt;P&gt;            .&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  INITIALIZATION.&lt;/P&gt;&lt;P&gt;  WA-SIGN = 'EQ'.APPEND WA TO OPTIONS.CLEAR WA.&lt;/P&gt;&lt;P&gt;  WA-SIGN = 'BT'.APPEND WA TO OPTIONS.CLEAR WA.&lt;/P&gt;&lt;P&gt;  WA-SIGN = 'GT'.APPEND WA TO OPTIONS.CLEAR WA.&lt;/P&gt;&lt;P&gt;  WA-SIGN = 'LT'.APPEND WA TO OPTIONS.CLEAR WA.&lt;/P&gt;&lt;P&gt;  WA-SIGN = 'NE'.APPEND WA TO OPTIONS.CLEAR WA.&lt;/P&gt;&lt;P&gt;  name = THIS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;  concatenate TEXT-005  this TEXT-005 into second.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; CONCATENATE  'INTO TAB WHERE' INTO FIRST.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; CONCATENATE FIELD OPTION THIS INTO SECOND.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   CONCATENATE FIELD OPTION second INTO FIRST SEPARATED BY SPACE.&lt;/P&gt;&lt;P&gt;   CLEAR : FIELD,OPTION,THIS,LIST[].&lt;/P&gt;&lt;P&gt;  SELECT * FROM (TABNAME) INTO TABLE &amp;lt;ft&amp;gt; WHERE (FIRST).&lt;/P&gt;&lt;P&gt;  LOOP AT &amp;lt;ft&amp;gt; INTO &amp;lt;f&amp;gt;.&lt;/P&gt;&lt;P&gt;     do.&lt;/P&gt;&lt;P&gt;      assign component  sy-index&lt;/P&gt;&lt;P&gt;         of structure &amp;lt;f&amp;gt; to &amp;lt;fcd&amp;gt;.&lt;/P&gt;&lt;P&gt;      if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;        exit.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;      if sy-index = 1.&lt;/P&gt;&lt;P&gt;        write:/ &amp;lt;fcd&amp;gt;.&lt;/P&gt;&lt;P&gt;      else.&lt;/P&gt;&lt;P&gt;        write: &amp;lt;fcd&amp;gt;.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;    enddo.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2007 09:23:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select-option/m-p/939739#M62922</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-19T09:23:36Z</dc:date>
    </item>
  </channel>
</rss>

