Redwood Documentation

Product Documentation

 

›RedwoodExpressionLanguage

Finance AutomationFinance Automation Reference

Introduction

  • Introduction

Template And Parameter Maintenance

  • Close Template
  • Process Lists in Orchestrator
  • Workflow Templates
  • Templates
  • FCc Templates

Balance Sheets

  • Balance Sheet Certification
  • BSC Installation
  • BSC Process Definitions
  • BSC Rules

Enhancements

  • Enhancements
  • Journal Extensions
  • Journal Definitions

Processes & Subprocesses

  • Process Definitions
  • Generic Loop
  • General SAP Process Definitions (Abap Run)
  • General SAP Process Definitions (Mail)
  • General SAP Process Definitions (Batch Input)
  • General SAP Definitions
  • Generic and Infrastructure Definitions
  • Utility Process Definitions
  • FPA specific Process Definitions
  • FCc specific Process Definitions
  • EBS specific process definitions
  • SAP Functional Process Definitions
  • Generic SAP Synchronization Process Definitions
  • Bulk Data Processing

Customizing

  • Customizing Redwood Finance Automation
  • Redwood Finance Automation Application Customizing FPA flavor
  • Redwood Finance Automation Application Customizing FCc Flavor
  • Redwood Finance Automation Application Customizing SAP
  • Redwood Finance Automation Application Customizing Base
  • Redwood Finance Automation Application Customizing Mail HTML Styles

Action Rules

  • Action Rules
  • Action rules Syntax
  • Files via Output Selection in Action Rules
  • Base Rules
  • SAP Rules
  • ABAP Rules
  • Transaction Rules

Replacements

  • Replacements
  • Base Replacements
  • Generic SAP Replacements
  • FPA Specific Replacements
  • FCc Specific Replacements
  • SAP FCc Replacements

RedwoodExpressionLanguage

  • REL Expressions
  • Base REL Functions
  • SAP Contraint REL Functions
  • SAP REL Functions
  • SAP ALM REL Functions
  • SAP FCc REL Functions
  • SAP FPA REL Functions
  • Reconciliation REL Functions
  • SAP REL functions, Miscellaneous

Default Roles

  • Built-in Roles

Appendix: Reference

  • SAP Add-Ons Contents
  • Chain Definition Templates
  • Process Definition Templates
← REL ExpressionsSAP Contraint REL Functions →

finance-related topic Finance Automation Base REL Functions

The following base REL functions are used in all flavors. The functions reside in the Redwood_FCA library. You call these functions by specifying =<partition>.Redwood_FCA.<function>. The examples on this page assume the definition which calls these functions resides in the same partition as the library, specified as $. The default partition of the library is FCA. The REL functions can be accessed via RedwoodScript from the com.redwood.scheduler.custom.fl.base.rel.FlBaseRel class.

convertAbsoluteFileReference

Converts the input string containing a relative file reference into an absolute reference.

  • <jobId> - id of the current process.
  • <ref> - JobFile reference with syntax <process>:<file>. <process> can be one of the following:
  • <step>, Job <n>
    • <step> - the name of a step.
    • <n> - display order of the process in the step.
  • parent - the parent of the current process.
  • Job <id> - the process with JobId <id>. Note that this is the expression the function will return.
  • <file> - the short name of the file, for example, stdout.log or step1_spool1.txt

Syntax

Redwood_FCA.convertAbsoluteFileReference(Long jobId, String ref)

Returns String

Example

=$.Redwood_FCA.convertAbsoluteFileReference(jobId, 'My Special Step, job 1:step1_spool1.txt')

Result

Returns Job 12345:step1_spool1.txt on this system.

convertList

Provides the option to convert the content of a list into a new list. It calls the Rule ConvertResultList.

note

The REL function automatically identifies a select-option range and handles it accordingly.

