Converting Currency Amounts

Use

If a Web Dynpro ABAP application contains input fields that are bound to related context attributes (for example: "Amount" and "Currency", or "Quantity" and "Unit"'), the following behavior is observed:

If the user changes the value of the Currency field (or Unit field) without changing the value of the Amount field (or Quantity) field, the content of the Amount (Quantity) field is displayed incorrectly in the following case:

The Amount (Quantity) field has decimal points and the new currency (or unit) does not allow decimal points.

Example:

If the Currency (Unit) field is converted to Yen, the position of the decimal point is moved two positions to the right, which means an incorrect amount is shown. The internal value of the referenced field remains unchanged.

Users can prevent this behavior with application parameter WDREFFIELDBEHAVIOUR.

The WDREFFIELDBEHAVIOUR parameter can have the following values:

  • 0 (default value): Internal value of the referenced field is not changed

  • 1: Position of the decimal point of the referenced field remains unchanged

To leave the position of the decimal point of the referenced field unchanged if the Currency (Unit) field is converted, proceed as follows:

  1. Use Web Dynpro application WD_GLOBAL_SETTING to set application parameter WDREFFIELDBEHAVIOUR to the value 1.

  2. Invalidate the shared object area CL_WDR_CONF_APPL_SHM in transaction SHMM.