Show TOC

Background documentationDefining Job Parameters Locate this document in the navigation structure

 

Parameters are used to store values, which can optionally be changed at submit time. In job chains, parameters can also be shared and updated between jobs.

The following properties define the parameters:

  • Name - is used in the source in job chains to refer to the parameter, you should only use alphanumeric characters and the underscore _ in names

  • Direction - defines the way how this parameter is to be used.

    • In - value is provided in the job definition or the submit wizard and does not change

    • Out - value is provided by the job, at runtime

    • In/Out - value is provided in the job definition or the submit wizard and can be changed by the job at runtime

  • Type - the data type of the parameter, you cannot store alphabetical characters in number parameters, for example

    • Character - parameter can only hold one single character

    • String - parameter can hold one or more alphanumeric characters

    • Number - parameter can only hold numbers

  • Default Expression - the value of the parameter, can be a literal, like Hello World or an expression, like =Time.now("Europe/Berlin").

The following properties specify the appearance in the submit wizard

  • Display Order - defines the order in which parameters are evaluated as well as displayed in the submit wizard

  • Group Name - allows you to create tabs in the submit wizard to group parameters

  • Display - parameter is displayed in the submit wizard

Other properties

Values

Field

Description

Default Value

Name

the name of the parameter

Direction

The direction can be in, out, or in/out. When a parameter is an in parameter, its value is read-only, if the parameter is out it does not have a default value, in/out parameters are read/write parameters.

Type

The type of parameter to use, Character parameters can only be filled by a single character, String can be filled by any number of characters and/or numbers.

Display Order

The order in which the parameters are displayed in the submit wizard.

Group Name

Allows you to group parameters in tabs in the submit wizard

Default Value Editable

Can the value be edited in the submit wizard?

[none]

Default Expression

The default value of the parameter, can be a literal or an expression.

Simple Constraint Type

The type of constraint

None

Simple Constraint Data

A value used with the constraint, for example a table name with table constraints.

Simple Constraint Message

Message that gets displayed when a value does not fulfill a constraint

Optional

Can the parameter have a null value?

Display

Should the parameter be displayed in the Submit wizard?

Part Of Key

Should this parameter be used in the primary key? The primary key is used to calculate the expiry of a job, which once reached will cause the job to get deleted by a background job.

Runtime

The value of the parameter is computed at runtime, once the job has been submitted. The value of the parameter will not show up in the submit wizard.

Note Note

The Display Order of parameters is also the order in which parameters are resolved. If you use Redwood Expression Language to define a parameter based on the value of another parameter, the parameter in the expression must have a lower Display Order than the parameter it defines or the latter will not get resolved.

End of the note.

Example

Your job definition has two parameters, param1 and param2. The data type of param1 is Number and its Default Expression is set to 1. The parameter param2 is also a Number parameter, its Default Expression is set to =parameters.param1 * 2. Here, the Display Order is very important, if parameter param2 has a lower Display Order than param1 it will be displayed first. However, SAP CPS will not be able to resolve it and attempting to submit the job will result in an exception being thrown. This is due to the fact that param1, which is part of the Default Expression of param2, has not been evaluated, yet, when SAP CPS attempts to evaluate param2.