Date and Salary validation at EO level.

Hi All,
I have two fields Salary and Date both are present at EO level
I need to write a validation that if the date of birth entered on UI is more than 50 years as of today then salary should not be less than 5000
Ex: if date entered is 02-02-1961 and salary entered is 4500 then it should throw an error message on click of the button.
There are many custom validations at eo level but exactly where should this be done.
Thanks,
Arun

Thanks All ... Actually i have binded the UI fields and in the bean i have written the following code and calling it on click of a button and its working... Anyhow i will try the other options also such as using groovy and writing the code in eoimpl provided in this thread .... The code which i have written is as follows but is it the right approach please let me know
public void comm() {
oracle.jbo.domain.Number s = (oracle.jbo.domain.Number)sal.getValue();
oracle.jbo.domain.Date ds = (oracle.jbo.domain.Date)dob.getValue();
java.util.Date sa = convertDomainDateToUtilDate(ds);
System.out.println("The dob is "+sa);
Calendar cl = Calendar.getInstance();
cl.setTime(new java.util.Date());
cl.add(Calendar.YEAR, -50);
java.util.Date toDate = cl.getTime();
System.out.println("The 50 years before date is "+toDate);
if ( sa.before(toDate) && s.intValue() < 5000) {
FacesMessage msg =
new FacesMessage(FacesMessage.FACES_MESSAGES,
"sal should be more than 5000");
FacesContext context = FacesContext.getCurrentInstance();
context.addMessage(null, msg);
} else {
invokeEL("#{bindings.Commit.execute}");
public static java.util.Date convertDomainDateToUtilDate(oracle.jbo.domain.Date domainDate) {
java.util.Date date = null;
if (domainDate != null) {
java.sql.Date sqldate = domainDate.dateValue();
date = new Date(sqldate.getTime());
return date;
Thanks,
Arun

Similar Messages

  • Date and Time validation together...

    Hi,
    I want to have the date and time validation together. Is it posible?
    I am not able to do it using "AT SELECTION-SCREEN".
    e.g.
    DATE1 - DATE2 is 12/22/2009 - 05/27/2010
    TIME1 - TIME2 is 15:00:00 - 01:00:00
    This will result in error because the time1 is more than time2 but it is correct when it is tied to date1.
    I tries to validate them together but it gives the standard error all the time.
    Please help me.
    Thank you.

    Hi,
    You could have a normal range for your date field and two parameters for the times...no?
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) ttime FOR FIELD p_time1.
    PARAMETERS: p_time1 type t.
    SELECTION-SCREEN COMMENT 54(2) tto FOR FIELD p_time2.
    SELECTION-SCREEN POSITION 60.
    PARAMETERS: p_time2 TYPE t.
    SELECTION-SCREEN END OF LINE.
    INITIALIZATION.
       ttime = 'Time'.
       tto = 'to'.
    Kr,
    Manu.

  • Planned order creation with PDS valid on only order start date and not finish date

    Hi All,
    We have requirement to allow creation of planned order manually if production version is valid on order start date and not finish date.  This is because lead time of order is longer. I refered OSS notes 385602. I could find out solution for this is implementation of OSS note 694140 to change validity mode at activity level to consider start date of first produce activity  in validity interval. Problem is even If I create order in APO by implementiong this note planned order is not transfered to ECC and it gets stuck with error production version not valid.
    Is there any way in ECC to control this? Any config or customization?
    Regards,
    Santosh

    Nilesh,
    I think there is a simple procedural skip happening in your business process. You are right when a planned order is created after MRP it would default assign it to the first available production version. 2options available for us,
    1. First use transaction MF50 and do the line loading and assign the quantites to the production versions/Production lines, so that the actual capacity planning is getting completed. This way you can have planned orders with both the production versions and matching to your actual line capacity.
    2. Use Quota arrangement concept, to automatically split the Planned orders during MRP for a percentage based on individual production versions.
    Now when backflush is performed S225 table is updated and Planned order qty also gets reduced.
    Hope this helps....
    Regards,
    Prasobh

  • Business rules and validation at view level?

    Hello,
    I was hoping to be able to do attribute validation at view level but I could not find this option and I would need to help to determine how to achieve this.
    I have a view based on several entities. That view include a updatable entity and others read only entities.
    Basically I have a season entity/ table and a dateRange Entity/table. The model is that dateRange is a child of Season ( a season can have several dataranges...).
    I need a validation rule to fire when users change the dateRange in the UI, I have to make sure that the date range attributes from and to are in the range of the season definition (season table has two attributes: starting date and ending date). So I would like to verify that
    daterange.from > season.startingdate and daterange.to < Season.endingdate and daterange.from < daterange.to
    Can I do that in some way? I don't how to resolve this at the entity level. the entity does not know about other entities, here I need a validation of the transaction by checking serveral entities.
    Thank you very much for your help

    You can do this programatically.
    Check out [url http://download.oracle.com/docs/cd/E21764_01/web.1111/b31974/bcrules.htm#sm0241]this part of the docs (and the surrounding chapter as well)
    John

  • Navigational Attribute data is not display in Cube level and reporting

    Hello ALL
    Iam facing a problem like,I created Navigational attribute and I selected that navigational attribute in cube level also but data is not display in cube level.
    What will be the problem?Pl help me out.
    regards
    balaji

    Hi Dinesh
    You mean base characteristic means loading data after creating Navigational attribute?Is it this way,(orelse can u tell me about this base characterstic)
    Yes after making that particular attribute as a navigational attribute I loaded data in master data tables.
    How to run Attribute change run?can u give me steps
    regards
    balaji

  • Delivery Block at PGI level based on GI date and Month end date

    Business need a check on delivery processing based on the Planned GI date, Month end date and transit period. This transit period is a custom field and dependent on customer. Also it is not maintained anywhere in system. Business store it in some excel format.
    The logic needed is: For any given month, the delivery order MUST be goods issued in the same month, i.e. once the order is delivered, the Post goods issue should ONLY be allowed if and only if , the PLANNED GI date ( as maintained in delivery ) + transit time ( at customer level ), falls within the month end date. If not, a block should be applied at PGI and only authorized personnel should be able to release that block.
    Also, there will be no check at invoicing VF01 level. Once the PGI blocked is removed, there will be no check on invoicing. The month end date may vary month to month and need to in combination of Sales Org / Plant as mentioned
    In addition, the business need an exception report where the information of releasing the block should appear for release date, user id of the responsible person, time sales order no etc. and it should be downloadable.
    We can have a custom table to maintain the month end day in given combination.
    But I need your expert inputs as-
    1-     Can we add this transit period in at customer master data as it is dependent on customer and there are huge no of customers for the sales unit? If not, then how to maintain it; may be a z table?
    2-     Based on this logic, what should the code/logic to be written for block at PGI.
    3-     How to control the authority check for removing the block.
    4-     The source fields for exception report.
    Pls revert accordingly.
    Many thanks in advance.

    Hello,
    Please refere the answers to your questions:
    1- Can we add this transit period in at customer master data as it is dependent on customer and there are huge no of customers for the sales unit? If not, then how to maintain it; may be a z table?
    You can either use some un-used Feild in Customer Master or maintain a Z-Table. I believe maintaining a Z-Table would be easy as you have huge number of Customers. You can also write a dmall program to Pick the Customer-wise transit dates from a excel file & store in Z-Table.
    2- Based on this logic, what should the code/logic to be written for block at PGI.
    You have explained the requirement well in your thread, you need to explain the same to your ABAPer & Basis person & they would do the needful.
    3- How to control the authority check for removing the block.
    Basis person would create & assign a Z-Authorization object which the ABAPer would use in his program.
    4- The source fields for exception report.
    Once you do the above development, your ABAPer will easily pick the required feild in Report as he has already used all the feilds somewhere in his development.
    Hope this helps,
    Thanks,
    Jignesh Mehta

  • Validation Script for Dates and General Event Questions

    I have just started using Javascript, and am now using some objects and methods etc. that I did not even know about. It's progressing rather well, now I need to know some Livecycle Designer Basics that I can't seem to answer from my searches.
    Here's what I am trying to do in English:
    I want users to choose a date that they will miss at our Farmers Market. I have the date field on the form - works well.
    I want to validate the entry for:
    The date must be today or in the future
    AND
    The date must be before the closing date
    AND
    The date must be a Saturday
    Here's some script I've written and placed in the Validation Event (I have actually written more for testing out that the results are coming out properly):
    ----- form1.#subform[0].Missdate::validate - (JavaScript, client) ----------------------------------
    var entereddate = this.rawValue;// The date vendor will not attend as entered on the form
    var dentry = new Date(entereddate.slice(0,4),[entereddate.slice(5,7)-1],entereddate.slice(8,10),0,0,0); // month starts at 0!
    var closingdate = "October 04,2008" // closing date of the market
    var today = Date();// today
    (dentry.getDay() = 6);// and attempt to validate that the day = Saturday - nothing happens!
    But now -
    How do I actually validate this - my last statement seems to be ignored. How to I force a 'false' being returned? In Formcalc I simply put a camparison statement here and if it resulted in 'False' validation failed and if it resulted in 'True' it passed - What's the JS equivalent? Or are the variables giving me troubles?
    Maybe I'm putting this in the wrong Event? If so which one should I place it in.
    I want to force the user to enter the correct data - how do I code this - and put in a custom message refering to this. I may even get fancy and ask the user if the next Saturday is what they meant if they enter the incorrect one (this will be a real challenge!)
    I think I'm lacking some basic knowledge here that other posts have assumed. Please refer me to any help pages as well - although I've done extensive searching on this and have not really found a good explanation of Validation - only specific pages that are not basic or general enough for my understanding. Thank!

    In the validation script you have to allow the field's length to be 0, or
    it will not be possible to clear it...

  • Date and Time Input Validation

    Anyone know a good way to validate date and time that a user is entering on the screen.  Our users want to enter AM and PM time vs. Military time. 
    Also, since Input fields don't have an "onBlur" command, what are other companies using in java script.

    What type of DATE/TIME validation are you looking for?
    If you want to validate the format you could simply set the type to date/time and enable the dovalidate attribute to "TRUE".
    for getting onBlur, onChange, etc for your input field you can use bsp:findandreplace.
       <%
      tmp_string =`<input onBlur="javascript:yourjsfunction();"`.
          %>
          <bsp:findAndReplace find    = "<input"
                              replace = "<%= tmp_string %>" >
            <htmlb:inputField id        = "myInputField2"
                              value     = "12345"
                              alignment = "left" />
          </bsp:findAndReplace>
    (courtesy Ulli Hoffmann)
    Hope this helps.
    Regards
    Raja

  • Plan assignment and equipment validity date

    My user has added a new piece of equipment with a valid from date of 4/15/2008 -- he also did the same thing for the equipment task list key date.  But when he went to start his plan, we wants to use a start date for 3/15/2008 -- I have told them to be careful when they add equipment because the valid from date is very important -- he should have put an older valid from date to do what he needs to do.  How can I fix this?
    Edited by: Isabelle Britten on Apr 17, 2008 10:01 AM

    hI Carlo,
                  I guess there should not be any problem as far as ur maintenance frequency is more than 1 month. The Key date and validity will be checked only if ur call object ( Maintenance order or Notification ) comes between 15/03/2008 to 15/04/2008, If ur maintenance order doesnt comes between above dates you shouldnt hv peoblem in assigning the start up date 15/03 for the plan.
            If ur Maintenance cycle frequency is less than one month then either introduce offset to hv first call object after 15/04/2008 or Use Functionality Start in Cycle.
              Try this you should not hv any problem.
    narendra

  • The filter expression is on external data and could not be validated.

    The filter expression is on external data and could not be validated. It may not be supported in Web browser forms.
    I am reciveing this error in my infopath 2010 browser form when I am trying to filter a drop down list from sharepoint.
    I thought filters were available on infopath 2010 browser forms or are they only available from values inside the form?
    I did have a look around the forums but only could find this error occuring during beta stage.
    Thanks

    Ok, so you shouldn't be filtering in the form, because that means it downloads the entire list first and then filters out the items.  That's client-side filtering.  What you want to do is server-side filtering by doing a parameterized query.
    Set the data connection NOT to automatically download
    Add Form Load rules that do the following:
    First, "Set a Field's Value" and set the position query node of the data connection to the value of "manager" (whatever the exact syntax is)
    Then query the data connection
    Doind this should make it ONLY download items where position=manager instead of downloading all items and filtering.  This is a much better practice and was not even available in 2007, so you should make full use of it in 2010.  Even so, what you
    were doing should have worked anyway, so I'm not sure what's going on there.
    When you do the filtered dropdown, your Source field should be the repeating group of the data connection, not the property itself.  The property should only be selected in Value and DisplayName.  The group should be in the Source field, and THAT'S
    where you apply the filter.
    SharePoint Architect || Microsoft MVP ||
    My Blog
    Planet Technologies ||
    SharePoint Task Force

  • Document level Data and Item level data

    Hi,
    Can anyone please explain the difference between Document level data and Item level data for sales order.
    Thanks
    shalini

    Item is the lowest level detail of the order. For ex it would be a particular material. Document would be the overall "top" level. Usually refered to as header level. It relates to everything in the document. 
    pts appreciated

  • Why should we load header data first and then we load item level data?

    Hi BW guru`s,
    I have small confusion about the data loading.
    Why should we load header data first and then we load item level data?
    Is there any particular reason?
    Scenario: 1st I have uploaded 2LIS_11_VAHDR sales document header data from R/3 to BW by using LO-Cockpit extraction. Then I loaded 2LIS_11_VAITM.This is the norma procedure which we use to follow.
    I have a question. If I load 2LIS_11_VAITM data 1st from R/3 to BW and then I will load 2LIS_11_VAHDR by using LO-Cockpit extraction. what will happen?
    Regards,
    Venkat
    Edited by: VENKAT BOORUGADDA on Aug 12, 2008 11:51 AM

    There is no difference in doing it the other way.
    The load sequence will come into play only during activation where if you map the same fields from the two datasources, you might want to have the previous value overwritten by data from the next datasource.
    That is when you should care about loading one datasource before the other.
    To your question it is not arule that header data should come first.

  • What is Header level data and item level data? Please elaborate.

    What is Header level data and item level data? Please elaborate.
    Details:
    EKKO is Purchasing Document Header; what is purchasing Document Header? who,what and where can i look for this data.
    EKPO is Purchasing Document Item; what is Purchasing document item means?
    what is item level data means?
    When you take the Senario of SRM and ECC; where the purchase data is maintained primarily in SRM or ECC?
    Thanks in advance. I will assign the points only to the valuable information.
    York.

    Hi York,
       You are right in stating EKKO as header and EKPO as line item data. They are maintained in ECC.
    Now for the details about the data:
    In SAP every transaction is referred to as a document. In this case you are talking about a purchase document. Now what does purchaing document contain? I will contain information like: Who is the vendor? When was the transaction done? what was bought? What is the quantity of each item bought?
      Whatever is applicable across the document is called header data... and what is applicable for each item is called line item data. In this case
    1. Header data would be the vendor, date of transaction, purchaing organization ... etc.
    2. Line item data would be the item details, the quantity of the item, the unit price of each item ...etc.
    Hope this helps.
    Best regards,
    Kazmi

  • Valid Feed wrong date and missing episod

    Hi there! I've uploaded my update feed but iTunes doesn't catch it.
    This is my feed, the validator said it's correct.
    http://www.riccidj.com/podcast/podcast.xml
    This is my podcast page
    http://itunes.apple.com/it/podcast/jacopo-riccis-podcast/id513921187?l=en
    The problem is that the dates are incorrect, in fact in the feed the first episode was published on 1 April but on podcast page it says 31 March but in iTunes it's correct. The second episode is shown in the podcast page as uploaded 30 April when in the feed is published 1 May and in iTunes it doesn't show. Can you help me?

    The date difference is normally caused by being in a different timezone from the feed (which gives the date and time in CEST). It happens quite a lot and I wouldn't worry about it.
    More seriously, your feed is not readable and cannot be subscribed to. You have numerous instances of ampersands (&) which can mess up a feed as they indicate the beginning of a code sequence which is never completed.
    Oddly enough both episodes appear in the Store OK but cannot be subscribed to: evidently the Store's software can cope with this but iTunes itself cannot.
    The best solution is to go through the feed changing every ampersand to the word 'and'.
    Incidentally your category - 'music' - should have a capital M - 'Music' - to be correct.

  • Data flow task error failed validation and return validation status "VS_NEEDSNEWMETADATA"

    I have ETL with ~800 tables that I moving from Oracle to SQL Server (Prod Oracle -> Prod SQL)
    Now the Oracle/SQL new version was came from vendor that I need to test, and for that I created new DEV environments for Oracle and SQL , the update includes updated new columns in exists tables and new tables . (DEV Oracle -> DEV SQL)
    So what I tried to do is to take the old ETL(PROD) to change the connection to DEV servers.
    Then I executing the packages from local laptop it's working, and if I trying to execute the packages from job schedule it's giving me errors : "Data flow task error failed validation and return validation status "VS_NEEDSNEWMETADATA"
    I went to each table to check the columns if something different, and I was dropping some of the tables and recreated them in the destination but the error still shows. I also tried to change the package to "DelayValidation" to True but without
    success.

    I do not understand the difference between "... if I going to change the Connection Manager to new connection" and "didn't change the Connection Manager, only changed inside the Server name / user/ pass" 800 tables.
    What I see is some tables your packages sees in Dev (laptop) is not of the same schema once the package is deployed hence the metadata error.
    Arthur
    MyBlog
    Twitter

Maybe you are looking for