Lock Planning Area
Hi,
I need to lock planning area. I used the FM /SAPAPO/TS_LC_LOCK. It works fine but when I come out of the program all the locks are released. Actually this is the standard behaviour of Enqueue functionality.
Tried this FM also - /SAPAPO/TS_DM_LOCK but of no use.
As per my requirement I need to Lock the Planning area and then run all the Jobs and then Unlock the planning area. Please help to achieve this functionality. In short I need to Loack the planning areas until I unlock them explicitly.
Thanks!
Hi,
Try these function modules separately ...
To lock planning area *******
CALL FUNCTION 'ENQUEUE_/SAPAPO/E_PAREA'
EXPORTING
MODE_/SAPAPO/DM_PAREA_LOCK = 'S'
PAREA = PL_AREA
IOBJNM =
SELECTION =
X_PAREA = ' '
X_IOBJNM = ' '
X_SELECTION = ' '
_SCOPE = '2'
_WAIT = ' '
_COLLECT = ' '
EXCEPTIONS
FOREIGN_LOCK = 1
SYSTEM_FAILURE = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE 'Planning area not locked' TYPE 'E' .
ELSE .
MESSAGE 'Planning area locked successfully' TYPE 'I' .
ENDIF.
To unlock planning area *******
CALL FUNCTION 'DEQUEUE_/SAPAPO/E_PAREA'
EXPORTING
MODE_/SAPAPO/DM_PAREA_LOCK = 'S'
PAREA = PL_AREA
IOBJNM =
SELECTION =
X_PAREA = ' '
X_IOBJNM = ' '
X_SELECTION = ' '
_SCOPE = '3'
_SYNCHRON = ' '
_COLLECT = ' '
IF sy-subrc <> 0.
MESSAGE 'Planning area not unlocked' TYPE 'E' .
ELSE .
MESSAGE 'Planning area unlocked successfully' TYPE 'I' .
ENDIF.
Similar Messages
-
Need to Lock Planning Area by using Enque and Deque Technique.
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.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 -
Multiple person working on same planning area
Hello,
Can anyone please suggest how multiple people can work on same planning area at the same time. We are working on implementation project and our team has to work on different planning levels in the same planning area. But locking prevents us to achieve the same.
Any ideas?
RegardsHello,
Regarding the change of the Area itself, it looks logic that two person cannot change its design at the same time.
If I remember well if somebody is changing the Area, then everything is locked. But it is not the case if two person are working on separate Levels.
A very important thing (correct me if I'm wrong) is that if you have been in change mode of an Area, Level, Package, etc... in your current BPS0 session, you will still lock it untill you get out of BPS0.
Then, if in your team everybody knows on wich level they have to work and then don't go in change mode of other elements it should work (but not for the area because it contains all the subelements...).
By the way, check also <a href="http://service.sap.com/~form/handler?_APP=01100107900000000342&_EVENT=REDIR&_NNUM=635244">Note 635244 - Locking transaction data in SEM-BPS</a>:
<i>Two parameters are only designed to facilitate the Customizing process, if users
carry out Customizing in transaction BPS0 within a project.
o SEM_BPS_NO_LOCK: This parameter has the effect that transaction
data is not locked at all. Never use this parameter in a production
system. As of Support Package 14 for Release 3.1B, parameter
SEM_BPS_NO_LOCK is released by an additional switch in table
upc_dark2: For this purpose you have to maintain a record with
param = ENABLE_NO_LOCK and value = X in table upc_dark2. Only then
the system includes parameter SEM_BPS_NO_LOCK. The parameter can
then be useful if you want to test functions or the manual planning
with 'test data' in Customizing.
o SEM_BPS_SAVE_UNLOCK: This parameter only works in transaction BPS0;
it has the effect that the system unlocks data (if possible) after
it has been saved. Therefore, the system only simulates an exit and
reentry in transaction BPS0 with the last active detail
application. Therefore, the above parameter can be helpful if many
people work on Customizing in transaction BPS0, because objects can
be unlocked earlier.</i>
You can add these parmeters to a user id in the "Parameter"tab in T-Code SU01.
Best Regards,
Jeoffrey -
Hi,
Has anyone worked on code for locking planning book? I already have a code but it fails at one scenario to lock the planning book. There are FM to lock the planning book, which behave exactly as I want in that scenario, but when I use them in my program even they fail to lock the planning book in that scenario.
For more details, you can check my thread for which link is given below
@Moderator - I had opened a similar thread before but it was locked by moderator (Thomas Zloch) with comment to do my own research. I have already done much research about this and have found my problem to be still existing in all the codes/solutions. I have already posted in SAP APO section regarding the specific problem and haven't got any solution from there too. Hence decided to check in ABAP section if any abapper had worked on the same.
[Lock Planning book before batch job run|Lock Planning book before batch job run]
Thanks!Your first attempt left no choice but to lock it.
Planning book lock
Thanks for supplying more information this time.
Thomas -
Locking plan versions , plant wise
Hello experts,
Requesting your expert advice in the below requirement of ours.
The requirement is to plan cost using plan versions, period wise. This is achievable in CJR2.
Now when the user is planning cost for the next month, he would like to lock that plan version
for the previous month. This also can be achieved by T-code OKP1.
But the users are restricted to each plant. So the users in plant XXXX, if he locks the CO version say AAA
the other users in plant YYYY can still be able to plan with version AAA for that period.
In one statement, this is like locking planning version by plant wise.
Do we have any options available for this in SAP.
Or any other suggestions to carry out cost planning , plant wise.
Thanks in advance.
Regards
SandeepI think you need to go for a Z development.
Create one Z table and maintain the combination of user and plant.
Use a Z tcode for cost planning where you give plant as selection field and also use authorization object to check whether th user is available in the Z table maintained. and also update another Z table where plant status locked after cost planning. -
How can I lock planning data using SEM-BPS Status tracking monitor
Hi,
What are the pre-requisites for being able to lock planning data when using certain header characteristics
in customizing the Status and Tracking System in BPS ?
I have done the following and expect the locks to be set, but they are not set and the data is still available for planning :
1. Assigned the 0COMPANY hierarchy to a subplan with a planning area which has header characteristics : VERSION and CALYEAR.
Header characteristic customization is as follows :
CALYEAR = 2005
VERSION = V1
2. Have set the status of all nodes in the hierarchy to 'approved' .
3. I execute a Web planning interface for this planning area with a selection of a 0COMPANY within this hierarchy, PLANYEAR = 2006, CALYEAR = 2005 and expect the plan to be locked but its not.
Could someone kindly explain why ?
Regards.
PS : Hope the scenario is clearly explained.Hello Anuradha,
The plan data should be locked after the status is switched if
- the package selection used in the planning function or planning layout is entirely contained in the header selection
- you do not access the plan data via a multi area
- the user does not have the authorization "STS_SUP" (super user).
It is important to note that the characteristic used to define the hierarchy is not used in the locking. The characteristic is only used to define the hierarchy.
In your example only the characteristics year and version are relevant for locking as these are the only ones used in the header selection. The data should be locked if the package selection is year = 2005 and version = V1. If you have a selection like year = 2005 and version = V1, V2 then the data is not locked as the selection is not completely contained in the header selection. Note that even if you only use version V1 in your selection but if you use a planning layout that has V2 in a comparison column then the system will enlarge the selection and data would not be locked.
Best regards,
Gerd Schoeffl
SAPNetWeaver RIG BI -
Planning area data not matching with backup cube / PSA
Hi friends,
while loading data from planning area to backup cube , for the key figure ( result of a macro),the data in planning area is not matching with PSA as well as with cube.
At the same time Data is matching at total level but not at disagregated level. And many times it disagregate in equal Proportion in cube/psa.
Pls its urgent.
Pts for sure.
Vishal.
9326179903make sure you have replicated the extraction of the data source. This is needed to ensure your backup cube gets the current data as in the planning area
if you got to /SAPAPO/SDP_EXTR then you can see this button
you can set this up as a program scheduled to run before the updation of your cube
As for the disaggregation, test at what level you are choosing your characteristic? ( i suppose you can choose the level)
Are you extracting at a detailed level or at the aggregated level
Is your macro saving the data into a Keyfigure or is it an auxilliary KF or something? -
Planning area data not updated in infocube in APO system
Hi all,
User is uploading a flat file using addon program to an infocube 1, from this infocube data for sales forecast KF is getting transferred to a planning area KF using standard program RTS_INPUT_CUBE. I can see the updated data in Planning book (which refer the same planning area) data views. In planning book the sales forecast data is also getting copyied to second KF 'Arrangement FC' and its correct.
Now there is a infocube 2 (second) which is getting data directly from this planning area (infocube also contains both KFs). But When i checked this infocube 2 , the updated data is availabe in Sales forecast KF , but arrangement forecast KF is having old data only and user is running query on second KF , so he is getting wrong report.
Since there is no data flow for this infocube 2, and it is getting data from planning area, I feel its remote infocube.
I have also found the datasource for this planning area but don't know how to move further to find why data is not updating properly? Please help on this.
I have information that 2 weeks before data was properly updated, but this time data is not updated,
system version is SAP SCM 4.0Hi Vivek
it is advisable to run the background jobs when the planning books are not being accesses by the users to prevent such inconsistencis. Hence i would advise you to run the jobs durng non-working hours. and if you have a global system, then you may restrict to run the jobs based on regional levels.
in addition, it is also a good practice to run consistency jobs before and after your have completed the background jobs. i hope you are using process chains to execute the sequeuce of jobs. if yes, then you can add consistency check jobs in the process chains.
some of the consistency check reports are :
/SAPAPO/OM17 - liveCache Consistency Check
/SAPAPO/TSCONS - Consistency Check for Time Series Network
/SAPAPO/CONSCHK - Model Consistency Check
and so and so forth..
you can find these conssistency jobs under APO Adiminstration --> Consistency checks in APO.
let me know if this helps.
Rgds, Sandeep -
Pension plans are not appearing under HRBEN0001
Hi All,
I have configured 3 pension plans and plan status for 2 plans are losed and one is open. I have set up everything correctly. But I am not able to see under Tcode HRBEN0001. Can anubody give me lights on this?
What I understood is closed status will not reflect via HRBRN0001. Am I right or wrong?
Regards,
PurnimaHi Sarah,
Yes, that person is eligible for that plan whose plan status is open. But when I am going through HRBEN0001 for that category of employee, I am not able to see that plan. I checked all configuration. Everything looks like OK. Can you please tell what I am missing?
Regards,
Purnima -
Load from cube to planning area
Hi,
We are facing a problem in loading data from Cube to planning area, we need to distinguish between the Zero and the blank values in planning area when loading data from cube to planning area.
Scenario is like this.
For a CVC u2013A on day D I am having key figure value as blank and on D1 is Zero and on D2 is 2, I want the same to appear as my planning area data If I load this data to cube my day D value will appear as Zero (but it was blank) and on D1 Zero and on D2 as 2 in cube.
I am using Std T-code /SAPAPAO/TSCUBE to load data from cube to planning area, in std T-code we are having option of ignore Zero, if I use this it will also stops the actual zero value(which I need) on day D+1 to come in to planning area which I donu2019t want.
I want my planning area data to be as blank on day D and Zero on D1 and 2 on D2 after loading data from cube to planning area..
Can any one put some light and help me out from this issue.
With regards,
SreeramaHi Seerama,
I am not sure to understand completely the issue: do you have an issue in the cube or in the planning area?
In order to differentiate a blank for a zero in the planning area, you need to set the flag "zero allowed" in the planning area settings. (in the tab keyfigure, click details, then for each key figure you can select or not the flag "zero allowed")
When you load the data, you should indeed not flag "ignore zero value"
If the issue you have is in your cube (between the file and the cube) then it is another matter...
Kind Regards,
Julien -
RE : BI APO Question Reg Data feeding from cube to Planning area.
Hi BW Experts,
iam working in an Implementation project for SCM in BW prcisely working with APO Bw..
For that I have taken historical data as a flat file and loaded it in to the external BW Infocube and its fine...
Second step I have created generate export datasource on topr of BW infocube and replicated in to Bw and used this export datasource as datasource for APO BW Infocube which is inbulit BW System from External Bw..
also I have created tranformations and data is loaded in the BW cube in APO system.Also Included Version charecterstics..
When I try to fed the APO Cube data to planning area Iam gettinga the following warning itsnot an error:
1.Key figure copy: InfoCube - planning area (DP) 01.01.2010 to 31.12.2010-- Successful
*2.No data exists for the selection made (see long text*
Diagnosis:Data could not be loaded from the Cube for the selection you made. Check whether the Cube actually contains data that is relevant for your selection.
For the second point I have time charecterstics filled in the infocube which Iam feding to a Planning area like 0CALMONTH,0CALWEEK,FiscVarnt,0CALMONTH
3.Characteristic assignment: No data copied --- Message
Can you please help me with your thoughts so that i wll try to corner the issue I will be highly obligedHi,
As I understood, you have loaded data from external BW cube to APO BW cube and now loading planning area from APO BW cube.
I hope your settings in /SAPAPO/TSCUBE transaction code would be correct and you have selected the correct planning version with correct cube.
Check if Data in APO BW cube is available for reporting or not and data is avilable for given selction (if any but I guess you are not giving any).
Thanks,
S -
Loading data from Cube to Planning area
Hi,
If I am loading data from a cube to a planning area using transaction TSCUBE,
does the system load data into planning area for the combinations that exist in the cube or does it load for all CVCs?
For example,
I have my CVC as Plant, Material, Customer
If there are 4 CVCs in the POS that were previously generated as
Plant--Material--Customer
01--M1--
C1
01--M2--
C3
01--M2--
C2
01--M4--
C5
If the cube has data like this:
Plant--MaterialCustomer----Qty.
01--M1C1--
10
01--M2C3--
20
01--M2C2--
5
(doesnot have the last combination), then if I use TSCUBE transaction to load data to Planning area from this cube,
is the data loaded as
Plant--MaterialCustomer----Qty.
01--M1C1--
10
01--M2C3--
20
01--M2C2--
5
Only for the 3 combinations that exist in the cube and not load anything for the last one
OR
is the data loaded as
Plant--MaterialCustomer----Qty.
01--M1C1--
10
01--M2C3--
20
01--M2C2--
5
01--M4C5--
0
Load all 4 combinations and send 0 as the cube doesnot have this combination?
Hope I am clear on this question.
Thanks.Thanks a lot Vinod, Srinivas and Harish. The reason why I am asking you is that we have a scenario where we get this situation.
We initially get data from R/3 to BW to APO like the below:
Plant--MaterialCustomer----Qty.
01--M1C1--
10
Later when the customer is changed or bought out by somebody C1 is changed to C2. Some times when the business doesnot know who the customer is initially they just put C1 as dummy and then after sometime replace it by C2. Then the new record coming in is as follows:
Plant--MaterialCustomer----Qty.
01--M1C2--
10
BW can identify changes in transaction data but not in Master data. What I mean by this is when Qty. 10 changes from 10 to 20, the system can identify it in deltas.
If the customer (master data) changes to C2 from C1, the system thinks it's a new record all together then if I use delta loads, it gets me the following:
Plant--MaterialCustomer----Qty.
01--M1C1--
10
01--M1C2--
10
If I am looking at Plant and Material Level, my data is doubled.
So we are planning to do a full load that works like this:
1. Initial data like the below:
Plant--MaterialCustomer----Qty.
01--M1C1--
10
The CVC is created and the planning area has Qty.10
Then we delete the contents of cube and do a full load into the cube with changed customer
Plant--MaterialCustomer----Qty.
01--M1C2--
10
This time a new CVC is created. Then we have another 10 loaded into Planning area.
If the system loads all CVCs, then the it would send
Plant--MaterialCustomer----Qty.
01--M1C1--
0
01--M1C1--
10
If the system loads only combinations in cube,
then it loads
Plant--MaterialCustomer----Qty.
01--M1C2--
10
But the system already has another 10 for Customer C1 duplicating the values.
We are trouble in the second case.
We had to go fr this solution instead of realignment as our business has no way pf knowing that C1 was replaced by C2.
Hope I am clear. -
Getting data in GATP Planning area on open Sales Orders yet to be PGI'ed
This is in context of allocation planning.
I understand there are two internal GATP relevant key figures AEMENGE (allocation) and KCQTY (incoming sales order quantity) which come over from R3. These two key figures are part of any allocation planning design to track consumption of allocation from sales orders.
We have a requirement to also get information on open sales orders not PGI'ed into GATP planning area. Is there a way to do this without configuring SNP and only core interface ? (Releasing data from SNP to GATP does not work since the levels are different)Hi
Just to correct you. The tcode is LBWQ and not LBQW.
Well as per your lines that it is not possible for 400 users to manually feed the data after changes .I totally agree.
To help get the same functionality we have v3 jobs or direct delta which serves the same job for you.
This is a job that runs at a regular interval as per you set it in the tcode LBWE.
If the Datasource is Delta Enabled then only these jobs would be available to run for those data sources and if incase the DS is Full then you dont need these jobs at all.
Thus once you set your DS as Delta. Go to LBWE select the DS you are working upon for delta
After finding the DS you see two options update mode and update.
Update mode -you can choose the type of update mode for example direct, queued and so on.. Generally we use Queued Detla
Update - you have to set here how do you want it to run and from wat date etc.clickin on job control gives you a window where in u can set all the fields as per ur requirement.
Once after these are done your job would automatically run and collect the changed records to the delta queue and from there you can pull the same using info pack.
Hope that clarifies your doubt to some extent.
Edited by: Puneet Chawla on Jan 29, 2010 8:52 AM -
How to use Different Calendars in one DP Planning Area
Hi Experts,
I would like to know that whether it is possible to use different calendars in single planning area ? Will explain the scenario in details as under
We have 3 plants having separate calendars (different weekly offs). Now using single planning area in DP, I have to plan the demand for all the 3 plants in weekly buckets.So I need to refer to 3 different calendars in single planning area. Is this possible in DP ? As far as I know, we can attach only one fiscal year variant to the planning area through storage bucket profile. Also in this case, the system do not refer to public holiday calendar there by assuming all day working except the weekly off.
Thanks in advance
Regards
SandeepThanks Sujay for immediate reply. The time bucket profile will just help me see the data in different buckets say Daily, weekly or monthly. However this still doesn't solve my problem. As only 1 Fiscal Year Variant is attached to the storage bucket profile, the system still will read the same profile for all the plants & will assume the same weekly off for all the plants which is not true in reality.
Any other suggestion for considering different weekly offs for different plants in the same planning area ?
Thanks & Regards
Sandeep -
Taking long time to initialize planning area.
Hi All,
Few questions on initalizing planning are. We have about 500000 CVC and 8 millions records in it. We have recently upgradd to SCM 7.0. I am noticing now that every time we run background job to create CVC and initialize planning are, I noticed that hob SAPAPO/TS_PAREA_INITILIZE is taking lont time about 1.5 hours . Dont know why is it something to do with Memory or can we do any setting to improve performance.
Also please advice if we have to initialize planning area every time we create CVC'c or Realignment. Or just during month end job.
Thanks
KV
Edited by: KVerma on Oct 30, 2009 5:22 PMHi KV,
1) Housekeeping of your existing data by archiving or deleting unwanted
data and keep your system free from all inconsistencies could be your
primary solution to resolve this issue
2) To keep the size of time series objects to a manageable minimum it makes
sense to initialize planning areas by scheduling background jobs that run
periodically. This is sometimes known as working with rolling horizons.
3) If you want the system to roll over periodically without scheduling the
same job repeatedly, you should use selection variables to enter relative dates.
The system then calculates the start and end dates each time the report is
executed. For instance, you specify that the initialization period should be
from 12 months in the past to 12 months in the future. If todayu2019s date is
July 1, 2003, this means that the initialization period starts on July 1, 2002
and ends on June 30, 2004. If the report is started anew on August 1, 2003,
change the dates to August 1, 2002 and July 31, 2004.
Regards
R. Senthil Mareeswaran.
Maybe you are looking for
-
Import Html text and convert to InDesign tags
Hello everybody, The script receives a JSON with text (html markup: headers <h1>, <b></b>, new line characters, ...). I have to save the converted text into a temp text file and then do .place() into a text frame. That's the only way it can recognise
-
Dear Expert, I am trying to assign the default Warehouse via DTW > i am putting the Warehouse code in the field of default warehouse in Item templates but failed . Error is {OITM.DFLT} The Connected value 1 was not found in the table Warehouse Applic
-
Drill through report with parameters that user can change
Hi Team, Need to provide user the ability to select the parameters in drill through report. But even after changing parameters to different values and click view reports.Its getting reset to the parameter that being passed from main report. Is there
-
please can anybody help me with this line of code? i need to know eactly what the code is talking about.. its hard for me to know.. please i need explanation.. the code is displayed below: Private Shared Sub Main() Application.EnableVis
-
Regarding showing of all the expense account with amounts
Hi, I want to create a report which will show all the expenses account name and the amount in a already existing XL Report of sales margiin. Below this report i want all the accounts. How to put group in a row. How to do this? regards priya