DropDown List issue in saving user entered custom value to dropdown : WDJ

Hi Experts,
I have a dropdown list that is say prepopulated with 2 values, by clicking "allow custom entry" I can enable the user to type in a value if he doesnt want to choose from existing options.
I am trying to add the user entered value to the dropdown list by using the "addItem()" script appropriately.
Issue is that though the new value is getting saved, once the users saves and closes the form, opens again and adds a new user entered value then this new value overwrites the previously entered custom value.
I see that the user entered value doesnt get bound to the dropdown.
I have bound this dropdown field to an appropriate web dynpro java context attribute.
Please provide any solutions if known!
I am using NWDS 7.0.14, ALD 7.1 and Reader 8.1
Thanks,
Lisha

Closing the post.

Similar Messages

  • How to show an error if the user enters a value which is not in the dropdown of a form

    Hi All,
    I have attached the screenshot below and if we look at the field for claimnumber we have a dropdown which can help the users pick the available claimnumbers, but if someone accidentally types in a claimnumber that is not in the system( which doesnt show
    up in the dropdown) the form is accepting that claimnumbers too, but i want to have a error or warning window popup saying that this claimnumber is not valid or something.
    Can someone please help me with this?
    Thanks.

    Open the form in design view.
    Select the Combo Box.
    Set its Limit to List property to Yes.
    If the user types a value that does not occur in the list, Access will display a standard error message:
    If you want to display a custom message, you can write code in the On Not in List
    event of the combo box:
    Private Sub ClaimNumber_NotInList(NewData As String, Response As Integer)
    ' Undo the incorrect item
    Me.ClaimNumber.Undo
    ' Display a custom error message
    MsgBox "Please select a claim number from the list!", vbExclamation
    ' Tell Access not to display the built-in message
    Response = acDataErrContinue
    End Sub
    where ClaimNumber is the name of the combo box.
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • Dropdown lists or F4 (input help) on custom field

    I created a custom field and would like to either add a dropdown or an F4 input help.  I know how to do the input help  or the dropdown, but I would like the user to type in their own data on the field if they don't want to select from the list provided.
    Does anyone know how to do this.

    Check out this code.... This module does F4 help for a screen field called P_TRFAR.   It gets its values from the data base,  you could easily build this internal table in your program without going to the database.
    MODULE HELP_ON_TRFAR.
    data: begin of help_trfar occurs 0,
           trfar type t510a-trfar,
           tartx type t510a-tartx,
          end of help_trfar.
      select * into corresponding fields of table help_trfar
                  from t510a
                        where molga = '10'.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
           exporting
                retfield    = 'TRFAR'
                dynprofield = 'P_TRFAR'
                dynpprog    = sy-cprog
                dynpnr      = sy-dynnr
                value_org   = 'S'
           tables
                value_tab   = help_trfar.
    ENDMODULE.
    In you flow logic, you need the following line to trigger the help when the user presses F4.
    PROCESS ON VALUE-REQUEST.
      FIELD P_TRFAR MODULE HELP_TRFAR.
    That should be all you need.
    Please don't forget to award points accordingly for helpful answers.  Thanks.
    Regards,
    Rich Heilman
    Message was edited by: Rich Heilman

  • Look-up name value from XML file based on user entered number value

    My form has an "Employee Number" numeric field and an "Employee Name" textfield. I want the user to enter their employee number and have JavaScript that will "look-up" that employee number in the XML data file and return the corresponding Employee Name into the employee name textfield. I need an example XML data file and form with the appropriate script.
    Can anyone help me with this?

    Hi ,
    Re-read your post, find that the col2 in List1 is people and group type column, SharePoint Lookup type column showing additional fileds option does not support people and group type column, so there should be no OOB method to achieve your
    goal.
    http://techtrainingnotes.blogspot.com/2012/01/sharepoint-not-all-column-types-can-be.html
    I think you can try using InfoPath form to manipulate the correspond col2 value when lookup col1 from List1 then show in list view, or may use custom visual web part to achieve you goal.
    http://sharepointsolutions.com/sharepoint-help/blog/2011/11/get-infopath-to-display-lookup-column-value-not-id/
    Thanks
    Daniel Yang
    TechNet Community Support

  • How to customize the XML file name from user entered field value when submitting

    How can I customize the name of an HTTP submitted XML file from data entered by the user in a text field?
    The field in question contains user identification information and would ease the sorting of files received for easy identification.
    Thank you,

    How can I customize the name of an HTTP submitted XML file from data entered by the user in a text field?
    The field in question contains user identification information and would ease the sorting of files received for easy identification.
    Thank you,

  • How can a user enter a value in the field which is in read mode.

    Hi all,
          I am creating a badi for the valuation class.when ever i execute the mm02 transaction.if an invalid valuation class is entered,my error message is poping up.but it is coming in the display mode.i should get the valuation class field in the read mode.
    Regards,
    charita.

    Hi Charita,
    Use information message instead of Error message.Then it will not give u that field in non-editable mode.
    <b>Reward points if it solves ur query or answer is helpful</b>
    Thanks
    Chinmay

  • Dropdown list dynamic domain Display Settings contains no values

    Hi,
    I want to create a dynamic domain on a viewobject (RefCodesByDomain), which is not based on an entity object.
    When I test my bc4j-service everything works as expected.
    The view object has a key attribute.
    In the Application Definition Editor I am able to create a dynamic domain with the data-collection of RefCodesByDomain1 but I cannot select any attributes in the "Display Settings"-section.
    Can you give me some advise on this matter?
    Regards,
    Romano

    Steven,
    I rebuild the project. I think it has something to do with importing business components.
    What I did is the folowing:
    1. In a existing project I extended the default base-classes to create our own layer
    2. created a project called ModelShared
    2a. configured the project to use the base-classes I created in step 1
    2b. created an entitybased-viewobject (RefCodesByDomain)
    2c. created bc deployment-descriptors
    3. created a project called RelatieModel in the same workspace as ModelShared
    3a. added dependencies to the deployment-descriptors as well as the project created in step 2
    3b. configured the project to use the base-classes I created in step 1
    3c. imported business components
    Although I did not recieve any errors during the import of business components, I am unable to add the vo (RefCodesByDomain) to a service.
    I do see the package which contains the vo but is has no entries.
    Importing the business components to a new BC Project in a seperate workspace did succeed (I could reuse the vo).
    I tested a little further and the folowing occurred:
    4. I created a new vo in the ModelShared Project
    5. I deployed the ModelShared
    6. Restarted JDeveloper
    7. Got the folowing error message in the console window when expanding a service in my datacontrol pallette:
    INFO: oracle.adf.share.config.ADFConfigFactory No META-INF/adf-config.xml found
    1-sep-2008 13:23:27 oracle.adf.dt.controls.DataControlsTreeWillExpandListener treeWillExpand
    FINER: THROW
    java.lang.NullPointerException
            at oracle.adf.dt.objects.JUDTViewReferenceAccessorDefinition.init(JUDTViewReferenceAccessorDefinition.java:108)
            at oracle.adf.dt.objects.JUDTViewReferenceAccessorDefinition.<init>(JUDTViewReferenceAccessorDefinition.java:98)
            at oracle.adfdt.internal.meta.bc4j.BC4JDataControlDefinition.createViewObjectDefinition(BC4JDataControlDefinitio
    n.java:228)
            at oracle.adfdt.internal.meta.bc4j.BC4JDataControlDefinition.addViewObjects(BC4JDataControlDefinition.java:208)
            at oracle.adfdt.internal.meta.bc4j.BC4JDataControlDefinition.loadStructure(BC4JDataControlDefinition.java:110)
            at oracle.adfdt.internal.meta.bc4j.BC4JDataControlDefinition.getStructure(BC4JDataControlDefinition.java:407)
            at oracle.adf.dt.controls.treemodel.jsr227.JSR227DataControlTreeNode.loadChildNodes(JSR227DataControlTreeNode.ja
    va:129)
            at oracle.adf.dt.controls.DataControlsTreeWillExpandListener.treeWillExpand(DataControlsTreeWillExpandListener.j
    ava:32)
            at javax.swing.JTree.fireTreeWillExpand(JTree.java:2302)
            at javax.swing.JTree.setExpandedState(JTree.java:3000)
            at javax.swing.JTree.expandPath(JTree.java:1742)
            at javax.swing.plaf.basic.BasicTreeUI.toggleExpandState(BasicTreeUI.java:2189)
            at javax.swing.plaf.basic.BasicTreeUI.handleExpandControlClick(BasicTreeUI.java:2176)
            at javax.swing.plaf.basic.BasicTreeUI.checkForClickInExpandControl(BasicTreeUI.java:2130)
            at com.jgoodies.looks.plastic.PlasticTreeUI.access$801(Unknown Source)
            at com.jgoodies.looks.plastic.PlasticTreeUI$MouseHandler.mousePressed(Unknown Source)
            at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:222)
            at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221)
            at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221)
            at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221)
            at java.awt.Component.processMouseEvent(Component.java:5485)
            at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
            at java.awt.Component.processEvent(Component.java:5253)
            at java.awt.Container.processEvent(Container.java:1966)
            at java.awt.Component.dispatchEventImpl(Component.java:3955)
            at java.awt.Container.dispatchEventImpl(Container.java:2024)
            at java.awt.Component.dispatchEvent(Component.java:3803)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3889)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
            at java.awt.Container.dispatchEventImpl(Container.java:2010)
            at java.awt.Window.dispatchEventImpl(Window.java:1774)
            at java.awt.Component.dispatchEvent(Component.java:3803)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    java.lang.NullPointerException
            at oracle.adf.dt.objects.JUDTViewReferenceAccessorDefinition.init(JUDTViewReferenceAccessorDefinition.java:108)
            at oracle.adf.dt.objects.JUDTViewReferenceAccessorDefinition.<init>(JUDTViewReferenceAccessorDefinition.java:98)
            at oracle.adfdt.internal.meta.bc4j.BC4JDataControlDefinition.createViewObjectDefinition(BC4JDataControlDefinitio
    n.java:228)
            at oracle.adfdt.internal.meta.bc4j.BC4JDataControlDefinition.addViewObjects(BC4JDataControlDefinition.java:208)
            at oracle.adfdt.internal.meta.bc4j.BC4JDataControlDefinition.loadStructure(BC4JDataControlDefinition.java:110)
            at oracle.adfdt.internal.meta.bc4j.BC4JDataControlDefinition.getStructure(BC4JDataControlDefinition.java:407)
            at oracle.adf.dt.controls.treemodel.jsr227.JSR227DataControlTreeNode.loadChildNodes(JSR227DataControlTreeNode.ja
    va:129)
            at oracle.adf.dt.controls.DataControlsTreeWillExpandListener.treeWillExpand(DataControlsTreeWillExpandListener.j
    ava:32)
            at javax.swing.JTree.fireTreeWillExpand(JTree.java:2302)
            at javax.swing.JTree.setExpandedState(JTree.java:3000)
            at javax.swing.JTree.expandPath(JTree.java:1742)
            at javax.swing.plaf.basic.BasicTreeUI.toggleExpandState(BasicTreeUI.java:2189)
            at javax.swing.plaf.basic.BasicTreeUI.handleExpandControlClick(BasicTreeUI.java:2176)
            at javax.swing.plaf.basic.BasicTreeUI.checkForClickInExpandControl(BasicTreeUI.java:2130)
            at com.jgoodies.looks.plastic.PlasticTreeUI.access$801(Unknown Source)
            at com.jgoodies.looks.plastic.PlasticTreeUI$MouseHandler.mousePressed(Unknown Source)
            at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:222)
            at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221)
            at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221)
            at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221)
            at java.awt.Component.processMouseEvent(Component.java:5485)
            at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
            at java.awt.Component.processEvent(Component.java:5253)
            at java.awt.Container.processEvent(Container.java:1966)
            at java.awt.Component.dispatchEventImpl(Component.java:3955)
            at java.awt.Container.dispatchEventImpl(Container.java:2024)
            at java.awt.Component.dispatchEvent(Component.java:3803)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3889)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
            at java.awt.Container.dispatchEventImpl(Container.java:2010)
            at java.awt.Window.dispatchEventImpl(Window.java:1774)
            at java.awt.Component.dispatchEvent(Component.java:3803)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)8. In my other "fresh" bc project I was able to use the newly created vo.
    Do you have any suggestions?
    Regards,
    Romano

  • How to restrict a user typing a custom value in the dDocAccount field.

    I have dDocAccount field drop down pre-populated with 2 values - Dept1, Dept2. However, user can able to type any other values (say Dept3) in the account text box and checkin a doc from WCC UI. How to restrict user from entering custom values?
    As an alternate solution - for time being i have the above account field is set as hidden using rule. I am trying to derive the account value from another one field's value (say Departments field with values Dept1, Dept2). I tried below code and found working:
    Department is a custom field created as option list with values Dept1, Dept2
    Under the Rules, for the field dDocAccount, is derived field checked and added below code
    <$dprDerivedValue=#active.xDepartment, getValue("#local","dOption")$>

    Hi,
    If Department is a custom metadata then you should access it like xDepartment(as any other custom metadata), not dDepartment.
    I know it is also possible to change the HTML that is generated for the dDocAccount field, to add javascript validation and so on, maybe this approach plus some additional JS and HTML twists and you should get it working(via component development).
    Hope it helps,
    Vlad

  • 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

  • Use of Validation tab in Dropdown list properties

    Hi All,
    I have created input form  with 2 dropdown fields and submit button. While clicking submit button i need a  message if dropdown lists are not selected. So that I have entered one condtion in validation tab in dropdown list properties. But this validation is not working while clicking submit button.
    Can you please guide how to use validation in VC?
    Thanks,
    Venkatesh R

    Hi
    'Validation Tab' is use to validate the values for that UI control. In case of 'Dropdown list' it is used to show invalid values in perticular cases. Example -
    1. You have dropdown list on 'Country' & it is based on fiscal year input.
    then
    If fiscal year is 2008 values should be X, Y & Z. If value apart from this its invalid. You can configure this with the formula in 'Validation Tab' & if user selects the value apart from theses, system will through the error message as you have set.
    Please also look at the link below -
    http://help.sap.com/saphelp_nw04s/helpdata/en/47/7a46502823199ae10000000a42189d/frameset.htm
    I hope this is what you were looking for, if you want anything else please let me know.
    Regards
    Sandeep

  • Personalization-Set Portal Theme dropdown list

    Hi SAP Experts,
    I have Assigned a personalize role which consists of Portal Theme page.
    I have to add a List of customized themes in the "Set Portal Theme dropdown list".
    Currently only one theme is getting displyed (one which is currently assigned to the user).
    Please provide me with the steps of how to achieve the same.
    Many thanks in advance.
    Regards,
    Disha.

    Thank you Prashant and Ameya for your quick reply.
    Dear Ameya...I tried the steps mentioned by you but only the default theme is getting displayed.
    The scenario here is that there are 15 users.
    I have assigned a customised theme to all of them.
    The client wants a list of different themes to be displayed in the Dropdown list.
    When the user selects a theme from the list of different themes in the dropdown, will the theme be assigned to the user automatically?? for example how it happens in Gmail, yahoo,etc.
    If not then please guide me in the same.
    Awaiting your response.
    Thanks in Advance,
    Disha.

  • How can I use a Dropdown list in a table col and only get the choosen key?

    hi!
    I have chosen Cell editor = Dropdown for two of the columns in my WD table  (ordinary Table not ALV) .
    When the table is displayed the first time this looks OK, but if a user selects a value from the dropdown list, both the key and the explanation text is copied into the cell, and the cell column is automatically widened. I want to copy the key value only, and not the connected text. How is this possible?
    I started setting the table as fixed and setting the width on the column, but this was a puzzle I gave up since there are quite a lot of columns.
    regards, Tine

    Well , the problem is that in the dropdown list I want to see both the key value and the text, like you do in SAP GUI. Fex. if I would like to create a dropdown for langauges, factory calendar or countries, I want to see both the country code (the key) and the name of the country in the dropdown list, and then when user choose a line I would only like to see the keyvalue in the input field.  Right now I concatenate the key and the text into the 'value' in the valueset table.
    In some cases the user knows the key value better than the explanational text, and then it is good to show both values. But sInce I would like to save space in the table displayed in the view I only want to show the key values selected in the table (ex. NO if user choose Norway) .
    But maybe it is better to create this kind of input help as an OVS with no input fields .?

  • Dependency DropDown List for Multiple Rows in Offline Interactive Form

    Hi I have 2 drop down lists.. in one dropdown list I have "Billable" and "Non Billable" , in second Dropdown list we will have Binding values with "Billable".... when we select "Billable" I need to get the data in Second Dropdown list from Database, and when we Select "Non Billable" then Dropdownlist should become a Inputfield (i.e Dropdown should turn to textfield)...and this should happen for each and every row....based on Index value....help me on this.....

    Hi,
    You can create one input text field and make it visible when a user choses non billable option in dropdown 1, using -
    <this>.presence = "visible";
    when billable is chosen from dropdown 1, I can think of two ways.
    - Since you have binding 'billable' options with second dropdown, make it visible when billabile option is chosen.
    - you can also populate the second dropdown using javascript (something like dependent dropdowns) when billable option is chosen.
    if ( this.rawValue == 'billable' )
         seconddropdown =  xfa.resolveNodes("xfa.record.ITAB.DATA[ *]");
         for ( var k = 0; k < seconddropdown.length ; k++)
          <your path>.addItem(seconddropdown.item(j).fieldname.value,seconddropdown.item(j).fieldname.value );   (to populate second dropdown)
    Regards, Liz

  • 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

  • Javascript needed - need checkbox to check automatically based on selected item from dropdown list

    I am building a fillable form.  In this form, I have created items in a dropdown list.  Based on the item picked from the dropdown list, I need a corresponding checkbox to be checked.  I am certain there is an easy javascript to resolve my current problem.  Please assist.
    For example: dropdown list field (SubSupplier1) -   Demolition                            export value 2
                                                                                    Rough Carpentry Labor       export value 4
                                                                                    Rough Carpentry Material    export value 3
    I need the corresponding checkbox (SalesTax1) to automatically be checked when Demolition (export value 2) or Rough Carpentry Material (export value 3) is selected.
    Thank you,
    Jennifer

    Hi Jennifer,
    This should help you do what you need. Place it in the Custom Calculation property of the dropbox and select "commit selected value immediately" in the fields options:
    var drop = this.getField("SubSupplier1");
    var check = this.getField("SalesTax1");
    if ((drop.value == 2) || (drop.value == 3)){
    check.checkThisBox(0,true);
    else {
    check.checkThisBox(0,false);
    The code is asking if the export value of the field is either '2' or '3' and if so, check the box.
    Otherwise uncheck the box.
    If you don't want it to uncheck on other selections, remove the 'else' section of code.

Maybe you are looking for