cancel
Showing results for 
Search instead for 
Did you mean: 

Locking of planning books

Former Member
0 Kudos

Hello All,

there are lot of threads for this topic on this forum and I have been through almost all of them. we have lots of background macros being executed as part of daily batch process and since the APO system is used globally, we are facing the issue of errors/process chain failures because of user locking the CVC when batch process is executed. In order to overcome this, we are thinking of a solution ('z' program) that will:

1. give a list of users that are in change mode in a planning area (locking CVC in change mode).

2. give a pop-up to the users to save and exit the data views (FM - TH_POPUP)

3. Delete user sessions that are locking the CVC

4. update of a variable in a z table. variable is DISPLAY_STATUS. we are setting this value = 1.

5. the program ends after the variable is set.

Now, we are planning to call badi /sapapo/sdp_interactive; method DVIEW_DISPLAY_MODE_SET whenever user tries to enter the planning book/data view pertaining to a particular planning area, the badi will be called and will check the variable value set in the program earlier. if the variable value in table = 1, the badi method will set the variable CV_DISPLAY_STATUS = 2. this will automatically, put the user in display mode.

After the background jobs are completed, we will execute another program that will set the variable in z table = 3. Now, when user tries to enter planning book/data view, badi will refer to this variable in the table and update CV_DISPLAY_STATUS = 3. This will enable the user to be in change mode.

My question: Will this approach work? Is it possible to check a value of a variable in custom table and based on that value, can the badi/method be used to change CV_DISPLAY_STATUS?

Any hints/suggestions will be very much appreciated.

Regds,

Ashutosh

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Good news is this entire concept works! and you are in the right direction. You will be able to make use of the aforementioned BADI to change the display/change mode of the plannning book.

One pointer, there is a check to see if it is a DP or SNP planning book in the example implementation, make sure you make correct use of it.

Another thought, After step 3, you might also want to check the locks have also been deleted. Sometimes an orphan lock might get left behind when a user session is deleted.

Also, in our implementation, we locked some specific transaction like /sapapo/sdp94. You might want to consider that option as well.

Hope this helps.

Thanks & regards

Mani Suresh