TopLink Article HowTo Manipulate objects using Unit of Work

http://www.oracle.com/technology/sample_code/tech/java/codesnippet/toplink/unitofwork/readme.html
My questions are:
What is the var aSession and where is it declared. Where is this code, on the class created by toplink or the class that is tied to the JSP? How can you click an add button on the jsp and get the data to add to the database?
It seems all the code and example on this site are missing, is there any reference that should you how to build a JSF app with jdev from start the finish?
Thanks

http://www.oracle.com/technology/sample_code/tech/java/codesnippet/toplink/unitofwork/readme.html
My questions are:
What is the var aSession and where is it declared. Where is this code, on the class created by toplink or the class that is tied to the JSP? How can you click an add button on the jsp and get the data to add to the database?
It seems all the code and example on this site are missing, is there any reference that should you how to build a JSF app with jdev from start the finish?
Thanks

Similar Messages

  • Exception while using unit of work commit

    Hi,
    I have using this code to create a object
    KbAdAlerts alert = new KbAdAlerts();
    alert.setAlertId(kmData.getAlertId());
    alert.setAlertDesc(kmData.getOutcome());
    alert.setAlertLastRevisionDate(KmUtils.convertReviewDate(kmData.getReviewDate()));
    alert.setAlertType(kmData.getAlertType());
    System.out.println("Alert Object :" + alert);
    KbAdAlerts alertClone = (KbAdAlerts) uow.registerObject(alert);
    System.out.println("Clone Alert:" + alertClone);
    uow.printRegisteredObjects();
    uow.commit();
    I am getting exception while using uow.commit(). I have gone into alert object and everything seems to be fine.
    Could you help me in this issue.
    Thanks,
    Ashish
    Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-01400: cannot insert NULL into ("AD_OWNER"."KB_AD_ALERTS"."ALERT_ID")
    Error Code: 1400
    Call:insert into kb_ad_alerts(alert_id, alert_desc, alert_type, alert_last_revision_date)
    values
    (NULL, NULL, NULL, NULL)
    Query:InsertObjectQuery(oracle.ccr.admin.model.KbAdAlerts@6108)
         at oracle.toplink.exceptions.TopLinkException.<init>(TopLinkException.java:46)
         at oracle.toplink.exceptions.DatabaseException.<init>(DatabaseException.java:50)
         at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:282)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:658)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:707)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:496)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:442)
         at oracle.toplink.publicinterface.UnitOfWork.executeCall(UnitOfWork.java:1603)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:117)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:103)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.insertObject(DatasourceCallQueryMechanism.java:238)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObject(DatabaseQueryMechanism.java:355)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMechanism.java:433)
         at oracle.toplink.queryframework.InsertObjectQuery.executeCommit(InsertObjectQuery.java:60)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedWrite(DatabaseQueryMechanism.java:622)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedInsert(DatabaseQueryMechanism.java:586)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWriteWithChangeSet(DatabaseQueryMechanism.java:479)
         at oracle.toplink.queryframework.WriteObjectQuery.executeCommitWithChangeSet(WriteObjectQuery.java:110)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:259)
         at oracle.toplink.queryframework.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:47)
         at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:603)
         at oracle.toplink.queryframework.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:519)
         at oracle.toplink.queryframework.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:100)
         at oracle.toplink.queryframework.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:72)
         at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(UnitOfWork.java:2532)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:981)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:938)
         at oracle.toplink.internal.sessions.CommitManager.commitNewObjectsForClassWithChangeSet(CommitManager.java:240)
         at oracle.toplink.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:161)
         at oracle.toplink.publicinterface.Session.writeAllObjectsWithChangeSet(Session.java:3123)
         at oracle.toplink.publicinterface.UnitOfWork.commitToDatabase(UnitOfWork.java:1242)
         at oracle.toplink.publicinterface.UnitOfWork.commitToDatabaseWithChangeSet(UnitOfWork.java:1330)
         at oracle.toplink.publicinterface.UnitOfWork.commitRootUnitOfWork(UnitOfWork.java:1097)
         at oracle.toplink.publicinterface.UnitOfWork.commit(UnitOfWork.java:865)
         at oracle.ccr.admin.model.FeedbackServices.writeFeedback(FeedbackServices.java:116)
         at oracle.ccr.admin.view.AlertDetails.updateTables(AlertDetails.java:834)
         at oracle.ccr.admin.view.AlertDetails.commandButton1_action(AlertDetails.java:822)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
         at oracle.adf.view.faces.component.UIXCommand.broadcast(UIXCommand.java:211)
         at oracle.adf.view.faces.component.UIXCollection.broadcast(UIXCollection.java:94)
         at oracle.adf.view.faces.component.UIXTable.broadcast(UIXTable.java:205)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
         at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:629)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)

    Hi,
    I am having a similar problem that results in this stack trace. The funny thing is that it occurs after a session.logout/login and re-read of the object I'm trying to update. The other thing is that if I remove objects from the transaction it just happens somewhere else - on a different object/descriptor. I am attempting to upgrade from 9.03 runtime to the 10.0.3.1 builder/runtime. I am connecting to a Sybase 12.5 db.
    Any ideas on this one?
    Thanks,
    Bret
    This is the sql that is found in the DatasourceCallQueryMechanism. We are not using any custom SQL.
    SQLCall(INSERT INTO Invoice (id, description, billingAddress, customerNote, invoiceNumber, startDate, stopDate, sentDate, commitDate, customerId, dueDate) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?))
    java.lang.NullPointerException
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.insertObject(DatasourceCallQueryMechanism.java:213)
         at oracle.toplink.internal.queryframework.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:156)
         at oracle.toplink.internal.queryframework.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:170)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMechanism.java:426)
         at oracle.toplink.queryframework.InsertObjectQuery.executeCommit(InsertObjectQuery.java:65)
         at oracle.toplink.queryframework.InsertObjectQuery.executeCommitWithChangeSet(InsertObjectQuery.java:75)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:251)
         at oracle.toplink.queryframework.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:47)
         at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:620)
         at oracle.toplink.queryframework.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:542)
         at oracle.toplink.queryframework.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:100)
         at oracle.toplink.queryframework.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:72)
         at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(UnitOfWork.java:2578)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:988)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:945)
         at oracle.toplink.internal.sessions.CommitManager.commitNewObjectsForClassWithChangeSet(CommitManager.java:243)
         at oracle.toplink.internal.sessions.CommitManager.commitAllObjectsForClassWithChangeSet(CommitManager.java:218)
         at oracle.toplink.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:174)
         at oracle.toplink.publicinterface.Session.writeAllObjectsWithChangeSet(Session.java:3177)
         at oracle.toplink.publicinterface.UnitOfWork.commitToDatabase(UnitOfWork.java:1282)
         at oracle.toplink.publicinterface.UnitOfWork.commitToDatabaseWithChangeSet(UnitOfWork.java:1370)
         at oracle.toplink.publicinterface.UnitOfWork.commitRootUnitOfWork(UnitOfWork.java:1137)
         at oracle.toplink.publicinterface.UnitOfWork.commit(UnitOfWork.java:905)
         at com.tbs.database.DBBroker.mergeSingleObject(DBBroker.java:288)
         at com.tbs.database.DBBroker.merge(DBBroker.java:235)
         at com.tbs.database.DBBrokerSetInvoker.merge(DBBrokerSetInvoker.java:73)
         at com.tbs.database.TbsDataSource.merge(TbsDataSource.java:353)
    /////////////////////////////////

  • Registered objects with Unit of work

    Hi,
    I am using the following code for persisting some data to the database. I register the following objects with the UOW obtained. If there is any exception with the business rules method(shown below) , the code uow.commit() is never invoked.
    My question here is what happens the registered objects in that uow if commit is never invoked.
    Any help will be appreciated.
    Thanks
    Priya
    node=(DeviceNode) uow.registerObject(node);
    station=(Station)uow.registerObject(station);
    user=(User)uow.registerObject(user);
    //Call a method to do some businees rules check
    startWork(node,station,user);
    uow.commit;

    It depends on how you set things up. If you are managing the connection directly via Toplink (no pooling or containers or transactions), then if you dont commit, it doesnt save. If you are using JTS, registering the object will save it to the database barring any unchecked exceptions.
    Zev.

  • Problem in using Unit of Work with executeNonSelectingCall() method

    Hi,
    I am using external Connection Pooling and Transaction Controller of JBoss in Toplink.
    When I am getting the data from DB and do "clientSession.release();", it works fine.
    I get the clientSession as follows:
    serversession = (Server) SessionManager.getManager().getSession(new XMLSessionConfigLoader(),"Session", Thread.currentThread().getContextClassLoader(), false, true);
    serversession.login();
    ClientSession clientsession = serversession.acquireClientSession();
    I am facing the problems in two cases:
    Case 1: But when I get the UOW through "transaction = clientSession.getActiveUnitOfWork();" and insert the data, commit and do "clientSession.release();", I get the following error:
    [CachedConnectionManager] Closing a connection for you. Please close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection@c42091
    I removed clientSession.release(); from my finally{} block still I am getting the same error.
    Case 2: But when I get the UOW through "transaction = clientSession.acquireUnitOfWork();" and insert the data, commit and do "clientSession.release();", I get the following error:
    17:48:55,670 ERROR [LogInterceptor] TransactionRolledbackLocalException in method: public abstract java.lang.String com.pearson.pix.business.purchaseorder.interfaces.PurchaseOrderLocal.saveOrderConfirmation(com.pearson.pix.dto.purchaseorder.POHeader) throws com.pearson.pix.exception.AppException, causedBy:
    org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=asad/139, BranchQual=, localId=139] status=STATUS_NO_TRANSACTION; - nested throwable: (java.lang.NullPointerException)
         at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:354)
    I am not able to understand what to do. Pls. help.
    Thanks

    Locking a row that does not exist can be difficult.
    On most database you can lock an entire table through "LOCK TABLE <table>", however this may be extreme. Potentially you could also insert an empty row into the table with the id that you want to lock, then you would have a write lock on the row until you commit the transaction.

  • Acquire unit of work, default?

    Hi,
    I'm writing a finder using findManyByQuery with a readAllQuery for CMP 2.0 with weblogic 7.0.
    Watching the server output, I noticed that a new unit of work is acquired and released each time, how can I disable that and doing as if I would have called the executeQuery from the session?
    [TopLink]: ServerSession(1236551)--Connection(0)--client acquired
    [TopLink]: ClientSession(7337388)--Connection(0)--acquire unit of work:7163719
    [TopLink]: UnitOfWork(7163719)--Connection(0)--JTS#register()
    [TopLink]: ServerSession(1236551)--Connection(3785130)--SELECT NOM, IDVOITURE FROM VOITURE WHERE (ID
    VOITURE = 15389)
    [TopLink]: UnitOfWork(7163719)--Connection(0)--JTS#beforeCompletion()
    [TopLink]: UnitOfWork(7163719)--Connection(0)--JTS#afterCompletion()
    [TopLink]: UnitOfWork(7163719)--Connection(0)--release unit of work
    [TopLink]: ClientSession(7337388)--Connection(0)--client released
    Vlad

    It looks like there is somthing to do with JTS, but I'm a bit lost, where have I to write the code furnished in the example of the documentation, in the ejbCreate, in the project class?
    Thanks for help.

  • Persistenance for Java Objects Using Toplink

    Hi All Happy New Year
    I am trying the a tutorial in Jdeveloper 10.1.3.0.4 called
    Provide Persistenance for Java Objects Using Toplink.
    I have followed the instructions and get the following error.
    com.evermind.reflect.UndeclaredExceptionTypeException: oracle.oc4j.rmi.OracleRemoteException
         at __Proxy1.persistEntity(Unknown Source)
         at acme.ejb.session.EmpSessionClient.main(EmpSessionClient.java:29)
    oracle.oc4j.rmi.OracleRemoteException: Invocation error: java.lang.NoSuchMethodException: acme.ejb.session.EmpSession.persistEntity(java.lang.Object)
    The release notes mention TopLink POJO's Must Implement java.io.Serializable When Returned From a Session Bean's Remote Interface (4902787) When creating a session bean facade for TopLink POJO objects, you must implement java.io.Serializable for each of the TopLink POJO objects returned from the SessionBean facade through a remote interface. This is typically required when using ADF Swing, a EJB Sample Client, or when your EJB Session Bean resides on a separate application server from the client. You can also tell you you need to implement java.io.Serializable when you get the following exception:
    com.evermind.reflect.UndeclaredExceptionTypeException:
    /oracle.oc4j.rmi.OracleRemoteException/
    at __Proxy1.[Your Class Name Here] (Unknown Source)
    The workaround is to manually edit each POJO object to implement java.io.Serializable.
    I have only one POJO which is declared as follows:
    public class EmpInfo implements Serializable {
    Can anybody help me understand what I need to do to get it to work?
    Many Thanks in Advance

    Hi,
    can you send me your test scenario/project at anuj dot k dot jain at oracle dot com. I tried reproducing this but was unable to do so.
    Thanks,
    anuj dot k dot jain at oracle dot com

  • Insertion using objects and update using queries in a single unit of work

    HI All,
    I have a set of objects that i want to insert and then perform some update queries ( direct queries ) on the inserted data in the same transaction. but when i register the objects and execute the update SQL's on the same data in a same unit of work, the update statements are executed first and then the inserts are happening, I've also tried with child unit of work and parent unit of work but the result is the same.
    Can any one suggest a way to do object insertion and sql updates in a single transaction, Thanks in advance
    Regards,
    Sai Krishna

    The UnitOfWork is an abstraction for the physical database query. By default nothing is actually written into the database until the UnitOfWork commits. This means making updates to new objects involves modifying them in-memory and then the updated values will be included in the INSERT during commit.
    If you are having difficulty finding the newly created objects you can enable the query conforming capabilities to have modified and new objects included in query comparisons without requiring them to first be written to the database.
    Doug

  • LT12: how to manipulate the handling unit

    Dear all,
    This is my first message on this forum and I've seen many bright lights on this forum so I have high hopes of your response to my question : )
    When I want to confirm a transfer order with trx LT12, 2 Handling Units (HU) are assigned (which can be seen in the lower part of the screen). I have 2 items in my active worklist (different storage units) and can modify some fields, including the HU. For some reason both items have the same HU (the upper one of the assigned HU). I would like the first item to have the first HU and the second item to have the second HU.
    My question is simple (and I had thought this would be possible but I've tried a LOT and did not succeed, hence my cry for help here): is there a possibility to manipulate the Handling Unit before it is shown on the screen? I did not seem to find a suitable BADI/user exit.
    Any help would be greatly appreciated. Thanks in advance for your efforts!
    With kind regards,
    Roel van den Berge

    Dear Roel van den Berge
    if iam not wrong you can achieve the same by  TO split
    Transfer Order Split
    Use
    To optimize processes in the warehouse, it often makes sense to split up putaways and stock removals into smaller packets according to certain criteria. In doing so, it is important, for example, to:
    •     Distribute the workload equally amongst the warehouse workers
    •     Optimize stock movements in the warehouse according to certain criteria.
    The transfer order (TO) represents a work package and determines the actual workload for a putaway or stock removal. It can therefore make sense to split a single, extensive transfer order into several smaller transfer orders. During the TO split, the system creates several smaller packets from one large one.
    During the TO split, the TO items are divided up between one or more TOs. A TO split does not however mean that the system divides individual items of a TO into smaller TO items.
    Prerequisites
    1.     You define the criteria according to which the TO split is to occur in the Customizing for Warehouse Management under Activities &#61614; Transfers &#61614; Processing Performance Data/TO Split &#61614; Define Profiles.
    a.     To define a TO sort profile, choose Sort profile for TO splitting.
    In the sort profile for the TO, you define the criteria according to which you want to sort the items in a transfer order before the actual split.
    For each of these sort criteria, you define whether the system is to sort the transfer order items in ascending or descending order.
    Before the actual dynamic TO split, you must sort the corresponding TO according to certain criteria. By sorting the TO items, you ensure that the TO split is sensibly executed and that no nonsensical TO splits occur.
    b.     To define a TO split profile, choose Profile for Transfer Order Splitting.
    c.     You assign your sort profile to the TO split profile by entering it in the field Sort profile.
    2.     You determine when the TO split should take place in the Customizing for warehouse management under Activities &#61614; Transfers &#61614; Processing Performance Data/TO Split &#61614; Control for Performance Data Processing/Define TO Split.
    You also assign a key to the TO split profile, consisting of a warehouse number, movement type, source storage type and destination storage type.
    Features
    Standard Sorting of TO Items
    Control of the TO split occurs on the basis of the sort. The system defines the sequence of the items in the transfer order before the actual TO split via the sort, so that the sequence of the TO items corresponds to an optimal sort sequence for later processing.
    Since the system always executes the forced split of the transfer order items according to the forced split criteria, the system always sorts the TO items in the standard sort in accordance with the forced split criteria in the order that the forced split criteria are processed.
    Forced Split
    Even if you have not set any user-defined criteria for the TO split, the system always executes a TO split according to the following forced split criteria:
    •     Planned data is required
    The TO split first divides the TO items for which planned data creation is required, from the TO items for which planned data creation is not required.
    The TO split also causes a further division for all TO items with planned data creation, according to the source storage type and destination storage area criteria.
    •     Per split profile
    As soon as TO items differ from one another in the split profile to which they are assigned, a TO split occurs according to the split profile criterion.
    •     Per performance data profile
    As soon as TO items differ from one another in the performance data profile to which they are assigned, a TO split occurs according to the performance data profile criterion.
    •     Per staging area
    The TO split divides the TO items according to the staging zone to which they are assigned.
    •     According to mixed pallets
    The TO split then separates the TO items containing mixed pallets from those containing no mixed pallets.
    The TO split also creates a further division of all TO items with mixed pallets according to the storage unit that is to be moved.
    •     According to queue
    The TO split divides the TO items according to the queue that these TO items are assigned to.
    If you work with queues, you can assign each work area to its own printer. That way, all materials that are to be processed in a specific area can be combined in one list and printed on the assigned printer.
    •     According to handling unit items
    The TO split then separates the TO items containing handling units from those containing no handling units.
    •     Separate confirmation of the withdrawal step and the transfer step is necessary
    The TO split divides the TO items with split confirmation from TO items for which split confirmation is not planned.
    The system transfers the information on the forced split to the header via the transfer orders, which are created as a result of the TO split.
    The forced split criteria are obligatory. You cannot influence the forced split via the user exit. The system does not adopt any changes to the forced split criteria.
    Dynamic Sorting
    Before you can execute a dynamic TO split controlled via the Customizing settings, the TO items should be sorted according to the split criteria. In doing so, you ensure that the TO split is sensibly executed and that no nonsensical TO splits occur.
    You can define the sequence of all the storage bins in the warehouse based on a specific sequence and sort the TO items according to this sequence. The system sorts according to the Sequence indicator in the warehouse master data.
    Dynamic Split
    You can define several criteria for the TO split in the Customizing for Warehouse Management.
    •     Split according to movement unit
    On the basis of this split criterion, you create a new TO for each movement unit. In doing so, you create TOs with one item for exactly one movement unit.
    You use this split, for example, during goods receipt when a whole pallet is moved from the GR area into the warehouse.
    You define the split according to movement unit in the Customizing for Warehouse Management under Activities &#61614; Transfers &#61614; Processing Performance Data/TO Split &#61614; Define Profiles &#61614; Profile for performance data with the indicator Split single TO.
    •     Split according to picking area
    You divide up the items to be picked according to the areas of responsibility of the picker.
    •     Split according to target times in the TO
    You determine, for example, how long the picking for a transfer order is allowed to take.
    •     Split according to scope (weight or volume)
    You determine the total weight or volume that a transfer order can cover for putaway or stock removal.
    Note that the volume is calculated based on the alternative unit of measure. A box with 10 bottles, for example, can have a different volume than 10 times the volume of one bottle. If the volume for the alternative unit of measure has not been defined in the material master record, the system uses the volume from the base unit of measure for its calculation.
    Activities
    Note that you have no influence over the TO split according to forced split criteria.
    You can, however, define your own criteria for a dynamic TO split via user exit MWMTO012. For more information, see the system documentation on this user exit

  • Assign Chief Position to custom OM Object Business Unit

    Hello
    Is it recommended or doable to assign chief position via 012 relationship to the top most custom object Business  Unit. Currently the  chief position relationships is for Org Units. We would like to keep Chief Position to OU, also if possible to create similar 012 relationship to Business Unit. Since Business Unit will have one-to-many relationship with Regions, need is to identify chief position for the Business Unit for reporting purposes.
    Evaluation path for Business Unit - Region - OU - Position - Person.
    Thank you.

    yes, in om structure it will be seen as top most OM object business unit (top most)  region --> o.u. --> position --> person. Can I use 012 relationship of position assigned to top most business unit and keep 012 position relationship to OU.?
    Narrowing down. Currently, chief position relationship is assigned to top OU that is tied to region 1:1 relationship. Now with the new top most custom object business unit has many regions. So need to identify top most region tied to business unit via 012 position.
    Is it possible and how?

  • TopLink - Best Practice Question - Object Validation

    We are fairly new to TopLink and have a question about doing object validation. We would like perform some validation on our objects that are about to be persisted to the DB. Since TopLink will persist all objects that are reachable from the ojects that are registered (I think) we would like to send a message to each of these objects (validate) before they are persisted. If the object validation fails, we will throw an exception (and the objects will not be persisted), hopefully such that the exception can be received by the client. Has anybody done anything similar to this before, or is there a better way of approaching this?
    TIA for any help.

    Are you using EJBs?
    If so, there are a couple of options that may work better for you.
    1. You could use the ejbStore method for your validation and throw the exception in there. You should be able to get the exception on the client side, but it may be wrapped in several layers.
    2. For more complex validation, you may want to use a session bean to control the validation process. It can interact with your entity beans and provide feedback about why validation fails.

  • Mapping an object using values from multiple tables

    Is it possible to use values looked up in other tables when mapping an object?
    For example: I have three tables. In table 1, I have fields for 'cityCode' and 'stateCode'. Table 2 is a state table which contains a list of stateCodes and corresponding stateIds. Table 3 is a city table with cityCodes listed by stateId (the city code is unique within the stateId but can be duplicated under other stateIds). Table 3 also contains the cityName for the matching cityCode/stateId pair.
    I am ultimately trying to match a cityName to a cityCode. I can't figure out how to tell toplink use the stateId returned when mapping Table 1 to Table 2 via stateCode when mapping cityCode in Table 1 to Table 3.
    Any help is greatly appreciated
    --matt                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    What does your object model look like, do you have a single object with data from all three tables in it?
    <p>
    In general because the cardinality of the tables and usage does not match, I would not recommend using multiple tables to map this. Instead define a CityNameManager class that preloads and stores all of the city names for each state, (possible lazy initializing each set of cities per state). Your getCityName() method in your class would then just use this manager.
    <p>
    You could map the multiple tables but it may be difficult, and would most likely need to be read-only because I don't think you want to insert into the table2 or 3. You basically have a foreign key table1.stateCode => table2.stateCode, (table1.cityCode, table2.stateId) => (table3.cityCode, table3.stateId). You probably cannot define this in the Mapping Workbench, so would need to use the ClassDescriptor code API and an amendment method. If you can't get the foreign keys to work you can always use the descriptor multipleTableJoinExpression and define the join directly.
    <p>
    You could also define a OneToOneMapping to the CityName from your object using the cityCode and using a selectionCriteria() on your mapping to provide an expression that uses the getTable() method to join to the intermediate table.
    <p>
    <p>---
    <p>James Sutherland

  • TopLink Unit of Work Primer classes

    Hello,
    I found the contents of White Paper : "Oracle Application Server TopLink Unit of Work Primer" very interessant.
    It is possible to provide me the java definition of the three classes used: Fart, PetOwner and VetVisit?
    Regards,
    TT

    Sorry about that. I posted that too soon. It should become available today (Monday Aug 22nd).
    Doug

  • Report to check authorization object used in customized programs

    Hi Guys,
    An auditor came and he raised a question to us, he asked whether all of our customized transactions and programs are maintained with authorization checks? The question is how can we check what authorization objects are used for our customized programs and transaction codes? The developer did not maintain the objects used for that program in SU24 table. Is there a program or a report to show us all the authorization object used for a customised program or transaction? Example : T-code MIGO we can check in SU24 table for all the authorization object used. How do we check for customized tcodes? Please advise. Thanks!
    Edited by: Jarod Tan on Nov 25, 2010 9:42 AM

    Note that some programs are built in such a way that no (visible) auth check is necessary, or even desired at all.
    To determine the necessity of an auth check, you should check that starting it has an entry point (tcode, rfc, service) which is appropriately restricted. The rest (whether and where and how a further check is evaluated) is entirely dependent to what the program actually does.
    Well designed applications generally have centralized functions and methods, and the checks are in there or a "base check" they use.
    Others again use the same in UI programming to determine the visibility of functions, to make the application more intuitive for the user. This on it's own is however not a sufficient auth check to rely on.
    Code review is an art form!
    Cheers,
    Julius

  • Dynamic Creation of Objects using Tree Control

    I am able to Create Dynamic Objets using List control in
    flex,but not able to create objects using TreeControl,currently iam
    using switch case to do that iam embedding source code please help
    me how to do that
    <?xml version="1.0" encoding="utf-8"?>
    <!--This Application Deals With How to Create Objects
    Dynamically -->
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:XML id="treeDP">
    <node label="Controls">
    <node label="Button"/>
    <node label="ComboBox"/>
    <node label="ColorPicker"/>
    <node label="Hslider"/>
    <node label="Vslider"/>
    <node label="Checkbox"/>
    </node>
    </mx:XML>
    <mx:Script>
    <![CDATA[
    import mx.core.UIComponentGlobals;
    import mx.containers.HBox;
    import mx.controls.*;
    import mx.controls.VSlider;
    import mx.controls.Button;
    import mx.controls.Alert;
    import mx.core.UIComponent;
    import mx.controls.Image;
    import mx.managers.DragManager;
    import mx.events.DragEvent;
    import mx.controls.Tree;
    import mx.core.DragSource
    import mx.core.IFlexDisplayObject;
    /*This function accepts the item as on when it is dragged
    from tree Component */
    private function ondragEnter(event:DragEvent) : void
    if (event.dragSource.hasFormat("treeItems"))
    DragManager.acceptDragDrop(Canvas(event.currentTarget));
    DragManager.showFeedback(DragManager.COPY);
    return;
    else{
    DragManager.acceptDragDrop(Canvas(event.currentTarget));
    return;
    /*This Function creates objects as the items are Dragged
    from the TreeComponent
    And Creates Objects as and When They Are Dropped on the
    Container */
    private function ondragDrop(event:DragEvent) : void
    if (event.dragSource.hasFormat("treeItems"))
    var items:Array =event.dragSource.dataForFormat("treeItems")
    as Array;
    for (var i:int = items.length - 1; i >= 0; i--)
    switch(items
    [email protected]())
    case "Button":
    var b:Button=new Button();
    b.x = event.localX;
    b.y = event.localY;
    b.addEventListener(MouseEvent.MOUSE_MOVE,mouseMoveHandler);
    myCanvas.addChild(b);
    break;
    case "ComboBox":
    var cb:ComboBox=new ComboBox();
    myCanvas.addChild(cb);
    cb.x = event.localX;
    cb.y = event.localY;
    cb.addEventListener(MouseEvent.MOUSE_MOVE,mouseMoveHandler);
    break;
    case "ColorPicker":
    var cp:ColorPicker=new ColorPicker();
    myCanvas.addChild(cp);
    cp.x = event.localX;
    cp.y = event.localY;
    cp.addEventListener(MouseEvent.MOUSE_MOVE,mouseMoveHandler);
    break;
    case "Vslider":
    var vs:VSlider=new VSlider();
    myCanvas.addChild(vs);
    vs.x = event.localX;
    vs.y = event.localY;
    vs.addEventListener(MouseEvent.MOUSE_MOVE,mouseMoveHandler);
    break;
    case "Hslider":
    var hs:HSlider=new HSlider();
    myCanvas.addChild(hs);
    hs.x = event.localX;
    hs.y = event.localY;
    hs.addEventListener(MouseEvent.MOUSE_MOVE,mouseMoveHandler);
    break;
    case "Checkbox":
    var check:CheckBox=new CheckBox();
    myCanvas.addChild(check);
    check.x = event.localX;
    check.y = event.localY;
    check.addEventListener(MouseEvent.MOUSE_MOVE,mouseMoveHandler);
    break;
    else {
    var Component:UIComponent =
    event.dragSource.dataForFormat("items") as UIComponent ;
    Component.x = event.localX;
    Component.y = event.localY;
    Component.addEventListener(MouseEvent.MOUSE_MOVE,mouseMoveHandler);
    myCanvas.addChild(Component);
    /*How to move the Objects within the Container */
    public function mouseMoveHandler(event:MouseEvent):void{
    var
    dragInitiator:UIComponent=UIComponent(event.currentTarget);
    var ds:DragSource = new DragSource();
    ds.addData(dragInitiator,"items")
    DragManager.doDrag(dragInitiator, ds, event);
    ]]>
    </mx:Script>
    <mx:Tree dataProvider="{treeDP}" labelField="@label"
    dragEnabled="true" width="313" left="0" bottom="-193" top="0"/>
    <mx:Canvas id="myCanvas" dragEnter="ondragEnter(event)"
    dragDrop="ondragDrop(event)" backgroundColor="#DDDDDD"
    borderStyle="solid" left="321" right="-452" top="0"
    bottom="-194"/>
    </mx:Application>
    iwant to optimize the code in the place of switch case
    TextText

    Assuming your objects are known and what you need are simply
    variable names created by the program, try using objects as
    associative arrays:
    var asArray:Object = new Object();
    for (var n:int = 0; n < 10; n++) {
    asArray["obj" + n] = new WHAT_EVER();

  • How to upload data into SAP BW Info Objects using SAP XI

    Hi,
    I need to upload master and hierarchy data into SAP BW Info Objects using SAP XI as EAI.
    Can anyone suggest me the best solution to do it.
    Thanks in Advance,
    Volker.

    Hi! Have you not checked the BW-XI Integration document? It is available on the main page of the SDN section for XI. Almost all the steps for the integration are there...

Maybe you are looking for