cancel
Showing results for 
Search instead for 
Did you mean: 

Locking planning area/planning book during batch execution?

Former Member
0 Kudos

Hi

I'm curious how people out there solve the issue of users locking the planning area while batch jobs are executed on it?

We have a globally used system, so someone somewhere is always at work and could potentially open the planning area in edit mode via a planning book.

Thus when we have to run batch jobs for loading and manipulating data the jobs may crash since users can lock data while the job runs.

Currently we manage by informing people via mail whenever they should not edit data. But this is not really practical once the group of users become large and people might forget etc.

Is there an elegant way to solve this issue?

Ideally you'd need a way to lock/unlock access to a planning book or planning area for certain users I suppose?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Simon,

We had this problem at one of my previous clients and this is what we did.

There were about 5 countries, USA, Two in Europe and two around China. So they are fairly in separate time zones.

Since they all use the same planning books, we have created a nomenclature for selection ids starting with country codes.

So some body in US would always use the selection ids starting with US*** and we have restricted the user authorizations using the object C_APO_SEL2 and function APO_SELID where you can restrict by selection names.

So we assigned the appropriated roles with restrictions to users by region and ran this jobs. This restricted the users from "overlapping".

The other thing we did is to create a simple program that calls FM "SAPAPO/TS_DM_LOCK_UNLOCK" and we have a selection screen in program where you can specify the user names to lock/unlock.

So we ran this job just before the jobs start and job after completion to unlock the users.

This way, we can restrict the selections to different users and the users in that area when a job runs for them.

Your requirement could be different. Think about the above and you may get ideas.

Former Member
0 Kudos

Hi Simon,

The best approach will be to define roles for user and categorize them and lock that category of those user who have the authorization on the planning area on which batch job will run.In addition to this make use of Locking Logic available in planning area.

Hope this helps!!

Regards,

Jatin

Former Member
0 Kudos

So you're saying it should be handled via authorizations? It seems a bit heavy since the auth settings usually needs to be transported in our setup before they become active.

Former Member
0 Kudos

Simon,

Locking a user does not require transport.

Best Regards,

DB49

Former Member
0 Kudos

Locking users would lock people out of the system completely though.

The people who use our setup often uses APO for lots of other daily tasks (logistics and production planning for instance.)

So it seems rather drastic to lock them out completely in order to prevent them from interfering while the batch jobs run.

It can certainly be done, but there really has to be a better way?

Former Member
0 Kudos

Simon,

Lock users only when the batch job is about to begin and unlock once the job is complete.Also only those users will be locked who will try to access the specific planning area which is under process. Rest users can still work on other objects.

--

Jatin