Lawson Software

Lawson Insight Technical Documentation

Generated by:
Documentation generated by Decision Analytics

ERDs Tables Elements Libraries App Forms

                             MAINVDTL FILE

                        Matching Invoice Detail

The Matching Invoice Detail file contains line item, miscellaneous add on
cost, and line item add on cost approval information by invoice and purchase
order.

REFERENCED BY

POA3.1    MA278     PO135     PO64.1    PO295     POIJ.1

UPDATED BY

AP115     AP180     AP181     AP190     AP198     AP220
AP28.1    AP28.2    AP30.2    AP30.4    AP300     AP305
AP45.1    API1.1    MA126     MA63.1    MA65.1    MA66.2
MA66.3    MA68.1

FIELD NAME           DESCRIPTION/VALID VALUES                    UPDATED BY

MAD-COMPANY          Numeric 4                                   AP115   AP180
Company              The company number represents an            AP181   AP190
                     established company and is entered on       AP220   AP28.1
                     all function codes.                         AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-VENDOR           Alpha 9  (Right Justified)                  AP115   AP180
Vendor ID            The vendor's identification code.           AP181   AP190
                                                                 AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-INVOICE          Alpha 22                                    AP115   AP180
Invoice Number       Used to identify the invoice.               AP181   AP190
                                                                 AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-SUFFIX           Numeric 3                                   AP115   AP180
Invoice Suffix       This is the suffix for the invoice.         AP181   AP190
                                                                 AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-PO-NUMBER        Alpha 14  (Right Justified)                 AP115   AP180
PO Number            This field contains the number              AP181   AP190
                     representing the purchase order.            AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-PO-RELEASE       Numeric 4                                   AP115   AP180
PO Release Number    Used to identify a purchase order           AP181   AP190
                     release (created from a Blanket or          AP220   AP28.1
                     Standing order).                            AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-PO-CODE          Alpha 4                                     AP115   AP180
Purchase Order Code  Purchase order number code. Used to         AP181   AP190
                     keep purchase orders unique. Can also be    AP220   AP28.1
                     used for reporting purposes.                AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-LINE-NBR         Numeric 6                                   AP115   AP180
Line Number          This field contains the line number.        AP181   AP190
                                                                 AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-AOC-CODE         Alpha 2                                     AP115   AP180
Add On Cost Code     This field contains the identifier for      AP181   AP190
                     the add on cost associated with this        AP220   AP28.1
                     line item.                                  AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-SEQ-NBR          Numeric 4                                   AP115   AP180
Sequence Number      An automatically assigned sequence          AP181   AP190
                     number.                                     AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-ITEM-TYPE        Alpha 1                                     AP115   AP180
Item Type            This field identifies the line item         AP181   AP190
                     type.                                       AP220   AP28.1
                     I = Inventoried                             AP28.2  AP30.2
                     N = Non-stock                               AP30.4  AP305
                     S = Service                                 AP45.1  API1.1
                     X = Special                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-ITEM             Alpha 32                                    AP115   AP180
Item Number          This field contains the item                AP181   AP190
                     identifier.                                 AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-VEN-ITEM         Alpha 32                                    AP115   AP180
Vendor Item          The vendor's item identifer.                AP181   AP190
                                                                 AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-MATCHED-QTY      Signed 13.4                                 AP115   AP180
Matched Quantity     The quantity of items that have been        AP181   AP190
                     matched.                                    AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-MATCH-UNIT-CST   Signed 13.5                                 AP115   AP180
Match Unit Cst                                                   AP181   AP190
                                                                 AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-VPRI-UOM         Alpha 4                                     AP115   AP180
Vendor Price Unit    This is the vendor pricing unit of          AP181   AP190
of Measure           measure.                                    AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-VPRI-UOM-MULT    Signed 13.7                                 AP115   AP180
Vendor Price UOM     This is the vendor pricing unit of          AP181   AP190
Multiplier           measure multiplier. It is used to           AP220   AP28.1
                     convert unit cost to stock unit of          AP28.2  AP30.2
                     measure terms.                              AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-ENTERED-QTY      Signed 13.4                                 AP115   AP180
Entered Qty                                                      AP181   AP190
                                                                 AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-ENT-UNIT-CST     Signed 13.5                                 AP115   AP180
