This switches the XML processor to look at the database given as its value. There are two version of this:
dfd="aaa" or dfdx="aaa"
… where "aaa” is either a 3-character mnemonic for the application file, such as "SLA” for the sales ledger accounts file, or "POD” for the purchase orders details file; or it is one of the additional files defined in a processing command, such as "LOG”, or "GLU”, or "CON” (see Database Identifier under Processing Commands above). This attribute may require a key attribute (see below) if access to the file is not implied by the application.
Since an attribute cannot be used more than once in an element, the version dfdx, where x can take the value 1 or 2, is required where more than one file is to be referenced. For example, the copy attribute (described above) usually requires two files to be referenced. As another example, if a test is being carried out on a lookup, requiring the use of a dfd attribute to specify the lookup file, then a second dfd attribute may be required to switch
the XML processor to another file for the element value itself — the dfd1 and dfd2 versions must again be used in such a case.
Used on its own for an incoming XML file, the "dfd” attribute can be used to check that a value exists. For example, the attribute dfd="GLU", with the element value given as D001-CODE will cause an error if the element value is not present in the GLU file. Use this to check that (for example) the trading partner for an incoming file, whatever code is used (theirs, yours, or an EAN, say) is known to you. The value that could appear here must be present in the GLU file if so.
Another use of the dfd attribute concerns master/detail-style input XML files, where there are often trailer elements, to be updated into the master record, that follow all the detail elements.
Note that, for "dfd2” a value of "DFD” means that the object database for the copy is the current target database.
Important Notes
1. The "dfd” attribute normally sets the target database that is to be used for the element data, including for any child elements. You may have to experiment — perhaps moving a conflicting attribute to a higher or lower element level — to get the right result. The target database reverts to that of the parent element once the current element and all its child or sibling elements have been processed.
Some additional attributes have the effect of not changing the target database, restoring the original target after the element attributes have been processed. For example, the "flgn” attribute
2. For an output XML file, the "dfd” attribute defines the break between the master and detail file records in master/detail file transactions such as purchase orders.
Article ID: 1826 Created On: Mon, Jul 9, 2012 at 4:08 PM Last Updated On: Thu, Jun 22, 2023 at 4:53 PM