Validating input variables

hi, this may sound like a dumb question, but i have a small program for booking hypothetical swimming lessons, the input is obtained from a bunch of textfields, i was wondering for validation purposes, how one can check the user has entered valid data to go into the variables, e.g. if they put a String in a field which is going to be put into an integer variable, what can i do to check whether it is an integer before putting it into the variable and crashing the program?
thanks
maqk

"How to Use Text Fields"
http://java.sun.com/docs/books/tutorial/uiswing/components/textfield.html
Read the above link and read the link on JFormattedTextField which in turn has a link on using InputVerifiers. Determine which approach is best for you.

Similar Messages

  • Ready for Input Variables for Multiple Queries in I_T_VAR_RANGE

    Hi
    I created Web template which contains multiple views/queries. Two views/queries contain Ready for Input Variables. I have custeomer exit code for this Web template. I wrote code by using Ready for input variable which pass to customer exit code. But the variables which contain in two views/queries not appearing in I_T_VAR_RANGE. The two variables belongs to different views and I required those variables. please find below code:
        WHEN 'ZVBCUST'.
          LOOP AT i_t_var_range INTO w_var_range WHERE vnam = 'ZVAR1'. 
            g_soldto = w_var_range-low.
          ENDLOOP.
          LOOP AT i_t_var_range INTO w_var_range WHERE vnam = 'ZVAR2'
            g_zvbsshto = w_var_range-vnam.
            g_shipto = w_var_range-low.
          ENDLOOP.
    The above 'ZVAR1' is ready for input variable which belongs to one Query and below 'ZVAR2' is other ready for input variable which belongs to second query. I required these two at a time when customer exit variable 'ZVBCUST' executes.
    But in I_T_VAR_RANGE only one variable appears when I execute Web Template . Kindly help me in this regard
    Thanks
    luci

    Hi,
    First thing is to how you have defined your variable such as
    Customer exit or
    Replacement path or
    Manual input etc..
    If you want your variable filled through the exit select Customer Exit, then you have to look at the variable options such as Single value or range. According to your definition you have code as you defined such as wa_range-opt = 'BT' or 'EQ'.
    Next..
    In CMOD -> your project -> EXIT_SAPLRRS0_001 -> include 'ZXRSRU01' ->
    ISTEP = 1 -> before the variable pop up will be filled by the exit
    when 'your variable'
    your code
    ISTEP = 2 -> after the variable pop up i.e after running your selections, calculates the values for your variables after selection screen execution.
    when 'your varaible'
    your code
    ISTEP = 3 -> Validation purpose and message handling purpose
    when 'your variable'
    your code

  • PartnerLink Input Variable initialization error for xsd:any datatype

    I have a web service which use the xsd:any for the message type( segment of the wsdl given below):
    - <message name="post_ps_apg_services0Request">
    <part name="fa_form" type="**xsd:any**" />
    </message>
    <portType name="ps_services_wsPortType">
    - <operation name="post_ps_apg_services">
    <input name="post_ps_apg_services0Request" message="tns:post_ps_apg_services0Request" />
    <output name="post_ps_apg_services0Response" message="tns:post_ps_apg_services0Response" />
    </operation>
    <binding name="ps_services_wsBinding" type="tns:ps_services_wsPortType">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
    - <operation name="post_ps_apg_services">
    <soap:operation soapAction="" style="rpc" />
    - <input name="post_ps_apg_services0Request">
    <soap:body use="literal" namespace="ps_services_ws" />
    </input>
    - <output name="post_ps_apg_services0Response">
    <soap:body use="literal" namespace="ps_services_ws" />
    </output>
    </operation>
    <service name="ps_services_ws">
    - <port name="ps_services_wsPort" binding="tns:ps_services_wsBinding">
    <soap:address location="http://spider.apollogrp.edu:4400/sst/runtime.asvc/ps_services" />
    </port>
    </service>
    I have created a Partnerlink Invoke_ps_apg_services with Input Variable 'Invoke_ps_apg_services_post_ps_apg_services_InputVariable'.
    During Compilation of the process I get the following exception:
    Error: Couldn't initialize variable.
    Error occurred while initializing BPEL variable "Invoke_ps_apg_services_post_ps_apg_services_InputVariable" at line 51, the schema processor could not find type "{http://www.w3.org/2001/XMLSchema}any" for part "fa_form", in the following schemas:
    Schema 0 ---> namespace=http://edu.apollogrp.ws.ps_services/Ips_services_ws.xsd
    location=file:/C:/BPELProjects/FAPP/FAPP_PS_Service/bpel/PostFAFormsPSSchema.xsd.__OAUX_GENXSD_.TOP.XSD
    Schema 1 ---> namespace=http://xmlns.oracle.com/pcbpel/adapter/jms/
    location=file:/C:/BPELProjects/FAPP/FAPP_PS_Service/bpel/jmsAdapterInboundHeader.wsdl.__OAUX_GENXSD_.TOP.XSD
    Schema 2 ---> namespace=null
    location=file:/C:/BPELProjects/FAPP/FAPP_PS_Service/bpel/FAPPService.wsdl.__OAUX_GENXSD_.TOP.XSD
    Please make sure that the type "{http://www.w3.org/2001/XMLSchema}any" is valid in your wsdl.
    Has anyone have seen this error ? What is the fix/workaround ?
    Thanks in advance

    The "any" type is not defined in the standard http://www.w3.org/2001/XMLSchema namespace. Try changing the type name to "anyType" and it should not give that error anymore.
    The valid types defined under that namespace are located at [http://www.w3.org/TR/xmlschema-2/#built-in-datatypes|http://www.w3.org/TR/xmlschema-2/#built-in-datatypes].

  • Validating BEx Variables

    Hi All:
    I have created two optional/ready for input variables - one is for cost center values and the other is for nodes of the cost center hierarchy.  I want to make sure that the user populates one of the two variables.  For this reason, I cannot make them both required.
    I was planning on checking the values in program ZXRSRU01 when I_STEP = 3 and displaying a message if the user left them both blank.  The problem is, blank variables are not included in I_T_VAR_RANGE, thus they can't be checked.
    I have no problem validating variables that have been filled, but can anyone suggest a way to validate those that are optional and left blank?
    Thanks,
    Kerry

    u should be able to do that.
    check for one variable at a time.
    if that is initial check for other.
    it should wrk

  • Anding of the Input Variables in a BEx Query

    Hello,
    I have following scenario: If the report is executed by user1, then one set of shipto's should be visible (also if that user enters a valid shipto, then only that should be visible) AND if the report is executed by user2, then any shipto's should be visible.
    If I take two input variables for Shipto, one of them I give to user for input and the other I populate in the exits (I_Step = 1) by checking the user type and populate the 2nd input variable accordindgly then the list of shipto's for that user is given.
    The PROBLEM occurs when the user also enters a Shipto, then the Output shows: List of Shipto's derived thru the exit plus the ones that user has entered, WHEREAS it should be that if the user has entered a Shipto then only that should be visible, i.e. it should be an 'AND' operation not 'OR' between two variables.
    I hope this can be achieved by some way. If you have an idea about the same, it will be of Great Help.
    Many thanks for your help.
    Best Regards,
    Sumita

    Hi Sumita,
    I think concept Valueset can be used here.
    You define your values of "shipto" for user in a table and than accordingly you can use this in BEx.
    I will see if I can find some more solutions.
    Hope this helps.
    Regards,
    Ashish

  • Restrict values on web template input variable

    Hi WAD and Bex Experts,
    I'm trying to reduce the numbers of valid values when I press the match code in the input variable in a web template.
    In the same time I would like to increase the maximum numbers of valid values
    Any ideas how to do it ? I checked on Bex and WAD but I can't figure out how to do it.
    I'm on a Bw 3.5 version.
    Thank you.
    Ste

    Hi Ste,
    check this:
    Displaying filter values in WEB reporting
    SAP Note Number: [587751|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bw_bex/~form/handler]
    Attributes are missing in F4 Help for characteristic values
    SAP Note Number: [562497|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bw_bex/~form/handler] 
    Regards
    Andreas

  • Error in Query input variable

    Hello Experts
    I have a query which has input variable 0I_FPER for Fiscal year period and takes interval as input.
    when i try to select values i get following error. i have tried different inputs
    "Characteristic Fiscal year/period has no master data for "003.2010" "
    I tried creating new input variables and still get same ptoblem for TO value put in.
    Please help.
    Thanks in advance
    Regards
    Sudeep

    Hi
    I am using 0FISCPER infoobject for restriction, master data table for this is T009B.
    i even tried to rebuild this using tranfer global setting s option but problem still exists.
    0FISCPER object has no SID table.
    Moreover this report work fine using RSRT but give error at inputs when i run it over web.
    I am still facing same problem
    Please help
    Regards
    Sudeep
    Edited by: Sudeep Paranjape on Dec 27, 2010 10:50 AM

  • I am facing error while running Quickpay in Fusion payroll that "The input value Periodicity is missing for element type KGOC_Unpaid_Absence_Amount. Enter a valid input value". Any idea?

    I am facing error while running Quickpay in Fusion payroll that "The input value Periodicity is missing for element type KGOC_Unpaid_Absence_Amount. Enter a valid input value". Any idea?

    This is most probably because the Periodicity input value has been configured as "Required" and no value has been input for it.
    Please enter a value and try to re-run Quick Pay.

  • Performance issues with query input variable selection in ODS

    Hi everyone
    We've upgraded from BW 3.0B to NW04s BI using SP12.
    There is a problem encountered with input variable selection. This happens regardless of using BEx (new or old 3.x) or using RSRT. When using the F4 search help (or "Select from list" in BEx context) to list possible values, this takes forever for large ODS (containing millions of records).
    Using ST01 and SM50 to trace the code in the same query, we see a difference here:
    <u>NW04s BI SQL command</u>
    SELECT                                                                               
    "P0000"."COMP_CODE" AS "0000000032" ,"T0000"."TXTMD" AS "0000000032_TXTMD"                             
    FROM                                                                               
    ( "/BI0/PCOMP_CODE" "P0000" ) LEFT OUTER JOIN "/BI0/TCOMP_CODE" "T0000" ON  "P0000"."COMP_CODE" = "T0000
      "."COMP_CODE"                                                                               
    WHERE                                                                               
    "P0000"."OBJVERS" = 'A' AND "P0000"."COMP_CODE" IN ( SELECT "O"."COMP_CODE" AS "KEY" FROM              
      "/BI0/APY_PP_C100" "O" )                                                                               
    ORDER BY                                                                               
    "P0000"."COMP_CODE" ASC#                                                                               
    <u>BW 3.0B SQL command:</u>
    SELECT ROWNUM < 500 ....
    In 3.0B, rownum is limited to 500 and this results in a speedy, though limited query. In the new NW04s BI, this renders the selection screen unusable as ABAP dumps for timing out will occur first due to the large data volume searched using sequential read.
    It will not be feasible to create indexes for every single query selection parameter (issues with oerformance when loading, space required etc.). Is there a reason why SAP seems have fallen back on a less effective code for this?
    I have tried to change the number of selected rows to <500 in BEx settings but one must reach a responsive screen in order to get to that setting and it is not always possible or saved for the next run.
    Anyone with similar experience or can provide help on this?

    here is a reason why the F4 help on ODS was faster in BW 3.x.
    In BW 3.x the ODS did not support the read mode "Only values in
    InfoProvider". So If I compare the different SQL statements I propose
    to change the F4 mode in the InfoProvider specific properties to
    "About master data". This is the fastest F4 mode.
    As an alternative you can define indexes on your ODS to speed up F4.
    So would need a non-unique index on InfoObject 0COMP_CODE in your ODS
    Check below for insights
    https://forums.sdn.sap.com/click.jspa?searchID=6224682&messageID=2841493
    Hope it Helps
    Chetan
    @CP..

  • Input Variable in BO Webi Report

    Hi,
    We have BW-Query and have defined BO Webi-Report using Universe on this query.
    When we execute BW-Query direct in BW, we can see all plants from
    master data table in the input Variable (Input help/F4).
    When we execute BO-Report in BO, it shows only plants in the input variable, for which there are transaction data
    in InfoCube. I expect here to see all plants from the master data table (like BW Query).
    Is it normal? Or is there some other issue?
    Thanks

    Hi,
    as the webi report will contain only transactional data anyway (webi MDX statement will ask for non empty records), this is the normal behavior what you are experiencing.
    What settings do you have on the infoObject, on which you have the variable set?:
    -Query Def Filter Value Selection
    -Query Execution Filter Val. Selection
    There you should be able to choose between "Only Values in InfoProvider" and "master data".
    Best regards

  • Formula variable with replacement path to another input variable

    Hi @ all,
    i have a question regarding "Formula variable with replacement path to another input variable".
    My Problem is that in selection screen and for info-fields the input variable is shown with its key and not with its description.
    Scenario:
    A formula variable (X) is used to get an input value of a characteristic variable (Y) for 0Fiscper3 to realize a IF-Then scenario.
    The formula variable (X) uses replacement path by variable (Y) replace by "key".
    In selection screen of the query variable (Y) is named with its key "ZAB_BUPE01" and not with its description " fiscal period". Same as for info-fields where the description is "ZAB_BUPE01" and not " fiscal period".
    Does anybody have a solution to display the selection variable correctly?
    Regards
    Tobias

    Issue Solved!
    The input varaible (y) for 0Fiscper3 was saved globally on the InfoProvider. This results in that the formula variable with replacement path only shows its technical name. I put the input variable in the query itself and it soved the problem. The variable is displayed with its description in selection screen.
    Regards

  • Calculations on customer exit using input variable

    hi,
    suppose i have a date input variable on my query, and i want to use the input value as an input for a calculation to be done in a different characteristic variable whose value is derived via a customer exit. how could this be done?
    as an example - i have an input date field, and say, the user enters 1/15/2005. the other characteristic variable is, for example, sales for a given date, restricted against a characteristic variable (customer exit) which should restrict the KF to say, the start of the month of the input date up to the input date (in this case, 1/1/2005 - 1/15/2005).
    thanks in advance. =)
    ryan.

    Hi Ryan,
    you have to use parameter I_STEP = 2 in your exit (IF I_STEP = 2. (...))
    This second step is called after the processing of the variable pop-up and only for those variables that are not marked as “ready for input” and are set to “mandatory variable entry”.
    Build your second variable in this way and then you can use this step to see first (pop-up) variable value.
    For details see www.service.sap.com/bw -> SAP BW InfoIndex -> Variables -> How to... Derive a Variable value from another variable 2.x (pdf).
    Hope it helps (and please don't forget to assign some points by clickin'on the yellow star to the contributors that help you !!!)
    Bye,
    Roberto

  • Invoking a LiveCycle process with multiple input variables using REST

    Hi all,
    A simple scenario brushup:
    I have an LC process that takes as input 2 parameters:
    - formID
    - formXML
    The user starts out with an empty interactive form and fills out some info in this form. In the end he/she clicks submit and now I want to invoke my process to create a flattened form from the XML just entered in the interactive form.
    The process returns a flattened form with the data merged with the XDP template referenced in formID. Simple as that.
    What I basically need is to do something similar to the following in a LiveCycle Designer Form:
    ------------------------------------Snippet from http://help.adobe.com/en_US/livecycle/10.0/ProgramLC/WS624e3cba99b79e12e69a9941333732bac8- 7fe5.html ---------------------------------------------------------------------
    <html>
    <body>
    <form name="input" action="http://localhost:9080/rest/services/RestTest3" method="post" 
             enctype="multipart/form-data">
    Doc: <input type="file" name="inDoc">
    String 1: <input type="text" name="inListOfStrings" value="hello">
    String 2: <input type="text" name="inListOfStrings" value="privet">
    <input type="submit" value="Submit"/>
    </form>
    </body>
    </html>
    ------------------------------------End snippet from http://help.adobe.com/en_US/livecycle/10.0/ProgramLC/WS624e3cba99b79e12e69a9941333732bac8- 7fe5.html ---------------------------------------------------------------------
    Now my question to you is (hope you can help out here):
    How do I invoke this process from my form using the REST endpoint - I need to specify 2 input variables for my process. One string (formID) and some xml (formXML). How is this done in Designer?
    Thanks in advance
    Kim Christensen
    Dafolo A/S
    Denmark

    Bump...
    Nobody who has an idea of how to do this?
    Thanks in advance
    Kim Christenen
    Dafolo A/S
    Denmark

  • [INS-08109] Unexpected error occurred while validating inputs at state 'get

    Facing that on a windows 2003 server on installing 11gR2 on an installed 11.1.0.6
    [INS-08109] Unexpected error occurred while validating inputs at state 'getOCMDetails'.
    that's in the first step on the installer

    Very stupid installer !
    I've omitted my email, then pressed no in the next message, it passed that step!

  • INS-08109 Unexpected error occurred while validating inputs at state nodeselection page

    Scenerio: We have 4 node 11gr2 RAC cluster and Trying to install RAC Database software only on two nodes
    Getting warning on run Installer Page INS-08109 Unexpected error occurred while validating inputs at state nodeselection page while selecting two nodes out of four and even after confirming it comes back to same screen ....
    Example ... RAC node A,B,C,D  and clusterware is up and running on all four nodes .....
    Trying to Install RAC database on node C,D ... Getting INS-08109 Unexpected error occurred  while selecting C,D  Node out of Four nodes ...A,B,C,D

    Very stupid installer !
    I've omitted my email, then pressed no in the next message, it passed that step!

