Utility Process Definitions
The following process definitions are used to interpret results of other process definitions.
FCA_SAP_Utils_Amounts_Compare
This process compares a list of amounts against a value or list of values.
Parameters
In Parameters
- List with amounts to check (
AMOUNTS
) - Amounts to check. Format is<key>;<val>|<key>;<val>
for example1;923|2;23000
. - Check amounts against this (
AGAINST
) - Check amount against this. Format is<key>;<val>|<key>;<val>
for example1;1000|2;20000
. - Negate Against amounts (
AGAINST_NEGATE
) - Flag to negate the against amounts. - Compare Absolute (
COMPARE_ABS
) - Flag to compare absolute values. The against values are converted to absolute values before comparison. - Operation to perform (
OPERATION
) - Compare operators such asEQ
,NE
,LT
,GT
,LE
, orGE
. When working with ranges onlyEQ
andNE
are supported - Difference range low (
RANGE_LOW
) - For theEQ
andNE
operation a range can be specified. The lower interval can be entered as absolute or percentage value. If you enter a percentage, the percentage value is subtracted from the respective against value. - Difference range high (
RANGE_HIGH
) - For theEQ
andNE
operation a range can be specified. The greater interval can be entered as absolute or percentage value. - Raise error if key not found in other list (
NOT_FOUND
) - Specify if an error should be raised if a key is not found in the other list - Return Code to raise (
RC
) - Return code to raise. Default is4
. - Action Rule(s) to process (
AMOUNTS_RULE
) - Action rule to be applied on amounts parameter. - Action Rule(s) to process (
AGAINST_RULE
) - Action rule to be applied on against parameter. - Action Rule(s) to process (
RULE
) - Action rule(s) to be applied.
Out Parameters
- Action Rule(s) to process (
RULE_RESULT
) - Rule result (merge record) of action rule. - Action Rule(s) to process (
RULE_RESULT_AMOUNTS
) - (obsolete) Resulting value with amounts. - Resulting amounts that matched (
RULE_RESULT_MATCHING
) - Resulting matched values with amounts.
SAP-Specific Parameters.
- SAP System (
SAP_SYSTEMS
) - Target SAP System. - SAP Client (
CLIENT
) - Target SAP Client. - SAP User Name (
SAP_USER_NAME
) - SAP User name.
Examples
Compare a list of values in their absolute values with a reference list of values:
- List with amounts to check (
AMOUNTS
) -1;202|2;-307|3;249|4;-199|5;246
- Check amounts against this (
AGAINST
) -1;200|2;300|3;250|4;200|5;250
- Compare Absolute (
COMPARE_ABS
) -X
- Operation to perform (
OPERATION
) -EQ
- Difference range low (
RANGE_LOW
) -5%
- Difference range high (
RANGE_HIGH
) -5%
- Raise error if key not found in other list (
NOT_FOUND
) -X
- Return Code to raise (
RC
) -4
The result in stdout.log
will return success because each value in the first list is within a 5% range of the against list, taking the absolute values.
Comparison of two numbers:
- List with amounts to check (
AMOUNTS
) -1,05
- Check amounts against this (
AGAINST
) -1,1
- Compare Absolute (
COMPARE_ABS
) -X
- Operation to perform (
OPERATION
) -EQ
- Difference range low (
RANGE_LOW
) -2%
- Difference range high (
RANGE_HIGH
) -10%
- Raise error if key not found in other list (
NOT_FOUND
) -X
- Return Code to raise (
RC
) -4
The result in stdout
will return an error, details of which can be found in stdout.log
and stderr.log
:
EQ-Check failed: amount 1,05 is not in range [1,08 - 1,21]
note
The formatting of decimal points is taken from the SAP user of the specified SAP system.
See SAP_Utils_Amounts_Compare for more information.
FCA_Utils_Document_Create
This process creates a document from a template.
Parameters
- Document path to be used as Template (
IN_DOC
) - Document path to be used as template. - Target document name (
DOC
) - Target document name, for exampleCUS_CMS_${P:BUKRS}_${P:TASKLIST_YEAR}_${P:TASKLIST_PERIOD}
. - Format of document content (
FORMAT
) - Format of document content, for example FormatSystem_Excel_xml
. - Description (
DESC
) - Description, for example Documents for${P:BUKRS} on ${P:TASKLIST_PERIOD}/${P:TASKLIST_YEAR}
. - Delete existing target document (
DELETE
) - Flag to delete existing target document. - URL to Edit (
EDIT
) - URL to edit.
Documents are created/updated in the specified location.
FCA_Utils_File_Transfer
This process performs file transfers. One source parameter must be filled ( From path (IN_FROM_FS)
, From transaction (IN_FROM_TRANSACTION)
, or From document (IN_FROM_DOCUMENT)
), the process will exit without any action otherwise. If no target parameter ( To path (IN_TO_FS)
, To transaction (IN_TO_TRANSACTION)
, or To document (IN_TO_DOCUMENT)
) is set, the file(s) will be transferred to the current process. More than one target parameter is not allowed, and it will result to an error. The FROM parameters can be combined with the File/Pattern to process (IN_FILE)
parameter. Wildcards *
and ?
can be used in FROM parameters or in the File/Pattern to process (IN_FILE)
parameter. If a FROM parameter contains wildcards then the File/Pattern to process (IN_FILE) parameter must be empty.
Parameters
- From path (
IN_FROM_FS
) - From filesystem path(s) (source). Specifies path(s) in the file system from where the file(s) will be copied/moved from. The path(s) can be:- One or more comma or semi-colon-separated (default, see parameter Separators for combined parameter (
IN_SPLITTERS
)) directories; the files specified in File/Pattern to process parameter will be transferred. - One or more comma or semi-colon-separated (default, see parameter Separators for combined parameter (
IN_SPLITTERS
)) files; the parameter File/Pattern to process must be empty. Within filenames the wildcards?
and*
are allowed to be used.
- One or more comma or semi-colon-separated (default, see parameter Separators for combined parameter (
- From transaction (
IN_FROM_TRANSACTION
) - From process or processes where the file(s) will be copied/moved from (source); multiple processes are comma or semi-colon-separated (default, see parameter Separators for combined parameter (IN_SPLITTERS
)):- Syntax:
<process-reference>:[<file_spec][;<process-reference>[:<file_spec]]*
- Example:
Step 1, job 1:
- File/Pattern to process parameter will be used to specify the files from the processes. - If wildcards ('?', '*') are used for this parameter then target filenames are ignored for example with parameter
IN_TO_TRANSACTION
and the original filenames are used.
- Syntax:
- From document (
IN_FROM_DOCUMENT
) - From document(s) (source): Specifies a single or multiple, comma or semi-colon separated (default, see Separators for combined parameter (IN_SPLITTERS
)) documents that will be copied or moved.- Syntax:
[<doc_path>[,<doc_path>]]*
or[<doc_path>[;<doc_path>]]*
- Example:
doc:FCA:/FCA.FCA/FCA.FCA_FPA/filename.pdf
. If the file transfer destination parameter 'To document' parameter is used, then exactly the same number of documents must be contained there. No wildcards are allowed to use specify the documents as source.
- Syntax:
- To path (
IN_TO_FS
) To path (target): Specifies path in the file system where the processed files will be copied/moved to. The path specifies a directory and all processed files will be copied/moved to it. The path must already exist on the target system and access must already have been granted through the Application Customizing propertyBase_Directory_Whitelist
. If To path (IN_TO_FS
), To document (IN_TO_DOCUMENT
), and To transaction (IN_TO_TRANSACTION
) are left empty, the current process is the target. - To transaction (
IN_TO_TRANSACTION
) To process (target): Specifies the process where the processed files will be copied/moved to; defaults to current process when To path (IN_TO_FS
), To document (IN_TO_DOCUMENT
), and To transaction (IN_TO_TRANSACTION
) are left empty.- Syntax:
<process-reference>:[<file_spec][;<process-reference>[:<file_spec]]*
.JobFile:<UniqueId>
- Example:
Step 1, job 1:
Step 2, Job 2:stdout.log
If filenames are specified, the file will be attached to the process with the specified name.- Using
JobFile:12345
- Example: 'Step 1, job1:stdout.log' No wildcards are allowed here. Multiple process files are separated by semicolon ';'. Except for format (a.) also comma ',' is allowed as delimiting character.
- If wildcards ('?', '*') are used in parameter
IN_FROM_TRANSACTION
orIN_FILE
then the filename part of this parameter is ignored and original filenames are used.
- To document (
IN_TO_DOCUMENT
) - To document (target): Specifies a single document or multiple documents where the processed files will be copied/moved to. No wildcards are allowed here. If this parameter is used, then the same number of files must be specified either in the 'From path', in the 'From process' or in the 'From document' parameter. Also the parameter 'File/Pattern to process' must be empty. Multiple documents are separated by semicolon ';' or comma ','.- Example:
doc:FCA:/FCA.FCA/filename.xyz
report_accounts.txt,report_journal.xls
- File/Pattern to process (
IN_FILE
) - File/Pattern to process: Specifies the filenames that will be copied/moved. Used in combination with 'From path' and 'To path' parameters. For this parameter wildcards '?' and '*' are allowed to be used. In combination with the 'From path'/'From process' parameter, the other one must contain a single directory/process and no wildcards. If this parameter is used, the transfer destination parameter (To path/To process) must contain exactly one element. Multiple filenames/patterns are separated by semicolon ';' or comma ','. - Separators for combined parameter (
IN_SPLITTERS
) - Separators used to specify multiple values in the source and target parameters; defaults to semi-colon;
and comma,
. - Create Target Directory/Application (
IN_CREATE
) - Create Target Directory: If the value 'X' is set, then target directory creation is allowed. - Copy or Move (
IN_MOVE
) - Copy or Move: Value 'C' means 'copy', value 'M' means move. - Simulate (IN_SIMULATE) - Simulate: If the value 'X' is set, the data transfer operation will be simulated without writing the target files.
- Files processed (
OUT_PROCESSED_FILES
) - Files processed: Processed files will be filled here. Multiple files will be separated by semicolon ';'.- Examples:
- paths:
/home/sap/file1.txt;/home/sap/file2.xls
- processes:
job 4711:file1.txt;job 7788:file2.xls
- documents:
doc:FCA:/FCA.FCA/FCA.FCA_FPA/file1.xyz;doc:FCA:/FCA.FCA/FCA.FCA_FPA/file2.xyz
- Action Rule(s) to process (
RULE
) Action Rule(s) to process: additional skip rule can be defined here:- Syntax:
SKIP <lines to skip>
- skips the first number of lines specified by the parameter
- Syntax:
Examples
Parameters:
From path ( IN_FROM_FS
)= /home/redwood/src
File/Pattern to process ( IN_FILE
)= *.xls
To path ( IN_TO_FS
)= /home/redwood/dest
Output:
Files processed ( OUT_PROCESSED_FILES
)= /home/redwood/dest/report1.xls,/home/redwood/dest/report2.xls
Parameters:
From transaction ( IN_FROM_TRANSACTION
)= Step 1, Job 2:
File/Pattern to process ( IN_FILE
)= *.xml
Output:
Files processed ( OUT_PROCESSED_FILES
)= Job 4711:report1.xml,Job 4711:report2.xml
Parameters:
From transaction ( IN_FROM_TRANSACTION
)= Job 4711:report1.xml,Job 4711:report2.xml
(where 4711 is a previous process id)
Output:
Files processed ( OUT_PROCESSED_FILES
)= Job 4720:report1.xml,Job 4720:report2.xml
(current process id = 4720)
financeTopic