Entered Unit Cost    The entered unit cost.                      AP181   AP190
                                                                 AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-TAX-CODE         Alpha 10                                    AP115   AP180
Tax Code             This field contains a code representing     AP181   AP190
                     specific tax information.  This must be     AP220   AP28.1
                     valid Tax Code.                             AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-TAX-TYPE         Alpha 1                                     AP115   AP220
Tax Type             The type of tax.                            AP30.2  AP30.4
                                                                 AP305   API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-TAX-AMOUNT       Signed 13.5                                 AP115   AP180
Tax Amount           The tax amount for the invoice.             AP181   AP190
                                                                 AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-VBUY-MATCH-QTY   Signed 13.4                                 AP115   AP180
Matched Quantity     The quantity of items that have been        AP181   AP190
                     matched.                                    AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-VBUY-UOM         Alpha 4                                     AP115   AP180
Vendor Buy Unit of   The vendor's buying unit of measure.        AP181   AP190
Measure                                                          AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-VBUY-UOM-MULT    Signed 13.7                                 AP115   AP180
Vendor Buy UOM       Vendor Buy Unit Of Measure Multiplier.      AP181   AP190
Multiplier           Used to convert quantity and unit cost.     AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-NO-TAX-FLAG      Alpha 1                                     AP115   AP180
Taxable Invoice Flag Indicates if the invoice is taxable.        AP181   AP190
                     N = No                                      AP220   AP28.1
                     Y = Yes                                     AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-MATCH-CLASS      Alpha 10                                    AP115   AP180
Match Class          Match class. A user-defined matching        AP181   AP190
                     key structure consisting of matching        AP220   AP28.1
                     elements.                                   AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-MATCH-DTL-KEY    Alpha 55                                    AP115   AP180
Match Detail Key     Match detail key. Combines all Matching     AP181   AP190
                     Elements into a single element.             AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-RTL-UNIT-COST    Signed 13.5                                 AP115   AP180
Retail Unit Cost     The retail unit cost of the item.           AP181   AP190
                                                                 AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-LOCATION         Alpha 5                                     AP115   AP180
Location Code        This field contains a valid stocking        AP181   AP190
                     location within the company inventory.      AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-MATCH-OBJ-ID     Numeric 12                                  AP115   AP180
Matching Object ID   A system generated matching object          AP181   AP190
                     identifier.                                 AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-ENT-UOM          Alpha 4                                     AP115   AP180
Entered Unit of      Entered unit of measure.                    AP181   AP190
Measure                                                          AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-ENT-UOM-MULT     Signed 13.7                                 AP115   AP180
Entered UOM          This is the multiplier that relates the     AP181   AP190
Multiplier           entered UOM to stock UOM.                   AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-TRAN-ND          Numeric 1                                   AP115   AP180
Transaction Number   The number of decimal positions defined     AP181   AP190
of Decimals          for the transaction currency.               AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-REC-SOURCE       Alpha 2                                     AP115   AP180
Record Source        Indicates where the detail record was       AP181   AP190
                     created.                                    AP220   AP28.1
                                                                 AP28.2  AP30.2
                     Valid values are:                           AP30.4  AP305
                                                                 AP45.1  API1.1
                     IN = Invoice                                MA126   MA63.1
                     "  " = PO Entry                             MA65.1  MA68.1
                     LM = Line Match (MA43)
                     "  " = PO Entry
                     MA = Created within match

MAD-TOT-DIST-AMT     Signed 15.2                                 AP115   AP180
Total Distribution   The total amount of the distribution.       AP181   AP190
Amount                                                           AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-TOT-BASE-AMT     Signed 15.2                                 AP115   AP180
Total Base Amount    This defines the total distributed          AP181   AP190
                     approval amount in the company base         AP220   AP28.1
                     currency.                                   AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-STATUS           Numeric 1                                   AP115   AP180
Status               The transaction status.                     AP181   AP190
                                                                 AP220   AP28.1
                     Valid values are:                           AP28.2  AP30.2
                                                                 AP30.4  AP305
                     0 = Unmatched                               AP45.1  API1.1
                     1 = Matched                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-API-OBJ-ID       Numeric 12                                  AP115   AP180
