MAC-PAC Homecontact ussupport login 
Documentation > MAC-PAC Technical Library > Distribution > Purchasing > Programs > Item/Vendor Relationship Reports - Purpose > Item/Vendor Relationship Reports - Calculations

Item/Vendor Relationship Reports - Calculations

PO560E

A.   Housekeeping

1.   See Common Processing Routines - Housekeeping of this manual for a general discussion of the Housekeeping subroutine.  Processing specific to this program is described below.

2.   Key lists are defined for each file retrieved by the program.

3.   Workfields are defined and program constants are initialized.

4.   The date format record (category 049) is retrieved from the Reference file (REFERP).  If this record is not found, the date format defaults to MMDDYY.

5.   All valid company/warehouse combinations and plant ID codes are retrieved from the Warehouse Description file (IC170M) and stored in arrays.

B.   Mainline

1.   The first record on the Item/Vendor Relationship Report Request file (PO310BP) is read.  The Request Type is checked to determine which report is being requested:

Request Type

 

Report

1

Item/Vendor Relationships by Item (PO560A)

2

Item/Vendor Relationships by Vendor (PO560B)

3

Item/Vendor Relationships With No Quotation (PO560C)

2.   If the Request Type is 1 (Relationships by Item), the following processing occurs.

a.   QCHECK is executed to open the Printer file (PO500A) and select output queue.

b.   The logical Item/Vendor Relationship file (PO150ML2), keyed by part number, is read sequentially to retrieve all records having the requested part number and, if entered, company/warehouse and buyer code.

c.   Each record is validated against the selection criteria in the report request record.  If a match is not made, the relationship record is rejected and the next relationship record is read.

d.   When the first matching record is found, the report headings are printed.

(1)  The company/warehouse, requestor, report title, date and time are formatted and printed.

(2)  The report request record is formatted and printed.

(3)  Decodes are retrieved from the Reference file and printed.

(4)  The base currency and base currency description are printed on the report heading if the user is in a multi-currency environment.

e.   Each item/vendor relationship detail line is formatted and printed.

(1)  The Vendor Name is retrieved from the Vendor Master file (APMASTP).

(2)  The Volume at Unit Cost (VIUCYD) and Accepted Quantity (VIAQYD) are retrieved from the Item/Vendor Statistics file (PO280M).  The Year-to-Date Average Price is calculated as the Volume at Unit Cost divided by the Accepted plus Rejected Quantities, and printed on the detail line.

(3)  The Planned Quantity and Minimum Order Quantity are converted from purchasing units of measure to the stockkeeping unit of measure and printed.

f.    The Item/Vendor Relationship Comment file (PO140M2) is checked; if comments exist for the current item/vendor relationship, they are printed on the next detail line.

3.   If the Request Type is 2 (Relationships by Vendor), the following processing occurs.

a.   QCHECK is executed to open the Printer file (PO560B) and select OUTQ.

b.   The logical Item/Vendor Relationship file (PO140ML1), keyed by Vendor Number, is read sequentially to retrieve all records having the requested vendor number and, if entered, company/warehouse and buyer code.

c.   Each record is validated against the selection criteria in the report request record.  If a match is not made, the relationship record is rejected and the next relationship record is read.

d.   When the first matching record is found, the report headings are printed.

(1)  The company/warehouse, requestor, report title, date and time are formatted and printed.

(2)  The report request record is formatted and printed.

(3)  Decodes are retrieved from the Reference file and printed.

(4)  The base currency and base currency description are printed on the report heading if the user is in a multi-currency environment.

e.   Each item/vendor relationship detail line is formatted and printed.

(1)  The Vendor Name is retrieved from the Vendor Master file (APMASTP).

(2)  The Volume at Unit Cost (VIUCYD) and Accepted Quantity (VIAQYD) are retrieved from the Item/Vendor Statistics file (PO280M).  The Year-to-Date Average Price is calculated as the Volume at Unit Cost divided by the Accepted plus Rejected Quantities, and printed on the detail line.

(3)  The Planned Quantity is converted from purchasing units of measure to the stockkeeping unit of measure and printed.

f.    The Item/Vendor Relationship Comment file (PO140M2) is checked; if comments exist for the current item/vendor relationship, they are printed on the next detail line.

4.   If the Request Type is 3 (Relationships With No Quotation), the following processing occurs.

a.   The logical Item/Vendor Relationship file (PO140ML2), keyed by Part Number, is read sequentially.

b.   Each record is validated against the selection criteria in the report request record.  If a match is not made, the relationship record is rejected and the next relationship record is read.

c.   If the record matches the selection criteria, the Quotation file (PO150M1) is accessed.  If a quotation record is found for the relationship record, the relationship record is rejected and the next relationship record is read.

d.   When the first record with no quotations is found, the report headings are printed.

(1)  The company/warehouse, requestor, report title, date and time are formatted and printed.

(2)  The report request record is formatted and printed.

(3)  Decodes are retrieved from the Reference file and printed.

e.   Each item/vendor relationship with no quotations detail line is formatted and printed.

(1)  The Vendor Name is retrieved from the Vendor Master file (APMASTP).

(2)  The Planned Quantity is converted from purchasing units of measure to the stockkeeping unit of measure and printed.

f.    The Item/Vendor Relationship Comment file (PO140M2) is checked; if comments with a Print Code of 1 (print on item/Vendor Relationship report) exist for the current item/vendor relationship, they are printed on the next detail line.

PO560E Program Menu