BC4J - Transaction level Validations

I need to introduce in my software some Transaction Level Validations (like an order mus have at least 1 detail, or a company must have 1 and only 1 president).
Where can I put this kind of "validations" in the BC4J Framework ?
TIA
Tullio

As far As I know, you can put this kind of validation:
1) directly in the database, using constraints and/or triggers.
2) In the Associations objects between the entity objects, by specifying the cardinality of the relationships, in the last tab of the association wizard. I have never tested it though, therefore I'm not sure it works this way.
3) In the Entity object wizard validation tab, you can specify a custom validation method for the whole entity.
What you have to do is implement a method in the YourEntityImpl class, perform as many checks as you wish in this method (you can use all the association accessors etc...) and then select it as the validation method for the entity in the entity object wizard.
Hope this helps.
Remi

Similar Messages

  • ME21N validation at transaction Level

    Hi All,
    I want validate at SAP Transaction level (ME21N). When I am going to create PO i need to validate the EKGRP maintained at PO level and maintained at Info record level. if both are different i need to throw an error??
    So can you please tell me the procedure to go ahead? if i need to write the code in the exit, please let me know the procedure where to write.
    Thnks,
    Raghu.

    Hello Raghu
    Having BAdI ME_PROCESS_PO_CUST available on your system you can use its method CHECK to do final validations which allow you to cancel saving of the PO (in case of failed validations set CH_FAILED = 'X' ).
    IMPORTING parameter IM_HEADER (IF_PURCHASE_ORDER_MM) has a method GET_DATA which returns the header data (structure MEPOHEADER). Here you can find EKGRP at header level.
    If I am correct then info records are found at item level. Thus, call IM_HEADER->GET_ITEMS to retrieve them.
    Items are TYPE REF TO IF_PURCHASE_ORDER_ITEM_MM -> implementing class CL_PURCHASE_ORDER_ITEM_MM).
    Loop over the item instances and call method lo_item->GET_DATA in order to retrieve the item data (structure MEPOITEM) which contain field INFNR ( Number of Purchasing Info Record ).
    Well, from here on it should be possible to find the way on your own.
    Regards
      Uwe

  • Error: Creating a Connection Pool: issue with valid transaction levels

    Server: SunOS 5.8 Generic_117350-27 sun4u sparc SUNW,UltraAX-MP
    App Server: Sun Java System Application Server 8.2
    Jar: ojdbc14.jar
    Datasource Classname: oracle.jdbc.pool.OracleConnectionPoolDataSource
    Resource Type: javax.sql.ConnectionPoolDataSource
    [Issue]
    Using /SUNWappserver/lib/ojdbc14.jar, when I create my connection pool in Sun Java System Application Server 8.2, I return the following error each time I try to start the domain:
    [#|2006-07-28T14:53:56.169-0500|WARNING|sun-appserver-pe8.2|javax.enterprise.resource.resourceadapter|_ThreadID=11;|RAR5117 : Failed to obtain/create connection. Reason : The isolation level could not be set: READ_COMMITTED and SERIALIZABLE are the only valid transaction levels|#]
    When I change the value to "SERIALIZABLE" in my domain.xml file, I receive the following error in my server.log:
    Caused by: org.xml.sax.SAXParseException: Attribute "transaction-isolation-level" with value "SERIALIZABLE" must have a value from the list "read-uncommitted read-committed repeatable-read serializable ".
    So, I'm stuck!
    I can't use the values READ_COMMITTED or SERIALIZABLE since the valid values are "read-uncommitted read-committed repeatable-read serializable ".
    Case sensitivity matters.
    Any thoughts or help would be greatly appreciated.
    Thanks,
    --Todd                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    The Oracle JDBC accepts TRANSACTION_READ_COMMITTED and TRANSACTION_SERIALIZABLE isolation levels.
    Example:
    connAttr.setProperty(“TRANSACTION_ISOLATION”, “TRANSACTION_SERIALIZABLE”);
    I'd check with the Apps server folks.
    Kuassi - blog http://db360.blogspot.com/
    ------ book http://www.amazon.com/gp/product/1555583296/

  • Skip entity level validation programatically - special case

    Hi
    using jdev 11.1.1.3
    Can anyone suggest me a solution as to how I can skip validation programatically.
    I have both entity level and deffered entitylevel txn validations on this entity.
    I use the VO to populate the data and I modify the date field, and I want to skip validation for this particular usecase as it is against the validation rule(special case)
    thanks

    Hi,
    Check
    http://jobinesh.blogspot.com/2009/08/how-to-skip-validation.html
    http://andrejusb.blogspot.com/2012/10/transaction-level-adf-bc-entity.html

  • ToyStore Unexpected exception / Entity Level validation check question.

    Hi,
    JDev 10..1.2
    I'm using the ToyStore Exception/Error handler.
    I added an Entity level validation test by adding following test in the validateEntity method of my entity:
    protected void validateEntity()
    super.validateEntity();
    if (this.getAccountStatus() != null && this.getAccountStatus().compareTo(Constants.NUMBER_20) < 0)
    throw new JboException(ErrorMessages.class,"14000",null);
    In the ErrorMessages class I added following line to the message array:
    { "14000", "Entity validation ERROR" }
    I would have expected to see this error in the "global error section" but the exception was handled as a "unexpected exception" and was shown in the stack trace but not in the generated page.
    Could you please tell me how to write an entity level validation error in the validateEntity method so that it gets displayed in the global error section?
    I succesfully added attribute level validation and it gets displayed at the attribute level.
    Here's the stack trace, notice that the message is retrieved from my ErrorMessages.class:
    05/08/10 11:28:03 com.photoswing.webview.actions.AccountCreateAction.reportErrors userLocale: English (United States)
    oracle.jbo.JboException: Entity validation ERROR
         at com.photoswing.model.site.AccountTestImpl.validateEntity(AccountTestImpl.java:83)
         at oracle.jbo.server.EntityImpl.validate(EntityImpl.java:1506)
         at oracle.jbo.server.DBTransactionImpl.validate(DBTransactionImpl.java:3944)
         at oracle.adf.model.bc4j.DCJboDataControl.validate(DCJboDataControl.java:958)
         at oracle.adf.model.binding.DCBindingContainer.validateInputValues(DCBindingContainer.java:1681)
         at oracle.adf.controller.lifecycle.PageLifecycle.validateModelUpdates(PageLifecycle.java:465)
         at oracle.adf.controller.struts.actions.DataAction.validateModelUpdates(DataAction.java:328)
         at oracle.adf.controller.struts.actions.DataAction.validateModelUpdates(DataAction.java:519)
         at oracle.adf.controller.lifecycle.PageLifecycle.handleLifecycle(PageLifecycle.java:115)
         at oracle.adf.controller.struts.actions.DataAction.handleLifecycle(DataAction.java:223)
         at com.photoswing.webview.actions.BaseDataForwardAction.handleLifecycle(BaseDataForwardAction.java:209)
         at oracle.adf.controller.struts.actions.DataAction.execute(DataAction.java:155)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1485)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:527)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:768)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
         at com.photoswing.filter.LocaleFilter.doFilter(LocaleFilter.java:191)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:235)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:600)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    Thanks
    Fred

    More info:
    If I write:
    <html-el:errors/>
    I get all the errors displayed.
    My purpose is to display the attribute level errors next is to each attribute and the Entity level errors at the top.
    So at the top I wrote:
    <html:errors property="<%= ActionErrors.GLOBAL_ERROR %>"/>
    I added following trace:
    At the beginning of the processException method:
    System.out.println(getClass().getName()+".processException, ex: "+ex.toString()+", ex.getClass().getName(): "+ex.getClass().getName());
    In the if block:
    if (attrName == null) {
    String errorCode = jboex.getErrorCode();
    globalErrs.add(jboex.getLocalizedMessage(locale));
    System.out.println("attrName == null, errorCode: "+errorCode+", jboex.getLocalizedMessage(locale): "+jboex.getLocalizedMessage(locale));
    My trace:
    05/08/10 12:19:44 com.photoswing.webview.actions.AccountCreateAction.processException, ex: oracle.jbo.RowValException: Failed to validate a row with key null of type WebAccountAM.AccountTestView1, ex.getClass().getName(): oracle.jbo.RowValException
    05/08/10 12:19:44 com.photoswing.webview.actions.AccountCreateAction.processException, ex: oracle.jbo.JboException: Entity validation ERROR, ex.getClass().getName(): oracle.jbo.JboException
    05/08/10 12:19:44 attrName == null, errorCode: 14000, jboex.getLocalizedMessage(locale): Entity validation ERROR
    Remark:
    AccountId => pk, not mandatory,refresh after insert => sequence fetched in pre-insert trigger
    Thanks
    Fred

  • Field Status at Transaction Level

    I want to change the field status for Business Place/ Section Code from Supress to Optional in transaction F-02.
    How can I change Field status at Transaction Level ?

    Hi ,
    FIelds Status can be changed by 2 ways
    1, Posting Keys - any change in the Field status will Effect all the clients
    2.Field Status Group Variant,which we assign in GL Master- Changes to FSG, Will Effect only Perticular Lilne Items of tht GL Account.
    As Per your requirment, I do not think you can change the Field Status as Per Transcation i.e for F-02 or FB50 instead you can change the Field Status of perticular GL Account which you are posting the Transcation. which will b specific to the GL Account.
    if you want the Changes across clients , you can change the Field Status By posting Keys.
    Hope the Above Helps you .
    Thanks
    Goutam

  • Page level validation to prevent duplicate data entry into the database

    Hello,
    Can anyone please help me out with this issue.
    I have a form with two items based on a table. I already have an item level validation to check for null. Now I would like to create a page level validation to check that duplicate data are not entered into the database. I would like to check the database when the user clicks on ‘Create’ button to ensure they are not inserting duplicate record. If data already exist, then show the error message and redirect them to another page. I am using apex 3.2
    Thanks

    Hi,
    Have you tried writing a PLSQL function to check this?
    I haven't tested this specifically, but something like this should work:
    1) Create a Page Level Validation
    2) Choose PLSQL for the method
    3) Choose Function Returning Boolean for the Type
    For the validation code, you could do something like this:
    DECLARE
        v_cnt number;
    BEGIN
        select count(*)
        into v_cnt
        from
        your_table
        where
        col1 = :P1_field1 AND
        col2 = :P2_field2;
        if v_cnt > 0 then return false;
        else return true;
        end if;
    END;If the query returns false, then your error message will be displayed.
    Not sure how you would go about redirecting after this page though. Maybe just allow the user to try again with another value (in case they made a mistake) or just press a 'cancel' button to finish trying to create a new record.
    Amanda.

  • Item Level & Page Level Validation..

    Hi ,
    What is the difference between Item Level validation & Page Level validation..
    in which sceneario it will be useful.
    Anoo..
    Edited by: Anoo on Dec 16, 2008 5:04 AM

    Hi,
    From the APEX help:
    * Item level validations are specific to a single item.
    * Page level validations do not apply to any single item, but apply to an entire page.
    {code}
    Paulo Vale
    [http://apex-notes.blogspot.com]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to implement a page level validation !!

    Hello ,
    I want to implement page level validation.
    thanks
    Edited by: kumar73 on Apr 21, 2010 1:41 PM

    Should be pretty easy - your condition would probably just be the click of the button (button name) or the request value sent by the button (SUBMIT?) You can do a function returning boolean as the type
    The code would be something like:
    begin
      if :P1_SHUTTLE is not null or
      :P1_SHUTTLE2 is not null or
      :P1_SHUTTLE3 is not null or
      :P1_SHUTTLE4 is not null or
      :P1_SHUTTLE5 is not null then
        return(true);
      else
        return(false);
      end if;
    end;

  • GL Translation at Transaction Level?

    We are mutli-national company with 22 Sets of Books and 21 different functional currencies running on 11i (11.5.10.2) We consolidate all into single SOB at end of each month into USD. Issue is we are getting a lot of questions from our upper level management wanting to see transactional and/or balance detail in USD "live" throughout the month so they do not have to wait until the end of the month to get the picture in USD.
    Currently only way we know of to do this is to schedule the standard Translation program ( GLTTRN ) to run at appropriate intervals. Not crazy about that idea because to fully please the users we'd literally have it scheduled to run every few minutes for every balancing segment in each set of books. That's a lot of load to pile up on the Concurrent Managers to constantly have the Translation program running and translating each SOB's balances to USD.
    Our users had prior system that literally translated at the transaction level. Technically Oracle translates to the the functional currency every time a transaction is posted and even marks a translated balance as out-of-date so it can be re-translated but we cannot find any indication of a "better" way to handle this to meet our users requests.
    Question is.....how are other companies handling this? Just running Translation repeatedly? Some other standard functionality we're missing? Other workarounds?
    Thanks,
    Jason

    Dear Jason,
    Gather key reporting requirements of user and convert the transactions on the basis of Translational rate at reporting level. i.e. Say a user runs GL Trial Balance, the converted transactions shall be picked from the Translated Lines and the remaining lines shall be picked from particular SOB gl_je_lines, multiplied with Translational currency rate and displayed in Report.
    Here we are mimicking the effect of translation in reports.
    I agree that these reports will have some performance issue, but not that much of Translation program.
    The advantages are, Users are given the choice, they can run report whenever they want
    Second advantage is, say he does not run the report today, there is no burden on system for Translation program schedule.
    I believe if you discuss with your Technical and Functional team, this option can work.
    Regards,
    Sridhar
    Edited by: K Sridhar on Apr 30, 2009 6:05 PM

  • Digital Signatures in sap workflow at transaction level.

    Hi Experts,
    How to show the digital signature at task level approval in workflow, I have requirement as below.
    For example purchase requisition approval workflow. We have 3 level of approval process for PR, if first level approves it the work item need to go to second level approval with first level user signature (Digital Signature) same like third level also.
    Can we display the digital signature at transaction level.

    Hi,
    In Task Description Tab, you can insert a graphic as a Digital Signature coding the condition you need.
    Regards,

  • JDBC sender Adapter consistency and Transaction level - URGENT

    Hi,
    We are using the JDBC adapter to read data from an Oracle view. The view joins two tables on their keys where flag = 0. The JDBC adapter carries out the select and then updates the selected rows with flag = 1. The transaction level used is the default, which according to XI help is TRANSACTION_SERIALIZABLE.
    Our question is what happens if the oracle application that feeds the underlying tables inserts a new record in the time interval between the select statement and the update statement with flag = 0.
    WILL THE UPDATE STATEMENT UPDATE EVERYTHING, EVEN THE NEWLY INSERTED RECORD??
    As we are in a live environment and we have reason to believe that some records updated to FLAG = 1 are NOT sent to XI we would appreciate the expert's help on this issue!

    Dimitris,
    I was looking at the FAQ :JDBC Driver Snote and found this information which seems to answer ur question.
    Q: If I have the following configured in a JDBC Sender:
    Select Query:
    SELECT column FROM TABLENAME WHERE FLAG = "TRUE"
    Update Query:
    UPDATE TABLENAME SET FLAG = "FALSE" WHERE FLAG = "TRUE"
    How do I know that the JDBC adapter will not update newly added rows (rows that were added between the time that the SELECT and UPDATE queries were executed) that were not read in the initial SELECT query?
    A: The SELECT and the UPDATE are run in the same DB transaction, i.e. both statements have the same view on the database.
    Make sure that both statements use the same WHERE clause. An additional requirement for the correct operation of this scenario is the configuration of an appropriate transaction isolation level on the database (i.e., repeatable_read or serializable). You might also consider using a "SELECT FOR UPDATE" statement instead of a plain SELECT statement to ensure proper locking on the database.

  • OA JDeveloper 9i (RUP5) 9.0.3.5 (Build 1453) - Row level validation issue

    Hi everyone,
    Can anyone help me with the following:
    Version of OA JDeveloper 9i (RUP5) 9.0.3.5 (Build 1453)
    I have a xml page what is based on a master detail relationship.
    The master table (Advancetable EO) contain the Employee details and the Detail VO (Advancetable) contain
    the allowances an employee are entitiled too.
    How do I stop a user from selecting(radio button) the next employee in an advance table, it the the records
    they entered at the detail level is not valid. (Row level validation). My validation method works fine then they try commit the record.
    But I need to stop them from navigating to the next employee record in the table, when the records they entered
    at detail level is not valid.
    How will I do this?
    I added the same validation method I used for the "APPLY" event to validate the records entered at detail level to the "EmployeeSelect" event, but the error message showed only after the new employee has been selected. Thus the error message that is displayed does not relate the the employee record selected at that stage.

    Time for you to make a trip to the [url http://forums.oracle.com/forums/forum.jspa?forumID=210]OA Framework Forum

  • GL cost allocation batches transaction level information

    Hi
    In Gl_LINES_ALL, all reference columns information is NULL.
    After posting the cost batches into GL, what is procedure to find transaction level information for these cost batches.
    Eg: For Inventory and receivables batches transaction information stored into GL_JE_LIENS Reference columns, in the same way cost batches transaction how can we find.
    Regards
    Kishore S.

    Hi Dianne,
    Check whether the real time integration between co and fi has been done in transaction OK17.
    Thanks
    Aravind

  • How to display Entity level validation messages in a table

    I'm using ADF 11g 11.1.1.2.0. I have a page with an updateable table based on an EO. In the EO I have defined some entity level and attribute level declarative business rules. When the user enters a value in the table that violates an attribute level validation, the related message is displayed inline and the attribute is surrounded by a red box. Furthermore the user is not able to place his cursor in a different row. In this way it is clear which row and attribute caused the error. However if the user enters some data that violates an entity level validation, the validation message is displayed as global messages in the message-popup when the business rule is based on a script or a method. This means that the user gets a global message popup, and does not know which row caused the error. Ofcourse we can include the identifying attributes of the row in the error message, but I would like to know if there is another more visual way to communicate to the user which row caused the error.
    Edited by: Jonas de Graaff (PSB) on 10-feb-2010 2:51

    Hi Chittibabu,
    what about using a TreeTable control?
    SAPUI5 SDK - Demo Kit
    Regards
    Tobias

Maybe you are looking for

  • Solution to iCloud control panel 4 sign-in server error under windows 8.1x64

    Potential solution for icloud 3.1 and 4.0 installation and iTune store sign-in, all showing errors or sign-in errors due to server error. My setup is Iphone 4S upgraded to ios8, ipad Air still on 7.1.2, windows PC on Win8.1x64 and with icloud 3.1 wor

  • HT204384 maximum size for sdxc?

    I like to buy a new macbook pro retina with 256MB SSD. I would expand it with a sdxc card, but what is the maximum size of such a card? For now I think 64GB, but is there really no 128GB or more available? Thanks for your reaction Kurt

  • Connection reset exception

    I am getting the below exception in my weblogic logs [FMWGEN][SQLServer JDBC Driver]socket write error: Connection reset by peer. java.sql.SQLNonTransientConnectionException: [FMWGEN][SQLServer JDBC Driver]socket write error: Connection reset by peer

  • Java IDE survey

    Hi I am trying to learn Java SWING and wonder which IDE is better when comes to SWING programming. I am looking at JBuilder and JDeveloper. Which is better?

  • How do I recover a lost ipod?

    How do I recover a lost ipod?