API Object ID        A subsystem object interface                AP181   AP190
                     identification number.                      AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-MA-REC-NBR       Numeric 10                                  AP115   AP180
Receipt Number       The receipt number an invoice detail was    AP181   AP190
                     matched to in a detail match.               AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-MA-LINE-NBR      Numeric 6                                   AP115   AP180
Receipt Line Number  Receipt line number.                        AP181   AP190
                                                                 AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-MATCH-SEQ-NBR    Numeric 4                                   AP115   AP180
Matching Sequence    Matching sequence number. Used to keep      AP181   AP190
Number               records unique.                             AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-MTCH-EXC-PROC    Numeric 1                                   AP115   AP180
Mtch Exc Proc        0 = No excess quantity                      AP181   AP190
                     1 = Chargeback                              AP220   AP28.1
                     2 = Write off                               AP28.2  AP30.2
                     3 = Matched no rec                          AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-INVOICE-TYPE     Alpha 1                                     AP115   AP180
Invoice Type         C = Credit Memo                             AP181   AP190
                     " " = Regular                               AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-DISTRIB-DATE     Numeric 8  (yyyymmdd)                       AP115   AP180
Distribution Date    The date used for posting the               AP181   AP190
                     transactions to the general ledger.         AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-UPDATE-DATE      Numeric 8  (yyyymmdd)                       AP115   AP180
Update Date          This field contains the date the record     AP181   AP190
                     was updated.                                AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-UPDATE-TIME      Numeric 6                                   AP115   AP180
Update Time          This field contains the system time         AP181   AP190
                     when the record was updated.                AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-TAX-USAGE-CD     Alpha 10                                    AP115   AP180
Tax Usage Cd         The tax usage coe for the vendor.  This     AP181   AP190
                     filed is required if the AP Company         AP220   AP28.1
                     inidcates that VAT reporting required.      AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-LAST-MSG-SEQ     Numeric 6                                   AP115   AP220
Last Message                                                     AP30.2  AP30.4
Sequence Number                                                  AP305   API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA66.2
                                                                 MA66.3  MA68.1

MAD-ICN-CODE         Alpha 8                                     AP115   AP180
Icn Code                                                         AP181   AP190
                                                                 AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-SUPLMNTARY-QTY   Signed 13.4                                 AP115   AP180
Suplmntary Qty                                                   AP181   AP190
                                                                 AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-SUPLMNTARY-UOM   Alpha 4                                     AP115   AP220
Suplmntary Uom                                                   AP30.2  AP30.4
                                                                 AP305   API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-WEIGHT           Signed 9.3                                  AP115   AP180
Unit Weight          This field contains the unit weight of      AP181   AP190
                     the item based on the stocking UOM.         AP220   AP28.1
                                                                 AP28.2  AP30.2
                                                                 AP30.4  AP305
                                                                 AP45.1  API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1

MAD-MATCH-EXT-COST   Derived
Match Ext Cost

                         MAINVDTL FILE INDEX

NAME      KEY FIELDS    DESCRIPTION / SUBSET CONDITION           USED IN

MADSET1   COMPANY                                                AP115   AP198
          VENDOR                                                 AP220   AP30.2
          INVOICE                                                AP30.4  AP300
          SUFFIX                                                 AP305   API1.1
          PO-NUMBER                                              MA126   MA63.1
          PO-RELEASE                                             MA65.1  MA68.1
          PO-CODE                                                POA3.1
          LINE-NBR
          AOC-CODE
          SEQ-NBR

MADSET10  COMPANY       KeyChange, Subset                        MA278   PO135
          PO-NUMBER     Where STATUS = 1                         PO64.1
          PO-RELEASE
          PO-CODE
          LINE-NBR
          UPDATE-DATE*
          UPDATE-TIME*
          VENDOR
          INVOICE
          SUFFIX
          AOC-CODE
          SEQ-NBR

MADSET2   COMPANY       KeyChange                                AP115   AP220
          PO-NUMBER                                              AP30.2  AP30.4
          PO-RELEASE                                             AP305   API1.1
          PO-CODE                                                MA126   MA63.1
          LINE-NBR                                               MA65.1  MA68.1
          VENDOR                                                 PO295   POIJ.1
          INVOICE
          SUFFIX
          AOC-CODE
          SEQ-NBR

