How to fill the values in List Box?

Hi Experts,
Can anyone explain me how to fill the values in the List Box such that the value should be from the table?
For Example : Fill the EmpID from table T1 into the ListBox?
Thanks in Advance,
Regards,
Raghu

hi,
and u doing it through report means from se38 than here is code...
DATA : BEGIN OF itab OCCURS 0,
        matnr LIKE mara-matnr,
       END OF itab.
DATA : ok_code LIKE sy-ucomm.
CALL SCREEN 0200.
*&      Module  STATUS_0200  OUTPUT
      text
MODULE status_0200 OUTPUT.
  SET PF-STATUS 'Z200'.
ENDMODULE.                 " STATUS_0200  OUTPUT
*&      Module  USER_COMMAND_0200  INPUT
      text
MODULE user_command_0200 INPUT.
  CASE ok_code.
    WHEN 'BACK' OR 'UP' OR 'CANC'.
      LEAVE PROGRAM.
  ENDCASE.
ENDMODULE.                 " USER_COMMAND_0200  INPUT
*&      Module  mat_val  INPUT
      text
MODULE mat_val INPUT.
  SELECT matnr FROM mara INTO CORRESPONDING FIELDS OF TABLE itab
    WHERE matnr BETWEEN '000000000000000101' AND '000000000000000109'.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
        retfield               = 'MATNR'
       VALUE_ORG              = 'S'
      tables
        value_tab              = itab
    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.                 " mat_val  INPUT
<b>And this is flow logic..</b>
PROCESS BEFORE OUTPUT.
  MODULE status_0200.
PROCESS AFTER INPUT.
  MODULE user_command_0200.
PROCESS ON VALUE-REQUEST.
  FIELD itab-matnr MODULE mat_val.

