Documentation >
MAC-PAC Technical Library >
Distribution >
Electronic Data Interchange >
Programs >
EDI Receipts - Purpose
EDI Receipts - Purpose
ED120E
The EDI Receipts program (ED120E) receives transactions (ANSI #856) previously translated by an external EDI translation package. The key fields received through the EDI interface are: Vendor Bill of Lading Number, Purchase Order Number, External Company/Warehouse, External Bill-to Customer, External Ship-to Customer, Direct Distribution Flag, Part Number, Original Order Quantity, Backordered Quantity, Vendor Lot Number, and Lot Quantity. This program also receives any information for user-defined fields and passes them through the system without validation.
The program validates the transactions and:
· If valid, creates a new purchase order receipt. For direct shipments, it also initiates an automatic shipping process for associated sales order lines and quantity control processing is performed. It then updates the status fields on the transactions workfiles (ED120AP1-3) to 'P' (processed).
· If invalid, writes an error message to the EDI Receipt Error file (ED120AP4) and sets the error status field on the workfiles to either header, detail, or lot/line error.
This program can be run in either asynchronous or batch mode. If the program is called in batch mode, it reads through the EDI Receipt Request file (ED310AP) and processes the requested records from the transaction files.
The fields of the EDI Receipt Header file (ED120AP1) are validated. The external information fields (Company/Warehouse, Bill-to Customer, and Ship-to Customer) are used to find the vendor on the Vendor Master file using the logical file APMASTL9. The purchase order is retrieved using the Purchase Order Number of the Header file. If the purchase order is found, validation is performed.
If no errors occurred, the purchase order is logically locked. All receipt detail transactions associated with this header are retrieved and read sequentially from the EDI Receipt Detail file (Ed120AP2). The fields from the transaction file are then validated. For every detail transaction, purchase order line information is retrieved and validated using the Purchase Order Line Number of the EDI Receipt Detail file.
If no errors occurred with the validation of the EDI receipt line, the item is lot controlled and lots exist for this line, all lots associated with the line are retrieved from the EDI Receipt Lot file (ED120AP3) and are validated.
If any transaction errors occur for the purchase order (either header, line, or lot errors), all associated transactions are marked with the corresponding error status of 1, 2, or 3 and an error message is written to the EDI Receipt Error file (ED120AP4).
If no errors occurred and this is not the first header transaction, the program checks whether this PO receipt can be placed on the receipt previously created. Although multiple shipments related to multiple purchase orders can be placed on one receipt, a new receipt is needed for each Vendor Bill of Lading Number. Also, PO information like Company/Warehouse, Order Type (Direct or Warehouse Ship), Tax, Credit, Currency, and Vendor must match with the previous PO on the receipt.
The program also checks to see if the Electronic Data Collection (BC) module is installed. Note: For direct ship orders, when purchase orders are tied directly to sales orders, this program can apply a shipment directly against a sales order line using the Electronic Data Collection Transaction Router program (BC200E). If BC is not installed, the shipment line will not be formatted and a warning message will inform the user that the shipment cannot be processed. If BC is installed, a request is formatted to PO220E in asynchronous mode to process the updates to the PO for direct distribution shipments. Records are also written to BC200AP2 to initiate the automatic shipping process. Warehouse shipments update the PO directly but the program only performs the function of receipt administration. Quantity control must be performed on the inbound EDI shipments.
Key information from the Receipt is compared to the purchase order information and warning messages are generated when significant differences are found. These, however, do not prevent receipt creation. Two reports are produced:
· The Control report (ED120A) will summarize the total number of headers, lines, and lots processed successfully, not processed through error and the number of receipts created.
· The Update/Variance report (ED120B) lists those records processed successfully together with any warning messages.