cch_get_cns

At leaving the foreign key field in a link mask :
Searches for an existing entry in the secondary table that is identical to the current entry in the field of the link mask.

If a record is found in the secondary table, DataView automatically enters all subsequent attributes of this table visible in the link mask.

If several records are found in the secondary table, DataView will recursivley open the master list of the secondary table for the selection of exactly one record in that table.

If no corresponding record is found, a message will appear. The user can only leave the field after he either cancels the update- or insert operation, enters nothing, or specifies a value which the userexit can find in the secondary table.


Usage as:

Post_Field userexit at the foreign key field of a link.


Explanation:

Using this userexit you can simply prevent new entries in link masks if no corresponding record exists in the secondary table the link is directed to. Thus you force the user to first create the records in a list of the main table, before he creates a link. At the same time you make sure that all other attributes are automatically entered if the userexit allows the new entry in the link mask.

The userexit can only be usefully appled at foreign key fields in link masks.