Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Some concerns about the sap update system

Former Member
0 Kudos

Hello,

i have requirement to make some database changes using standard function modules.

The first steps are

- move a Handling Unit to another storage bin (L_TO_CREATE_MOVE_SU)

- unpack some material (BAPI_HU_UNPACK)

These steps depends on each other:

that means, In order to unpack the HU, the first step has to be finished succesfully.

I tried to handle this problem using the sap update system.

So i built for each step one update task and at the end of all steps i start the update part of my LUW by using 'commit work and wait'-statement.

But the whole update process fails; sm13 indicates, that there is an error during the the second step: (MB_CREATE_GOODS_MOVEMENT fails und then a rollback is made).

Edited by: Michael Dirndorfer on Aug 11, 2010 12:25 PM

2 REPLIES 2

Former Member
0 Kudos

(continuing)

The reason for this is, because the first step isn't still committed to the database.

If i don't call the function in update task und use a 'commit work and wait' after the first step, i have no problems.

(But also in this case, if have to make a waite-statement after the first commit work and wait... )

Now i have same questions:

- is the update system not suitable, when the steps depend on each other? especially if you use standard funtion modules

- or should i make a single sap luw for each step (commit work and wait after each step)?

I also got another problem working with the update system:

let's say in the first step an internal number is created, which i need in the second step.

How can we do this using only one SAP LUW ( except using global variables in the function group / selects in the update task)?

Thanks

0 Kudos

Hi Michael,

- is the update system not suitable, when the steps depend on each other?

LUW works on the concept 'ALL or Nothing'. LUW consists of the related work, not the dependent work.

For instance, your bank transfer. If you are transferring an amount 100 to your friend X, then the LUW consists of

1. Debit your account with Rs 100

2. Credit X account with Rs 100.

If any case fails nothing need to do (rollback).

But in your case, the first one should be completed inorder to priocess the second. Do this will not work using update module.

- should i make a single sap luw for each step

If you have more than one related task, then go for the LUW, otherwise, not necessary or logically not required.

Regards,

Selva K.