Similar Messages

  • How to hold the value in List box.

    Hi All,
    On my screen painter Screen I am displaying the Sold to party and ship to party with thier address.
    I am also displaying the Shipping condition based on ship to party. To display the shipping condition i am using list box. Once the user enter the sold to party automatically all the field is going to populate in their respective fields. I am facing the problem that, The list box getting populated with shipping condition but once you choose the shipping condition and hit the enter the list box getting refreshed. I am using this code in PAI event. And I can Only use this in PAI.
    The Function i am using for list box is CALL FUNCTION 'VRM_SET_VALUES'.
    Pls suggest me how to hold the value in List box.
    Thanks,
    Rakesh

    Hi,
    Now i am using in PBO.
    the code below in in PBO.It is still not holding the value.
          if list[] is initial.
          perform SHP_COND.
          endif.
    form SHP_COND .
    *DATA: SHOP(80).
        clear : GT_VSBED, list.
        refresh : GT_VSBED, list.
         select vsbed
           from knvv AS K
           into table GT_VSBED
          where Kvkorg = vbak-vkorg  "Kkunnr = GV_STPH
          and K~vtweg = vbak-vtweg
          and K~spart = vbak-spart.
        select VSBED vtext
          from TVSBT
        into table list
        for all entries in GT_VSBED
        where spras = sy-langu
        and vsbed = GT_VSBED-VSBED.
    *break-point.
    NAME = 'SHP_CON'.
    CALL FUNCTION 'VRM_SET_VALUES'
      EXPORTING
        id                    = NAME
        values                = LIST[]
    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.
    endform.                    " SHP_COND
    Thanks,
    Rakesh

  • Problem in picking up the value from list box

    Hi,
    I have created a parameter list box on the selection screen using VRM_SET_VALUES fn module and populating the list box. Now my problem is when i select one value from the list box and executing, it shows null value.
    AT SELECTION-SCREEN OUTPUT.
    PERFORM f_f4help.
    FORM f_f4help .
      REFRESH: gt_tvaut,
               gs_list.
      CLEAR: gs_tvau,
             gs_value.
      SELECT spras
            augru
            bezei
        FROM tvaut
        INTO TABLE gt_tvaut
        WHERE spras EQ sy-langu.
    IF NOT gt_tvaut[] IS INITIAL.
        LOOP AT gt_tvaut INTO gs_tvau.
          gs_value-key = sy-tabix.
          CONCATENATE gs_tvau-augru
                      gs_tvau-bezei
                 INTO gs_value-text
            SEPARATED BY space.
          APPEND gs_value TO gs_list.
        ENDLOOP.
      ENDIF.
      param = 'P_AUGRU'.
    CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = param
          values          = gs_list
        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.
    How to get the value which  is selected in the selection screen becoz i'm using p_augru in further selection queries..
    i have tried reading gs_list table but its not working.

    Move the portion of function call 'VRM_SET_VALUES' to event  at selection-screen on value-request for P_AUGRU. Rest is OK...
    I mean, Your code should be like this.
    AT SELECTION-SCREEN OUTPUT.
    PERFORM f_f4help_values.
    FORM f_f4help_values.
    REFRESH: gt_tvaut,
             gs_list.
    CLEAR: gs_tvau,
           gs_value.
    SELECT spras
           augru
           bezei
           FROM tvaut
           INTO TABLE gt_tvaut
           WHERE spras EQ sy-langu.
    IF NOT gt_tvaut[] IS INITIAL.
      LOOP AT gt_tvaut INTO gs_tvau.
        gs_value-key = sy-tabix.
        CONCATENATE gs_tvau-augru
                    gs_tvau-bezei
               INTO gs_value-text
        SEPARATED BY space.
        APPEND gs_value TO gs_list.
      ENDLOOP.
    ENDIF.
    ENDFORM.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_AUGRU.
    PERFORM f_f4help.
    FORM f_f4help
    param = 'P_AUGRU'.
    CALL FUNCTION 'VRM_SET_VALUES'
      EXPORTING
        id              = param
        values          = gs_list
      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.
    ENDFORM.
    Rgds,
    Birendra

  • How to specify the value help list of a variable?

    Hi Gurus
       My requirement is like this. The query has at least two fields( manager and employee). A group of employees belong to a certain manager. When an employee is going to run the query, he will fill an employee number into a variable so that the information of the employee will be displayed in the query. My question is that is it possible to display all the employees of the same manager when the user trys the value help of the variable? Right now, the list of all employees will be displayed. I just want the ID list of employees of the same manager will be displayed.
    for example:  here is the data
    manager              employee
      A                          101
      A                          102
      A                          103
      B                           104
      C                           105
      C                           106
      C                           107
    IF user 105 runs the query and he clicks on the value help button of the varibale, only 105, 106, 107 will be displayed for him to choose instead of list of all employees.
    if is possible? how to? thanks

    Hi Stephen Xue,
    I think it can be done through Compounding option in the maintenance of the characteristics. Make the Manager as the compounding attribute of Employee. I am not sure about it, but have a try on it.
    Hope it helps.
    Veerendra.

  • How to capture the multiple value in list box

    Hi forums,
           How to select the multiple values in list box and how to catch that values in OnInputProcessing.
    Regards,
    Ravi.

    Hi,
    A possible method is:
    Get all fields of the form
        CALL METHOD request->get_form_fields
          CHANGING
            fields = table_fields.
    loop over the fields
        LOOP AT table_fields INTO wa_fields.
    test the name of the field
          CASE wa_fields-name.
            WHEN 'test'.
    retrieve the value of the field
              test = wa_fields-value.
    endcase
    endloop.
    Eddy

  • How to increase the width of the drop down list box in SSRS multi value parameter

    Hi,
    I am using SSRS 2012. I have a parameter, which accepts multi value.
    The width of the drop down list box is very small, and the user need to scroll to the right to view the complete view of the content in the list box. But, if I don't use multi value then the length is good.  Kindly suggest how to I increase the width
    of the list box when it set to multi value parameter.
    Thanks in advance,
    Mahalengam Arumugam

    Hi Mahalengam,
    After testing the issue in my local environment, I can reproduce it. When the values for a single parameter are too long, the drop-down list of the parameter will automatically enlarge to an appropriate size. While the values for a multiple parameter are
    too long, we need to scroll to the right to view the complete view of the content in the list box in SSRS 2008. But in SSRS 2008R2 and SSRS 2012, we can directly drag the black control at the bottom of the list box to control the size.
    The following screenshot is for your reference:
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support
    Hi Katherine,
    Thanks for your reply. I understood we need to drag the list box to a maximum size to view the contents.
    But, this seems an additional task, i know this is a limitation in the current version of SSRS and hope it will be resolved in the next versions.
    Thanks for your efforts,
    Mahalengam Arumugam

  • 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 get the value entered in input enabled field of a list output?

    Hi all,
    I am developing a program to display  list with two input enabled fields . After users enetered the values into these fields I need to do some calculations based on these values and modify the value of another field in the list.
    But i couldn't have an idea how to read the values after users enter into these fields.
    Please help me on solving this problem?  If possible please provide the sample code.
    Thanks,
    Aravind.

    You can enable disable screen fields in at selection screen output event.
    And by using loop at screen.
    And for changing the values you can do in initialization event.
    I Hope you are doing these in Reports.

  • How to compare the values stored in the list

    Hi,
    I am having the requirement that i want to compare the values stored in the list.How to store the values in the list and compare the list values stored inside it.
    Regards,
    Ahamad

    http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collections.html#sort(java.util.List)
    http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collections.html#sort(java.util.List,%20java.util.Comparator)
    http://java.sun.com/j2se/1.5.0/docs/api/java/util/Comparator.html
    http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Comparable.html

  • How to insert data to the specified row column of the multi column list box

    Hi All
    How do i insert data into the specified column of the multi cplumn list box?
    I have a table that containsall station nos and name.Then another table contains the data the various stations having at  for 24 hrs.That is 12 am to 11 pm.
    And i want to display each stations details as follows using a multi column list box/table
    My stationinfo table
    stnno   stnname......................
    s1           stn1
    s2            stn2
    s3             stn3
    The other table
    stnno      sysdatetime       data
    s1             12am                   1
    s2              12am                   4
    s1               1  am                 2
    So the station s1,s2.... will have data for 24 hrs.
    And i want to display it as follows using a multicolumn listbox
    stnname        12am   1 am ......................................11pm
    s1                   ...................
    s2                 ........................
    What i have in my  mind is to get all station nos
    and in a for loop get the station's data from 12 am to 11 pm
    or
    select every statios data for each hor.But in this case i have to query the database 24 times.So i dont think its a good way.
    Or any other better query available?
    Can anybody suggest me a good idea?
    One more thing...how to insert data into the specified field row or column of a multi column list box?
    Thanks in advance

    hi
    i want to know,,can u say ur need clearly...and i attached two image u see that one
    Indrajit
    | [email protected] | [email protected] .
    Attachments:
    station.JPG ‏35 KB
    station2.JPG ‏79 KB

  • How to trace the value passed by select list

    Hi,
    Is it possible to know what value is passed by the select list.
    eg:
    :p1_testid -- is the select list name .
    if select list contains 3 values ... value1, value2, and value3. and I select value2 from the select list.
    I want to confirm it that the value I selected is the same value passed to the query.
    - select * from Test where Testid=:p1_testid;
    How to trace the value of :p1_testid before query execution.
    Thanks.

    check your session state to see what value the select list has..
    From developer tools at bottom of running page, select session, then look for the value associated with your select list..
    Thank you,
    Tony Miller
    UTMB/EHN

  • Filling a multi-column list box with a query

    Hi folks!
    I'm really very unexperienced with Oracle Forms so I wasn't able to implement the following problem. I have got a database table called 'employees' with the columns 'id', 'firstname', 'lastname'. In my form I would like to have a listbox containing all the entries of this table (based on a select ... from employee) but with only 2 visible columns (firstname and lastname).
    My first question is, how to fill the list with the values from the query. The second question is, when the user selects an entry of the list (an employee), how can I get the ID of this employee?
    I hope you can help me!
    Thanx in advice
    Ingo

    A list item can have only two columns - one shown to the user and one invisible one which actually populates the item. In order to display your names you need to concatenate them into one.
    Create a record group with the query:
    select firstname||' '||lastname, id from employees
    then in a suitable trigger (eg when-new-form-instance)
    call POPULATE_LIST(list, recordgroup)

  • How to get the values from popup window to mainwindow

    HI all,
       I want to get the details from popup window.
          i have three input fields and one search button in my main window. when i click search button it should display popup window.whenever i click on selected row of the popup window table ,values should be visible in my main window input fields.(normal tables)
       now i am able to display popup window with values.How to get the values from popup window now.
       I can anybody explain me clearly.
    Thanks&Regards
    kranthi

    Hi Kranthi,
    Every webdynpro component has a global controller called the component controller which is visible to all other controllers within the component.So whenever you want to share some data in between 2 different views you can just make it a point to use the component controller's context for the same. For your requirement (within your popups view context) you will have have to copy the component controllers context to your view. You then will have to (programmatically) fill this context with your desired data in this popup view. You can then be able to read this context from whichever view you want. I hope that this would have made it clear for you. Am also giving you an [example|http://****************/Tutorials/WebDynproABAP/Modalbox/page1.htm] which you can go through which would give you a perfect understanding of all this. In this example the user has an input field in the main view. The user enters a customer number & presses on a pushbutton. The corresponding sales orders are then displayed in a popup window for the user. The user can then select any sales order & press on a button in the popup. These values would then get copied to the table in the main view.
    Regards,
    Uday

  • How to get the value from databank

    Hi,
    How to get the value from databank? and how to set the same value to visual script object?
    thanks,
    ra

    Hi,
    You can use GetDatabankValue(HeaderName, Value) to get the value from databank and SetDataBankValue(HeaderName, Value) to set the value to databank.
    You can refer to the API Reference to see list of associated functions and techniques we can use with related to Data Bank.
    This is the for OFT but if you are using Open Script then you have direct access for getting the databank value but when it comes to setting a value you have to use File operation and write you own methods to do the set operation.
    Thanks
    Edited by: Openscript User 100 on Nov 13, 2009 7:01 AM

  • How to get the values from html:select? tag..?

    i tried with this, but its not working...
    <html:select styleClass="text" name="querydefs" property="shortcut"
                 onchange="retrieveOptions()" styleId="firstBox" indexed="true">
    <html:options collection="advanced.choices" property="shortcut" labelProperty="label" />
    </html:select>
                        <td align="left" class="rowcolor1">
                        <script language="javascript" type="text/javascript">
                              function retrieveOptions(){
                             var sel = document.querydefs.options;
                             var selectedOption = sel[sel.selectedIndex].value;
                             document.write(selectedOption);
                           </script>

    <td align="left" class="rowcolor1">
                        <script language="javascript" type="text/javascript">
                              function retrieveOptions(){
                             var sel = document.querydefs.options;
                             var selectedOption = sel[sel.selectedIndex].value;
                             document.write(selectedOption);
                           </script>This java script is not working at all..its not printing anything in document.write();
    This is code..
    <td class="rowcolor1" width="20%">
    <html:select styleClass="text" name="querydefs" property="shortcut"
                             onchange="retrieveSecondOptions()" styleId="firstBox"
                             indexed="true">
                             <html:options collection="advanced.choices" property="shortcut"
                                  labelProperty="label"  />
                        </html:select>i tried with this also. but no use..i'm not the getting the seleced option...
    function retrieveOptions(){
    firstBox = document.getElementById('firstBox');
                             if(firstBox.selectedIndex==0){
          return;
        selectedOption = firstBox.options[firstBox.selectedIndex].value;
    }actually , how to get the values from <html:select> ...?
    my idea is to know which value is selected from the combo box(<html:select> ) if that value is equal some string i have enable a hyperlink to open a popup window

Maybe you are looking for

  • How to run a command line for every folder in a share

    I'm trying to use Robocopy to merge two user home directories shares from two different servers to a new server, but the only problem is that I can't use the /purge to mirror deletes because it will delete the other servers stuff (since one server's

  • Error when starting After Effects CC / Trying to install AMM

    I keep getting an error saying that my Application Manager is missing or damaged whenever I run AE. This is more of an AMM problem than an AE one I think, because I have had this problem before but I was always able to fix it when I reinstalled the A

  • Please please plese help me

    can somebody please help me, ive had a blackberry today and loved it. someone i was speaking to told me to download the new messenger and i did but now its gone :-( ive reinstalled a few times with no luck and have tried to reinstall via the net and

  • How to redefine the "AltGr"-Key in Beehive Conferencing

    Hi @all, I have a weird problem with beehive Conferencing. If I'm the presentator and want to type for example an "@"-sign (or "{","[","]","}","~","|"), I have to press the "AltGr" (or "Ctrl+Alt") on my german keyboard to get this. But if I do that t

  • PC users can't leave comments on my blog.

    Mac users can leave comments without an issue. PC users get to the comment screen, type the captcha, and nothing happens. Have tried it myself on 2 PCs and had same issue. Any advice?