The <conversions> parameter takes a semi-colon-delimited list of commands.Supported commands:

  • ADD=<int> - Add an integer to the resulting entries (if numeric).
  • MAX[[=<int>[[,<int>]] - Return only the highest result. Field specified are key fields.
  • SUM[[=<int>[[,<int>]] - Return only the sum result. Field specified are key fields.
  • NUMC=<int> - Convert entries to NUMC format of specified length (if numeric); must be specified after any mathematical commands such as ADD, MAX, and SUM.
  • PRE=<String> - Add string in front of each entry (example PRE=! to exclude in selection).
  • POS=<String> - Add string to each entry.
  • SUBTRACT=<int> - Subtract an integer from the entries.
  • DUPLICATES - Removes duplicate entries from Result List.
  • SELOPT - Adds Select-Option brackets to result.
  • FIELD=<int> - Set field in result set to work on (default 1).
  • FIELDS=<int>[[,<int>] - Reduces the fields in the records to the ones specified.
  • BEFORE=<String> - Splits the value and uses the first part.
  • AFTER=<String> - Splits the value and uses the last part.

Syntax

Redwood_FCA.convertList(Long jobId, String inList, String conversions)

Returns String

Example

=$.Redwood_FCA.convertList(jobId,parameters.IN,'MAX;ADD=1;NUMC=10')

Result

In this example, the value in parameter In is 97,98,99,100, so the result returned is: 0000000101

documentExists

Pre-Condition function that returns true if a specified document exists.

Syntax

Redwood_FCA.documentExists(Long jobId, String inDocIds)

Returns boolean

Example

=$.Redwood_FCA.outputExists(jobId, $.Redwood_FCA.getDocumentPath(jobId, 'FCA_ACKNOWLEDGEMENTS'))

Result

Returns true on this system.

getApplCustomizing

Retrieves the value of an Application Customizing key.

Syntax

Redwood_FCA.getApplCustomizing(Long jobId, String key)

Returns String

Example

=$.Redwood_FCA.getAppleCustomizing(jobId, 'my special key')

Result

Returns my special value on this system.

getBaseReplacement

Converts the input string using the Base Replacement definitions.

Syntax

Redwood_FCA.getBaseReplacement(Long jobId, String repl)

Returns String

Example

=$.Redwood_FCA.getBaseReplacement(jobId, '${J:SAP_USER_NAME}')

Result

Returns JDOE on this system.

getCurrentUser

Return the current user id.

Syntax

Redwood_FCA.getCurrentUser(Long jobId)

Returns String

Example

=$.Redwood_FCA.getCurrentUser(chainJobId)

Result

Returns jdoe on this system.

getDocumentPath

Returns the full path to a document using just the name of the document. It defaults to the partition where application was imported and checks applications in the following order:

  1. data application, defaults to CUS_FCA_Data
  2. custom application, defaults to CUS_FCA
  3. FCA application

Syntax

Redwood_FCA.getDocumentPath(Long jobId, String in)

Returns String

Example

=$.Redwood_FCA.getDocumentPath(jobId, 'FCA_ACKNOWLEDGEMENTS')

Result

Returns doc:FCA:/FCA.FCA/FCA_ACKNOWLEDGEMENTS.html on this system.

getFileDir

Returns the parent directory of the provided path.

Syntax

Redwood_FCA.getFileDir(String in)

Returns String

Example

=$.Redwood_FCA.getFileDir('/etc/hosts')

Result

Returns /etc on this system.

getFileName

Returns the filename of the provided path.

Syntax

Redwood_FCA.getFileName(String in)

Returns String

Example

=$.Redwood_FCA.getFileName('/etc/hosts')

Result

Returns hosts on this system.

getFileParameterJobFile

Retrieve a Jobfile Name from a parameter of type File.

Syntax

Redwood_FCA.getFileParameterJobFile(Long jobId, String parameterName)

Returns String

Example

=$.Redwood_FCA.getFileParameterJobFile(jobId, 'Parameter2')

Result

Returns report.html on this system.

getInboxIconURL

Returns the icon URL or document link for the inbox toolbar button, which can change over time as new messages are received in the inbox and again when read.

Syntax

Redwood_FCA.getInboxIconURL(String aPartitionName)

Returns String

Example

=$.Redwood_FCA.getInboxIconURL('$')

Result

Returns resource/EPExternalResources/images/ToolbarIconNew.png on this system.

getJobFilePath

Returns the internal representation of a process.

Syntax

Redwood_FCA.getJobFilePath(Long jobId, String relJobFile)

Returns String

Example

=$.Redwood_FCA.getJobFilePath(jobId, 'My Special Step, job 1:step1_spool1.txt')

Result

Returns JobFile:123:step1_spool1.txt on this system.

getParameter

Returns value of a parameter even if it has bad naming (like SAP parameters can have). The Boolean allows a search upwards.

Syntax

Redwood_FCA.getParameter(Long jobId, String inParameter, boolean parents)

Returns String

Example

=$.Redwood_FCA.getParameter(parentJobId, 'Parameter9', 'true')

Result

The value of parameter Parameter9 of the parent process was set to 1,2,3,4,5. 1,2,3,4,5

getResultListSize

Returns the size of a result list. The result list is referenced using a relative job specification and a parameter name.

Syntax

Redwood_FCA.getResultListSize(Long jobId, String relJob, String parm)

Returns String

Example

=$.Redwood_FCA.getResultListSize(jobId,'My Step 1, Job 2', 'Parameter9')

Result

The value of parameter Parameter9 of the parent process was set to 1,2,3,4,5. The function returns 4.

getReturnCode

Returns the return code of a relative job.

Syntax

Redwood_FCA.getReturnCode(Long jobId, String inRelJob)

Returns String

Example

=$.Redwood_FCA.getReturnCode(chainJobId,'My Step, Job 1')

Result

Returns 0 on this system.

getTaskListIdDescrPairs

Returns the task list in an LOV to be used in a parameter Simple Constraint expression; partition defaults to FCA or GLOBAL if application FCA does not exist.

Syntax

Redwood_FCA.getTaskListIdDescrPairs(String partitionName)

Returns String

Example

=$.Redwood_FCA.getTaskListIdDescrPairs('$')

Result

Returns =no tasklist found on this system.

leftFill

The function returns a specified number of characters from the right side of a string.

Syntax

Redwood_FCA.leftFill(String in, int length)

Returns String

Example

=$.Redwood_FCA.leftFill('Hello World',8)

Result

Returns lo World on this system.

mergeResultList

Appends one list to another, inserting a comma (,) when the input list is comma-separated, and a pipe (|), when the list is semi-colon-separated.

Syntax

Redwood_FCA.mergeResultList(String in1, String in2)

Returns String

Example

=$.Redwood_FCA.mergeResultList(parameters.Parameter1,parameters.Parameter2)

Result

Parameters Parameter1 and Parameter2 contain 1,2,3,4 and 5,6,7,8,9,10, respectively; the returned value is 1,2,3,4,5,6,7,8,9,10. Parameters Parameter1 and Parameter2 contain 1;2;3;4 and 5;6;7;8;9;10, respectively; the returned value is 1;2;3;4|5;6;7;8;9;10. Parameters Parameter1 and Parameter2 contain Hello World and 5;6;7;8;9;10, respectively; the returned value is 5;6;7;8;9;10|Hello World.

numericFill

Converts the input string into a SAP NUMC field format (pre-filled with 0).

Syntax

Redwood_FCA.numericFill(String in, int len)

Returns String

Example

=$.Redwood_FCA.numericFill('123',8)

Result

Returns 00000123 on this system.

outputExists

Pre-Condition function that returns true if a specified output exists. If the file name is not specified, it defaults to the sap standard output.

Syntax

Redwood_FCA.outputExists(String inJobIds, String inFile)

Returns boolean

Example

=$.Redwood_FCA.outputExists(jobId, 'step1_spool1.txt')

Result

Returns true on this system.

removeBkType

Remove the ''type'' prefix in the business key; this is used to sanitize the input string in queries, for example.

Syntax

Redwood_FCA.removeBkType(String in)

Returns String

Example

=$.Redwood_FCA.removeBkType('JobDefinition:System_Sleep')

Result

Returns System_Sleep on this system.

rightFill

The function returns a specified number of characters from the left side of a string.

Syntax

Redwood_FCA.rightFill(String in, int length)

Returns String

Example

=$.Redwood_FCA.rightFill('Hello World',8)

Result

Returns Hello Wo on this system.

searchParameter

Returns value of a chain parameter, searching for it recursively, beginning from the parent job. The first found wins. Note that it only searches for its direct ancestors, for example, its grand parent and parent processes.

Syntax

Redwood_FCA.searchParameter(Long jobId, String in)

Returns String

Example

=$.Redwood_FCA.searchParameter(chainJobId, 'Parameter9')

Result

Returns 1,2,3,4,5 on this system.

financeTopic

← REL ExpressionsSAP Contraint REL Functions →
  • convertAbsoluteFileReference
    • Syntax
    • Example
    • Result
  • convertList
    • Syntax
    • Example
    • Result
  • documentExists
    • Syntax
    • Example
    • Result
  • getApplCustomizing
    • Syntax
    • Example
    • Result
  • getBaseReplacement
    • Syntax
    • Example
    • Result
  • getCurrentUser
    • Syntax
    • Example
    • Result
  • getDocumentPath
    • Syntax
    • Example
    • Result
  • getFileDir
    • Syntax
    • Example
    • Result
  • getFileName
    • Syntax
    • Example
    • Result
  • getFileParameterJobFile
    • Syntax
    • Example
    • Result
  • getInboxIconURL
    • Syntax
    • Example
    • Result
  • getJobFilePath
    • Syntax
    • Example
    • Result
  • getParameter
    • Syntax
    • Example
    • Result
  • getResultListSize
    • Syntax
    • Example
    • Result
  • getReturnCode
    • Syntax
    • Example
    • Result
  • getTaskListIdDescrPairs
    • Syntax
    • Example
    • Result
  • leftFill
    • Syntax
    • Example
    • Result
  • mergeResultList
    • Syntax
    • Example
    • Result
  • numericFill
    • Syntax
    • Example
    • Result
  • outputExists
    • Syntax
    • Example
    • Result
  • removeBkType
    • Syntax
    • Example
    • Result
  • rightFill
    • Syntax
    • Example
    • Result
  • searchParameter
    • Syntax
    • Example
    • Result
Docs
Getting StartedInstallationFinance InstallationConcepts
TroubleshootingArchiving
Learn and Connect
Support Portal
BlogEventsResources
ISO/ IEC 27001 Information Security Management
Automate to be human

2023 All Rights Reserved |

Terms of Service | Policies | Cookies | Glossary | Third-party Software | Contact | Copyright | Impressum |