cancel
Showing results for 
Search instead for 
Did you mean: 

Need to Lock Planning Area by using Enque and Deque Technique.

Former Member
0 Kudos

Hi Experts,

My problem is I have to lock the planning area till the Batch program complete and I have to unlock the planning area once the batch job is completed. if any one of the user is login i.e. accessing planning book while batch job is running then batch job getting Failed.

we can check the lock in SM12

We have a custom program to send message to user to come out of the planning area but it does hit upto the mark.

we are expecting some solution to lock and unlock the plannig area till the job completes.

I was using some functional module to lock the planning area but it does not helped us. Kindly provide some help to acheive this situation

The below functional modules I used to lock the Plannning area ZDP31. I have given the input while executing the Function module PAREAID = ZDP31 (our Planning area Name)

1) ENQUEUE_/SAPAPO/E_PAREA

2) /SAPAPO/TS_DM_LOCK

3) /SAPAPO/TS_DM_UNLOCK_NEW

4) /SAPAPO/TS_DM_LOCK_UNLOCK

Please help me its in high prioity for us.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Balaji,

Here are the needful function modules where you can use to lock the PA by enque & deque technique..

a) ENQUEUE_READ Pass Planning Area value as GARG and PAREAID as GNAME to get information about lock entries for selected planning area. GUNAME corresponding to GNAME = /SAPAPO/DM_PAREA_LOCK and GOBJ = /SAPAPO/E_PAREA entries provides user id (s) locking the planning area displayed in the field GTARG.

b) TH_POPUP to send out popup messages to the users locking the Planning Area.

c) TH_DELETE_USER to kick off users (GUNAME) who have been locking the planning area.

I hope this helps...

Cheers !!

Regards

Rahul Chitte

samir_ali
Participant
0 Kudos

Hi Rahul,

We have used "TH_POPUP " and found very strage result. its working fine in Development sytem but not in Live system. When we went to SAP they say "TH_POPUP " is not released for Customer.

regards

Samir

0 Kudos


Hi Samir/Rahul,

I am also facing same issue, Please let me know if you find some solution to overcome this issue.

In my case funtionality is working fine in Dev but we have issue in QA.

Thanks!

Anil Sahni

former_member583013
Active Contributor
0 Kudos

Hi,

You can create a program to Lock planning areas

prior to our Batch jobs so that they may not fail due to user locks.You

can use the report /SAPAPO/TS_LC_DISPLAY_LOCKS to find the users and

planing area which is locked.This report is available from note

1265235.Once you identity locked users then terminate their sessions and

lock planning area using function module /SAPAPO/TS_LC_LOCK.

Regards,

Sunitha