How to populate values in listbox of a field?

HI all,
My requirement is : i have one filed , for that i have five values,
i want to display those five values in the list box. then i have to select one of them  and based on this field i have to display few fields in table control .
here i am able to display the values in listbox but even i select any value , it showing the first vale only !!!!!!
please help me in this regard.

This is the way........
DATA: DYNFIELDS TYPE TABLE OF DYNPREAD WITH HEADER LINE.
  DATA : L_PSPNR  TYPE PROJ-PSPID,
         L_WBSE   TYPE PRPS-POSID.
PARAMETERS : P_BPO TYPE CKIS-EXTNR
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_BPO.
DATA : BEGIN OF IT_BPO OCCURS 100,
         BPO LIKE ZCKIS-BPO,
         END OF IT_BPO.
  DYNFIELDS-FIELDNAME = 'P_PSPNR'.
  APPEND DYNFIELDS.
  CLEAR DYNFIELDS.
  DYNFIELDS-FIELDNAME = 'P_WBSE'.
  APPEND DYNFIELDS.
  CLEAR DYNFIELDS.
  CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
      DYNAME               = SY-CPROG
      DYNUMB               = SY-DYNNR
      TRANSLATE_TO_UPPER   = 'X'
    TABLES
      DYNPFIELDS           = DYNFIELDS
    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.
  IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ELSE.
Rewards if satisfied
Thanks

Similar Messages

  • How to populate values into a Listbox on selection screen

    Hi All,
    Please any one let me know how to populate values (for ex.01,02 and 03) in a list box of selection screen..
    Thanks,
    Vijay

    Try this code ...
    REPORT  ZLISTBOX.
    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 5
    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.
    ENDLOOP.

  • How to populate values in List Box in Adobe form

    Hi,
    How to populate values in List box in adobe forms?
    Thanks
    RB

    if you want to display a fixed values in the dropdown you can use list box ui and can specify values there
    or if u want to display values from the context node of the webdynpro
    1. Drag and drop a Value Help Drop-down List element from the Web Dynpro Library tab to the Body Pages pane.
    2. Drag and drop your node from the Data View tab onto it. This action binds the layout element to the corresponding node.
    with regards
    shanto aloor

  • How to populate values for a new field in target infoprovider

    Hi Experts,
    am new to BI. i would like to know on how to populate values for a new field in the target cube with start rotuine.In my case,  i have a source infoprovider, which has 3 fields and a target infoprovider, which has 5 fields. i need to populate the new 2 fields in start routine. i dont want to populate using Field routine and am using 3.5 version. please assist with code on how to solve this issue.
    Thank you,
    Chitra.
    Edited by: Chitra_BI on Jun 13, 2011 10:23 AM

    Debug the standard code and see where the other fields are getting update. you can use the similar approach and area to code for the new field.
    Regards,
    Lalit Mohan Gupta.

  • How does the value filled in Appointment Date field reflect in IE_SHIPMENTSTATUS table?

    Hi Team,
    Just wanted to know : How does the value filled in Appointment Date field reflect in IE_SHIPMENTSTATUS table in OTM.
    Please help.
    Regards,
    John

    Sorry, wrong forum: created in ABAP forum instead.

  • How to populate values in a Listbox parameter in selection screens

    I have a parameter(as list box) field in selection screens. And now I want to populate a list from a ztable field values.  How to do that.
    Thanks in Advance

    Hi,
    You have to use the FM VRM_SET_VALUES.
    Check this example..
    TYPE-POOLS: vrm.
    PARAMETERS: p_test TYPE char4 AS LISTBOX VISIBLE LENGTH 10.
    DATA: t_data TYPE vrm_values.
    INITIALIZATION.
    DATA: s_data TYPE vrm_value.
    <b>***Here you to have to do the select and populate the internal table
    ***t_data.</b>
    s_data-key = 'ABCD'.
    s_data-text = 'First four'.
    APPEND s_data TO t_data.
    s_data-key = 'EFGHI'.
    s_data-text = 'Second four'.
    APPEND s_data TO t_data.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
    id = 'P_TEST'
    values = t_data
    EXCEPTIONS
    id_illegal_name = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    START-OF-SELECTION.
    WRITE: / p_test.
    Thanks,
    Naren

  • How to Populate Values in Report for Fields

    Hi Experts,
    I have a Report requirement where in I need to Populate values for FROM Period & TO Period based on the user i/p for Quarter variable.
    For Eg;
    Fiscal year : 2009
    Quarter : 3
    Mat     Year         From period    ToPeriod          QTY
      A      2009            07                  09                1
      B      2009            07                  09                22
      C      2009            07                  09                44
    There are no fields FROM Period or TO Period in Cube.I need to populate them in the report directly.
    Please give some inputs to goahead.
    Thanks
    Ravve
    Edited by: ravve king on Jun 4, 2009 4:38 PM
    Edited by: ravve king on Jun 4, 2009 4:39 PM

    You're going to need to create a User Exit in your query. Here's a link to a helpful document on how to do that:
    [Using Customer Exit Variables in BW/BI Reports Part - 1|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20f119d9-922d-2c10-88af-8c016638bd90]

  • How to populate value node with values?

    Hi Experts,
    I have created a new view with a vlaue node of table type.
    How can I populate values into the value node?
    Which method will be useful?
    Is there any material for Web UI Programing?
    Please help me in this.
    Thanks,
    Adi.

    Hi Adi
    If ZVal is your value node then,
      DATA: lref_entity    TYPE REF TO cl_bsp_wd_value_node,
            lref_bo_coll   TYPE REF TO if_bol_bo_col,
            lref_data TYPE REF TO <<your ZStructure>>,
             ls_data type <<your ZStructure>>.
    ls_data-<<field1>> = 'XYZ'
    ls_data-<<field2>> = 'XYZ'
         CREATE OBJECT lref_bo_coll TYPE cl_crm_bol_bo_col.
          CREATE DATA lref_data.
          CREATE OBJECT lref_entity
            EXPORTING
              iv_data_ref = lref_data.
          lref_entity->set_properties( ls_data ).
          lref_bo_coll->add( lref_entity ).
          typed_context->ZVal->set_collection( lref_bo_coll ).
    Hope this was helpful.
    Best Regards,
    Lakshminarayana

  • How to populate values in to dropdown in table ui element

    Hi,
    according to my scenario  i have atable with five records ...andi have acolumn name DATE and  it contains 5 dropdowns with some values i.e dates from jan 1 2008-dec 31 2008.user needs to select only those values which are in dropdown. can u tell me the code to populate values in to dropdown in table UI element.
    Thanks
    Raju

    Hi,
    you can go for two drop downs like DropDown by Key or Drop Down by Index as per requirment.
    Create context Node for the table UI, in that one will be for ur drop down. Create element for the Context node and add thses to the conetxt.
    Code example for DropDownBy Key:-
    ISimpleType simpleType =               wdContext     .nodeProjEstiTable().getNodeInfo()
         .getAttribute("projphasname")               .getModifiableSimpleType();
    IModifiableSimpleValueSet svs1 =
    simpleType.getSVServices().getModifiableSimpleValueSet();
    svs1.clear();
    for (int j = 0; j < projphasname.length; j++) {
         svs1.put(projphasname[j][1], projphasname[j][1]);
    for DropDownBy Index you can work in normal way means try to create element for the respective context attribute.
    Hope this may help you...
    Deepak

  • How to populate values into DFF

    hi all
    kindly tell me how to create a LOV for a DFF field based on some other field in the form?
    for ex:
    i created a DFF to catch supplier site based on supplier name entered in the form , how to correlate both?
    kindly answer
    --regards
    --raj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hi Ghattamaneni,
    Issue resolved?
    if not, try with this.
    Create a Value set based on suppplier name to get supplier site.
    then go to DFF.
    either Sys Admin/Application/DFF or AP/Set-up/DFF.
    Then create DFF with Context Prompt or with context.
    add the attributes and add Value set to each attribute.
    try with this.
    --Basava.S                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to populate values of field symbols?

    HI,
    I need to pass values into a field-symbol (defined as a dynamic Work Area) and append the values later on into another field-symbol (defined as a dynamic Table) by inserting the work area to the table. The insert statement in the screen shot below is syntetically correct but when I uncomment
    *      <gw_itab>-tplnr = 'TPLNR'.
    *      <gw_itab>-pmsog = 'PMSOG'.
    *      <gw_itab>-k_pro = 'K_PRO'.
    I get a syntax error. During debugging if I pass the values of the work area, they are properly appended into the table.
    Could somebody show me the code on how to atain this programatically?
    Thanks for your help
    Carl

    From the short dump:
    "<GT_ITAB> has line type "v" and the length 24, but the work area has line type "g" and the length 8".
    The code you included in your first screenshot is not the code that it dumped on... Looking at the shortdump here's what you have.
    lv_fieldname = '<GW_ITAB>-TPLNR'.
    assign (lv_fieldname) to <gw_itab>.
    <gw_itab> = 'TPLNR'.
    insert <gw_itab> into table <gt_itab>.
    This code doesn't make any sense...
    What you're saying is:
    <gw_itab> points to <gw_itab>-tplnr. So now it points to just a field of the structure, not the whole structure.... Then you say that field is set to 'TPLNR'. So you set the field of the original structure called TPLNR to be the string "TPLNR"...
    If that's really what you're trying to do then try changing it to:
    field-symbols: <field> type any.
    lv_fieldname = '<GW_ITAB>-TPLNR'.
    assign (lv_fieldname) to <field>.
    <field> = 'TPLNR'.
    insert <gw_itab> into table <gt_itab>.

  • How to populate value frm SO to Delivery List

    hi all
    i am getting the values in VA05 for the fields created by and order quantity,when i run vl10a i am nt able to find the same values here ,can u all check the same and give ur valuable suggestions so that i can fetch the values in Delivery List.
    cheers
    shalsa007.........

    hi
    wt i have to check in the shipping  point and del dated ,i am creating order for todays date and when i execute transaction code vl10 ,before delivery i wanna see the values in the column created by and order quantity i.e who has created SO and wts d Order quantity.
    can u explain it bit more
    cheers
    shalsa007...........

  • How to assign values for more than one field

    Hi,
    I have written following code
    constants: fieldname(30) value '(SAPMF02D)KNA1-AUFSD'.
    constants: fieldname1(30) value '(SAPMF02D)KNA1-LISFD'.
    constants: fieldname2(30) value '(SAPMF02D)KNA1-FAKSD'.
    field-symbols: <L_FIELD>  TYPE ANY.
    field-symbols: <L_FIELD1> TYPE ANY.
    field-symbols: <L_FIELD2> TYPE ANY.
          Assign (fieldname) to <l_field>.
          <L_FIELD> = 'ZB'. " value according to your requirement
          Assign (fieldname1) to <l_field1>.
          <L_FIELD1> = 'ZB'.
    while debugging <l_field1> is not assinging (fieldname1).
    Im able to assing for (fieldname).
    how to assign value for (fieldname1).
    plz suggest me to assign values for more than one field.
    Regards,
    Brahmaji

    Hello,
    Because there is no field name called LISFD in KNA1. Actually you misspelled the field name.
    It is KNA1-LIFSD

  • How  to add values in Listbox

    Hi All,
    PARAMETERS: cust_dbt(3)
                      AS LISTBOX VISIBLE LENGTH 20
                        DEFAULT 'yes'.
    Above code shows only 'yes' value when we click on drop down list box.
    How to assign both 'yes' & 'No' values to the drop down list box.

    Hi
    Use the fun module VRM_SET_VALUES to get the multiple values for that LIST BOX
    see the sample code
    Input : p_char = 'J'.
    Press: enter
    List Box of Month = January, June , July.
    REPORT ZLIST_VALUES.
    TYPE-POOLS vrm.
    tables:
    spfli.
    parameters: p_char type c.
    parameters:
    p_month(12) as listbox visible length 20,
    p_year as listbox visible length 20 .
    DATA:
    t_table TYPE STANDARD TABLE OF vrm_value,
    t_table1 TYPE STANDARD TABLE OF vrm_value,
    vrm_values1 LIKE LINE OF t_table.
    DATA:
    t_year TYPE STANDARD TABLE OF vrm_value.
    data: w_year(4) type n value '2000'.
    at selection-screen output.
    vrm_values1-key = 'a'.
    vrm_values1-text = 'January'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 'p'.
    vrm_values1-text = 'February'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 'q'.
    vrm_values1-text = 'March'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 'r'.
    vrm_values1-text = 'April'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 's'.
    vrm_values1-text = 'May'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 't'.
    vrm_values1-text = 'June'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 'u'.
    vrm_values1-text = 'July'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 'v'.
    vrm_values1-text = 'August'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 'w'.
    vrm_values1-text = 'September'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 'x'.
    vrm_values1-text = 'October'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 'y'.
    vrm_values1-text = 'November'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 'z'.
    vrm_values1-text = 'December'.
    APPEND vrm_values1 TO t_table.
    t_table1[] = t_table.
    delete t_table1 where text+0(1) <> p_char.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
    id = 'p_month'
    values = t_table1
    EXCEPTIONS
    ID_ILLEGAL_NAME = 1
    OTHERS = 2.
    do 10 times.
    add 1 to w_year.
    vrm_values1-key = sy-index.
    vrm_values1-text = w_year.
    APPEND vrm_values1 TO t_year.
    enddo.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
    id = 'p_year'
    values = t_year
    EXCEPTIONS
    ID_ILLEGAL_NAME = 1
    OTHERS = 2.
    start-of-selection.
    write: p_month.
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • How to populate values to the variables in standard text

    Hi friends,
    I have maintained a standard text in So10 like this invoice number&vbeln&.
    Inside a function module i want to read this text and populate the value to the variable &vbeln&.How to achive this.
    Rgds.

    Thanks Simon but i didn't understand your answer but i will tell you the problem that i want to solve with foreach or iterator
    i have a view that have employeeId and employeeName and ManagerID
    create table employeesView
            EmployeeId           Number,
            EmployeeName      varchar2(100),
            ManagerId             Number
        }i want to make a foreach or Iterator to make
    every Employees with the same manager id to be in the same <af:panelGroupLayout>
    i mean
      <af:foreach or af:Iterator >
           <af:panelGroupLayout >
                   <af:commandButton id="cb1" text="All Employees With Manager Id 1" />
           </af:panelGroupLayout >
           <af:panelGroupLayout >
                   <af:commandButton id="cb1" text="All Employees With Manager Id 2" />
           </af:panelGroupLayout >
           <af:panelGroupLayout >
                   <af:commandButton id="cb1" text="All Employees With Manager Id 3" />
           </af:panelGroupLayout >
      </af:foreach or af:Iterator >How can i do this

Maybe you are looking for

  • Validation settings for a list in Sharepoint 2010 to find if there is a document attached to the list item

    Hi Everyone, Greetings!!! I have a very peculiar question on List validation settings. I want to validate a list item whether user has attached a document to the list item or not? The list item should not be saved until a document is attached to it.

  • PL/SQL with DBMS_HS_PASSTHROUGH Package

    Hi, Can someone provide me a sample code on using DBMS_HS_PASSTHROUGH package? I have Oracle 10g installed on Windows XP Home and needs to extract some data from HP-UX(running Informix 8.32). Any help is highly appreciated. Thanks

  • Invoke node unfonctionnal after compiling

    Hello, I'm currently trying to use an invoke node (I'm not using an english LabVIEW so I don't know if the words are exactly the same translated) : Obtain VI / Editor Version When I'm using it in my .VI my project work perfectly, but when I'm trying

  • Itunes improvement suggestions.

    Does anyone have any idea how to link together certain songs. Many albums have songs that were made to play consecutively. This makes shuffling songs very annoying when they play out of order. It seems to me that Itunes should have a way to link them

  • EAAS and Listner service are not comming up

    Hi all, I am using CIM 4.4.1 with ES1. I have installed and integrated the CIM with UCCE and all configuration has synch with CIM from UCCE. But i am facing 2 issues right now first my CIM MR PIM is not comming up, it looks the port i an using 38001