Sharing means you want to share or choose a specific instance or key value in the chain of relationships. This is not just an implementation specification; it relates business requirements as well.
Sharing only takes place if the referenced entity has more than one key field; only the high order keys may be shared. The low order key will always require a separate entry.
Take the following model for example:
Customer is Owned by Company
Order Refers to Customer For Ordering Customer
Order Refers to Customer For Invoicing Customer
An Order refers to the Customer twice, first for Ordering Customer and then for Invoicing Customer. This requires two entries in Order of Customer Code, one for Ordering and one for Invoicing.
For the Company Code entry, there is a choice. If the two customers (ordering and invoicing) must be customers of the same company, then, to ensure this, the Company Code is shared for the two Refers to relations. That means there would be only one Company Code entry in the Order file. If the two customers can be customers of different companies, then the Company Code is not shared for the two Refers to relations. That is when two Company Code entries in the Order file are needed, one for ordering and one for invoicing.
The Owned by and Refers to relations may imply that a key field should be added to a file when that field already exists on the file because it was resolved from a preceding relation, causing duplicate entries.
You can control whether separate entries are created for a field in a file-to-file relation by checking the value specified for the Sharing parameter on the relation statement. For example:
You can use the Default Sharing Type (YSHRDFT) model value to set the default sharing to *NONE or *ALL.
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |