Dropdown-list in parameters ?

hi,
i know that i can produce drop-down-parameter in sel. screen with:
PARAMETERS..................AS LISTBOX........................
well, i have on problem:
i have one parameter MONTH. there i want to select the 12 month (TEXT of month like january, february, march................) in the dropdown and ONLY this month !
as default i want to set the last month (from sy-date).
how to archive this ?
reg, Martin

Pl. see this code. May be it will help u.
*& Report  ZTEST_HL6
REPORT  ZTEST_HL6.
data: l_date type sydatum,
      l_mon(2) type n.
TYPE-POOLS: VRM.
DATA: NAME  TYPE VRM_ID,
            LIST          TYPE VRM_VALUES,
            VALUE LIKE LINE OF LIST.
PARAMETERS: PS_PARM(10) AS LISTBOX VISIBLE LENGTH 10.
initialization.
l_date = sy-datum.
l_mon = l_date+4(2).
l_mon = l_mon - 1.
  case l_mon.
  when '01'.
   PS_PARM = '1'.
  when '02'.
   PS_PARM = '2'.
  when '03'.
   PS_PARM = '3'.
  when '04'.
   PS_PARM = '4'.
  when '05'.
   PS_PARM = '5'.
  when '06'.
   PS_PARM = '6'.
  when '07'.
   PS_PARM = '7'.
  when '08'.
   PS_PARM = '8'.
  when '09'.
   PS_PARM = '9'.
  when '10'.
   PS_PARM = '10'.
  when '11'.
   PS_PARM = '11'.
  when '12'.
   PS_PARM = '12'.
  endcase.
NAME = 'PS_PARM'.
VALUE-KEY = '1'.  VALUE-TEXT = 'January'.
APPEND VALUE TO LIST.
VALUE-KEY = '2'.  VALUE-TEXT = 'February'.
APPEND VALUE TO LIST.
VALUE-KEY = '3'.  VALUE-TEXT = 'March'.
APPEND VALUE TO LIST.
VALUE-KEY = '4'.  VALUE-TEXT = 'April'.
APPEND VALUE TO LIST.
VALUE-KEY = '5'.  VALUE-TEXT = 'May'.
APPEND VALUE TO LIST.
VALUE-KEY = '6'.  VALUE-TEXT = 'June'.
APPEND VALUE TO LIST.
VALUE-KEY = '7'.  VALUE-TEXT = 'July'.
APPEND VALUE TO LIST.
VALUE-KEY = '8'.  VALUE-TEXT = 'August'.
APPEND VALUE TO LIST.
VALUE-KEY = '9'.  VALUE-TEXT = 'September'.
APPEND VALUE TO LIST.
VALUE-KEY = '10'.  VALUE-TEXT = 'October'.
APPEND VALUE TO LIST.
VALUE-KEY = '11'.  VALUE-TEXT = 'November'.
APPEND VALUE TO LIST.
VALUE-KEY = '12'.  VALUE-TEXT = 'December'.
APPEND VALUE TO LIST.
AT SELECTION-SCREEN OUTPUT.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = NAME
VALUES = LIST.
START-OF-SELECTION.
WRITE: / 'PARAMETER:', PS_PARM.
Regards,
Joy.

Similar Messages

  • Parameters, dropdown list limit

    i am using a dropdown list of companies.
    as part of my parameters to run my report.
    i think the limit of the dropdown list is 150.
    how do i make it bigger?  i think i have 210 companies... or something like that
    thanks, Jon

    Hi Jon,
    Well, the limit is not 150 but 1000.
    Crystal Reports only shows 1000 list of values by default. This is, however, controlled by a registry key and you can increase it like this:
    Go to regedit (start > run > regedit) Browse to the location:
    HKEY_CURRENT_USER\Software\Business Objects\Suite 12.0\Crystal Reports\DatabaseOptions
    Create a new key called 'LOV' here and then on the right-hand side create a new string value called 'MaxRowsetRecords' with a value higher than 1000, perhaps around 10000.
    Now, this will increase the total values in the list, however it will still show 200 in one page/batch. To increase the batch size and make sure all the values appear a single list there is another registry key:
    Browse to:
    HKEY_CURRENT_USER\Software\Business Objects\Suite 12.0\Crystal Reports\ReportView and look for a key called 'PromptingLOVBatchSize'. Double-click the key and select 'Decimal' and set the value to 5000. Then, make sure you select 'Hexadecimal' and click OK. (We've noticed sometimes that the value is not saved unless we keep Hexadecimal selected).
    Restart Crystal Reports designer and you should have all the values in one batch.
    Let me know how this goes!
    -Abhilash

  • SSRS report - A single selection dropdown list converted to text box

    Hello everyone,
    We created a single selection dropdown parameter (City parameter) on a report. The data in this parameter is populated using MDX query. Also, it is filtered based on selection of another single selection dropdown list (Country parameter) of a report.
    The problem is when there is no cities for the selected country the dropdown list is gets converted to free type text box and user can insert city data in it. Why SSRS is not keeping it as empty dropdown list with no data?
    Any help would be much appreciated.
    Thanks, Ankit Shah
    Inkey Solutions, India.
    Microsoft Certified Business Management Solutions Professionals
    http://www.inkeysolutions.com/MicrosoftDynamicsCRM.html

    Hello Charlie,
    We developed a fresh report only with two parameters but still the dropdown control gets converted to text box in our case. We have two single selection parameters, Location and Customers. Based on selected Location the customer
    dropdown gets populated.
    Location Parameter Query
    WITH MEMBER [Measures].[ParameterCaption] AS [Location].[Location Name].CURRENTMEMBER.MEMBER_CAPTION MEMBER [Measures].[ParameterValue] AS [Location].[Location Name].CURRENTMEMBER.UNIQUENAME MEMBER
    [Measures].[ParameterLevel] AS [Location].[Location Name].CURRENTMEMBER.LEVEL.ORDINAL
    SELECT {[Measures].[ParameterCaption], [Measures].[ParameterValue], [Measures].[ParameterLevel]} ON COLUMNS , [Location].[Location Name].ALLMEMBERS ON ROWS FROM [Model]
    Customer Query
    WITH MEMBER [Measures].[ParameterCaption] AS
    [Customer].[Customer Name].CURRENTMEMBER.MEMBER_CAPTION
    MEMBER [Measures].[ParameterValue] AS
    [Customer].[Customer Name].CURRENTMEMBER.UNIQUENAME
    MEMBER [Measures].[ParameterLevel] AS [Customer].[Customer Name].CURRENTMEMBER.LEVEL.ORDINAL
    SELECT {[Measures].[ParameterCaption], [Measures].[ParameterValue], [Measures].[ParameterLevel],[Measures].[Amt]} ON COLUMNS,
    nonempty([Customer].[Customer Name].ALLMEMBERS,[Measures].[Amt]) ON ROWS FROM ( SELECT ( STRTOSET(@LocationName, CONSTRAINED) ) ON COLUMNS FROM [Model])
    Regarding parameter settings on General tab for both the above parameters we did not select any of the following values, all these checkboxes are empty:
    Allow Blank Value ("") , Allow null value, Allow multiple values.
    I think it has something related to [Measures].[Amt] that we used in customer parameter. We are now trying to take other two parameters where we would be not using the [Measures].[Amt] to filter the data. Will update you soon.
    Thanks, Ankit Shah
    Inkey Solutions, India.
    Microsoft Certified Business Management Solutions Professionals
    http://www.inkeysolutions.com/MicrosoftDynamicsCRM.html

  • Display month and year in dropdown list on selection screen

    Hi
      Can anyone tell me how to display months and year in a dropdown list on a selection screen?
      also please tell me how to get the first and the last dates upon selecting the month and year on the dropdown list.
    Month: January Year:2007 . 
    After selecting the required month and year, the first date and last date i.e '01.01.2007 - 31.01.2007' should be displayed on the right side.
    Reward Points assured..
    thanks,
    Chetan

    Hi..,
    <b>
    Just copy, paste and execute this program !!</b>
    type-pools: vrm.
    parameters : p_month(2) type n as listbox visible length 10,
    p_year(4) type n as listbox visible length 10.
    DATA : W_DATE type d, w_ldate type d.
    initialization.
    perform user_drop_down_list_fordt.
    perform user_drop_down_list_foryr.
    start-of-selection.
    concatenate p_year p_month '01' into w_date.
    call function 'BKK_GET_MONTH_LASTDAY'
      exporting
        i_date        = w_date
    IMPORTING
       E_DATE        = w_ldate
    write /: w_date,w_ldate.
    build user_drop_down_list
    form user_drop_down_list_fordt.
    data: name type vrm_id,
    list type vrm_values,
    value like line of list.
    data: t_months type t247 occurs 0 with header line.
    clear list. refresh list.
    name = 'P_MONTH'.
    select * into  table t_months
    from t247 where spras eq 'EN'.
    sort t_months ascending by mnr.
    loop at t_months.
    clear value.
    value-key = t_months-mnr.
    value-text = t_months-ltx.
    append value to list.
    endloop.
    Set the values
    call function 'VRM_SET_VALUES'
    exporting
    id = name
    values = list.
    endform.
    for year...
    form user_drop_down_list_foryr.
    data: name type vrm_id,
    list type vrm_values,
    value like line of list.
    clear list. refresh list.
    name = 'P_YEAR'.
    do 9999 times.
    clear value.
    value-key = sy-index.
    append value to list.
    enddo.
    Set the values
    call function 'VRM_SET_VALUES'
    exporting
    id = name
    values = list.
    endform.
    <b>
    Hope this solves ur problem..</b>
    regards,
    sai ramesh

  • Creating a Month dropdown list for a report with multiple datasets

    I am currently working on a report that contains many charts that rely on multiple datasets. Currently, I have parameters @StartDate and @EndDate to display the information of the previous month across all the charts as my default value. Now, I would like
    to create a dropdown list so that the user can pick any month, and have the report display the data across all the charts for that particular month, while keeping the display of the previous month as the default value. Can anyone help as to how I can approach
    this. Would I have to use an expression when I specify my available values, or would I have to create a dataset to get the value of all 12 months? Any help would be greatly appreciated.

    This is essentially where I am having some trouble, as in creating the dataset that returns the individual months of the year as I am relatively to the use of SSRS. Could you possibly elaborate on how I can do so? Thank you in advance!
    Create a dataset in SSRS
    Inside dataset properties map datasource and then inside give command like
    DECLARE @Month int = 5 --example value
    SELECT ...
    FROM Table
    WHERE datefield >= DATEADD(mm,DATEDIFF(yy,0,GETDATE())*12 +(@Month-2),0)
    AND datefield < DATEADD(mm,DATEDIFF(yy,0,GETDATE())*12 +(@Month-1),0)
    then on refresh it will take field information and parameter information by itself.
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Custom Sort Order in Dropdown list of translate values

    Peoplesoft sorts the dropdown translate values in ascending order by default. I wanted to change the sort order. For example:
    The translate values in alphabetic order are:
    Andrea
    Baluch
    Others
    Shumi
    I want this "Others" as the last value. So the drop down should display like this:
    Andrea
    Baluch
    Shumi
    Others

    From a document I had created ...
    This odd behavior of PeopleTools however can be overridden by implementing a few lines of JavaScript and PeopleCode.
    The approach is quite simple and summarized briefly as below:
    1.     Concatenate the value-description pairs of the dropdown list into a single string separated by a pipe “|” as delimiter (in case other delimiter is used the script shown below in Step 4 has
    to be accordingly modified) in the sequence in which it should be displayed on the page.
    2.     While concatenating, make sure to place the value first and then the description, these being separated by the delimiter. Example: “01|”|”January”|”02|”February” …and so on.
    3.     Pass this string as a parameter to an HTML definition through a GetHtmlText function. This HTML definition in turn will a have a JavaScript logic to resolve this delimited string into
    meaningful value-description pairs and use them to override the intended dropdown list.
    Below are the steps in detail:
    Step 1:
    Find out the html element-id for the dropdown field from the html source-code of the PeopleSoft page from the browser. In HTML, the tag for a dropdown field is <select> </select>
    The element-id is set by the id attribute of the <select> tag. This id would be used in Step 5.
    Step 2:
    Add a field of type Long Character to any work record that you may be using on your page for buttons, hyperlinks, etc.
    Step 3:
    Add an HTML-Area to the page (preferably alongside the dropdown field which needs need to be sorted). In the properties of the HTML-Area, assign the Record-field used in Step 2 above.
    Step 4:
    Create a HTML definition from the app-designer and add the below JavaScript code to it and save the definition.
    <script>
    var j=0;
    var str=new String('%bind(:2)');
    ar1=str.split("|");
    var fld = document.getElementById("%bind(:1)");
    fld.options.length = 0;
    fld.options[fld.options.length] = new Option('', '');
    while (j<ar1.length)
              fld.options[fld.options.length] = new Option(ar1[j+1], ar1[j]);                      
                    j=j+2;
    </script>
    Step 5:
    Write peoplecode on an appropriate event to generate the concatenated string of value-descriptions delimited by a pipe “|”. A pseudocode for the same is shown below. Here the HTML id for the dropdown field and the value-description string are passed as parameters to the JavaScript shown in Step 4; and JavaScript thus created after substitution of the Bind values is assigned to the value of Record.Field used in Step 2 & 3. The location of the below peoplecode may vary depending on the when the dropdown list needs to be sorted.
    Local string &strDropdownValues;
    &strDropdownValues = "1|" | "January|" | "2|" | "February|" | "3|" | "March|" | "4|" | "April|" | "5|" | "May|" | "6|" | "June";
    <Record.Field>.Value = GetHTMLText(<HTML.DPS_DROPDOWN_HTML>, "<DROPDOWN_ID>", &strDropdownValues);

  • How can I select properties from dropdown lists using only the keyboard?

    Hi,
    I am using SAP Netweaver Studio and when modifying UI elements in views, I want to select the value for a property from the corresponding dropdown list in the Properties view using only the keyboard.
    When a property row is selected, "Enter" toggles to Edit mode, Alt+ArrowDown expands the list, but ArrowUp or ArrowDown directly selects the previous/next item list and changes to Selected mode.  Which key is used to navigate between the list items without selecting them immediately?
    Thanks a lot. I deal with lots of views and this would save me quite a few massage hours
    Maria
    Edited by: Maria Marinova on Feb 14, 2008 9:40 AM
    Edited by: Maria Marinova on Feb 14, 2008 9:40 AM

    Thanks Andrew. When creating an external table does it requires an access to SQL*Loader?
    CREATE TABLE dept_external (
       deptno     NUMBER(6),
       dname      VARCHAR2(20),
       loc        VARCHAR2(25)
    ORGANIZATION EXTERNAL
    (TYPE oracle_loader
    DEFAULT DIRECTORY admin
    ACCESS PARAMETERS
    RECORDS DELIMITED BY newline
    BADFILE 'ulcase1.bad'
    DISCARDFILE 'ulcase1.dis'
    LOGFILE 'ulcase1.log'
    SKIP 20
    FIELDS TERMINATED BY ","  OPTIONALLY ENCLOSED BY '"'
    deptno     INTEGER EXTERNAL(6),
    dname      CHAR(20),
    loc        CHAR(25)
    LOCATION ('ulcase1.ctl')
    REJECT LIMIT UNLIMITED;

  • How to create dropdown list for custom remote function module

    HI ,
           I created a custom remote function module for a ztable.table having four fields.But now the requirement is to maintain the dropdown list for input parameter .
    For eg: I maintain Input parameter as action.For that Action we have to maintain a dropdown list(display,insert,update and delete  values ) in function module.Is it possible.

    Hi
    Try using POPUP_GET_VALUES function module in the begining of the Function module this gives a POP to provide a value to you
    In this you can provide a value
    Check the import parameters of this Function module if it has COMBOBOX as parameter ( I dont have SAP access at this point of time) you can pass X to it so you get List box for the following fields
    Create a domain to field and assing fixed values to it and use it in any table(As this works with only existing tables)
    refresh fields.
    DATA: fields LIKE SVAL OCCURS 0.
    fields-tabname = 'MAKT'.
    FILEDS-FIELDNAME = 'MAKTX'.
    APPEND FIELDS.
    CALL FUNCTION 'POPUP_GET_VALUES'  " Try copying this in a Test program and execute
            EXPORTING
              POPUP_TITLE  = 'Enter Mail Id here'
              START_COLUMN = '5'
              START_ROW    = '5'
            IMPORTING
              RETURNCODE   = SRETURN
            TABLES
              FIELDS       = FIELDS.
    Cheerz
    Ramchander Rao.K
    Edited by: Rob Burbank on Nov 23, 2011 9:50 AM

  • Set default "Dropdown Lists" to "By value"

    Hi ,
    In the WebUI under Personalize / Personalize Settings , the user can setup the parameter "Dropdown Lists" to be "By value".
    We want to setup that at the system level , so every connection to the WebUI will have the Sort in the Dropdown Lists by value . How can we do that ? Nothing seems to be in IMG , maybe that a parameters in a SYSTEM file ? Thank you

    Hi Julie and happy HannuChristmaKwanzaYule to you!
    There is only one place I'm aware of that any slide timing
    default may be set. In Captivate 2, you look at Project >
    Preferences... > Defaults tab.
    In Captivate 3, you look at Edit > Preferences... >
    Project node.
    In both places you will find a place to configure the default
    slide time. This has no effect on any existing slides and I don't
    believe it will factor into the mix when recording. Also it would
    appear the minimum limit is one second. The only places this seems
    to take effect are when inserting Blank slides and when creating a
    Blank project.
    Hopefully this helps a smidge! Rick

  • Retreiving data corresponding to dropdown list.

    hii all,
    i want to know that if i have to make one application where there is a dropdown list with several parameters and if i select one parameter and retrieve the data corresponding to that parameter, then i select second parameter and retreive the data. now there r two possibilities.
    FIRST, i can make one syncBO for all parameters and storing data corresponding to all parameter on the PDA and when i select one parameter it will fetch the data from client database corresponding to that parameter(All the data corresponding to all parameters will be stored on the PDA database irrespective of selected parameter. is it true).
    SECOND, i can make different syncBO for all parameters and after every parameter selection it will fetch the data from MI server through synchronization
    and is it possible to synchronize the client with the MI server every time a new parameter is selected automatically.
    And plz let me know what i m thinking is true in technical aspect or not and what will be the best way to do the same.

    Hi Devendrakumar,
    just go through this forum.
    i have discussed , how to handle a scenario like this in this forum . let me know if u have doubts ..
    go through it carefully..
    Re: Regd 2-Way (S01)
    Regards
    Kishor Gopinathan

  • Dropdown list with multiple selections

    I need to create a dropdown list in a selection screen and allow the user to select more than one option. Can this be done. I know how to use VRM_SET_VALUES to create a dropdown but it restricts me to selecting only one value. The user should be able to select multiple values. Thank you.

    Hello,
    Try to use this Fm
    PARAMETERS :
    y_p_list TYPE char32  AS LISTBOX VISIBLE LENGTH 22
                                  MODIF ID rsg. .
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR y_p_list.
      PERFORM y_f_dring_type_f4.
    FORM y_f_file_frmt_f4 .
      MOVE: text-212 TO y_wa_listbox1-field.
      APPEND y_wa_listbox1 TO y_i_listbox1.
      CLEAR y_wa_listbox1.
      MOVE  text-213 TO y_wa_listbox1-field.
      APPEND y_wa_listbox1 TO y_i_listbox1.
      CLEAR y_wa_listbox1.
      MOVE  text-214 TO y_wa_listbox1-field.
      APPEND y_wa_listbox1 TO y_i_listbox1.
      CLEAR y_wa_listbox1.
      MOVE  text-215 TO y_wa_listbox1-field.
      APPEND y_wa_listbox1 TO y_i_listbox1.
      CLEAR y_wa_listbox1.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'FIELD'
          dynpprog        = sy-repid
          stepl           = 1
          value           = ' '
          value_org       = 'S'
          display         = ' '
        TABLES
          value_tab       = y_i_listbox1[]
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc <> 0.
      ENDIF.
      REFRESH y_i_listbox1.
    ENDFORM.                    " y_f_file_frmt_f4
    Use this code you will get the List box in selection screen.

  • Fill the second Dropdown List based on user selection

    Hi All,
    I am using Web Services to populate Dropdownlists. This works fine for me.
    I have a table with the column "Core Category" and "SUB Category", "Core Category" can have 1 or more SUB Categories.
    The SQL statement in the Web Service for "Core Category" looks like this: "Select DISTINCT [core category] from table", this returns a list of categories.
    In this example, I want to achieve the following:
    When I select a "Core Category' in the first Dropdownlist, the application fires an event or action to fill the second Dropdownlist "SUB Category" with ONLY values that belongs to the selected "Core Category" in the first Dropdown list.
    Is this possible with Visual Composer? Please let me know how I can achieve this?
    Many Thanks,
    Ridouan

    Hi Ridouan,
    Yes it is possible. [Example of Ship and Engine|http://img146.imageshack.us/img146/2968/shipenginezt9.jpg]. Kindly note there is a web service for getting ship and on basis of ship-id selected, engine is filled, which is also deliverd by web service
    The intial state of application is ship drop down is enabled but not the engine, that gets enabled only when ship is selected.
    Here the steps: Please replace it with your fields:
    1. Place the 2 drown down controls.
    2. For Ship, Select the web service in the dynamic list of the dropdown, remember at runtime, if those input parameters are not valid it will give the data service error, make use of if statement.
    3. Define Store -> shipid, engineid and boolean show_engine  - default false
    4.  Action of ship -> ASSIGN action -> true to show_engine from data store
    5.  Value of ship ->
    =store@SHIP
    6.For engine, Select the web service in the dynamic list of the dropdown, remember at runtime, if those input parameters are not valid it will give the data service error, make use of if statement. Where the paramter for shipid is to be filled
    =IF(store@SHIP!="",UPPER(store@SHIP),"AVRA")
    7. Value of engine ->
    =store@ENGINE
    Let me know, if helps.
    Best regards,
    Dharmi
    Edited by: Dharmi Tanna on Jun 27, 2008 3:23 PM

  • By selecting the dropdown list a new empty browser tab is getting opened

    Hi,
    When i try to pass the parameters in Bi report, by selecting the dropdown list a popup(new empty browser tab) is getting opened why is this so. Can anyone help me to sort it out.
    Edited by: user9093700 on Jul 6, 2012 8:57 AM
    Edited by: user9093700 on Jul 9, 2012 8:46 AM

    If you have tabs on top and no menu then the tabs are in a "Windows" area so there is no space to right. If you put tabs back to the bottom you will have most of your old behavior but because of the changes to tabs on top most of the tab context menu stuff all of the context menu part was lost except the customize toolbar stuff, double-clicking on an empty spot was restored, and eventually during the FF 4 beta most of the tab extensions Firefox messed up eventually worked again except in the area to the right of the tabs.
    The Windows part of that double-click has to maximize or restore to normal,
    and you have to be able to drag the window by it;'s title bar.
    You can make Firefox 4.0.1 and '''Firefox 5.0''' look like Firefox 3.6.17, see numbered items 1-10 in the following topic [http://dmcritchie.mvps.org/firefox/firefox-problems.htm#fx4interface Fix Firefox 4.0 toolbar user interface, problems (Make Firefox 4.0 look like 3.6)]

  • Dropdown List in report program

    Hi
    Anybody send me the Dropdown list coding for a parameter in s selection-screen of a normal report program without using a module-program
    regards
    paul

    HI  paul
    try this
    TYPE-POOLS: VRM.
    TABLES SPFLI.
    TABLES SSCRFIELDS.
    DATA flag.
    DATA: NAME TYPE VRM_ID,
          LIST TYPE VRM_VALUES,
          VALUE LIKE LINE OF LIST.
    PARAMETERS PS_PARM LIKE SPFLI-CARRID  AS LISTBOX VISIBLE LENGTH 10
    USER-COMMAND
    fcodex.
    data: i_spfli type spfli occurs 0 with header line.
    PARAMETERS PQ_PARAM LIKE SPFLI-connid AS LISTBOX VISIBLE LENGTH 15
    USER-COMMAND
    fcodey.
    *DS AS CHECKBOX USER-COMMAND FLAG.
    INITIALIZATION.
      NAME = 'PS_PARM'.
      DATA T TYPE I VALUE 0.
    SELECT DISTINCT carrid into corresponding fields of table i_spfli FROM
    SPFLI.
      loop at i_spfli.
        VALUE-KEY = i_spfli-CARRID.
        VALUE-TEXT = i_spfli-CARRID.
        APPEND VALUE TO LIST.
      endloop.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          ID     = NAME
          VALUES = LIST.
    AT SELECTION-SCREEN.
      if sy-ucomm eq 'FCODEX'.
        REFRESH LIST.
        CLEAR LIST.
        PQ_PARAM = ' '.
        NAME = 'PQ_PARAM'.
        SELECT  * FROM SPFLI WHERE CARRID = PS_PARM.
          VALUE-KEY = SPFLI-connid.
          VALUE-TEXT = SPFLI-connid.
          APPEND VALUE TO LIST.
        ENDSELECT.
      endif.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF SY-UCOMM NE 'FCODEX' OR SY-UCOMM NE 'FCODEY'.
          CALL FUNCTION 'VRM_SET_VALUES'
            EXPORTING
              ID     = NAME
              VALUES = LIST.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    START-OF-SELECTION.
      clear i_spfli.
      refresh i_spfli.
    select * into table i_spfli from spfli where carrid = ps_parm and connid
    = pq_param.
      loop at i_spfli.
        WRITE: / 'CITY FROM:', I_SPFLI-CITYFROM, 'CITY TO :',I_SPFLI-CITYTO,
       'DEPARTURE TIME :', I_SPFLI-DEPTIME.
    regards
    kishore
    Message was edited by: Harikishore Sreenivasulu

  • Dropdown list in tab strip

    Hi,
      I want a dropdown list for block reason ,in the two tabs that i have created.The dropdown list is not a part of the table contol.
    The dropdown list should have the contents of Delivery and Billing block as observed in the 'SALES' tab of VA03.
    The functionality of the list is to filter the blocks displayed in the table control according to the reason selected in the list.
    Thanks.

    Hi
    Welcome to SDN Community
    LIST BOX                    
    Drop down list box can be created in a dialog screen(SE51) as well as selection screen.
      The sap list box allows to select a value from the list but we cannot enter our own value in the list box .The value list that will be displayed consists of two
    fields TEXT field of TYPE 80(C) and internal KEY field of TYPE 40(C).
    In screen painter to create a input/output field into list box we use
    'L" as a value for dropdown attribute for the i/o field.
    In screen painter to determine the type of method that will be used to fill the value
    list we use the attribute value list.
    If it is blank  the value list will be filled by the first column of the input help assigned to the screen field.This input help can be defined in the ABAP Dictionary, on screen using SELECT,VALUES screen statements or in event POV (PROCESS ON VALUE-REQUEST ) and the input help that will be passed to the field should consists of 2 columns ,the key column is filled automatically by the system.SAP recommends value list field should be blank.
    or
    The value  can be 'A' meaning that the value list will be filled in the event PBO(PROCESS BEFORE OUTPUT) or before the screen is displayed.In this method we use function module VRM_SET_VALUES to fill the values and pass it to the i/o field.
    If a function code is attached to the list box the selection of a value triggers a PAI
    otherwise PAI will not trigger.
    LIST BOX in SELECTION SCREEN
      List Box is created in selection screen using PARAMETERS staement
    with AS LISTBOX addition other attributes like VISIBLE LENGTH (width of listbox)
    can be specified with the declaration.
    PARAMETERS name(n) AS LISTBOX VISIBLE LENGTH n.
    Here n is an integer and name is the name of parameter.
    To populate the value list we use the FM VRM_SET_VALUES  and the
    selection screen event AT SELECTION-SCREEN OUTPUT is used to write the code to fill it.
    VRM_SET_VALUES   
    The function module VRM_SET_VALUES is used to fill the value list associated with a List Box .This FM uses types which are declared in type group VRM. So
    we should declare TYPE-POOLS VRM before using this FM.
    Some important types declared in the VRM type group are
    VRM_ID
       It refers to the name of the input/output field associated with list box
    VRM_VALUES
      It refers to the internal table consisting of two fields TEXT(80C) and KEY(40)C
    that will be used to create the list values.
    CALL FUNCTION 'VRM_SET_VALUES'
      EXPORTING
          ID                =  name of screen element ,it is of TYPE VRM_ID
          VALUES      =  internal table containing values,of TYPE VRM_VALUES
    LIST BOX with value list from input help
    In this example the screen element attribute value list is set to blank as such the value list will be filled with the 1st column of the input help,We use PROCESS ON VALUE-REQUEST event to pass the value list  to the listbox.In the MODULE call used to fill the value list we can use FM like F4IF_INT_TABLE_VALUE_REQUEST to create input help as explained in the input help.The value of first column will be shown in the field when selected.
    PROCESS ON VALUE-REQUEST
    FIELD list MODULE fill_list_100
    FIELD list MODULE fill_list_100 INPUT
    SELECT f1 f2 FROM table INTO int
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield        = 'input/output screen field'
                value_org       = 'S'
           TABLES
                value_tab       = itab "it contains 2 fields that will be shown in the list box
           EXCEPTIONS
                parameter_error = 1
                no_values_found = 2
                OTHERS          = 3.
      IF sy-subrc <> 0.
    ENDIF.
    ENDMODULE.
    VALUE LIST CREATED IN PBO
    In this method we set the value list attribute to 'A'.The value list will be filled in the PBO by using FM VRM_SET_VALUES .
    TYPE-POOLS : VRM
    DATA : field_id TYPE VRM_ID ,
                values  TYPE VRM_VALUES,
                 value   LIKE LINE OF values.
    PROCESS BEFORE OUTPUT
    MODULE list_fill_100
    MODULE list_fill_100 OUTPUT
    SELECT f1 f2 f3  FROM tab WHERE condition.
    value-KEY = f1.
    value-TEXT = f2
    APPEND value TO VALUES
    CALL FUNCTION 'VRM_SET_VALUES'
           EXPORTING
                id     = 'i/o screen field'
                values = values.
    ENDMODULE.
    LIST BOX with Selection Screen
    For this the FM VRM_SET_VALUES is used to fill the value table and is passed to the parameter created with TYPE LISTBOX in the selection screen event
    AT SELECTION-SCREEN.
    PROGRAM zlist
    TYPE-POOLS : VRM.
    DATA: param TYPE vrm_id,
           values     TYPE vrm_values,
           value LIKE LINE OF values.
    PARAMETERS: p_name(10) AS LISTBOX VISIBLE LENGTH 10.
    AT SELECTION-SCREEN OUTPUT.
      param = 'P_NAME'.
      value-key = '1'.
      value-text = 'JOHN'.
      APPEND value TO values.
      value-key = '2'.
      value-text = 'PETER'.
      APPEND value TO values.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING id     = param
                  values = values.
    Regards
    Pavan

Maybe you are looking for