Previous Topic: Has Relation

Next Topic: Includes Relation

Example of Using Has Relations

A company is defined as follows:

FIL Company REF Known by FLD Company code CDE

FIL Company REF Has 1 FLD Company name TXT

FIL Company REF Has 2 FLD Creation date DT#

FIL Company REF Has 3 FLD Profit last year VAL

FIL Company REF Has 4 FLD No of employees NBR

These relationships will result in the following entries:

 

Company file

K

 

Company code

Company name

Creation date

Profit last year

No of employees

For each CA 2E file, all the file-to-field relations must be unique. The same field cannot be declared twice in the same file. A field can be declared in two different files. Although it can be declared with two different usages, this is not recommended. For example:

FIL Product REF Known by FLD Product code CDE

FIL Order Detail REF Has FLD Product code CDE

Using a field as an attribute in one file and as an identifier in another file usually indicates that a relation is missing from your model.