This graphic illustrates the logic for populating sales order detail, sales order detail ledger file, reference, and reference 2 fields before changes.