1 PACKAGE WIP_CHANGE_STATUS AUTHID CURRENT_USER AS
2 /* $Header: wippcsts.pls 120.1 2007/10/15 22:59:52 kkonada ship $ */
3
4
5 /* INSERT_PERIOD_BALANCES
6 This procedure inserts accounting records into WIP_PERIOD_BALANCES for an
7 acive job or schedule. No validation is done on any information passed
8 into this routine. If you are calling RELEASE or PUT_JOB_ON_HOLD, you do
9 not need to call this procedure.
10 */
11
12 PROCEDURE INSERT_PERIOD_BALANCES
13 (P_wip_entity_id NUMBER,
14 P_organization_id NUMBER,
15 P_repetitive_schedule_id NUMBER,
16 P_line_id NUMBER,
17 P_class_code VARCHAR2,
18 P_release_date DATE DEFAULT SYSDATE);
19
20
21 /* CHECK_REPETITIVE_ROUTING
22 This procedure verifies that the routing of a current schedule matches the
23 routings of all other transactable schedules for the repetitive
24 assembly on the line. You do not need to call this routine if you are
25 calling RELEASE or PUT_JOB_ON_HOLD in this package.
26
27 PRE: The routing for the repetitive schedule should have already been
28 exploded. The repetitive schedule may or may not have been released when
29 you call this.
30
31 PARAMETERS: No validation is done on the parameters.
32 */
33
34 PROCEDURE CHECK_REPETITIVE_ROUTING
35 (P_wip_entity_id NUMBER,
36 P_organization_id NUMBER,
37 P_repetitive_schedule_id NUMBER,
38 P_line_id NUMBER);
39
40
41 /* RELEASE
42 This procedure updates the tables WIP_OPERATIONS and WIP_PERIOD_BALANCES
43 when a job or schedule is released. For a repetitive schedule, the
44 procedure CHECK_REPETITIVE_ROUTING is called. This routine does not update
45 the parent record.
46
47 PRE: The routing must have already been exploded.
48
49 PARAMETERS:
50 * P_old_status_type is the previous status
51 * P_new_status_type is the status being changed to. The statuses are
52 validated to insure that you are changing from an non-released status to
53 a released status.
54 * No other validation is performed on the input parameters.
55 * P_routing_exists indicates whether the job or schedule has a routing.
56 It's values can be WIP_CONSTANTS.YES or WIP_CONSTANTS.NO.
57 */
58
59 PROCEDURE RELEASE
60 (P_wip_entity_id NUMBER,
61 P_organization_id NUMBER,
62 P_repetitive_schedule_id NUMBER,
63 P_line_id NUMBER,
64 P_class_code VARCHAR2,
65 P_old_status_type NUMBER,
66 P_new_status_type NUMBER,
67 P_routing_exists OUT NOCOPY NUMBER,
68 P_release_date DATE DEFAULT SYSDATE); /* fix for bug 2424987 */
69
70
71 /* PUT_JOB_ON_HOLD
72 DESCRIPTION:
73 This procedure places a job on hold. The following validations are
74 performed. If any of the validations fail, an appropriate message is placed
75 on the message stack and an exception is raised.
76 * The job must have a status of Unreleased, Released, Complete, or Hold.
77 If the job is already on hold, nothing happens.
78 PARAMETERS:
79 * No validation is performed on the input parameters.
80 */
81
82 PROCEDURE PUT_JOB_ON_HOLD
83 (P_wip_entity_id NUMBER,
84 P_organization_id NUMBER);
85
86
87 /* PUT_LINE_ON_HOLD
88 DESCRIPTION:
89 This procedure puts all active schedules (released, complete, and hold) for
90 an assembly on a line on hold. The following validations are performed. If
91 any of the validations fail, an appropriate message is placed on the message
92 stack and an exception is raised.
93 * There must be at least one active schedule for the assembly on the line.
94 For schedules on hold, nothing happens.
95 PARAMETERS:
96 No validation is performed on the input parameters.
97 */
98
99 PROCEDURE PUT_LINE_ON_HOLD
100 (P_wip_entity_id NUMBER,
101 P_line_id NUMBER,
102 P_organization_id NUMBER);
103
104 /* wrapper over procedure Release()
105 This also updates the status of job to Release in the databse at the end
106 */
107 PROCEDURE RELEASE_MES_WRAPPER
108 (P_wip_entity_id NUMBER,
109 P_organization_id NUMBER
110 );
111
112 END WIP_CHANGE_STATUS;