Maybe you are looking for

  • My hard drive icon is gone from desk top and does not show up in spotlight or finder searches!

    Hi there recently my hard drive icon has disappeared from my Macbook Pro (10.7.4) desk top and does not show up in spotlight or finder searches! I have tried several fixes posted online for earlier operating systems with no luck. Also, when I connect

  • New User Trying To Set Up Best Backing Up Scheme

    i am trying to set up the best system to upload my photos from my camera and maintain a good backup procudure, and i am a little confused on the best way to do this. i have a new sony dsc-tx5 that i got around the same time i bought my lightroom soft

  • Issue opening pdf on mouse click

    I have build a swing app which makes search over lucene index and fetches the pdf file from derbydb saves in HDD and let me opens the pdf from the selected row. public void mouseClicked(MouseEvent e){             JTable table = (JTable)e.getSource();

  • How to set software updates back to Apples server?

    Hi, I just started using OSX Server. I will be using it to perform hundreds of netboot installs of Leopard which I have working. I also want to use it to serve software updates which I also have working on one machine using the defaults write com.app

  • DAQ Problem when migrating to LV8.0

    Hallo, I have a piece of code which was originally written with LV7.1.1. It deals with a NI6289PCI card. This code has been verified. Now I've migrated from LV7.1.1 to LV8.0 and trying to load this code returns an error. A VI called "Get Terminal nam