cancel
Showing results for 
Search instead for 
Did you mean: 

Purpose of Parameter Range Button in Process Selections

Former Member
0 Kudos
858

I want to follow up on a post from another member related to the "Parameter Range" button available in the Processes Selections for Parameters. I want to understand why this button exists and how to use it.

The tooltip for this button says "Parameter Range," but I have attempted to enter value ranges for a parameter using this button, but it seems to have no effect. For example, if I have a Parameter P_FISCYEARPER in a Process and rather than define a specific value for this Parameter, I use the Parameter Range button to enter a range of values as shown in the screenshots.

I would expect that a function that uses P_FISCYEARPER in the Selection Condition, as shown below, would return all values within the range defined in the "Parameter Range', similar to how "Selection Conditions" allow for a range of values for Selection Fields. In my testing, this does not appear to be the case. If I run a function that uses P_FISCYEARPER defined in the complex selections, as shown below, both statements return no data.

WHERE
(R0002.FISCYEARPER IN (:P_FISCYEARPER)) << Returns no data
(R0002.FISCYEARPER LIKE :P_FISCYEARPER) << Returns no data

If I return to the process and enter a value in the Formula for P_FISCYEARPER, e.g., "2022006", and run the same function, it returns data where FISCYEARPER = 2022006 as expected.

This begs the question, what is the purpose of the "Parameter Range" button? If it does not accept a range of values for the Parameter as you can for Selection Conditions and I cannot use other Parameters to define the start and end values for the Parameter, as Zhiyi Tang suggested, because the Parameter is expecting a value per the Parameter definition, e.g., Characteristic, CHAR, 7. It is unclear what purpose this "Parameter Range" button serves.

I suspect it has to do with how I use the P_FISCYEARPER Parameter in my example function, or it maybe that still have to enter something in the Formula field of the Parameter in the Process for the Parameter Range to work.

I would be very interested if someone could show an example of how this "Parameter Range" button can be used. I wish the PaPM documentation would include an appendix on Complex Selections and how they can be used in conjunction with Parameters. I have found the PaPM documentation to be lacking in this area.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

@ktopino

This is fantastic, except I do not know how to set a "Parameter Range". When I set up a Parameter in Environment, Environment Files, and create a Parameter as a Characteristic, I see no DDIC Data Type for LIST. If I set up as normal CHAR 4 or NUMC 4 and then go to the Calc Unit and add the Parameter to a Process, I don't see any way to set a list of values, e.g. 2020, 2021, 2022, 2023, etc. I am obviously missing something.

If this works, it would be fantastic! One of the related questions I have been meaning to ask is how to use a LIST with a Parameter. If I hard code values into a Selection Criteria, I can use the "IN" SQL statement, but I have not figured out how to create a list Parameter so that I can use an IN statement. The workaround has been to create each value in the list as an individual Parameter or create a Model Table and use a Select statement to pull a list of values if the list is more than just a couple.

Hard Coding List Example:

WHERE
R0001.FISCYEAR IN ('2020', '2021', '2022', '2023')

I can use a "Start" and "End" Parameter with the between statement if the values are sequential, e.g.

WHERE
R0001.FISCYEAR BETWEEN :P_FYSTART AND :P_FYEND 
## P_FYSTART and P_FYEND values set in the Calc Unti Process "Formula" to be 2020 and 2023 respectively ##

What I do not know how to do is have a list of non-sequential values, such as would be the case with company codes, e.g. Company Codes: US01, US23, US47, US91

If I hard code these into the WHERE clause as I did above with FISCYEAR, I can use the "IN" statement to check if a value exists in the list. I cannot figure out how to do this with Parameters, but it must be the same answer to the original question: how to define a static list of values for a Parameter?

If you have a screenshot of how you do this, that would be Awesome!! The only downside is once I know how to do this, then I have bunch of functions to "fix" to remove the individual parameters in the WHERE statement linked together with an OR clause. A list would be a lot more efficient.

Thanks again for the info.

Former Member
0 Kudos

I think I found my answer. The functionality we have fully explored is setting up Master Data for a Parameter or a Field within PaPM. Typically we import Master Data from an external source, but I started messing around with the defining a Parameter with Master Data elements. From my example above, I can create Master Data for a Parameter P_FISCYEAR and then enter the values for 2020 - 2023. If I add this parameter to my process and select the Parameter Range button, then I see the list of values I defined as Master Data. So this at least answers the question of how to create a Parameter Range. Still working through different test scenarios to see if I can also use these in Complex Selection Conditions and use the SQL IN statement.

former_member741705
Participant
0 Kudos

Hi Andrew,

Parameter Range is used to define range of values for Parameter. When you clicked on the button, there is new input ready screen where you can set values. Later, when you want to use parameter - you can select only those values you set in range.

For example:

The parameter is Fiscal Year. First you have to set Parameter Range (list of possible values).
You set 2020, 2021, 2022, 2023.

Then, you go to process and want to set parameter value. Open the dialog and will see there only 4 values you set before. You can choose 2019 or 2024 since these are out of the range you set before. Basically, the the purpose of the Parameter range in Process selection.

Hope this helps!

Best regards,
Kevin