CURRENCY_SAP
Description
This operator converts the currency value as stored by SAP to the actual value based on the internal TCURX table.
SAP stores every NETWR value as a result of the following formula: stored_value = actual_value / TDEC
Here, TDEC is computed as follows: TDEC = POW(10, 2 - TCURX.CURRDEC)
This operator therefore uses the inverse of the first formula to obtain the actual value from the stored value. The TCURX table should be present in the datamodel.
If the TCURX table does not contain the requested currency, TDEC=1 is assumed, which means that it is not required to do any conversion of the input amount. Therefore, the unchanged input amount is returned is that case.
Syntax
CURRENCY_SAP ( amount_column, document_currency_type_column [, source_system_column ] )
amount_column: The column containing the amounts as stored in the SAP format. Must be of type FLOAT.
document_currency_type_column: The column containing the document currency types. A corresponding entry should be present in the TCURX table for each document currency type. Must be of type STRING.
source_system_column: Optional column specifying the source system that is to be used in the conversion. Must be of type STRING. The name of this column and the source system column in TCURX must be the same.
Examples
[1] An example of converting the SAP representation of NETWR values to their actual value. | ||||||||||||||||||||||||
| ||||||||||||||||||||||||
|
[2] An example showing the use of CURRENCY_SAP in combination with CURRENCY_CONVERT_SAP for the SAP P2P process. The output columns show the SAP representation of the NETWR value, the actual value, and the value after conversion to EUR respectively. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|