MADSET3   COMPANY       KeyChange, Duplicates                    AP115   AP220
          API-OBJ-ID                                             AP30.2  AP30.4
          PO-NUMBER                                              AP305   API1.1
          PO-RELEASE                                             MA126   MA63.1
          PO-CODE                                                MA65.1  MA68.1
          MATCH-DTL-KEY
          SEQ-NBR

MADSET4   COMPANY       KeyChange, Duplicates                    AP115   AP220
          VENDOR                                                 AP30.2  AP30.4
          INVOICE                                                AP305   API1.1
          SUFFIX                                                 MA126   MA63.1
          PO-NUMBER                                              MA65.1  MA66.1
          PO-RELEASE                                             MA66.2  MA66.3
          PO-CODE                                                MA66.8  MA68.1
          ITEM
          SEQ-NBR

MADSET6   COMPANY       KeyChange
          PO-NUMBER
          PO-RELEASE
          PO-CODE
          LINE-NBR
          VENDOR
          AOC-CODE
          INVOICE
          SUFFIX
          SEQ-NBR

MADSET7   COMPANY       KeyChange, Subset
          API-OBJ-ID    Where AOC-CODE = Spaces
          PO-NUMBER
          PO-RELEASE
          PO-CODE
          LOCATION
          MATCH-DTL-KEY
          LINE-NBR
          AOC-CODE
          SEQ-NBR

MADSET8   COMPANY       KeyChange                                AP115   AP220
          API-OBJ-ID                                             AP30.2  AP30.4
          PO-NUMBER                                              AP305   API1.1
          PO-RELEASE                                             MA126   MA63.1
          PO-CODE                                                MA65.1  MA68.1
          LOCATION
          MATCH-DTL-KEY
          LINE-NBR
          AOC-CODE
          SEQ-NBR

MADSET9   COMPANY       KeyChange, Duplicates, Subset            AP115   AP220
          MATCH-OBJ-ID  Where INVOICE-TYPE = Spaces              AP30.2  AP30.4
          MATCH-SEQ-NBR                                          AP305   API1.1
                                                                 MA126   MA63.1
                                                                 MA65.1  MA68.1
                                                                 POA3.1

                         MAINVDTL FILE RELATIONS

ONE TO ONE RELATIONS


RELATION       RELATED
 NAME           FILE        INTEGRITY RULES / FIELD MATCH

Apbatch        APBATCH      Not Required

                            MAD-COMPANY          -> APB-COMPANY
                            API-BATCH-NUM        -> APB-BATCH-NUM

Apcompany      APCOMPANY    Required

                            MAD-COMPANY          -> CPY-COMPANY

Apinvoice      APINVOICE    Required

                            MAD-COMPANY          -> API-COMPANY
                            MAD-VENDOR           -> API-VENDOR
                            MAD-INVOICE          -> API-INVOICE
                            MAD-SUFFIX           -> API-SUFFIX
                            Zeroes               -> API-CANCEL-SEQ

Iccompany      ICCOMPANY    Required

                            MAD-COMPANY          -> ICC-COMPANY

Itemloc        ITEMLOC      Required

                            MAD-COMPANY          -> ITL-COMPANY
                            MAD-LOCATION         -> ITL-LOCATION
                            MAD-ITEM             -> ITL-ITEM

Itemmast       ITEMMAST     Required
                            When MAD-ITEM-TYPE = "I"
                            Or   MAD-ITEM-TYPE = "N"

                            ICC-ITEM-GROUP       -> ITE-ITEM-GROUP
                            MAD-ITEM             -> ITE-ITEM

Location       ICLOCATION   Required

                            MAD-COMPANY          -> ICL-COMPANY
                            MAD-LOCATION         -> ICL-LOCATION

Macompany      MACOMPANY    Required

                            MAD-COMPANY          -> MAY-COMPANY

Mapoinv        MAPOINV      Not Required

                            MAD-COMPANY          -> AOI-COMPANY
                            MAD-PO-NUMBER        -> AOI-PO-NUMBER
                            MAD-PO-RELEASE       -> AOI-PO-RELEASE
                            MAD-PO-CODE          -> AOI-PO-CODE
                            MAD-VENDOR           -> AOI-VENDOR
                            MAD-INVOICE          -> AOI-INVOICE
                            MAD-SUFFIX           -> AOI-SUFFIX

