cancel
Showing results for 
Search instead for 
Did you mean: 

Macro to Unlock the Cell on the start day of the Fiscal period

Former Member
0 Kudos

Dear Experts

We are using fiscal periods for the forecasting.1 period = 15 days.We forecast for 24 fiscal periods.

We only give chance to some customers to update forecast on 1 day of the fiscal period in the customer planning book .In this regard we have to lock the cell all most all the days except on 1 st day of the fiscal period.If the first of the Fiscal period is Sunday or Saturday, system should not unlock.

We did not maintained any Time stream ID to the storage bucket profile.

Example:

KF1 is used by our customers to update forecast.This keyfigure should always in the unedit mode.On the first day of the Fiscal period system should unlock the keyfigure.If first day of the period is saturday or sunday then system should not unlock this keyfigure.

Can we use calender in Macro?

Is it possible to achieve above logic in our case since we did not maintained time stream ID in storage bucket profile.

Please give your expertise opinion on my requirment.

regards

Vicky

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vicky,

Whilst other simpler options are given by others for locking /unlocking a KF with macros, Work around as below, if feasible in your environment.

Create two planning books (or with authorization at data view level, 2 data views).

One planning book PB1 with the KF1 in non-edit mode. This will be used normally.

Other planning book PB2 with KF1 in edit mode.

Create one more authorization profile/ role for each customer user.

Assign this additional authorization profile/ role only on specific dates as per background job to give additional authorizations.

Otherwise, if no. of user licenses is not an issue, then create an additional user id for each of the customer with additional authorizations and unlock these additional user accounts only on specific dates by background jobs.

We had in one project, some additional user accounts for similar( not exactly same) requirement. This gave better traceability.

Regards

Datta

Former Member
0 Kudos

This is a good aproach. You can also check in user exit BAdi /SAPAPO/SDP_SELECTOR. There you may be able to check user ID, planning view ID. You may also be able to switch on or off to change mode.

Answers (2)

Answers (2)

Former Member
0 Kudos

Vicky

You should probably be able to do this with with a combination of date functions in macros. Try function FISCAL_BDATE().

http://help.sap.com/saphelp_scm70/helpdata/en/12/3dfd81126e1c448c870f335f11d016/frameset.htm

Rishi

Former Member
0 Kudos

Try with functions: FISCAL_BDATE() to get the first day of FP. In second chekc you check this agains the current date (function DAY() like DAY ( TODAY )

If the FISCAL_BDATE() <> DAY(TODAY) --> lock planning area