Validation for DropDown Box

hi,
I want to do validation for dropdownbox. What I have done:
public void checkSelected(java.string.fieldName)
  Print Message from Message Pool.
onActionsubmit()
checkSelected(IPrivateView.IMaritalStatusElement.Value)
checkSelected(IPrivateView.IBloodGroupElement.Value)
How can I pass node dynamically so that this single method"checkSelected" works for two DropDownbox?
Please help me...
Regards
Manish

Hi,
use as follows
public void validate(IWDNode node, String attrName)
        // To access a value
        node.getCurrentElement().getAttributeValue(attrName);
        //To get attrinfo
     node.getNodeInfo().getAttribute(attrName);
invoke the above function
validate(<YourNode>,<Your Attribute part of 1param node>);
Regards
Ayyapparaj

Similar Messages

  • SAP MDG - How to activate user settings for Dropdown box Change request?

    Hello Expert,
    I have a question related to Hide DropDown Box Change request.
    When i save change request via collective processing, Change request Dropdown box is displayed. When, i select Change request dropdown list, only change request description is displayed,  not change request number.
    So how to activate access key from user settting ? Could you show me the menu path in order to activate it?
    Best regards,
    RAOELISON

    This is a generic Web Dynpro question and not specific to MDG. Any way, this is how you can do it:
    Right-click the field
    Select: Use Settings --> More
    Check the "Key Visible" checkbox
    Keep in mind this is a user-specific setting and not a global setting.

  • On change event for dropdown box

    Hello,
    we have created view using EEWB as assignmentment block with some fields as dropdown.
    I want to change the dropdown values from second dropdown depend upon the first dropdown value.
    there no event firing on chaging the values from first dropdown list.
    I checked all methods do_handle_event, do_prepare_output and all setter methods including the set/get_v_struct. but still no luck.
    does anybody having any idea,  how to raise the event on value change from the first dropdown list.
    thanks
    Tim

    Hello Tim,
    And in GET_V of the attribute serving as dropdown you defined an event?
    * Set the type of the field:  dropdown menu
       CASE iv_property.
        WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.
          rv_value = cl_bsp_dlc_view_descriptor=>field_type_picklist.
        WHEN if_bsp_wd_model_setter_getter=>fp_onclick.
          rv_value = 'select'.
      ENDCASE.
    Best Regards,
    Yevgen

  • Transparent Fill for Dropdown Box

    I've made a javascript to change the fill color of a drop down box depending on what is selected. Everything is working as expected except that I can't find how to fill it with a transparent/no fill color. I've found very discouraging info about being able to do this online, but the box starts as transparent (imported the document from a preexising pdf that has the box background at no fill) so I'm hoping that it is still possible. Using CS3, any help is greatly appreciated.

    Code example below. The "1" value is what the box starts at with a transparant/no fill and what I want to change back to that transparent/no fill when selected.
    var vName = this.somExpression;
    var fieldObj = xfa.resolveNode(vName + ".ui.#choiceList.border.fill.color");
    if (this.rawValue == "1") {
         fieldObj.value = "255,255,255";
    else if (this.rawValue == "2") {
         fieldObj.value = "255,255,255";
    else if (this.rawValue == "3") {
         fieldObj.value = "250,250,0";
    else if (this.rawValue == "4") {
         fieldObj.value = "0,145,0";
    else if (this.rawValue == "5") {
         fieldObj.value = "205,0,0";
    else if (this.rawValue == "6") {
         fieldObj.value = "90,90,90";
    else if (this.rawValue == "7") {
         fieldObj.value = "25,25,25";
    else {fieldObj.value = "0,0,0";

  • How to set initial value for a dropdown box?

    Hi,
    Within Netweaver 2004S (BI 7.0) we use integrated planning. In one of our applications we want to use a dropdown box (created with the WAD) to make a selection possible for a characteristic.
    We set up a pre-query to fill the dropdown box (via data binding CHARACTERISTIC_SELECTION) with the proper values. This works fine.
    We pass on the choosen entry (via command SET_VARIABLES_STATE) to a second variable that is used in another query. This command is triggered after the user makes a selection in the dropdown box. Also this works fine. After selection of one entry, the output of the second query is limited.
    We have the following problem: the first time a blank selection entry is added to the dropdownbox and that no values are passed on to the second query. Because it seems that the user first must choose an entry.
    What we would like to do is that one of the found values of the pre-query is automatically selected in the dropdown box and passed on to the second variable (to limit the second query).
    I give you an example:
    The first query delivers value A, B, and C for the characteristic of the dropdown box.
    The first time the dropdown box showns an empty entry, and three additional entries A, B and C. The second query shows all results, because the second variable doesn't receive any value via the command SET_VARIABLES_STATE. The command is not yet triggered.
    When you select A, B or C, the command is triggered and the second query shows only results for the choosen entry (this is correct). Now the empty entry has disappeared from the dropdown box. Only the entries A, B and C are left.
    Is it possible to set up the dropdown box on such a way (or add some script coding around it) that in the initial show for the dropdown box one of the entries is choosen automatically, so that the empty line is not part of the value set of the dropdown box and that the command connected to the dropdown box (in our case the SET_VARIABLES_STATE) is carried out automatically?
    Please, who can help us with this?
    Kind regards and thanks in advance,
    Marcel.

    Hi,
    In BW 3.5,say you want to set default for calmonth.
    In order to avoid the “ALL” option from appearing in the dropdown box,
    filter infobject 0CALMONTH for DP1 by any valid value.
    In the object Data_provider include the lines in Bold:
    <object>
    <param name="OWNER" value="SAP_BW"/>
    <param name="CMD" value="SET_DATA_PROVIDER"/>
    <param name="NAME" value="DP1"/>
    <param name="QUERY" value="WORKSHOP_CALMONTH_DROPDOWN"/>
    <param name="INFOCUBE" value="0D_SD_C03"/>
    <<b>param name="FILTER_IOBJNM" value="0CALMONTH"/>
    <param name="FILTER_VALUE" value="200401"/></b>
    DATA_PROVIDER: DP1
    </object>
    Hope this helps.
    Anu.

  • Filling the Sales Order Header - Source for filling the dropdown boxes

    Hi,
    I am trying to design the User Interface for Creation of sales order using the WebDynpro's. I want to know, what are all those BAPI's i need to use to fill the following drop down boxes.
    1. Order Type
    2. Sales Organization
    3. Distribution Channel
    4. Division
    As i am new to ABAP., and i am from Java background, i dont know much about the BAPIs used to get the above data.
    Could anyone let me know the source to fill those dropdown boxes. Thanks in advance.
    Thanks,
    Raghavendra

    Ah,my bad.
    Hmmm,i haven't found a BAPI's for filling all your dropdown-boxes with the valid values.
    What about using the FM "RFC_READ_TABLE" to read the values for your drowdown-boxes.(only if you don't want to write a Z*-Function).
    For examlpe for the dropdownbox "Sales Orgs",you can can start this FM for the table TVKOT.
    Is that a possilbe solution for you?
    Greetings
    Frank Brackmann

  • Initial value for a dropdown box

    Hello all,
    I have created a web template in the WAD (BI 70) with a dropdown box on a characteristic. A chart is displayed based on the query result. My query is built on an infoset.
    My problem is to populate the filter with an initial value and still let users change the characteristic value in the dropdown (all values for the characteristic is not acceptable in the context) . Also, I don't want the variable screen to show up.
    What is the best approach to achieve this?
    Thanks,
    JL

    In Query Designer you put in your default value in the area to the right in the first pane..
    If you put it on the left hand side, the filter will not be changeable.
    Hope this helps.
    Can give more presise answer if you need it.

  • Dropdown box for SAP provided Adobe Form is not populating

    Hi experts,
    I am new to Adobe Interactive Forms. Right now we are using Standard Adobe form for the (PCR) Special Payment. But the drop down box for 'Reason for spl. Payment' is not getting populated. We have defined Reason for special payments in IMG. Also the form 'ISR_FORM_SPSP' has been converted to 'ZCI' format.
    Can you please let me know is there anything else I have to configure?
    Thanks in advance,
    Phani

    Hi Antony,
    Thank you for the reply. As I said I am using the Standard Adobe form provided by SAP (Special Payment) 'ISR_FORM_SPSP'. On another note ..I am also using the form for Changing working time 'ISR_FORM_SPWT' where the dropdown box for the 'new working time' is getting populated properly. I am new to Interactive Adobe Form so I really don't know where I can find the backend code for this form.
    When I go to trasaction 'SFP' I could only see form and the interface being used. Is there a specific BADI that I need to look in? Where can I find the script for the Dropdown UI element.
    Please let me know
    Thanks
    Phani

  • Dropdown box not showing up for field w/attached search help

    Hi.  I've created a search help for a data element and I know that the search help is working on the selection screen. 
    The search help values come up if I hit F4 but when I click into the field on the selection screen no drop-down box appears to the right of it (so the users don't know that a search help is even available).
    Has anyone seen this before?

    Hi Rich,
    I tried closing all sessions and re-logging in.  That did not work.
    I also tried regenerating the program.  That did not work.  Very odd.
    F4 works on the field, just no dropdown box! 
    We're running 640.

  • I have a Belgian Apple ID, but want to use the UK i-tunes store.  I get a dialogue box saying "The Apple ID is only valid for purchases in The Belgian iTunes store".  Is there any way around this?  Thanks, Jackie

    I have a Belgian Apple ID, but want to use the UK i-tunes store.  I get a dialogue box saying "This Apple ID is only valid for purchases in the Belgian itune store".  Is there any way around this?  Thanks, Jackie and Manuel

    When you move to Portugal (very nice, I've just come back from visiting Cascais/Sintra/Sines ) I think you'll just get re-directed to Portuguese iTunes. When I moved to France from the UK  I got re-directed to the French store.
    To view UK programmes in France I used to subscribe to a VPN server through https://www.my-private-network.co.uk/ (there are others, but very pleased with their service). The catch-up channels (iPlayer, etc) think you're in the UK so you can watch the programmes online. Wouldn't work with iTunes UK store though .

  • How can i add multiple validations for a single input box in adf?

    hi,
    i want to add multiple validation for a single input text control in adf like number validation and its existence in database.
    MY JDEV VERSION IS 11.1.1.5.0
    pls help !!!!

    Hi,
    1.I want to validate if the value entered is pure integer
    Option 1-
    select the component and in the Property Inspector, in the "Core" category select a "Converter" format, select javax.faces.Number, if the user put a string, adf show a dialog error or message error...
    Option 2-
    or use the Regular expression:-
    http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_validateRegExp.html
    https://blogs.oracle.com/shay/entry/regular_expression_validation
    Also check this:-
    http://docs.oracle.com/cd/E15523_01/web.1111/b31973/af_validate.htm#BABHAHEI
    Option 3-
    Frank in his great book 'Oracle Fusion Developer Guide' shows a example using a javascript for input which is allowed only for numbers. You can manipulate for your requirement.
    Here is the code:
    function filterForNumbers(evt) {
        //get ADF Faces event source, InputText.js
        var inputField = evt.getSource();
        var oldValue = inputField.getValue();
        var ignoredControlKeys = new Array(AdfKeyStroke.BACKSPACE_KEY, AdfKeyStroke.TAB_KEY, AdfKeyStroke.ARROWLEFT_KEY, AdfKeyStroke.ARROWRIGHT_KEY, AdfKeyStroke.ESC_KEY, AdfKeyStroke.ENTER_KEY, AdfKeyStroke.DELETE_KEY);
        //define the key range to exclude from field input
        var minNumberKeyCode = 48;
        var maxNumberKeyCode = 57;
        var minNumberPadKeyCode = 96;
        var maxNumberPadKeyCode = 105;
        //key pressed by the user
        var keyCodePressed = evt.getKeyCode();
        //if it is a control key, don't suppress it
        var ignoreKey = false;
        for (keyPos in ignoredControlKeys) {
            if (keyCodePressed == ignoredControlKeys[keyPos]) {
                ignoreKey = true;
                break;
        //return if key should be ignored
        if (ignoreKey == true) {
            return true;
        //filter keyboard input
        if (keyCodePressed < minNumberKeyCode || keyCodePressed > maxNumberPadKeyCode) {
            //set value back to previous value
            inputField.setValue(oldValue);
            //no need for the event to propagate to the server, so cancel
            //it
            evt.cancel();
            return true;
        if (keyCodePressed > maxNumberKeyCode && keyCodePressed < minNumberPadKeyCode) {
            //set value back to previous value
            inputField.setValue(oldValue);
            evt.cancel();
            return true;
    2.I want to check if the value exists in my respective DB You must be having EO or VO if you want to validate with database in that case use the solution suggested by Timo.
    Thanks
    --NavinK                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How can I validate a dropdown box to NOT accept the default value?

    I have a fillable form where I need the user to select their "Number of Employees". I have added several ranges as their options in a dropdown box (1-10, 11-25, 26-50, 50+). My issue is the "defult value" is set to "1-10" and people submit it without changing it to the correct value.
    I have changed the default value to "--Select One--", but it still lets them submit the form with that value entered.
    I am assuming I need some sort of validation script that will basically say - "If the value in this field is --Select One-- do not submit the form, but give an error that says 'please select your number of employees" or something along those lines.
    Basically I just want them to pick something as opposed to just submiting it with the default value.
    I have looked all over and am not very good with JS.

    You can not have the default value set to a real possible value. You need a value that should be selected.
    Then for your submit script you need to test all of your required fields to make sure they are not at the default value.
    You make a variable that assumes all the required fields are completed and then check each field and if any one still has the default value you set your variable to "false" and then when you have checked all the fields you test your variable's value and only if it is true to you submit the form.
    var bSumbit = ture; // logical variable for submission test
    // test drop down # of employess
    this.getField("Number of Employees".).required = false; // clear required property
    if(this.getField("Number of Employees".).value == "--Select One--") {
    bSubmit = false;
    this.getField("Number of Employees".).required = true; // set required property
    if(bSubmit) {
    // your submit acation;
    } else {
    app.alert("Not all required fields properly completed", 0, 1);

  • JS Validation for Drop down List is not working in Oracle PL/SQL Package

    Hi All,
    I am facing an issue with JavaScript validation done in Oracle PL SQL package.
    System Requirement:
    There is one screen which contains two fields viz. FLD 1 & FLD 2 and one 'Submit' button.
    FLD 1 and FLD 2 fields are drop down list boxes.These are mandatory fields.
    The screen is developed in Oracle Mod PL SQL package.
    The html coding and java scripting are embedded in the respective Oracle PL SQL Package procedure which generates this screen,takes the input values provided by user,does the
    field validations and submits the form.
    Issue:
    The javascript validation for FLD 2 dropdown is working successfully.
    When the user leaves this field as blank,the embedded javascript pops up an error message 'Selection of FLD 2 is manadatory before submitting the form!'.
    As FLD 1 is also a mandatory field,the javascripting validation should pop up the similar error message 'Selection of FLD 1 is manadatory before submitting the form!'.
    But,this first field validation is not at all working.
    The system allows to submit the form even if the 'FLD 1' is left blank.
    The javascript code sysntax for validation of FLD 1 & FLD 2 drop down list boxes as follows:
    function validate_form_fields()
    if (document.forms[0].p_fld_1.selectedIndex == 0))) || (document.forms
    [0].p_fld_1.selectedIndex < 1 )
    alert("Selection of FLD 1 is manadatory before submitting the form!!!");
    return false;
    else if (document.forms[0].p_fld_2.selectedIndex == 0))) || (document.forms
    [0].p_fld_2.selectedIndex < 1 )
    alert("Selection of FLD 2 is manadatory before submitting the form!!!");
    return false;
    return true;
    I am viewing the screen from the web browser IE version 8.0.
    Your timely help will really be appreciated.
    Regards & Thanking in advance,
    Alka

    Hi,
    1. Your problem is actually related to JavaScript, not SQL and PL/SQL. So, this is the wrong forum to post. The closest to JS is the Application Express forum {forum:id=137}. Clearly state that it is not an Apex issue and that you are looking for JS help.
    2. Your JS code, the way you has posted it, is syntactically incorrect, so if you post on Apex forum put the correct code and in tags as described in the FAQ
    {quote}
    function validate_form_fields()
    if (document.forms[0].p_fld_1.selectedIndex == 0))) || (document.forms
    [0].p_fld_1.selectedIndex < 1 )
    alert("Selection of FLD 1 is manadatory before submitting the form!!!");
    return false;
    else if (document.forms[0].p_fld_2.selectedIndex == 0))) || (document.forms
    [0].p_fld_2.selectedIndex < 1 )
    alert("Selection of FLD 2 is manadatory before submitting the form!!!");
    return false;
    return true;
    {quote}
    Regards,                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Getting error "this serial number is not valid for Premier Elements 12"

    My old computer crashed big time and I'm trying to install Elements 12 on a new computer.  Installed ok and when trying to register it, I'm getting the error message "This serial number is not valid for Premier Elements 12."  Didn't install Premier Elements 12, just Elements 12.  Unable to get any assistance yet from Adobe support, hope to learn something here.  Thanks in advance.

    Have you activated the product previously on more than two machines? You will need to contact Adobe directly using the link below. Use the dropdown menu for boxes (1) & (2) to scroll down the list and choose:
    1. Adobe Photoshop Elements
    2. Adobe ID, and signing-in
    3. Click on the blue button: Still need help? Contact us – then click the area marked chat 24/7, then click “start chat ”
    It’s usually possible to start a live chat, if an Adobe agent is free, and often to get the problem fixed right away. Have your serial number available. The agent can directly troubleshoot your system if you agree to activate the Adobe Connect add-on.
    Click here to get help now Contact Customer Care

  • Inserting dropdown box

    Dear all,
    it is a business requirement to be able to chose between different seasons within my company. Therefore I need a dropdown box, which is "connected" to the prompt and refers on a variable (not like a usual Excel dropdown, which is more static with pre-defined selections). This means, it should be dynamic and if I change the season within the dropdown, it should also change it in the prompt and therefore change the workbook.
    As far as I know this was also possible in BEx Analyzer.
    Can anyone please give me some advice?
    Thanks in advance!
    Kind regards
    Dominik Drebinger

    Hi Dominik,
    I had a similar problem where the Finance user wanted to view their report by cost centre node without having to use the prompts screen so that the report did not have to refresh each time.
    This method allows you to refresh data only once and then you can toggle the data you want to view via the Excel list functionality.
    Hope this helps
    Using Excel Lists
    instead of SAPSetFilter Component
    Using Excel lists instead of the SAPSetFilterComponent will
    enable you to toggle your report without having to refresh your report each
    time. For example if you would like to view each of your cost centre nodes on
    one report without having to refresh.
    Step 1
    Ensure your data source includes all of the centres as a
    Column heading. Expand your centres to the correct level .
      Month Movement Current
      MTH_MOV_CUR
      [-] Customer markets
      [+] Access Points
      [+] Head Office Admin
      [+] Points of Representation
      [+] Pro-Active Sales
      [+] Suites
      1000PBB05CH003
      1000PBB06CH007
      1000PBB06CH008
      1000PBB06CH009
      1000PBB06CH010
      1000PBB06CH011
      ZAR
      ZAR
      ZAR
      ZAR
      ZAR
      ZAR
    Step 2
    In a separate sheet, create a list of cost centre nodes you
    would like to report on including their node names.
      [+] Access Points
      1000PBB06CH007
      [+] Head Office Admin
      1000PBB06CH008
      [+] Points of Representation
      1000PBB06CH009
      [+] Pro-Active Sales
      1000PBB06CH010
      [+] Suites
      1000PBB06CH011
    Step 3
    In the next column create a concatenate formula so that the
    node name can be recognised by the SAPGetData formula. =CONCATENATE("ZMIPROFIT=+",F1,"(0HIER_NODE)")
      [+] Access Points
      1000PBB06CH007
      ZMIPROFIT=+1000PBB06CH007(0HIER_NODE)
      [+] Head Office Admin
      1000PBB06CH008
      ZMIPROFIT=+1000PBB06CH008(0HIER_NODE)
      [+] Points of Representation
      1000PBB06CH009
      ZMIPROFIT=+1000PBB06CH009(0HIER_NODE)
      [+] Pro-Active Sales
      1000PBB06CH010
      ZMIPROFIT=+1000PBB06CH010(0HIER_NODE)
      [+] Suites
      1000PBB06CH011
      ZMIPROFIT=+1000PBB06CH011(0HIER_NODE)
    Step 4
    On the face of your report create a drop down list in Cell
    A1. On the MS Excel Ribbon select Data, Then select data validation.
    In the allow box select list and choose the list you created
    in Step 2 as the Source.
    Your List will look like this
    Step 5
    In the cell next to your list (cell A2), create a vlookup to
    find the cell that you created in Step 3.
    =VLOOKUP(D1,Parameters!$A$15:$c$19,3,FALSE)
    Step 6
    Now reference the vlooked up cell (Cell A2) you created in
    Step 5 in your SAPGetData formula and lock the cell using as follows ,$A$2. If
    you have referenced your measure type, and GL account (Please refer to manual
    on referencing your own you can drag the formula across your report.
    SAPGetData("DS_1",D$4,$B8,$A$2)

Maybe you are looking for

  • Transaction BORGR: No tolerance on goods receipt for Kanban calloff

    Hello, we have the following situation: - MM scheduling agreement with tolerance of 10% for under and overdelivery, production supply "summarized JIT call" is set. - KANBAN cycle has 1 empty container with a summarized JIT call for replenishment, qua

  • Po Qty

    Hi,      is there any provision in po where i can see the total of all the quantities and values that i have entered. example: material          QTY              Price ABC                20                 10 xyz                 13                  2

  • Error when trying to create a JCO Destination

    Hi I receives the following error when trying to creat a JCO Destination, clicking on the button in the host:port/webdynpro/dispatcher/sap.com/tcwdtools/Explorer I get the following error: Error stacktrace: java.lang.NullPointerException      at com.

  • Maximum file-size for HR EIC emails

    Hi folks We currently use EIC in ERP, and have an issue with sending large emails/attachments as the maximum file-size appears to be only 2MB. This is set in the IMG activity Employee Interaction Center (EIC) -> Interaction Center Web-Client -> Commu

  • Integrated Planning object issue - ALVL

    Hello, We just installed NW04s. I'm trying to evaluate Integrated Planning for a new project. I am able to login to the modeler and select my Infoprovider. However when I click on the Aggregation level tab and try to create the level I receive the er