1 PACKAGE PO_ORGS_SV AUTHID CURRENT_USER as
2 /* $Header: POXCOO2S.pls 115.3 2002/11/25 23:39:01 sbull ship $*/
3
4 /* bao - global variables */
5 TYPE USER_DEF_DATE_REC IS RECORD(v_enable_date DATE,
6 v_disable_date DATE,
7 v_organization_code VARCHAR2(3));
8
9 TYPE USER_DEF_DATE_TABLE IS TABLE OF USER_DEF_DATE_REC
10 INDEX BY BINARY_INTEGER;
11
12 x_date_table USER_DEF_DATE_TABLE;
13
14
15 /*===========================================================================
16 PROCEDURE NAME: get_org_info()
17
18
19 DESCRIPTION: Given a Org ID and Set of Books ID, bring back the
20 Org Code and Org Name from Org_Organization_Definitions
21 Entity.
22 This is currently used to get the Ship-To Org Code, Name
23 and Org Id in Enter Purchase Orders.
24 Called from the POXCOVEB.pls package.
25
26 PARAMETERS:
27
28 DESIGN REFERENCES: POXPOMPO.doc
29
30
31 ALGORITHM:
32
33 NOTES:
34
35 OPEN ISSUES:
36
37 CLOSED ISSUES:
38
39 CHANGE HISTORY: Sudha Iyer 05/95
40
41 ===============================================================================*/
42
43 PROCEDURE get_org_info(X_org_id IN NUMBER, X_set_of_books_id IN NUMBER,
44 X_org_code IN OUT NOCOPY varchar2,
45 X_org_name IN OUT NOCOPY varchar2 );
46
47
48
49 /*===========================================================================
50 FUNCTION NAME: val_dest_org()
51
52
53 DESCRIPTION: Validate that the organization
54 for the current destination type , item
55 and item_revision.
56
57 This function return TRUE for
58 valid organizations otherwise
59 it returns FALSE. An null org_id
60 is considered invalid by this function.
61
62 PARAMETERS: x_org_id IN NUMBER
63 x_item_id IN NUMBER
64 x_item_rev IN VARCHAR2
65 x_dest_type IN VARCHAR2
66
67 DESIGN REFERENCES: POXRQERQ.doc
68
69
70 ALGORITHM:
71
72 NOTES:
73
74 OPEN ISSUES:
75
76 CLOSED ISSUES:
77
78 CHANGE HISTORY: Ramana Y. Mulpury 06/95
79
80 ===============================================================================*/
81
82 FUNCTION val_dest_org(x_org_id IN NUMBER,
83 x_item_id IN NUMBER,
84 x_item_rev IN VARCHAR2,
85 x_dest_type IN VARCHAR2,
86 x_sob_id IN NUMBER)
87 RETURN BOOLEAN;
88
89
90
91 /*===========================================================================
92 FUNCTION NAME: val_src_org()
93
94
95 DESCRIPTION: Validate that the source organization
96 is valid for the current item, destination
97 organization, destination type and set of books.
98
99 This function return TRUE for
100 valid organizations otherwise
101 it returns FALSE. An null org_id
102 is considered invalid by this function.
103
104 PARAMETERS: x_src_org_id IN NUMBER
105 x_dest_org_id IN NUMBER
106 x_dest_type IN VARCHAR2
107 x_item_id IN NUMBER
108 x_mrp_planned_item IN VARCHAR2
109 x_sob_id IN NUMBER
110
111 DESIGN REFERENCES: POXRQERQ.doc
112
113
114 ALGORITHM:
115
116 NOTES:
117
118 OPEN ISSUES:
119
120 CLOSED ISSUES:
121
122 CHANGE HISTORY: Ramana Y. Mulpury 06/95
123
124 ===============================================================================*/
125 FUNCTION val_source_org(X_src_org_id IN NUMBER,
126 X_dest_org_id IN NUMBER,
127 X_dest_type IN VARCHAR2,
128 X_item_id IN VARCHAR2,
129 X_mrp_planned_item IN VARCHAR2,
130 X_sob_id IN NUMBER)
131 RETURN BOOLEAN;
132
133
134 /*===========================================================================
135 PROCEDURE NAME: validate_org_info()
136
137
138 DESCRIPTION: Validate the components of the organization record and return
139 error status and error messages depending on success or failure.
140
141
142 PARAMETERS: p_org_record IN OUT RCV_SHIPMENT_OBJECT_SV.Organization_id_record_type
143
144 DESIGN REFERENCES:
145
146
147 ALGORITHM:
148
149 NOTES: Uses dbms_sql to create the WHERE clause based on organization record
150 components that have not null values
151
152 OPEN ISSUES:
153
154 CLOSED ISSUES:
155
156 CHANGE HISTORY: 10/24/96 Raj Bhakta
157
158 ===============================================================================*/
159
160 PROCEDURE validate_org_info(p_org_record IN OUT NOCOPY RCV_SHIPMENT_OBJECT_SV.Organization_id_record_type);
161
162 /*===========================================================================
163 PROCEDURE NAME: derive_org_info()
164
165
166 DESCRIPTION: Derive the components of the organization record that are null
167 based on components that have not null values.
168
169
170 PARAMETERS: p_org_record IN OUT RCV_SHIPMENT_HEADER_SV.OrgRecType
171
172 DESIGN REFERENCES:
173
174
175 ALGORITHM:
176
177 NOTES: Uses dbms_sql to create the WHERE clause based on organization record
178 components that have not null values
179
180 OPEN ISSUES:
181
182 CLOSED ISSUES:
183
184 CHANGE HISTORY: 10/24/96 Raj Bhakta
185
186 ===============================================================================*/
187
188 PROCEDURE derive_org_info(p_org_record IN OUT NOCOPY RCV_SHIPMENT_OBJECT_SV.Organization_id_record_type);
189
190
191 END PO_ORGS_SV;