Key fields (identifiers) can be shared between file entries arising from the resolution of the Owned by and Refers to relations.
All files that you use as targets of sharing must always be defined as relations above the relation you are defining. Never share relations that are lower, and do not move shared relations lower.
Sharing is performed by matching the keys of the file named in the sharing parameter to the fields that already exist in the file. Thus you can control the fields shared by proper sequencing of the relations. When you name a file in the sharing parameter that is defined as a prior relation in the file, sharing uses the keys defined for that relation in preference.
For example:
Order Detail Refers to Item Master
For: Ordered
where Item No. (ordered) is the key
Order Detail Refers to Item Balance
For: Shipped, Sharing: *NONE
where Item No. (shipped) and Warehouse No.
are the keys
Order Detail Refers to Shipping Instructions
Sharing: Item Balance
where Item No. (shipped) and State Code
are the keys
The explicit reference of Sharing Item Balance ensures that the Item No. of the item being shipped is used as the key to the Shipping Instructions, rather than that of an item ordered even though the Ordered Item No occurs higher in the entries.
See the chapter "Understanding Your Data Model" for more information on sharing entries between relations.
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |