cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Calculation Unit Process with Variable Input Selection

Former Member
0 Likes
1,556

We are implementing a PaPM Process to calculate metrics based on daily revenue transaction from S4 Hana GL. The process chain begins with Model View function that retrieves transaction data from the universal journal HANA table (ACDOCA). We use a View function on the Model View to control the what data the Model View retrieves into PaPM for further processing. There is then a series of linked functions that processed the data and terminates with a Writer function to output the results to a BW ADSO.

We are at the stage where we need to setup the Calculation Unit Processes and then Deploy them through Fiori. We are struggling with how to setup the input selection criteria so that only records from a specific posting date(s) are pulled into PaPM from ACDOCA for processing. We do not want to hard code the posting date into the View function that filters the data from ACDOCA as the posting date(s) will change over time.

We have created a Calculation Unit Process for this activity. We have made the posting data a Selection Field and picked the Writer function as the activity as it is the last function in the process. However, this does not limit the records that are retrieved from ACDOCA as the View function that filters the data from ACDOCA is at the beginning of the process. It does not make sense to add the View function as a separate activity within the process because it is just one step in the chain of functions that ends with the Writer. If we include both the View function and the Writer as activities in the process, then how does the Writer know that the data has already been retrieved from ACDOCA? Is there a way to set up the selections so that they apply to the initial View function even though the process ends with the Writer function? Note that the posting date field name in the Writer is different than the filtered field name that is coming from ACDOCA.

The other issue we are having is how to make it so the posting date(s) can be changed over time either manually through My Activities in Fiori or through an automated scheduling program? We don’t want to have to re-deploy the process every time we need to change the posting date(s). If we set the process up as a “Run” Process Type, then there is no option to change the Selection Field selection in Fiori. We have tried setting the Process Type as Simulation so that we can change the posting date in My Activities, but testing has shown that even if the posting data is changed it does not change the dates that are retrieved from ACDOCA. It still pulls the same posting dates that were set when the process was deployed. Is there a way to make the posting data updateable so that it can be changed over time by users through Fiori or via a scheduling program?

Thanks for the assistance.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Likes

Hi Nathaniel.

Thank you for taking the time to reply to my post. Sorry for the delay in my response. We have been working on other issues and finally getting back around to setting up or Process for our Environment.

The main question I was trying to get to in my original post was if there was a way to make the Process Selection Criteria Dynamic with regards to Posting Date. For example, if we want to have a process that is run via a scheduling program like Redwood and we simply want the process to always process the prior days transactions based on the Posting Date. We are currently unaware of any way to make either Selections or Parameters Dynamic so that they do not need to be updated in My Activities in Fiori (assuming Simulation Mode). What we need is a way to dynamically calculate the Posting Date selection by using a formula, such as TO_DATS (ADD_DAYS (CURRENT_DATE, -1)). This way the process can run automatically without user intervention and will always just pull the prior day transactions without needing to be updated. If you are aware of a way to make Dynamic Selections by either using a formula in a Parameter or some other other means, please let me know.

If it is not too much to ask, would you mind expanding on what is the difference between Parameters vs Selection Fields for Calculation Unit Processes? We have been just using Selection Fields for our processes as it is not clear from the documentation what a Parameter does that a Selection Field does not do. I have tried getting a formula like the Current Data example above to work in Parameter, but so far I have been unsuccessful getting this to work.

Thanks again for the helpful info.

Andrew

NathSomera
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Andrew,

Right now there are no option available to have a dynamic selection available at the process template level. Dynamic selections can be only used in JOIN function through the complex selection.

What is the difference between Parameter and selection in a CALC UNIT?

SELECTION FIELD can filter the input data of the function based on the criteria you set for a given field. For example, you wanted to view or analyzed the data for a specific product. You will need to put in the PRODUCT NAME e.g. WATCH as a selection and the result will only give you the PRODUCT which is a WATCH all other products will not be shown.

PARAMETERS are defined in the environment and registered in calculation unit which can steer or influence the behavior of a function

Let me give you an example;

A company is giving discount on their product based on the month.
DISCOUNT RATE is defined as PARAMETER = I_disc
Where DISCOUNT = Product Amount * DISCOUNT RATE

In a function, you would set the formula and use parameter to make it more dynamic.

DISCOUNT = Product Amount * I_disc

In this manner, you would be able to change the values on the formula inside the function based on the parameter value you set in your process template. So lets say for AUG there will be a 10% discount. Therefore, you will have the formula below when you use the process template when running the function.

DISCOUNT = Product Amount * 0.1

When its SEPTEMBER you only have to change the value of parameter (discount rate e.g. 20%) from the process template and no need to change the formula and you will have the formula below

DISCOUNT = Product Amount * 0.2

You may also refer to this post for reference

https://answers.sap.com/questions/13092336/calcutated-parameter-in-a-process.html

Hope this helps!