cancel
Showing results for 
Search instead for 
Did you mean: 

BW-IP: Change Planning Function Characteristic Used in Planning Function Filter

0 Kudos

Hi All,

I have a requirement for which I need to create a custom planning function based on COPY function provided by SAP. I'll be getting reference data and am using blocks as well.

Now, in planning function filter, I have 0COSTCENTER that is restricted by a variable. This variable is a single value variable and is mapped to the variable used in AO query. In other words, whatever value user enters in selection screen of AO, gets transferred to this variable.

In my code of custom planning function - I haven't touched a thing in any of the methods except - EXECUTE of interface - IF_RSPLFA_SRVTYPE_IMP_EXEC_REF.

In execute method, among some calculations, I now have to change the value of costcenter to some other value than what was there originally.

  • I would need suggestions if such a design is possible or not?
  • What steps (workarounds) do I need to take make this work?

Additionally, if I do try to change costcenter value - I get this error:

"Value of characteristic 0COSTCENTER: Z0001 is not included in the selection"

Kindly advise.

Thanks.

Regards,
Sagar

PS: As broken as SCN has ever been - I'm unable to unBOLD the text. Miss you StackOverflow.

0 Kudos

One way I think of it is, to have another characteristic that is a copy of COSTCENTER in our infoprovider. Same master data and everything. Maybe just make a reference infoobject. Then use this characteristic in filter and change costcenter to whatever I need in planning function.

Accepted Solutions (0)

Answers (4)

Answers (4)

0 Kudos

Hi Gregor,

I concur with the usage of FROM and TO in parameters just like standard COPY function. Buts that where the dilemma is. I do not know what should be in 2 - TO value of Cost Center can can be anything (as long as the value is in master data). Yes, I can give same variable in planning filter and in FROM of parameter. But what goes in 'TO' of parameter?

In fact my design is almost exactly as standard COPY function - apart from the EXECUTE method. Everything else is copied from standard copy function.

You said - the cost center variable used in TO should also be used in the filter.

So you mean - same variable used in Plan Filter, FROM and TO of Planning function?

Regards,

Sagar

0 Kudos

Hi Sagar,

you can follow the approach of the standard copy function, i.e. if user should be able to set the FROM and TO cost centers your function has to support the corresponding parameters and there you use variables; the cost center variable used in TO should also be used in the filter.

Regards,

Gregor

0 Kudos

Hi Gregor,

Thank you for your answer.

Although my problem is that target cost center is not fixed and is dynamic in nature. I cannot know beforehand what value of target cost center will I get for every record. Similar is the case with cost center - whatever user enters I need to use that.

So, some examples would be -

  • Cost center 4711 has to be replaced with target cost center 4712.
  • Cost center 4711 has to be replaced with target cost center 5000.
  • Cost center 4389 has to be replaced with target cost center 1234.

You see? Total randomness.

So, to go back to your answer - use target cost center in filter and enter to and from values.

My follow up question is - what should I enter in "TO" value as I'm unaware what target cost center is going to be.

Thanks.

Regards,

Sagar

cornelia_lezoch
Active Contributor

Hello Sagar,

I think it is pretty obvious.

If you do not know the exact target cost center value, you need to include all possible cost centers in your filter selection - could be by authorization variable, hierarchy nodes or whatever is appropriate.

Or do not use a filter selection for cost center at all.

regards

Cornelia

0 Kudos

Hi Sagar,

the filter used to execute a planning function describes the data area where you can change data (records in the data area can be changed or created); observe that this data area is locked by the BW enqueue server.

As a result, the system checks whether data were changed that are not contained in the filter; in this case you get the error message you mentioned.

The solution is to include the 'target cost center' values in the filter as well. Observe that e.g. to copy values from cost center 4711 to 4712 you would model (in the standard planning function type copy): 4711 as from value and 4712 as target value (parameters of the planning function) and use only 4712 (!) in the filter. 4711 is used as reference data.

Regards,

Gregor