With the SAP S/4HANA Cloud 1805 release, **Manage Payment Formats,** came with a new Calculation Functionality. It provides you functionality to perform simple mathematical operations.

This would become handy for example if you need items numbered in the output file.

Calculations are done by **variables**, **calculations** **node** and possibility if **variable mapping** in the nodes.

**Variables**

Variables are defined in the header of the tree. There is new tab called **Variables**. There you can define required variables which will be used later in the calculation nodes or nodes where they can be mapped.

You have to specify

- Name of the variable
- Data type
- Initial value

**Name of the variable**

Name of the variable can contain all letters except the space.Variables are case insensitive.

**Data type**

Currently supported data type is **Number** which represents whole numbers. Result of the calculations is whole number.

**Variable initial value**

For data type Number, you must set value from set of **whole numbers**.

**Calculation nodes**

Calculation nodes groups mathematical operations which are **performed on** variables. Current solution supports mathematical operation with one or two **parameters**. There are several predefined operations which might be used.

**Parameters**

Important part of the operation are parameters. There is possibility of selection of four **source types** of parameters.

Source type |
Description |

Constant | User can insert numeric constant as a parameter |

Structure field |
User can choose field from available structures in DMEEX such as: – Structures assigned for tree type – Tree dependent structures – System structure |

Reference node | User can access to node value through node reference |

Variable | User can choose other variable defined in the header as a part of the formula |

Left side of a formula is always variable which is updated and can be reused later within tree.

**Operation**

Operation is a tool which can modify variable value in a certain way.

Operation |
Description |

ABS | Returns absolute value of a variable |

/ | Returns result of division of two parameters |

– | Returns result of subtraction of two parameters |

MOD | Finds the remainder after division of two parameters |

* | Returns result of multiplying of two parameters |

+ | Returns result of addition of two parameters |

**Variable mapping**

There is a new option of variable mapping.

You can access variable value during the whole execution of tree. You can select only from variables defined in the header of the tree. List of variables are available through match code on source screen.

**Variables in conditions**

You can also use variables in the conditions of the nodes. Similarly, as variable mapping you can select variable on one side of condition and compare it to variable or other value (constant, structure or reference node).

**Learn more about Manage Payment Formats here.**

**Be sure to check out Manage Payment Formats in Fiori Apps Library.**

**Read more about the SAP S/4HANA Cloud 1805 release of Manage Payment Formats**