Base Replacements
Base replacements provide the functionality to refer to parameters of a process. Basic logical operations or formatting functionality is explained in the section below.
Process Information
Retrieve the specified information from the current process.
Syntax
${J:<info>}
Where <info>
:
<ParameterName>
- Retrieves value of the specified parameter. This is the same as specifying the REL functionparameters.<ParameterName>
.#JobId
- Returns the current process ID. This is the same as specifying the REL function=jobId
.
Example
The following retrieved the value of parameter named SAP_USER_NAME
on the current process and returned JDOE
on this system.
${J:SAP_USER_NAME}
The following retrieved the ID of the process and returned 12345
on this system.
${J:#JobId}
Process Information
Retrieve the specified information from the inner-most process. The #DT_Start
and #TM_Start
replacements cannot be used in parameters of the upper-most process as that would attempt to retrieve the start date/time of the current process which has not yet started since its parameters are still being evaluated.
Syntax
${C:<info>}
The information to return is defined by the <info>
:
<ParameterName>
- Retrieves value of the specified chain parameter. This is the same as specifying the REL functionchainParameters.<ParameterName>
.#JobId
- Returns the current process ID.#DT_Start
- Returns the Start Date of the process (YYYYMMDD
). Cannot be used on the upper-most process.#TM_Start
- Returns the Start Time of the process (HHMMSS
). Cannot be used on the upper-most process.
Example
The following retrieved the value of parameter TASKLIST_PERIOD
of the inner-most process and returned 011
on this system.
${C:TASKLIST_PERIOD}
The following retrieved the start date of the inner-most process and returned 20181223
on this system.
${C:#DT_Start}}
Parent Parameters
A process parameter is searched for with the specified name. If it is not found on the current process, it will try to find it on an ancestor process (for example, the parent's parent process), first value found will be used.
note
The direct parent of a process is a step and steps have no parameters.
Syntax
${P:<parameter_name>}
Where <parameter_name>
is the name of the parameter to search.
Example
The following retrieved the value of parameter TASKLIST_PERIOD
from the top-level process as the intermediate processes in the hierarchy did not have this parameter set; the replacement returned 011
on this system.
${P:TASKLIST_PERIOD}
Relative Process Information
From the current process, the Relative process ID is retrieved to provide information.
Syntax
${RJ:<info>;<relative>}
<info>
accepts the following values:<ParameterName>
- Retrieves the value of the specified parameter from the specified relative process.#JobId
- Returns the id of the relative process.#DT_Start
- Returns the Start Date of the relative process (YYYYMMDD
). The process must have reached status Running for this to return a value.#DT_End
- Returns the End Date of the relative process (YYYYMMDD
). The process must have reached a final status for this to return a value.#TM_Start
- Returns the Start Time of the relative process (HHMMSS
). The process must have reached status Running for this to return a value.#TM_End
- Returns the End Time of the relative process (HHMMSS
). The process must have reached a final status for this to return a value.#DT_RemoteStart
- Returns the Remote Start Date of the relative process (YYYYMMDD
). The process must be a remote process (SAP job, Oracle EBS job) and it must have started for this to return a value.#DT_RemoteEnd
- Returns the Remote End Date of the relative process (YYYYMMDD
). The process must be a remote process (SAP job, Oracle EBS job) and it must have reached a final status for this to return a value.#TM_RemoteStart
- Returns the Remote Start Time of the relative process (HHMMSS
). The process must be a remote process (SAP job, Oracle EBS job) and it must have started for this to return a value.#TM_RemoteEnd
- Returns the Remote End Time of the relative process (HHMMSS
). The process must be a remote process (SAP job, Oracle EBS job) and have it must reached a final status for this to return a value.
<relative>
<step_name>, Job <process_order>
- example:Step 2, Job 4
orInitialize System, Job 5
Example
The following retrieves the value of parameter named SAP_USER_NAME
on the first process of step Step 1 and thus returned JDOE
on this system.
${RJ:SAP_USER_NAME;Step 1, Job 1}
Merge Record from Relative Process
${MR:[<record>],[<field>],<parameter>;<relative job>}
<record>
- the record to use for the merge. If left empty, the entire column is used.<field>
- the field of the record to use for the merge. If left empty, the entire record is used.<parameter>
- the name of the parameter on the relative process. Defaults toRULE_RESULT
.<relative job>
- the relative job to get the parameter from. The following syntaxes are allowed:<step_name>, Job <process_order>
- example:Step 2, Job 4
orInitialize System, Job 5
parent
Job:<process_ID>
Example
${MR:1,1,RULE_RESULT;Step 1,job 1} returns field 1 from record 1.
${MR:1,,RULE_RESULT;Step 1,job 1} returns record 1.
${MR:,1,RULE_RESULT;Step 1,job 1} returns field 1 from all records.
${S:<?>}
System Variables Parameter - The value is retrieved from the System Variables Table ( System_Variables
).
Syntax
${S:<key_value>}
Where <key_value>
is the key of the table; the Value field from the table is returned.
Example
On this system, the System_Values
table contains the following entry:
Key | Value |
---|---|
P_CLIENT_ERP | 800 |
The following replacement returns 800
.
${S:P_CLIENT_ERP}
Example
${S:DEFAULT_SYSTEM}
${A:<?>}
Application Customizing Parameter - Retrieves the value from the application customizing Table for the current application ( FCA_ApplicationCustomizing
).
Syntax
${A:<key>}
Example
The FCA_ApplicationCustomizing
table contains the following entry:
Key | Value |
---|---|
ERP_TaskList_Report_Template | doc:FCA:/FCA.FCA_ERP/FCA_ERP_Report_Template.txt |
The following expression returned doc:FCA:/FCA.FCA_ERP/FCA_ERP_Report_Template.txt
on this system.
${A:ERP_TaskList_Report_Template}
${V:<?>}
Cross System Variable Parameter - Retrieves the value from the cross FCA variable Table ( FCA_Variables
).
Example
${V:Counter}
${OF:<?>, <input>}
Operating System File Paths - Provide file path manipulations. The <input>
should always contain forward slashes ( /
), even on Windows, such as ${OF::PATH, C:/MyFolder/MyFile.txt}
.
The information returned is specified by the <?>
:
PATH
- Returns the path of the provided input (one level up). The function expects at least one subfolder, specifying onlyC:/
or/
will cause an error.MEMBER
- Returns the member (filename without extension, aka basename ). It assumes that the input contains the filename.EXTENSION
- Returns the extension of the filename. It assumes that the input contains the filename.FILENAME
- Returns the file name from the input. It assumes that the input contains the filename.SEPARATOR
- Returns the input with the current separator added at the end or just the separatorFIND
- Returns the first file found using the generics specified in input.FINDLAST
- Returns the last file found using the generics specified in input.FINDOLD
- Returns the oldest file found using the generics specified in input.FINDNEW
- Returns the newest file found using the generics specified in input.
note
In case the file name contains ":", specify ${OF::<?>,<input>}
to avoid conversion problems.
${DT:}
Formatted Date Time - The following replacements allow you to adjust and format dates and times.
Syntax
${DT:<date>,<format>[,<time_expression>]}
${DT:<time_expression>, <format>}
The information returned is specified by the <format>
:
<date>
- the date to use for the replacement, if omitted (note the different parameter order), the current date is used.NOW
- Uses the current date/time.<yyyyMMdd>
- Input date (determined by length and numeric)<hhmmss>
- Input time (determined by length and numeric)
<format>
- Format in Java Simple Date format or built-ins:SAP_TIME
andSAP_DATE
<time_expression>
- Expressions (like "add 1 days") to offset current date / time
Time Expressions
You can use expressions which are allowed and described in the REL Time expression function library.
Time expressions are a sequence of operations, applied in order to a time (generally now, but may be a specified date). They may be:
set <specifier> <value>
- set<specifier>
to<value>
add <value> <specifier>
- add<value>
to<specifier>
(This may propagate)subtract <value> <specifier>
- subtract<value>
from<specifier>
(This may propagate)truncate <specifier>
- truncate at<specifier>
(This will zero everything below<specifier>
).
The <value>
is always a number:
The days of the week start at 1 for Sunday.
The days of the year start at 1 for 1 January.
The <specifier>
is one of:
add/subtract
- accepts:second
,minute
,hour
,day
,week
,month
,year
truncate
- accepts:second
,minute
,hour
,day
,month
set
- accepts:second
,minute
,hour
,day
,day_of_week
,day_of_year
,week_of_month
,month
Plurals with an additional s
are accepted (for example: days, weeks, ...). The day is always the day of the month. English names are accepted for day of week (day_of_week) and month; for example set day_of_week Monday or set month January, three letter abbreviations are accepted as well.
Example time expressions:
add 1 minute
add 3 seconds
set hour 1
set day_of_week Mon
truncate day
subtract 2 days
Date/Time Format
The formatting supports standard SimpleDateFormat and the following built-ins:
SAP_DATE
- Formats to SAP's Batch Date formatSAP_TIME
- Formats to SAP's Batch Time format
${DT:20230101,SAP_DATE,add 1 month}
${DT:134513,SAP_TIME,add 3 minutes}
${DT:134513,hhmm,add 3 minutes}
${DT:add 1 week,SAP_DATE}
${DO:<name>}
Provide Input from Document - Provide input from Document (Text Only).
Syntax
${DO:<name>}
<name>
- Name of the Document, without partition, or full path.
note
If the document name is specified, then it needs to be in the customer application (CUS_FCA
) or customer data application (CUS_FCA_Data
). Replacement options are not possible with this replacement!
Example
The document FCA.ValueForReplacementParameter
(path doc:FCA:/FCA.CUS_FCA/FCA.CUS_FCA_Data/ValueForReplacementParameter.txt
) contains the text Text for the parameter
. You have two options to specify the document in the replacement:
${DO:ValueForReplacementParameter}
or
${DO:doc:FCA:/FCA.CUS_FCA/FCA.CUS_FCA_Data/ValueForReplacementParameter.txt}
The parameter will have the value Text for the parameter
.
This example uses another document ( GLOBAL.MyDocument
, path doc:/Redwood/Business/MyDocument.txt
) that is in a different application; it contains the text This one is elsewhere
.. The following replacement is used:
${DO:doc:/Redwood/Business/MyDocument.txt}
The parameter is set to This one is elsewhere
..
${L:<command>,<options>}
Logic Decisions - Provide means of simple logic decisions.
Syntax
${L:<command>,<options>}
<command>
- Command defines the command:EQUAL,<logic V1>,<logic V2>,<result True>,<result False>
- Checks if logic values are the same and returns the appropriate value for true or false.NVL,<logic V1>,<alternative>
- Returns logic value if it is not empty, else the alternative.
Example
The following replacement returns the string false
as the values (1 and 2) are not equal:
${EQUAL,1,2,true,false}
The following example uses combined replacements and returns true
on this instance as the parameter SAP_USERNAME
on the current process has the same value as the parameter with the same name on the process:
${EQUAL,${P:SAP_USER_NAME},${C:SAP_USER_NAME},true,false}
The following expression evaluates to this is empty
:
${NVL,,this is empty}
The following expression evaluates to this is it
:
${NVL,this is it, this is not}
The following expression mixes RedwoodExpressionLanguage (REL) with replacements:
='${NVL,' + parameters.MyParameter + ',Myparameter was not set}'
First, Redwood Finance Automation will evaluate the REL:
${NVL,<value_of_parameter_MyParameter>,Myparameter was not set}'
Where <value_of_parameter_MyParameter>
is the value of the parameter named MyParameter.
See Also
financeTopic