cancel
Showing results for 
Search instead for 
Did you mean: 

DP_How to lock KF in the interactive Planning table

Former Member
0 Kudos

Dear Expert!

I want to lock the data in the Interactive Planning table according to each Key figure and a period of time (that mean I can not change the data of KF after locked). How can I do?

e.g: I created a Planning book and data view with following Key Figure:

- Forecast

- GDP

- CPI

- Historical Data

And the time bucket profile of this planning book as following:

- Past: 24 months

- Future: 12months

Now, I want to lock data of the KF "Forecast" in all past and future; lock data of other KF (GDP, CPI, Historical data) in past period.

How can I do now!

I hope to know the question soon. Thanks for your support!

LeGiang

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member187488
Active Contributor
0 Kudos

Hello,

Macro ROW_INPUT() and CELL_INPUT() would be helpful when you control the read-only of key figure.

You can set it as default macro according to your requirement.

In /sapapo/sdp8b, there're two definitions:

1)Select the planning book radio button and edit, in the data view tab, you can specify the editability of historical periods of all KFs in the dataview, by using fields 'Input' and the following 'Frm'.

2)Select then data view radio button and edit, you can select one row or some rows, right click -> selected rows -> output only. By this setting, the row is not editable for the whole horizon.

Settings in //SDP8B would prevent repeated execution of macros when load data into planning book, hence may have better performance.

So please first consider settings in //SDP8B, then use of macro.

Best Regards,

Ada

Former Member
0 Kudos

Hi Ada Lv!

Thanks for your helpful answer. I only want to lock data in "forecast" Key figure for some periods of time in the future (e.g: 3 months in the future). So, how can I do?

former_member209769
Active Contributor
0 Kudos

Hi Giang,

For this, you should use CELL_INPUT that I mentioned earlier. Have '3' iterations in the 'future' when you define the step.

Thanks - Pawan

Former Member
0 Kudos

Hi Pawan!

I see your answer and that is verry helpful to me too. But in my situation, I don't want to use Macro and try to use other solution.

Is there another way for my question?

Thanks!

former_member209769
Active Contributor
0 Kudos

Hi Giang,

Standard settings would not allow you to have key figures in non-editable mode only for few months.

Macro would be the only choice for you in such case.

Thanks - Pawan

former_member187488
Active Contributor
0 Kudos

Hello,

I could not find a better solution than using macro function CELL_INPUT() ...

What's you purpose of doing this?

Best Regards,

Ada

Former Member
0 Kudos

Hi!

In my case, our ABAP team enhace approval function by create a new screen to perform this fution. In the new screen, user send for approval and manage the status of approval but still create and change data in the standard Interactive Planning Table.

After Data is approved, the data in the standard Interactive Planning table is locked (Some KF is locked in few months in the future and some KF is locked in past

That is my situation.

Thanks

former_member187488
Active Contributor
0 Kudos

Hello,

Not quite understand, but I suppose that whether or not lock the KFs and the number of locked periods is passed by your customizing coding, right? So it is out of standard, and you'll need to figure out your own way to realize it.

For example, after get approval of editing the planning book, you save "whether the KFs need to be locked" and "the number of locked periods in future and past" into your own customizing table. Then you write a BADI macro that reads the table, and you lock the cells in your own coding. The CELL_INPUT() macro function uses FM /SAPAPO/ADVF_CELL_INPUT. You can pass appropriate parameters to it in your BADI coding.

Of course there should be other ways, but no standard way ...

Best Regards,

Ada

Former Member
0 Kudos

Hi!

Thanks for all of your support. I think It is quite clear to me.

Legiang

former_member209769
Active Contributor
0 Kudos

Hi LeGiang,

If you would like to not allow any manual input for ALL the key figures in the past, then the solution for this "history" part would be quite easy.

When you define the planning view, specify the "input from" date as the current date. This way, no-one would be able to change any data in the past manually.

The above would also take care of not allowing any manual changes to "Forecast" in the past.

If however, you want only certain KFs should be non-editable while others should be editable, then you should use the function CELL_INPUT:

Syntax would be like

<Macro Name>

<Step Name> ( <Maintain 'processing Area' as 'past'>)

Cell: <Key Figure Row name> ( Attributes ) =

CELL_INPUT(0)

In above, remember that in <Step> row, you should double-click and change the value of the field 'change scope' to "attributes" from 'values'.

For the future and past, if you want that Forecast should be non-editable, then you could do this by another macro. Define a default macro that would change the attribute of the KF for Forecast as "no input allowed" for all the time periods. You could do this by using the function ROW_INPUT.

Your macro would look like -

<Macro Name>

<Step Name> : ( 1 Iterations :INITIAL;INITIAL )

Row: <Key Figure name e.g. Forecast> ( Attributes ) =

ROW_INPUT( 0)

In the row line above, remember to double click and change the value of the field 'change scope' to "attributes" from 'values'.

If you need more help, do let me know. This second macro would actually make the whole row non-editable. You could create these macros as a default macro, and have them run in the end after the other default macros.

Thanks - Pawan