Data validation at the UI level

Hi
I have a requirement like i need to validate the input data at the UI level.
If the data is valid ,only then it should be allowed to be saved.
If someone knows how to do the same.
I have seen a method DO_VALIDATE_INPUT method in View controller (IMPL) class.No clue on how it is being used.
Regards
Leon

Hi Leon,
Are you talking about the Webclient as UI or something else??
There are 2 options:
1) You use the Get and Set methods of your context node attributes (The ...CN01 etc classes) (to be found under your IMPL class --> attributes TYPED_CONTEXT(...CTXT class) and in there you should have some ...CN01, CN02, etc. classes. Here are all the GET and SET methods. (you could also go via the views' attributes, this is the shortest way).
Within the Get (put the value in the model) and Set (get the value from the model)methods you could do some checks and show an error.
2) Use the Do_handle_data method of your IMPL class. Once data is entered in the screen, this method is always called when another action is performed (pressing a button). Here you can easily check the content of fields.
3) Use the Do_handle_event method of your IMPL class. This method is called when there is an event that is being triggered (save button is pressed). You can redefine this method and before really saving the data you can perform your checks.
Hope this helps.
Kind regards,
Micha

Similar Messages

  • Do validations in the page level

    Hi ,
    I want to do validate the EMAIL field in my page as unique, for that i want to do validate in the entity level or what i want do?
    i tried validations in the entity level but it is not working, how to do this .
    Thanks In Advance,
    SAN

    Sundaravaradhan,
    One more thing please make sure that you close all your threads which are resolved with the resolution.
    fnd top and java top in R12
    Error page while running sample page in OAF
    and many more
    Thanks
    --Anil
    http://oracleanil.blogspot.com

  • Validation at the network level

    Hi Experts,
             I am doing the validation for the network at the header level for the resposible cost center field.
    I am giving Prerequiest as
    Req.cost center = 'X'
    Check as
    i am not entering anything in the check condition
    Message
    I am entering the message & message type is error.
    initiation of this validation is i want to check that any value is entered in the Req.cost center field. (Making this field as a manditory).
    But after doing that it is not checking in my cj20n transaction.
    can anybody suggest me wht is the problem.
    Thanks & regards
    Raman T S

    Hi,
    In validations 'X' doesn't mean alphanumeric, it means alphabet X only. That's why system is not giving you any message.
    You need to put validation check as Resp. Cost Center <> ' '
    which means it shouldn't be blank.
    Regards,
    Harsh.

  • How to load data only at the upper level in ASO

    We are loading the Days member with values 31/30/29/28 for the top level combinations in Block storage cube using a rule file.<BR>Now we need to carry out the same thing in ASO but ASO has a constraint that we can load data only at zero level.<BR>If we do that, then data at higher levels, after aggregation is incorrect. What can be done ?

    Also possible but a little more complicated is to create a separate cube with a DayCount account and only accounts and time dimensions. The time dimension goes down to day. You load it with 1 record per day. Then, you use this cube and your original cube as source, transparent partitions to a BSO cube. <BR><BR>This way, you have no bogus "input" members anywhere. Formulas that combine DayCount with other things would be written as outline formulas in BSO, since it doesn't support MDX. If you need those to be in MDX, then this wouldn't work for you.

  • How to do data validation before the submit by email

    I am developing an offline interactive form. There is submit button inside, which should check all data and submit the form by email if checking passes.
    My problem is that I can not cancel the submit event when the checking failed.
    I use Adobe LiveCycle Designer 7.1.3284.
    If I use Email Submit Button, I can do validation in presubmit event. But I can not cancel the event. Even there is error in validation, form is submitted anyway.
    If I use normal button, I can do validation in Click event. But I can not submit form with code.
    Is there anyone who has experience on this issue?
    Best Regards,
    Jun

    in that case, you can code just one line in the change event of all fields of the form
    xfa.form.form1.....button_validation.presence = "visible"
    xfa.form.form1.....button_submit_by_email.presence = "hidden"
    After click of validate button,
    if validation is successful,
    xfa.form.form1.....button_validation.presence = "hidden"
    xfa.form.form1.....button_submit_by_email.presence = "visible"

  • Prod No validation at the field level attribute

    Hi,
    I have a qualifying table, whose field refers to one of the product number in main table. It means, I can have a product number linked to another product number defined in the main table. Hence, I have defined the text field in the qualifying table to capture this related product number.
    Now, how do I validate, if the product number entered is valid within Data Manager. Basically, it needs to validate if the product number specified is present in the main table.
    Please let me know, if any suggestions to define such validations on a free-form text field.
    Thanks,
    Surendra

    Hi Surendra,
    Make the prdt no as a unique field.If when ur gng to add any new record with the prdt no already in the main table then it will pop -up a message that record already present.
    I think this may solve the issue (acc to my understanding)
    If problem persists kindly explain the scenario in simple manner.
    Hope this amy help u.
    Rgds
    Ankit

  • Records validation at the block level

    Block A
    multi record block
    Product code Unit No
    E3056             W039708002607
    E3056             W039708002721
    E3056             W039708002754
    Block B multi record block
    Product Code Unit No
    E3056               W029708002607
    E3056               W039708002971  -----------different than upper block data
    E3056               W039708002754
    Has to validate with the data in upper block A and say wrong data when compared. CHoose right data that is in
    block A How can I do it on item level of Block B?
    Thanks in advance.
    Anu

    So, you cannot simply loop over block B for it will clear block C on record-navigation (as C is the detail block).
    You have two options:
    1. Do the check against the database table block B is based on, something like:
    CURSOR cr IS
      SELECT COUNT(*)
        FROM THETABLE
      WHERE product_batch_id=:BLOCK_C.product_batch_id
        AND unit=:BLOCK_C.unit;
      nCount NUMBER;
    BEGIN
      IF :BLOCK_C.UNIT!=:BLOCK_B.UNIT THEN
        --maybe another unit matches
        OPEN cr;
        FETCH cr INTo nCount;
        CLOSE cr;
        IF nCount=0 THEN
          -- Error
        END IF;
      END IF;
    END;2. Fill a pl/sql-table with all the unit from block B, then loop over that pl/sql-table to validate (lot of work)

  • Date validation in the selection screen

    Hi
    I am new to all this..so pls help me with this...
    I need to validate my input field in the selection screen to have the format as YYYYMMDD i.e user is allowed to enter the date in this format only!!
    Now how to validate this kind of a format??

    Hi
    That's INPUT format just one used to save a date, so u need to check it only.
    It's the same if you used a DATS format, because its INPUT FORMAT is the same, for example, output format of SY-DATUM is DD.MM.YYYY, but input format is YYYYMMDD, so:
    PARAMATERS: P_DATE LIKE SY-DATUM.
    AT SELECTION-SCREEN.
    IF P_DATE < SY-DATUM.
      MESSAGE E208(00) 'Error'.
    ENDIF.
    In your case the INPUT and OUTPUT format are the same so:
    PARAMATERS: P_DATE(8) TYPE N.
    AT SELECTION-SCREEN.
    IF P_DATE < SY-DATUM.
      MESSAGE E208(00) 'Error'.
    ENDIF.
    Max

  • Table data encryptions on the Administration Level

    Hi,
    I like to know is there any functions in the oracle database
    that encrypt my data in the particular table which even an
    administrator wouldn't be able to see the data unless he enter a
    password ?
    Anyone can help?
    Thanks

    Hello Suresh,
    LOOP AT IT_MAIN1.
    IF ( IT_MAIN1-TDLNR <b>IN</b> S_TDLNR ) AND
    (IT_MAIN1-ROUTE <b>IN</b> S_ROUTE ).
    APPEND IT_MAIN1 TO IT_FINAL.
    ENDIF.
    ENDLOOP.
    Select option is an internal table with for fields: sign, option, low and high.
    you need to check the value in the internal table.
    U can use IT_MAIN1-TDLNR = S_TDLNR-LOW. (If you enter the value in left field of select option.), But it is not suggestable.
    Or else.. U can validate this in loop statement itself.
    LOOP AT IT_MAIN1 where IT_MAIN1-TDLNR <b>IN</b> S_TDLNR AND
    IT_MAIN1-ROUTE <b>IN</b> S_ROUTE .
    APPEND IT_MAIN1 TO IT_FINAL.
    ENDLOOP.
    Reward If Helpful.
    Regards
    Sasidhar Reddy Matli.
    Message was edited by:
            Sasidhar Reddy Matli

  • Task level data at the Project level?

    Hi all,
        I have a custom date field in Project 2010 that if certain text is displayed in the task name, this field is populated by the task finish date.
    Essentially this task is connected within Project Server to an external 'deliverable'.
    I need to grab this date and have it at the Project  Information level - is this possible?
    Even using Enterprise flags, I still could not obtain the task date at a Project level.
    Any thoughts much appreciated.
    -CL

    Rob,
    Maybe my latest post on this need may be of interest. How to show Implementation Milestone Dates in Project Center. #msproject
    http://aboutmsproject.com/how-to-show-implementation-milestone-dates-in-project-center/  I'm able to use formulas to bring task data up to the Project level.
    Treb Gatte, Project MVP |
    http://AboutMSProject.com |
    @tumbleroad

  • How to view the table at the application level

    Dear All,
    How to view the table in the Data Dictionary at the application level, If a table is created at the database level by using CREATE statement.
    code/
    create table zmard as select * from sapone.mard where 1 = 2
    /code
    I would like to view the table above, which is created at the Oracle database level in the Data Dictionary.
    can anyone guess the solution.
    Best wishes
    Mahesh

    Hi
    U should create a program using SQL native in order to select and show the data.
    By SE11 or directly in the program u can define a structure like your table:
    DATA: BEGIN OF W_ZMARD,
                  FIELD,
              END     OF W_ZMARD.
    EXEC.
       OPEN CURSO FOR SELECT * FROM ZMARD
    ENDEXEC.
    DO.
      EXEC.
         FETCH NEXT CURSOR INTO :W_ZMARD
      ENDEXEC.
      IF SY-SUBRC <> 0.
         EXIT.
      ENDIF.
      WRITE: / W_ZMARD-FIELD,
    ENDDO.
    EXEC.
      CLOSE CURSOR
    ENDEXEC.
    I don't know if it's possible to create a view in SE11, because it's needs a table just defined in SE11, u can create a new view ZMARD based on MARD but I don't believe it'll use your table.
    Max

  • How to setup data validation mechanism

    Hi, gurus,
    Now our customer wants to do data cleansing before loading data into infocube or ods, the source system includes R/3, flat file, and some legacy systems. However the client wants to create a staging area to keep incoming data, and develop some programming to check data validation. The specific requirement is as following:
    1. Provider a user interface to let biz man to correct the error record;
    2. can code logic to check the data rejection reason, such as field type is wrong, master data doesn't exist, and etc, and can prompt these reason message to assist business guy correct;
    They want to create a specific staging for data cleansing purpose, and because refer to my prior experience with some ETL tools, we can ask developer to write embeded program in informatica or datastage to check data quality and write down the rejection reason in a file to assist business man correct;
    so if we want to use SAP BW PSA for this purpose, is it feasible? Can we modify PSA to add one column, 'rejection reason' and add some ABAP program here; or you guys have some other good options for this function.
    and can we use PSA to keep all data for 5 years? because the annual delta data is not very big, just 4G.
    Someone suggests to create Z table in BW system for staging purpose, however this solution can not use BW ETL tool to load data but need heavy ABAP programming, so any good solution on this?
    BTW: can I modify PSA structure to add 1 or 2 column, such as reject reason?
    and how to use abap program to access Characteristics master data? are there any function module to read master data directly rather than select data from P table or T table?
    Regards, ls

    I think if the business guy is given some basic BW training and some aspects about correcting PSA records or adding or loading missing master data,then it can work.
    The BW monitor does give you good enough messages about the data load errors.
    I do not think it is good to modify the PSA..because this is against purpose of having PSA.PSA has records in transfer structure format,as sent by source system.
    PSA is often preserved for data reloads that might be needed some point in future.
    As u r saying that annual record load is not big,u can preserve PSA and then later develop a custom program to delete PSA's older than..say 2-3 years..(there might a std program for this).
    Modifying or adding columns to PSA is not general practice.
    For reading master data maybe u can use this fn module..RSAU_READ_MASTER_DATA.

  • Date Validation - a Nightmare for ME!

    Hi, I searched the forum and came up with some code that works for me partially. I am still having problems with getting the end result that is needed.
    I need to do a date validation where the begin date is less than end date. Below is the syntax..It works but when I put in the correct end date i still get the error message athough the date is correct. Also if I set the focus back to the field and correct the date it still set focus back... I'm sure it is something simple that I am missing
    ----- form1.subformpage1.empnsubform.DateTimeField2::exit - (JavaScript, client) -------------------
    if (DateTimeField2.formattedValue>=DateTimeField1.formattedValue);
    xfa.host.messageBox("Incorrect Date range");
    What am I missing? Yes I still struggle with writing scripts!!!!
    thanks

    I have a similar thing on one of my forms, the fields are "Date Submitted" and "Date Needed" and I need to validate that the Date Submitted date occurs before the Date Needed date.  If it does not, it prompts a response dialog box and asks for a new DateNeed to be entered.  Here is the code I used: (I'm by no means an expert at code)<br /><br />//This just sets the values of the date/time fields to variables, and then checks for a null value.  If null, it changes the rawValue to an empty string for inserting into database.  If not null, it leaves the existing rawValue unchanged. Unless you're writing info to a database, you probably wouldn't need this.<br /> <br />var DateSubmit = form1.MainForm.Info.DateSubmitted.rawValue == null ? "" : form1.MainForm.Info.DateSubmitted.rawValue;<br />var DateNeed = form1.MainForm.Info.DateNeeded.rawValue == null ? "" : form1.MainForm.Info.DateNeeded.rawValue;<br /><br />if (DateNeed<DateSubmit)<br /><br />{<br /><br />     var dateResponse = xfa.host.response("The Date Needed date must be later than the Date Submitted date.\nPlease enter new date below: (MM/DD/YYYY format)", "Date Needed Error");<br /><br />     var myDate = new Date(dateResponse);<br /><br />     var myFormattedDate = util.printd("dd mmm yyyy", myDate);<br /><br />     form1.MainForm.Info.DateNeeded.formattedValue = myFormattedDate;<br /><br />}<br /><br />BTW, I have this as code on a submit button that does all of my validations and then writes a new record to a database.  But I think you could also do this on the exit event of the second date/time field if needed. The variable declarations at the top would be slightly different.<br /><br />Lynne

  • How to fetch data from all the libraries/lists from a website only present in a site collection.

    Hi,
    I have a sitecollection named sitecollectionA....
    There are 3  subsites under this site collection named as site A, site B, site C
    and there are many libraries present in these subsites.
    I want to fetch the items from all the libraries present in site B ONLY.
    My custom webpart is in site B.But I am not able to fetch the data from this particular site(site B).
    I am using SPSiteDatauery....but getting nothing with below scopes-
    query.Webs = "<Webs  Scope=\"Recursive\" />";   ---- this gives data from all subsites and their subsites
    query.Webs = "<Webs  Scope=\"\" />";  -               ----this gives data from only the top level subsite of sitecollectionA
    Below are few lines from my code.....
     SPSiteDataQuery query = new SPSiteDataQuery();
                            query.Lists = "<Lists ServerTemplate=\"101\" />";
                            query.Webs = "<Webs  Scope=\"\" />";
    Please help...

    Got the answer....
    I defined my site collection object like below and it worked.
     SPSite site = new SPSite(SPContext.Current.Web.Url);

  • Viewset - active view and data validation problem

    Hey there,
    I've a problem while using a viewset (1 col, 2 rows) and the data-validation in the wdDoBeforeAction() method.
    My application works basically like this:
    The first view is displayed with 2 mandatory input fields. Upon the evaluation result of the entered data in these fields, a corresponding second view will be displayed. The input fields in the first view are set to read only and a button named "Change" appears. This button triggers an action which fires and outbound-plug to an empty view, so that the second view disappears and resets the "read only" properties of the input fields in the first view, so that the user can enter new data.
    The problem is, that the second view contains input fields itself, which are validated in the wdDoBeforeAction() method of this view. The navigation is cancelled if an error occurs. Well, this is fine if i want to submit (pressing the button "Approve" in the second view) this data and proceed, but if i want to go back to the first view (by hitting the "Change" button), i want to discard all information entered in the second view and i dont want this data to be validated. It's quite annoying if u just want to correct the first views data but have to enter correct values for the second view in order to get through the second views checks..
    I hope that's clear enough, otherwise i will upload a screenshot to clarify.
    Thx in advance
    Regards
    Pascal

    Hi Pascal,
    although I wont prefer to do so for reasons of readability, you could use wdDoProcessbeforeAction to control your view-flow.
    Take a look at the example, I have two Buttons with two actions, one is set on "Validate", the other is not (guess which on is the validating ).
    You can get the action triggered inside the doBefore ... method and determine whether or not the checkbox is set.
    So put your code to validate the input in the i(isValidting) branch and your problems are solved.
    Keep in Mind: I would delegate the Validation from the view to the controller, handle the validation myself with custom coding and then check in the view controller if any errors occured.
    hope that helped,
    Jan
      //@@end
      public void wdDoBeforeAction(com.sap.tc.webdynpro.progmodel.api.IWDBeforeAction validation)
        //@@begin wdDoBeforeAction
           IWDAction currentAction = validation.getCurrentAction();
           if (currentAction == null) return;
           String action = currentAction.getText();
           boolean isValidating = currentAction.isValidating();
           if (isValidating) {
                wdComponentAPI.getMessageManager().reportException(action);
           } else {
                wdComponentAPI.getMessageManager().reportSuccess(action);
        //@@end
    Edited by: Jan Galinski (Holisticon) on Sep 8, 2009 3:15 PM

Maybe you are looking for

  • Portrait Photos don't show in Slideshows...

    Okay, so I was making a Slideshow to send to iDVD when I noticed that while previewing the show, none of my portrait photos were showing up. The landscapes, however, were OK. After going back to the portraits, I saw that for every single portrait, a

  • Print Button not working properly in form

    Hi Experts, I have modified one form everything fine but i faced one problem. when ever enter the item details in form then (print button is there)press the print button it will be give pdf file data properly coming, again if i modify the item detail

  • Com.sapportals.wdf.WdfException

    Hi, I am working on Portal 7.3. I was trying to create an "Advance Copy" of a layout set under System Administration > System Configuration > Knowledge Management > Content Management.When clicked on the "Execute" button in "Advanced Copy of Layout S

  • 30 pin lightening adapter

    Can you use a ipad mini 30 pin lightening adapter with a  camera adapter to download pictures to the mini

  • PA - Transaction Data Conversion

    Dear Experts, Any one could help me what logic we have to follow when we do Data Conversion for PA for PA Transactional Data Thanks Bharath