Show TOC

 Reference Fields and Reference TablesLocate this document in the navigation structure

Use

You specify a reference table for fields when they contain quantities (data type QUAN) or currency amounts (data type CURR).

This reference table must contain a field with the format for the currency key (data type CUKY) or unit of measure (data type UNIT). This field is called the reference field of the output field. The reference field can also reside in the table itself.

Features

A field is assigned to the reference field at program runtime. If a field is filled with currency amounts, the corresponding currency is determined from the assigned reference field. The figure below shows the relation between Table T1 and Reference table T2. The value entered in the reference Field 5 defines the currency of the amount defined in Field 2 in T1.

Example

Table SBOOK in the flight model contains all the flight bookings made by customers. Field FORCURAM contains the price of the booking in the customer's currency. Field FORCURKEY of table SBOOK contains the corresponding currency key for this price. SBOOK is the reference table for field FORCURAM and FORCURKEY is the reference field for field FORCURAM.