Understanding Child Records

When you run the EDI Advanced Ship Notice Extraction program (R47032), the system updates the Record ID and Parent fields for each hierarchical level. The Record ID data item contains a unique value for each record in the hierarchy. The Parent data item contains the Record ID value of its parent's record. This allows a direct parent/child link between each record in the ASN database.

The parent/child functionality enables you to add a child record between two hierarchical level breaks. Each level break represents a subset of the fields that are associated with the level break. When you add a child record, the system:

  1. Stores the key fields of the selected record as variables.

  2. Verifies the hierarchical level to ensure that a new record is not being added to the lowest-level hierarchical level.

  3. Decrements the EDI Line Number value by 0.001.

    If a detail record contains that EDI line number, then the system decreases its EDI line number by 0.001. If a detail record has that number, then it is decreased by 0.001, and so forth.

    If the EDI line number on a record changes, then that change must be made to all related records within the ASN database.

  4. Displays the new record on the Work With Ship Notice Details form.

The system determines the hierarchy level of the new child record. If you attempt to add a child to the lowest hierarchy level record, the system issues an error message.