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.

Similar Messages

  • How to reset values in fileds of a selection screen?

    I have a selection screen ,can you please tell me how to reset the values of the fields in selection screen.

    Hi,
    SELECTION-SCREEN: begin of block blk,
    SELECT-OPTIONS FL_DATE FOR SBOOK_WA-FLDATE.
    SELECTION-SCREEN: End of block blk,
    INITIALIZATION.
    REFRESH  FL_DATE.
    Please Note: Always search SCN before posting.
    Hope it helps you,
    Regards,
    Abhijit G. Borkar

  • 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 value into textboxes

    Hi,
    I'm working with oracle forms for portlet and need help populating a certain value into textboxes. There are 40 textboxes, 40 checkboxes, and a textbox for a user to enter a value. When a user checks the preferred checkboxes then enters the value into the textbox, I want this value to be populated into those 40 textboxes.
    Please help...
    Thx in advance,
    Thuly2

    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

  • 0FISCPER - not populates value in the look up - selection screen -(urgent)

    Hi all,
    Fiscal year/period ( 0FISPER )is set to user input veriable that to appears in the selection screen, when we click on the Lookup for the Fiscal Year/period - don’t get the list of possible Periods to choose from.
    its an Master data infoprovider and fiscal period fetching the data from T009C. Hope it might be the reason not appear the possible periods in lookup.
    How to get the fiscal yesr periods in look up?
    Even I am not able to edit the Master data Tab of the Onfoobject in chnage mode.
    what could be reson ?

    Hi,
    what type of search help is this.
    If uou created this search help through se11 then assign values to the importing & exporting fields in the down side of the screen.
    With Regards,
    Sumodh.P

  • 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 use CrossReference and DVM in ODI &how to populate data into Xref

    Can any one tell how to use Domain Value Maps and Cross Referencing in ODI?
    DVM or Domain Value Map are created and used in ESB console of SOA suite.
    My actual requirement is as follows:
    The below steps describe loading data from ERP Application 1 to ERP Application 2.
    1. The Source Application ERP APP1, populates the interface table using their native technology.
    2. A job scheduler invokes the Source side ODI Package.
    3. ODI then extracts the data from Source Interface table and populates the Target Interface table.
    4. After populating the Target interface table the ODI populates the X-ref table with App 1 ID and generated common ID.
    5. The ODI either deletes or updates the rows that were processed from the Source interface table.
    6. On the Target Application ERP APP2, the native application extracts data from target interface table and populates target database there by generating ERP Application 2 ID.
    7. A job scheduler on the Target application invokes the ODI package to populate the Application 2 ID onto the Xref table matching on the Common ID.
    I just want to know :
    1. How to populate data into the Xref table from Source datastore
    2. And if data is successfully laoded from target datastore to actual base table of target then how to populate the target id into the cross reference table.

    can anyone suggest me some answer, then it would be of great help?

  • 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 the data in LISTBOX   of Dialog programming

    Hi All,
    I know how to create a Listbox in Modulepool programming, But i do n't know how to populate the data in LISTBOX. Does anyone knows , please help me ?
    Thanks in advance
    KR

    hi,
    u need to write this after all modules of PAI in screen flow logic
    PROCESS ON VALUE-REQUEST.
      FIELD ifmtp-form_type MODULE fm_drop.
    MODULE fm_drop INPUT.
      CLEAR ifmtp.
      REFRESH ifmtp.
      ifmtp-form_type = 'C'.
      APPEND ifmtp.
      ifmtp-form_type = 'F'.
      APPEND ifmtp.
      ifmtp-form_type = 'H'.
      APPEND ifmtp.
      ifmtp-form_type = 'D'.
      APPEND ifmtp.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield  = 'FORM_TYPE'
          value_org = 'S'
        TABLES
          value_tab = ifmtp.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDMODULE.                 " fm_drop  INPUT
    here ifmtp-form_type is my list box field on screen in which ifmtp is my internal table and form_type is my field name
    i have declared internal table like
    DATA : BEGIN OF ifmtp OCCURS 0,
              form_type LIKE zform_track_mast-form_type,
           END OF ifmtp.
    reward if useful...

  • To populate values into single field in an internal table

    Hi Friends,
    How we need to populate values into single field in an internal table.
    E.g itab consits of single field ( name)
           i need to assign values to this field name .like
          peter,
          john,
          abrahm,
          daneyal
    Pls tell me i how i need to code for this
    Thanks ,
    Parnith

    Hi,
    Please look at the below code :
    DATA : BEGIN OF itab OCCURS 0 ,
             name(20) TYPE c,
           END OF itab.
    START-OF-SELECTION.
      itab-name = 'Peter'.
      APPEND itab.
      CLEAR itab.
      itab-name = 'John'.
      APPEND itab.
      CLEAR itab.
      itab-name = 'Abrahm'.
      APPEND itab.
      CLEAR itab.
      itab-name = 'Daneyal'.
      APPEND itab.
      CLEAR itab.
      LOOP AT itab.
        WRITE : / itab.
      ENDLOOP.
    Thanks,
    Sriram Ponna.

  • 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 to passing value into Captivate from html?

    How to passing value into Captivate from html?
    Or
    How to communicate between objects in one slides?

    Hi czhao0378 and welcome to the forums!
    Captivate does not natively allow you to communicate your own
    data, either internally or externally. The only way to make this
    happen is to create your own functionality, either via custom-built
    Flash objects or JavaScript code executed in the browser or a
    combination of both.
    The only example I've seen of any "data passing" inside
    Captivate is a custom text input/output solution that was posted on
    the Captivate Developer Exchange:
    http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&loc=en_us&extid=1253 021
    This solution consists of an input box that takes information
    from the user on one slide and a second box that displays that
    information on another slide. The functionality was built in Flash
    and is embedded in Captivate as a Flash "animation". Unfortunately,
    since this is a custom functionality, the information is not
    included in the user completion results Captivate can pass to a
    Learning Management System.
    Since the solution mentioned above relies on a Flash
    Actionscript variable to hold the information that is displayed,
    you can also pass the information from HTML to Captivate using the
    "SetVariable" command in JavaScript. This would at least allow you
    to display your own HTML-based data inside Captivate.
    Beyond that, I'm not aware of any other way to gather and
    pass data in Captivate.

  • Value selected in Listbox of Selection screen

    Hi,
    I'm facing a problem where i'm not able to get the value selected in a listbox on selection screen.
    TYPE-POOLS : vrm.
    DATA : var_itab TYPE vrm_values.
    DATA : var_wa LIKE LINE OF var_itab.
    DATA:  count TYPE i.
    Parameters: variant(14) TYPE c AS LISTBOX VISIBLE LENGTH 14.
    INITIALIZATION.
      count = 1.
      name = 'variant'.
      SELECT variant FROM varid INTO var_wa-text
                     WHERE report = 'ZP_XXXXXX'.
        var_wa-key = count.
        APPEND var_wa TO var_itab.
        count = count + 1.
      ENDSELECT.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id     = name
          values = var_itab.
    START-OF-SELECTION.
    WRITE: VARIANT.
    Here in Start of selection, the value selected in listbox is not getting written. In fact variable VARIANT does not contain any values.
    Please help,
    Thanks in advance,

    Hi Srinivas,
    Thanks for ur reply,
    I tried it, it doesnt work.
    In Selection screen, it is showing values in listbox.
    But i'm not able to catch the value selected there.
    If i do:
    WRITE: VARIANT.
    in start-of-selection.
    VARIANT is blank.
    Thanks,

  • How to pass Selection screen values to another program's selection screen

    Hello,
    I have a requriement where in which i need to pass the selection screen values (say list of pernrs) and few others of one program to selection screen of another. 
    One option that i came across is using Submit. But am unware how to pass only the selection screen values (there wont be any data processing or filtering).  Just the values of one prgm's selection screen are to be sent to another.
    Thanks
    RK

    prog1.
    data:lt_params type table of RSPARAMS.
    data:wa like line of lt_params.
    parameters:pa1 type sy-datum.
    select-options:so1 type sy-dtaum.
    wa-SELNAME = 'PA2'.               "Seletion screen field name
    wa-KIND     = 'P'.                    "P-Parameter,S-Select-options
    wa-SIGN     = 'I'.                    "I-in
    wa-OPTION     = 'EQ'.               "EQ,BT,CP
    wa-LOW     = pa1.                    "Selection Option Low,Parameter value
    append wa to lt_params.
    loop at so1.
    wa-SELNAME = 'SO2'.               "Seletion screen field name
    wa-KIND     = 'S'.                    "P-Parameter,S-Select-options
    wa-SIGN     = 'I'.                    "I-in
    wa-OPTION     = 'EQ'.               "EQ,BT,CP
    wa-LOW     = so1-low.               "Selection Option Low,Parameter value
    wa-HIGH     = so1-high.               "Selection Option Low,Parameter value
    append wa to lt_params.
    endloop.
    CALL FUNCTION 'SUBMIT_REPORT'
      EXPORTING
        report                 = 'ZPROG2.'   "report name of ur tocde
        RET_VIA_LEAVE          = ''            "IF 'X' returns to the called program after execution
        SKIP_SELSCREEN         = 'X'       "If 'X' selection screen of called program is not displayed
    TABLES
       SELECTION_TABLE        = lt_params       "Contains values to the selection screen
    EXCEPTIONS
      JUST_VIA_VARIANT       = 1
      NO_SUBMIT_AUTH         = 2
      OTHERS                 = 3
    Prog2.
    parameters:pa2 type sy-datum.
    select-options:so2 type sy-dtaum.
    write pa2.
    skip 1.
    loop at so2.
    write:so2-low,so2-high.
    skip 1.
    endloop.
    Edited by: Keshu Thekkillam on Aug 20, 2009 3:22 PM

Maybe you are looking for