Utils: Compare Amounts
Component Name and System Landscape
- Name: FCA_SAP_Utils_Amounts_Compare
- Description: SAP - Utils: Compare Amounts
- Application: FCA_SAP_Transactions
- Type: RedwoodScript
Brief Description
This component can be used to compare a list of amounts against a value or list of values. When during comparison issues are found (for example, amounts not matching, keys not found) the process will be put by default into status Error. This is not a technical Error but a functional Error. With the status Error you could then for example use a Status Handler (Chain Editor) or Decision node (Process Studio) to instruct the process where to go in case issues are found.
Parameter Mapping - Generic Tabs
There are several tabs under this section. Some will be generic, and others are specific to the component. The generic tabs usually are:
- Target: Requires SAP and Client information. You can also hard code the SAP username.
- Infrastructure: Used for Action rules. See the Redwood Finance Automation Reference Guide.
- Recipient parameters: Generally left to default values.
- Job output parameters: Defines the format of the required output. Defaults to RTX and Text. See Porgam Handling for more information.
note
Most of the time these tabs will be shown, but there are components where these differ and either do not appear at all, or they are specific tabs.
Parameter Mapping - Specific Tabs
This guide shows the minimum parameter values required for the component to run. Please refer to the Redwood Automation Engineering Training course for submission and monitoring activities.
tip
The table below has many columns, if the table is cut off of the right-hand side, to view the entire data, either zoom out in your browser or collapse the navigation panes using.
Tab | Technical Name | Description | Format | Mandatory Field | Example |
---|---|---|---|---|---|
Parameters | AMOUNTS | List with amounts to check | Input is a Rule Result / Merge Record. First field(s) are key, last field is value to be checked. Important: The structure of the merge record should be the same as specified in the AGAINST parameter. | One key:<key>;<value> | <key>;<value> k1000;100 | k2000;350 | k3000;2000 Multiple keys: <key><key2><key3>;<value> | <key><key2><key3>;<value> k1000;99999;xyz;100 | k2000;88888;abc;350 | k3000;88888;zyz;2000 | |
Parameters | AGAINST | Check amounts against this | Input is a Rule Result / Merge Record. First field(s) are key, last field is value to check against. Important: The structure of the merge record should be the same as specified in the AMOUNTS parameter. | One key: <key>;<value> | <key>;<value> k1000;100 | k2000;350 | k3000;2000 Multiple keys: <key><key2><key3>;<value> | <key><key2><key3>;<value> k1000;99999;xyz;100 | k2000;88888;abc;350 | k3000;88888;zyz;2000 | |
Parameters | AGAINST_NEGATE | Negate Against amounts | If this parameter is set to X , all values specified in the parameter AGAINST will be negated before values specified in parameter AMOUNTS are checked against these values. | This field can only contain an X or be empty. If set to X and for example the following is specified: AMOUNTS parameter values: k1000;-100,00 | k2000,50;-350,00 | k3000;-2000 AGAINST parameter values: k1000;100 | k2000;349,99 | k3000;2001,00 Values 100 , 349,99 and 2001,00 are first negated before checked against values in AMOUNTS | |
Parameters | COMPARE_ABS | Compare Absolute | If this parameter is set to X , all values specified in both AMOUNTS and AGAINST parameter will be seen as absolute values before checking the amounts. | This field can only contain an X or be empty. If set to X and for example the following is specified: AMOUNTS parameter values: k1000;100,00 | k2000,50;-350,00 | k3000;2000 AGAINST parameter values: k1000;-100 | k2000;-349,99 | k3000;2001,00 Values -350,00 , -100 AND -349,99 are made absolute before checking the amounts. | |
Parameters | OPERATION | Operation to perform | How should the values from AMOUNTS be checked against the values in parameter AGAINST . The following operators are available: EQ – check if AMOUNT equals to AGAINST NE – check if AMOUNT not equals to AGAINST LT – check if AMOUNT is lesser than AGAINST GT – check if AMOUNT is greater than AGAINST LE – check if AMOUNT is lesser than or equals to AGAINST GE – check if AMOUNT is greater than or equals to AGAINST .NOTE: When using parameters RANGE_LOW and RANGE_HIGH, you can only use EQ or NE . Only the above-mentioned operators are allowed. | Yes | Example input: AMOUNTS : 1000;200,00 | 2000;300,00 | 3000;190,00 AGAINST : 1000;200,00 | 2000;200,00 | 3000;200,00 Result: EQ : returns keys 2000 and 3000 as not ok, 1000 is ok NE : returns key 1000 as not ok, 2000 and 3000 are ok LT : returns keys 1000 and 2000 as not ok, 3000 is ok GT : returns keys 1000 and 3000 as not ok, 2000 is ok LE : returns key 2000 as not ok, 1000 and 3000 are ok GE : returns key 3000 as not ok, 100 and 2000 are ok Remark: above results are checked without using ranges high and low. |
Parameters | RANGE_LOW | Difference range low | The value can be set as an absolute or percentage value. The value is subtracted from the respective AGAINST value. This parameter can only be used in combination with OPERATOR: EQ or NE . Default: 0 (also when parameter value is empty) | Example input: AMOUNTS : 1000;200,00 | 2000;300,00 | 3000;190,00 AGAINST : 1000;200,00 | 2000;200,00 | 3000;200,00 OPERATOR: EQ Example 1: RANGE_LOW: 100 returns key 2000 as not ok (AMOUNTS not between 100 and 200 , 1000 and 3000 are ok (AMOUNTS is between 100 and 200 ) Example 2: RANGE_LOW: 10% returns key 2000 as not ok (AMOUNTS not between 180 and 200 (10% subtracted from 200) , 1000 and 3000 are ok (AMOUNTS is between 180 and 200) | |
Parameters | RANGE_HIGH | Difference range high | The value can be set as an absolute or percentage value. The value is added to the respective AGAINST value. This parameter can only be used in combination with OPERATOR: EQ or NE . Default: 0 (also when parameter value is empty) | Example input: AMOUNTS : 1000;200,00 | 2000;300,00 | 3000;190,00 AGAINST : 1000;200,00 | 2000;200,00 | 3000;200,00 OPERATOR: EQ Example 1: RANGE_HIGH: 100 returns key 3000 as not ok (AMOUNTS not between 200 and 300 , 1000 and 2000 are ok (AMOUNTS is between 200 and 300 )Example 2: RANGE_HIGH: 10% returns keys 2000 and 3000 as not ok (AMOUNTS not between 200 and 220 (10% added to 200 ), 1000 is ok (AMOUNTS is between 200 and 220 ) | |
Parameters | IGNORE_ZERO | Ignore zero | If this parameter is set to X , all zero values in AMOUNTS or AGAINST will be ignored during comparison. | This field can only contain an X or be empty. Example input: AMOUNTS : 1000;200,00 | 2000;0,00 | 3000;190,00 AGAINST : 1000;200,00 | 2000;200,00 | 3000;0,00 Result: returns key 1000 as ok, 2000 and 3000 are ignored. | |
Parameters | NOT_FOUND | Raise error if key not found in other list | If this parameter is set to X , all keys not found in either AMOUNTS or AGAINST will return an error. | This field can only contain an X or be empty. Example input: AMOUNTS : 1000;200,00 | 1100;200,00 | 2000;300,00 | 3000;190,00 AGAINST : 1000;200,00 | 2000;200,00 | 2100;200,00 | 3000;200,00 Result: returns keys 1100 and 2100 as not ok, as key 1100 is not found in AGAINST and 2100 is not found in AMOUNTS . Also, keys 2000 and 3000 are returned as not ok, as the values do not match. If this parameter was not set (left empty), only keys 2000 and 3000 are returned as not ok. | |
Parameters | RC | Return Code to raise | The Return Code to set in case an issue is found during comparison. This parameter should contain an integer. Default value is 4 | When value is from 1 – x , this value will be set as Return Code. The process will go into status Error. When value 0 is used, this value will be set as Return Code. The process will not go into status Error | |
Parameters | AMOUNTS_RULE | Action Rule(s) to process on Amounts before compare | Should contain a valid Action Rule. This Action Rule is processed on the Merge Record entered in AMOUNTS before comparison is done. | When the records have different key structure or are not homogeneous you could change this by using for example Action Rule: ConvertResultList() | |
Rule | AGAINST_RULE | Action Rule(s) to process on Against before compare | Should contain a valid Action Rule. This Action Rule is processed on the Merge Record entered in AGAINST before comparison is done. | When the records have different key structure or are not homogeneous you could change this by using for example Action Rule: ConvertResultList() | |
Rule | RULE | Action Rule(s) to process for failed keys | Should contain a valid Action Rule. This Action Rule is processed on the output Rule Result parameter: RULE_RESULT after comparison. | For example, to filter out (FilterResultList) certain results or to change the structure of the Rule Result (ConverResultList ). | |
Rule | RULE_AMOUNTS | Action Rule(s) to process for failed Amounts | Should contain a valid Action Rule. This Action Rule is processed on the output Rule Result parameter: RULE_RESULT_AMOUNTS after comparison. | For example, to filter out (FilterResultList) certain results or to change the structure of the Rule Result (ConverResultList ). | |
Rule | RULE_MATCHED | Action Rule(s) to process for matched Amounts | Should contain a valid Action Rule. This Action Rule is processed on the output Rule Result parameter: RULE_RESULT_MATCHING after comparison. | For example, to filter out (FilterResultList) certain results or to change the structure of the Rule Result (ConverResultList ). | |
Rule | SAP_SYSTEMS | SAP System | Should contain a valid SAP System as defined in RunMyFinance. Available SAP Systems are listed. The SAP System, SAP Client and optionally SAP User Name is used to check the amounts format (decimal separator, thousand separator) | Yes | <PARTITION>:<SAP_SYSTEM_NAME> REDWOOD:SAP_EC6 |
Target | CLIENT | SAP Client | Should contain a valid SAP Client as defined in RunMyFinance. Available SAP Clients are listed, based on the chosen SAP System. The SAP System, SAP Client and optionally SAP User Name is used to check the amounts format (decimal separator, thousand separator | Yes | 800 |
Target | SAP_USER_NAME | SAP User Name | Should contain a valid SAP user. The SAP System, SAP Client and optionally SAP User Name is used to check the amounts format (decimal separator, thousand separator) | ||
Output | SHOW_INPUT | Show Input Records | Here you could specify if you would like to have the input of parameters AMOUNTS and AGAINST also available in either Html or Text format. If nothing is selected the input values are only visible in the Input parameters. If used it will create the following job-files: input_amounts.html or input_amounts.txt input_against.html or input_against.txt | Only empty or values Html and Text are allowed. | |
Output | SHOW_RESULT | Show Result Records | Here you could specify if you would like to have the output results also available in either Html or Text format. If nothing is selected the output results are only visible in the output parameters: Tab: Rule, RULE_RESULT_AMOUNTS , Tab: Rule, RULE_RESULT_MATCHING If used it will create the following job-files: differences.html or differences.txt matching.html or matching.txt | ||
Output | OUTPUT_KEY | Key Column descriptions | When SHOW_INPUT and/or SHOW_RESULT parameters are specified, you can set the name(s) of the key column here. If not set, the default will be used: key 0 , key 1 , etc. When you have multiple keys, you can specify these, separated by a comma. | Multiple keys: Company Code,GL Account | |
Output | OUTPUT_AMOUNT | Amount Column description | When SHOW_INPUT and/or SHOW_RESULT parameters are specified, you can set the name of the amount value in the AMOUNTS parameter. If not set, the default will be used: Amount | ||
Output | OUTPUT_AGAINST | Against Column description | When SHOW_INPUT and/or SHOW_RESULT parameters are specified, you can set the name of the amount value in the AGAINST parameter. If not set, the default will be used: Against Amount | ||
Output | HTML_BODY | Html Body, if empty default | When SHOW_INPUT and/or SHOW_RESULT parameters are specified with a Html, you can overwrite the default html body by pointing to another Redwood Document. | Default: doc:REDWOOD:/REDWOOD.FCA/FCA_Table_Template.txt | |
Output | HTML_CSS | Html CSS | When SHOW_INPUT and/or SHOW_RESULT parameters are specified with a Html, you can overwrite the default CSS style sheet by pointing to another Redwood Document. | Default: doc:REDWOOD:/REDWOOD.FCA/FCA_MAIL_REPORT_CSS.txt | |
Infrastructure | TRACE | Enable Tracing information | Set this parameter value to true (Show) to have additional logging information when you need to debug the results. Default: empty (which is equal to false (Don’t show) | Only empty or values true and false are allowed. | |
Output | RULE_RESULT_HEADER | List with Fields used in Resulting RTX | Each process generates an RTX job-file: RULE_RESULT_RTX.rtx In case no issues are found, this RTX contains all data with key column(s) and the amount value columns AMOUNTS and AGAINST . In case issues are found, only the key column(s) which have issue are listed in the RTX. You can specify comma separated all the headers you want to set. Order is key 0 , key 1 , key 2 etc and then followed by value of AMOUNTS and then value of AGAINST . If the result RTX contains more fields then specified in this parameter, the default is used: Field_3 , Field_4 , etc. (depending how many fields you have defined. In this example two column headers of the key fields where specified and therefore starts with Field_3 ) | Company Code,GL Account,SAP Amount,Excel Amount The above example has two key fields and the AMOUNTS values are coming from SAP and the AGAINST values are coming from an Excel file. |
Output Parameters
The Output parameters can be found under the Rule section.
The following output parameters are available:
RULE_RESULT
: All keys that have failedRULE_RESULT_AMOUNTS
: All keys and amounts that have failedRULE_RESULT_MATCHING
: All keys and amounts that have matched
These parameters are populated with a Merge Record.
Troubleshooting
Parameters Tab
- Issue:
- Resolution: Possible values for the different input parameters can be set dynamically by using REL expressions or Replacements.
See Also
Redwood Finance Automation Reference Guide
financeTopic