Anda di halaman 1dari 8

Sap bc414

Work process can only execute one db luw. So work process must always end db luw when its finishes the work. Implicit db commits : 1. dialog step completes 2. rfc 3. wait 4. messages like I,W, E. Explicit db commit : fm DB_COMMIT or COMMIT WORK. Implicit rollback : runtime error or messages like A or X. Explicit rollback : ROLLBACK WORK.

Database luw

Sap luw
Logical unit consist of several dialog steps whose changes are written to db in single db luw is called sap luw. Can span over several dialog steps and can use series of different work processes. All the db changes bundles into one single db luw. Bundling techniques are : using fm for updates, using subroutines, using fm in other r/3 systems.

Using fm for updates


Create fm with processing type update module with following options 1. immediate start : v1 functions, can be restart. 2. immediate start no restart : v1 functions. 3. delayed start : v2. 4. collective run. Call fm in update task. Fm flagged for executin using a special update work process. Fm parameters are stored as a log entry in VBLOG table. If error occurs during update, rollback work executes and fm not called again and entry delete from vblog table. If the technical error occurs, the update wp triggers a db rollback and places the log entry again in table and it sends mail to user and vblog entry can be processed again. Update db asynchronously.

Perform on commit level idx or rollback. This statement registers subroutine to execute when commit work or rollback work statement reached , and execute in same dialog work process and before other registered update fm. If this statement occurs in update fm, then it will execute lastly in update work process. They dont have parameter interface, data can be pass by abap memory or global variables. And data inconsistency. Better performance then update fm.

Using subroutine

Call function fm in background task destination dest, parameter_list as separate unit. Register fm to execute till commit work statement reaches in tables ARFCSSTATE AND ARFCSDATA. If destination not found then executable RSARFCSE is started in background. This attempts to start fm registered for an SAP LUW in their destination 30 times, if still not found, this is noted in table ARFCSDATA as CPICERR Entry. This entry get delete from ARFCSSTATE after 8 days. Using SEPARATE UNIT, the fm is executed in a separate context, using separate transaction id, in which the global data of function group not influenced by previous calls.

Remote fm

Sap locks
Span over several dialog steps Lock objects.

Asynchronous update Updating asynchronously in steps : synchronous update local update. Asynchronous update : dialog work process dont wait for update work process to finish. Updating asynchronously in steps : vblog entry can be divided into primary v1 and secondary v2 steps. V1 and v2 are process in separate db luws. Lock entry remove once v1 processed, there is no locking for v2 updates. V1 : time critical, lock critical. Synchronous update : commit work and wait, perform on commit. Local update : update program is process by same work process that processed the request, dialog user has to wait till update to finish, disadv : parallel nature, adv : reduce amount of access to db. SET UPDATE TAST LOCAL. Local update switch reset after each commit or rollback work, and therefore it should be set at beginning of SAP LUW.

Update techniques

Anda mungkin juga menyukai