Documentation >
MAC-PAC Technical Library >
Distribution >
Sales Analysis >
Programs >
Sales Analysis Report Requests - Purpose >
Sales Analysis Report Requests - Calculations
Sales Analysis Report Requests - Calculations
SA130E
A. Housekeeping
1. See the Common Processing Routines - Housekeeping section of this manual for a general discussion of the Housekeeping subroutine. Processing specific to this program is described below.
2. A parameter list is set up for the fast path and help screen parameters.
3. If this program was entered via fast path from another screen, the appropriate report request entry screen is displayed.
4. The following records are retrieved from the Reference file (REFERP):
a. The date format record (category 049) is retrieved. If this record is not found, a message is sent to the system operator, the date format defaults to MMDDYY, and processing continues.
b. The last period posted record (category 435) is retrieved. If the record is not found, the Last Period Posted field is set to zero.
c. The last year's sales calendar record (category 408) is retrieved. If the record is not found, the Last Period Posted Last Year field is set to zero.
d. The current sales period calendar record (category 407) is retrieved. If the record is not found, the program ends abnormally.
e. The next year's sales period calendar record (category A01) is retrieved. If the record is not found, the program ends abnormally.
f. The Sales Analysis system defaults record (category A03) is retrieved. If the record is not found, the program ends abnormally.
B. Mainline -- Overview
1. The Sales Analysis Report Request program is called when the user selects any of the report request options on the Sales Analysis Application Menu. One of the following parameters is passed to the program to execute the desired report request:
|
|
|
R62
|
D
|
Sales by Customer Class
|
R63
|
|
Sales by Product Class/Customer
|
R64
|
D
|
Sales by Product Class/Part
|
R65
|
|
Month End Sales by Product Class
|
R66
|
|
Month End Sales by Customer Class
|
R67
|
|
Sales, Backlog, Forecast Summary Class
|
R62
|
C
|
Year-to-Date Comparison by Customer Class
|
R64
|
C
|
Year-to-Date Comparison by Product Class
|
2. The corresponding select screen is displayed to the user. The validation and processing for each screen is discussed below.
C. Detail
1. Sales by Customer Class screen (SA310S01)
a. The entered data is validated.
(1) The 'from' company and location must not be greater than the 'to' company and location. The 'to' company cannot be blank unless the 'to' location is blank.
(2) The 'from' fiscal period for this year and last year must not be greater than the 'to' fiscal period for this year and last year. The total number of periods requested must be greater than zero. If the number of periods in a year is greater than zero, the period must not be greater than the current period (this year) or last period posted (last year).
(3) The Detail/Summary/Both field must contain either a 1 (for a Detail report), a 2 (for a Summary report), or a 3 (for both reports).
(4) The 'from' customer class must not be greater than the 'to' customer class.
(5) Invalid data is highlighted and an error message is displayed.
(6) A valid request is written to the Sales Analysis Report Request file (SA310AP).
b. The Sales by Customer Class screen is re-displayed to process requests until the user exits the screen by pressing F3 - Exit, or by using fast path.
c. Command keys allow the user to review report requests for that reference by transferring control to the Transaction Review program (SA300E). The user may also change the reference ID for the Sales Analysis by Customer Class request.
2. Sales by Product Class/Customer screen (SA310S02)
a. The entered data is validated.
(1) The 'from' company and location must not be greater than the 'to' company and location. The company cannot be blank unless the location is blank.
(2) The 'from' fiscal period for this year and last year must not be greater than the 'to' fiscal period for this year and last year. The total number of periods requested, and the sum of this year's and last year's request, must be greater than zero. If the number of periods requested in a year is greater than zero, the 'to' period must not be greater than the current period or the last period posted, for this year and last year.
(3) The Detail/Summary/Both field must contain either a 1 (for a detail report), a 2 (for summary report), or a 3 (for both reports).
(4) The 'from' territory must not be greater than the 'to' territory.
(5) The 'from' salesperson must not be greater than the 'to' salesperson.
(6) The 'from' product class must not be greater than the 'to' product class.
(7) Invalid data is highlighted, and an error message is displayed.
(8) A valid request is written to the Sales Analysis Report Request file (SA310AP).
b. The Sales Analysis by Product Class/Customer screen is re-displayed to process requests until the user exits the screen by pressing F3 - Exit, or by using fast path.
c. Command keys allow the user to review report requests for that reference by transferring control to the Transaction Review program (SA300E). The user may also change the reference ID for the Sales Analysis by product class/customer request.
3. Sales by Product Class/Part screen (SA310S03)
a. The entered data is validated.
(1) The 'from' company and location must not be greater than the 'to' company and location. The company cannot be blank unless the location is blank.
(2) The 'from' fiscal period for this year and last year must not be greater than the 'to' fiscal period for this year and last year. The total number of periods requested for both years must be greater than zero. If the number of periods requested in a year is greater than zero, the 'to' fiscal period must not be greater than the current period (this year) or last period posted (last year).
(3) The Detail/Summary/Both field must contain either a 1 (for a detail report), a 2 (for a summary report), or a 3 (for both reports).
(4) The 'from' product class must not be greater than the 'to' product class.
(5) The 'from' product subclass must not be greater than the 'to' product subclass.
(6) Invalid data is highlighted and an error message is displayed.
(7) A valid request is written to the Sales Analysis Report Request file (SA310AP).
b. The Sales Analysis by Product Class/Part screen is re-displayed to process requests until the user exits the screen by pressing F3 - Exit, or by using fast path.
c. Command keys allow the user to review report requests for that reference by transferring control to the Transaction Review program (SA300E). The user may also change the reference ID for the Sales Analysis by Product Class/Subclass/Part request.
4. Sales, Backlog, Forecast Summary screen (SA310S04)
a. The entered data is validated.
(1) The 'from' company and location must not be greater than the 'to' company and location. The company cannot be blank unless the location is blank.
(2) The 'from' fiscal period for this year, last year, and next year must not be greater than the 'to' fiscal period for this year, last year, and next year. The total number of periods requested for both this, last year, and next year must be greater than zero. If the number of periods requested in a year is greater than zero, the 'to' fiscal period must not be greater than the current period (this year) or last period posted (last year).
(3) The Financial/Statistical field must contain either a 1 (Financial report) or a 2 (Statistical report).
(4) The 'from' product class must not be greater than the 'to' product subclass.
(5) The 'from' product subclass must not be greater than the 'to' product subclass.
(6) The backlog flag field must contain either a Y (Sales, Backlog, Forecast Summary report) or an N (Actual Sales Versus Forecast report).
(7) Invalid data is highlighted, and an error message is displayed.
(8) A valid request is written to the Sales Analysis Report Request file (SA310AP).
b. The Sales, Backlog, Forecast Summary screen is re-displayed to process requests until the user exits the screen by pressing F3 - Exit, or by using fast path.
c. Command keys allow the user to review report requests for that reference by transferring control to the Transaction Review program (SA300E). The user may also change the reference ID for the sales, backlog, forecast by customer class request.
5. Year-to-Date Comparison by Customer Class screen (SA310S05)
a. The entered data is validated.
(1) The 'from' company and location must not be greater than the 'to' company and location. The company cannot be blank unless the location is blank.
(2) The Financial/Statistical/Both field must contain either a 1 (financial report), a 2 (statistical report), or a 3 (both reports).
(3) The 'from' period this year must not be greater than the current period.
(4) The 'from' customer class must not be greater than the 'to' customer class.
(5) Invalid data is highlighted, and an error message is displayed.
(6) A valid request is written to the Sales Analysis Report Request file (SA310AP).
b. The Prior Year Comparison by Customer Class screen is re-displayed to process requests until the user exits the screen by pressing F3 - Exit, or by using fast path.
c. Command keys allow the user to review report requests for that reference by transferring control to the Transaction Review program (SA300E). The user may also change the reference ID for the prior year comparison by customer class request.
6. Year-to-Date Comparison by Product Class screen (SA310S06)
a. The entered data is validated.
(1) The 'from' company or location must be less than or equal to the 'to' company and location. The company cannot be blank unless the location is blank.
(2) The Financial/Statistical/Both field must contain either a 1 (financial report), a 2 (statistical report), or a 3 (both reports).
(3) The 'from' period this year must not be greater than the current period.
(4) The 'from' product class must not be greater than the 'to' product class.
(5) The 'from' product subclass must not be greater than the 'to' product subclass.
(6) Invalid data is highlighted, and an error message is displayed.
(7) A valid request is written to the Sales Analysis Report Request file (SA310AP).
b. The Year-to-Date Comparison by Product Class Screen is re-displayed to process requests until the user exits the screen by pressing F3 - Exit, or by using fast path.
c. Command keys allow the user to review report requests for that reference by transferring control to the Transaction Review program (SA300E). The user may also change the reference ID for the prior year comparison by product class request.
7. Month End Sales by Product Class screen (SA310S07)
a. The entered data is validated.
(1) The 'from' company and location must be less than or equal to the 'to' company and location. The company cannot be blank unless the location is blank.
(2) The Detail/Summary/Both field must contain either a 1 (Detail report), a 2 (Summary report), or a 3 (both reports).
(3) The 'from' product class must not be greater than the 'to' product subclass.
(4) The 'from' product subclass must not be greater than the 'to' product subclass.
(5) Invalid data is highlighted, and an error message is displayed.
(6) A valid request is written to the Sales Analysis Report Request file (SA310AP).
b. The Month End Sales by Product Class screen is re-displayed to process requests until the user exits the screen by pressing F3 - Exit, or by using fast path.
c. Command keys allow the user to review report requests for that reference by transferring control to the Transaction Review program (SA300E). The user may also change the reference ID for the month-end sales by product class request.
8. Month End Sales by Customer Class screen (SA310S08)
a. The entered data is validated.
(1) The 'from' company and location must not be greater than the 'to' company and location. The company cannot be blank unless the location is blank.
(2) The Detail/Summary/Both field must contain either a 1 (Detail report), a 2 (Summary report), or a 3 (both reports).
(3) The 'from' customer class must not be greater than the 'to' customer class.
(4) Invalid data is highlighted, and an error message is displayed.
(5) A valid request is written to the Sales Analysis Report Request file (SA310AP).
b. The Month End Sales by Customer Class screen is re-displayed to process requests until the user exits the screen by pressing F3 - exit, or by using fast path.
c. Command keys allow the user to review report requests for that reference by transferring control to the Transaction Review program (SA300). The user may also change reference ID for the month-end Sales Analysis by customer class request.
9. Sales Statistics Post screen (SA310S09)
a. The entered data is validated.
(1) The Demand Post Flag field must contain either a Y (yes) or an N (no).
(2) The Final Post Flag field must contain either a Y (yes) or an N (no).
(3) The Month End Sales - Customer Class flag field must contain either a Y (yes) or an N (no).
(4) The Month End Sales - Product Class flag field must contain either a Y (yes) or an N (no).
(5) The period field must not be greater than 12 (if period flag is Y) or 13 (if period flag is P).
(6) If all data was valid, category A03 on the Reference file is updated and control is returned to the calling menu.
b. The Sales Statistics Post screen is re-displayed to process request until the user exits the screen by pressing F3 - Exit, enter with valid values, or by using fast path.