<?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: Dropdown values in Report in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-in-report/m-p/8470021#M1651214</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;put the code in at selection screen output. thats the reason you are not getting back the list when you come back to the selection screen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Dec 2011 11:02:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-12-27T11:02:41Z</dc:date>
    <item>
      <title>Dropdown values in Report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-in-report/m-p/8470020#M1651213</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 am using drop down functionality using VRM_SET_VALUES for field called YEAR . The values in this drop down are decided by other parameters in the screen like Country and company code .&lt;/P&gt;&lt;P&gt;When I am executing the report and coming back on the Selection screem , the year drop down disappears and only the one which I had selected for executing the report is visible .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot use the Initialization as the values of drop downs are decided at runtime .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know how can i retail the values of the dropdown &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Supriya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Dec 2011 10:59:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-in-report/m-p/8470020#M1651213</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-27T10:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown values in Report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-in-report/m-p/8470021#M1651214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;put the code in at selection screen output. thats the reason you are not getting back the list when you come back to the selection screen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Dec 2011 11:02:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-in-report/m-p/8470021#M1651214</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-27T11:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown values in Report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-in-report/m-p/8470022#M1651215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Supriya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In which SELECTION-SCREEN event have you coded for the drop-down list? AT SELECTION-SCREEN OUTPUT, is it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you paste your code snippet, so that we can analyse it better?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Dec 2011 11:04:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-in-report/m-p/8470022#M1651215</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2011-12-27T11:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown values in Report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-in-report/m-p/8470023#M1651216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have put in Selection screen output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN OUTPUT .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF p_ctcd IS NOT INITIAL AND p_cocd IS NOT INITIAL AND p_year IS INITIAL .
    DATA : g_year TYPE zyeas .
    CLEAR p_year .
    PERFORM f4_drop_down_year USING p_cocd p_ctcd CHANGING g_year it_values  .
  ENDIF .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;****&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM F4_DROP_DOWN_YEAR  USING    P_COCD
                                 P_CTCD
                        CHANGING P_YEAR
                                 T_VALUES .
  CONSTANTS : C_0 TYPE CHAR1 VALUE 0 ,
              C_I TYPE CHAR1 VALUE 'I' .
  TYPES : BEGIN OF T_YEAR ,
            ZYEAR TYPE ZYEAS ,
          END OF T_YEAR .
  DATA : G_KEY TYPE I .

  DATA : IT_VALUES    TYPE VRM_VALUES ,
         WA_VALUE     LIKE LINE OF IT_VALUES .

  DATA : IT_YEAR TYPE STANDARD TABLE OF T_YEAR ,
         WA_YEAR TYPE                   T_YEAR .

  SELECT ZYEAR FROM ZPMS_YEAR INTO TABLE IT_YEAR
              WHERE ZCLOSE = C_0
              AND   MOLGA EQ P_CTCD
              AND   BUKRS EQ P_COCD .
  G_KEY = 1 .
  IF SY-SUBRC EQ 0 .
    LOOP AT IT_YEAR INTO WA_YEAR .
      WA_VALUE-KEY = G_KEY.
      CONDENSE WA_VALUE-KEY .
      WA_VALUE-TEXT =  WA_YEAR-ZYEAR .
      APPEND WA_VALUE TO IT_VALUES.
      G_KEY = G_KEY + 1.
      CLEAR WA_YEAR .
    ENDLOOP.
    CALL FUNCTION 'VRM_SET_VALUES'
      EXPORTING
        ID              = 'P_YEAR'
        VALUES          = IT_VALUES
      EXCEPTIONS
        ID_ILLEGAL_NAME = 1
        OTHERS          = 2.
    IF SY-SUBRC &amp;lt;&amp;gt; 0.
      MESSAGE TEXT-002 TYPE C_I .
    ELSE.
*      READ TABLE
      SORT IT_VALUES BY KEY .
      T_VALUES = IT_VALUES .
    ENDIF.
  ELSE.
    MESSAGE 'No Year maintained for the Year and company code' TYPE C_I .
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;lt;Added Code tags&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suhas Saha on Dec 27, 2011 4:40 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Dec 2011 11:06:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-in-report/m-p/8470023#M1651216</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-27T11:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown values in Report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-in-report/m-p/8470024#M1651217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPe-pools vrm.&lt;/P&gt;&lt;P&gt;DATA: param TYPE vrm_id,&lt;/P&gt;&lt;P&gt;      values     TYPE vrm_values,&lt;/P&gt;&lt;P&gt;       value LIKE LINE OF values.&lt;/P&gt;&lt;P&gt;PARAMETERS: p_name type kunnr AS LISTBOX VISIBLE LENGTH 10 USER-COMMAND adi.&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN OUTPUT.&lt;/P&gt;&lt;P&gt;  REFRESH values.&lt;/P&gt;&lt;P&gt;  param = 'P_NAME'.&lt;/P&gt;&lt;P&gt;  value-key = '1'.&lt;/P&gt;&lt;P&gt;  value-text = 'Adi'.&lt;/P&gt;&lt;P&gt;  APPEND value TO values.&lt;/P&gt;&lt;P&gt;  value-key = '2'.&lt;/P&gt;&lt;P&gt;  value-text = 'Siva'.&lt;/P&gt;&lt;P&gt;  APPEND value TO values.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'VRM_SET_VALUES'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      id     = param&lt;/P&gt;&lt;P&gt;      values = values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Follow the above code there i maintained the values manually .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Dec 2011 11:07:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-in-report/m-p/8470024#M1651217</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-27T11:07:49Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown values in Report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-in-report/m-p/8470025#M1651218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;so, for the first time to get the values, are you pressing enter after filling up the values for P_COCD and P_CODE?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;anyways,&lt;/P&gt;&lt;P&gt;you clear out the values of P_COCD and P_CODE and p_year at the end of selection event (just before your code finishes for the processing), then when you come back to selection screen these three values wiil be blank and your initial screen will come back&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Dec 2011 11:12:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-in-report/m-p/8470025#M1651218</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-27T11:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown values in Report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-in-report/m-p/8470026#M1651219</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;&lt;/P&gt;&lt;P&gt;Make the Input field of Year as a List box in the selection screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As the Value of Year is based on Country and Company Code so you need to press Enter to avoid that you got to provide the F4 help as mentioned below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;at selection-screen on value-request for year. " Provide the F4 Help under this Event

First use *DYNP_VALUES_READ* Function module to read the Values in Country and Company Code
Then use *F4IF_INT_TABLE_VALUE_REQUEST* Function Module

  CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
      dyname     = SY-REPID
      dynumb     = SY-DYNNR
    TABLES
      dynpfields = dynpfields  "Go through the Function Module Documentaion
    EXCEPTIONS
      OTHERS     = 1.


For More info on how to use these function module take the Help of Where used List&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hope this would serve your purpose&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheerz&lt;/P&gt;&lt;P&gt;Ramchander Rao.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Dec 2011 11:20:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dropdown-values-in-report/m-p/8470026#M1651219</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-27T11:20:33Z</dc:date>
    </item>
  </channel>
</rss>