Mmuaval        MMUAVAL      Required

                            MAD-COMPANY          -> MUA-COMPANY
                            "AP"                 -> MUA-SYSTEM-CD
                            MAD-LOCATION         -> MUA-LOCATION
                            "IN"                 -> MUA-DOC-TYPE
                            Spaces               -> MUA-DOC-NUMBER
                            Zeroes               -> MUA-DOC-NBR-NUM
                            Spaces               -> MUA-PO-CODE
                            MAD-LINE-NBR         -> MUA-LINE-NBR
                            MAD-API-OBJ-ID       -> MUA-API-OBJ-ID
                            MAD-SEQ-NBR          -> MUA-SEQ-NBR

Poaocmast      POAOCMAST    Required
                            When ((MAD-AOC-CODE != Spaces )
                            And   (MAD-TAX-CODE =  Spaces ))

                            MAD-COMPANY          -> PAM-COMPANY
                            MAD-AOC-CODE         -> PAM-AOC-CODE

Pocompany      POCOMPANY    Required

                            MAD-COMPANY          -> PCY-COMPANY

Poline         POLINE       Not Required

                            MAD-COMPANY          -> PLI-COMPANY
                            MAD-PO-NUMBER        -> PLI-PO-NUMBER
                            MAD-PO-RELEASE       -> PLI-PO-RELEASE
                            MAD-PO-CODE          -> PLI-PO-CODE
                            MAD-LINE-NBR         -> PLI-LINE-NBR

Purchorder     PURCHORDER   Required

                            MAD-COMPANY          -> PCR-COMPANY
                            MAD-PO-CODE          -> PCR-PO-CODE
                            MAD-PO-NUMBER        -> PCR-PO-NUMBER
                            MAD-PO-RELEASE       -> PCR-PO-RELEASE

Vendor         APVENMAST    Required

                            CPY-VENDOR-GROUP     -> VEN-VENDOR-GROUP
                            MAD-VENDOR           -> VEN-VENDOR

                         MAINVDTL FILE RELATIONS

ONE TO MANY RELATIONS


RELATION       RELATED
 NAME           FILE        INTEGRITY RULES / FIELD MATCH

Mainvmsg       MAINVMSG

                            MAD-COMPANY          -> MAG-COMPANY
                            MAD-VENDOR           -> MAG-VENDOR
                            MAD-INVOICE          -> MAG-INVOICE
                            MAD-SUFFIX           -> MAG-SUFFIX
                            Zeroes               -> MAG-CANCEL-SEQ
                            MAD-SEQ-NBR          -> MAG-MAD-SEQ-NBR
                                                    MAG-SEQ-NBR

Mmdist         MMDIST
                            Valid When MAD-ITEM-TYPE != "I"

                            MAD-COMPANY          -> MMD-COMPANY
                            "PO"                 -> MMD-SYSTEM-CD
                            Spaces               -> MMD-LOCATION
                            "PT"                 -> MMD-DOC-TYPE
                            MAD-PO-NUMBER        -> MMD-DOC-NUMBER
                            MAD-PO-RELEASE       -> MMD-DOC-NBR-NUM
                            MAD-PO-CODE          -> MMD-PO-CODE
                            MAD-LINE-NBR         -> MMD-LINE-NBR
                            Zeroes               -> MMD-COMPONENT-SEQ
                            MAD-AOC-CODE         -> MMD-AOC-CODE
                                                    MMD-LINE-SEQ
                                                    MMD-REQ-LOCATION
                                                    MMD-API-OBJ-ID

Porecline      PORECLINE

                            MAD-COMPANY          -> PRL-COMPANY
                            MAD-PO-CODE          -> PRL-PO-CODE
                            MAD-PO-NUMBER        -> PRL-PO-NUMBER
                            MAD-PO-RELEASE       -> PRL-PO-RELEASE
                            MAD-LOCATION         -> PRL-LOCATION
                            MAD-MATCH-DTL-KEY    -> PRL-MATCH-DTL-KEY
                                                    PRL-PO-LINE-NBR
                                                    PRL-REC-NUMBER
                                                    PRL-LINE-NBR