1 PACKAGE RCV_SHIPMENT_OBJECT_SV AUTHID CURRENT_USER as
2 /* $Header: RCVCHTIS.pls 115.2 2002/10/26 03:36:27 bao ship $ */
3 /*===========================================================================
4 PACKAGE NAME: rcv_shipment_object_sv
5
6 DESCRIPTION: Contains the server side APIs: high-level record types,
7 cursors and record type variables.
8
9 CLIENT/SERVER: Server
10
11 LIBRARY NAME NONE
12
13 OWNER: DFong
14
15 PROCEDURES/FUNCTIONS:
16
17 ============================================================================*/
18
19 /* ksareddy 2481798 performance issue - cache the is_edi_installed flag */
20 g_is_edi_installed varchar2(1) := NULL;
21
22
23 TYPE ErrorRecType IS RECORD
24 (error_status varchar2(1),
25 error_message varchar2(255));
26
27 uom_class po_line_locations.unit_of_measure_class%type;
28 ship_to_org_id po_line_locations.ship_to_organization_id%type;
29 receipt_code po_line_locations.receipt_days_exception_code%type;
30 error_code varchar2(1);
31 error_text varchar2(255);
32
33 /* ksareddy 2506961 - support for parallel processing of RVCTP */
34 cursor c1 (x_request_id number, x_group_id NUMBER) is
35 select * from rcv_headers_interface
36 where NVL(asn_type,'STD') in ('ASN','ASBN','STD')
37 and processing_status_code in ('RUNNING')
38 and nvl(validation_flag,'N') = 'Y'
39 and processing_request_id = x_request_id
40 and group_id = decode(x_group_id, 0, group_id, x_group_id)
41 order by transaction_type,shipment_num
42 for update of processing_status_code nowait;
43
44 cursor c2 (x_header_interface_id number) is
45 select rcv_transactions_interface.*,
46 rowid row_id,
47 uom_class unit_of_measure_class,
48 ship_to_org_id ship_to_organization_id,
49 receipt_code receipt_days_exception_code,
50 error_code error_status,
51 error_text error_message
52 from rcv_transactions_interface
53 where header_interface_id = x_header_interface_id
54 and nvl(validation_flag,'N') = 'Y'
55 order by document_line_num;
56
57 TYPE cascaded_trans_rec_type is RECORD
58 (transaction_record rcv_shipment_object_sv.c2%rowtype,
59 error_record rcv_shipment_object_sv.ErrorRecType);
60
61 -- Need 7.3 and Above for defining the cascaded_trans_tab_type record type below.
62
63 TYPE cascaded_trans_tab_type IS TABLE OF rcv_shipment_object_sv.c2%rowtype
64 INDEX BY BINARY_INTEGER;
65
66 TYPE organization_id_record_type IS RECORD
67 (organization_name org_organization_definitions.organization_name%type,
68 organization_code org_organization_definitions.organization_code%type,
69 organization_id org_organization_definitions.organization_id%type,
70 error_record ErrorRecType);
71
72 TYPE location_id_record_type IS RECORD
73 (location_id hr_locations.location_id%type,
74 location_code hr_locations.location_code%type,
75 organization_id org_organization_definitions.organization_id%type,
76 error_record ErrorRecType);
77
78 TYPE employee_id_record_type IS RECORD
79 (employee_name hr_employees.full_name%type,
80 employee_id hr_employees.employee_id%type,
81 error_record ErrorRecType);
82
83 /*===========================================================================
84 PROCEDURE NAME: create_object()
85
86 DESCRIPTION: Creates the receiving shipment object, namely new rows in the
87 RCV_SHIPMENT_HEADERS and RCV_SHIPMENT_LINES tables. Prior to
88 insert, create_object() will derive, default and validate columns
89 in the rcv_headers_interface and rcv_transactions_interface tables.
90
91 PARAMETERS:
92
93 x_request_id: The group of rows that this submission of the
94 processor should work on.
95
96
97 DESIGN REFERENCES:
98
99 ALGORITHM:
100
101 NOTES:
102
103 OPEN ISSUES:
104
105 CLOSED ISSUES:
106
107 CHANGE HISTORY: DFong 09/23/96 Created
108 ===========================================================================*/
109
110 -- ksareddy - changed signature to support parallel processing in RVCTP - 2506961
111 PROCEDURE create_object (x_request_id NUMBER, x_group_id NUMBER DEFAULT 0);
112
113 END RCV_SHIPMENT_OBJECT_SV;
114