[Home] [Help]
PACKAGE: APPS.CSP_PARTS_ORDER
Source
1 Package CSP_PARTS_ORDER AUTHID CURRENT_USER AS
2 /* $Header: cspvpods.pls 120.5 2011/06/09 15:38:52 htank ship $ */
3 --
4 -- Purpose: To create/update/cancel internal parts order for spares
5 --
6 -- MODIFICATION HISTORY
7 -- Person Date Comments
8 -- --------- ------ ------------------------------------------
9 -- phegde 05/01/01 Created Package
10
11 TYPE Req_dist_Rec_type IS RECORD
12 (distribution_id po_req_distributions_all.distribution_id%TYPE
13 ,last_update_date po_req_distributions_all.last_update_date%TYPE
14 ,last_updated_by po_req_distributions_all.last_updated_by%TYPE
15 ,requisition_line_id po_req_distributions_all.requisition_line_id%TYPE
16 ,set_of_books_id po_req_distributions_all.set_of_books_id%TYPE
17 ,code_combination_id po_req_distributions_all.code_combination_id%TYPE
18 ,req_line_quantity po_req_distributions_all.req_line_quantity%TYPE
19 ,last_update_login po_req_distributions_all.last_update_login%TYPE
20 ,creation_date po_req_distributions_all.creation_date%TYPE
21 ,created_by po_req_distributions_all.created_by%TYPE
22 ,encumbered_flag po_req_distributions_all.encumbered_flag%TYPE
23 ,gl_encumbered_date po_req_distributions_all.gl_encumbered_date%TYPE
24 ,gl_encumbered_period_name po_req_distributions_all.gl_encumbered_period_name%TYPE
25 ,gl_cancelled_date po_req_distributions_all.gl_cancelled_date%TYPE
26 ,failed_funds_lookup_code po_req_distributions_all.failed_funds_lookup_code%TYPE
27 ,encumbered_amount po_req_distributions_all.encumbered_amount%TYPE
28 ,budget_account_id po_req_distributions_all.budget_account_id%TYPE
29 ,accrual_account_id po_req_distributions_all.accrual_account_id%TYPE
30 ,variance_account_id po_req_distributions_all.variance_account_id%TYPE
31 ,prevent_encumbrance_flag po_req_distributions_all.prevent_encumbrance_flag%TYPE
32 ,attribute_category po_req_distributions_all.attribute_category%TYPE
33 ,attribute1 po_req_distributions_all.attribute1%TYPE
34 ,attribute2 po_req_distributions_all.attribute2%TYPE
35 ,attribute3 po_req_distributions_all.attribute3%TYPE
36 ,attribute4 po_req_distributions_all.attribute4%TYPE
37 ,attribute5 po_req_distributions_all.attribute5%TYPE
38 ,attribute6 po_req_distributions_all.attribute6%TYPE
39 ,attribute7 po_req_distributions_all.attribute7%TYPE
40 ,attribute8 po_req_distributions_all.attribute8%TYPE
41 ,attribute9 po_req_distributions_all.attribute9%TYPE
42 ,attribute10 po_req_distributions_all.attribute10%TYPE
43 ,attribute11 po_req_distributions_all.attribute11%TYPE
44 ,attribute12 po_req_distributions_all.attribute12%TYPE
45 ,attribute13 po_req_distributions_all.attribute13%TYPE
46 ,attribute14 po_req_distributions_all.attribute14%TYPE
47 ,attribute15 po_req_distributions_all.attribute15%TYPE
48 ,ussgl_transaction_code po_req_distributions_all.ussgl_transaction_code%TYPE
49 ,government_context po_req_distributions_all.government_context%TYPE
50 ,project_id po_req_distributions_all.project_id%TYPE
51 ,task_id po_req_distributions_all.task_id%TYPE
52 ,expenditure_type po_req_distributions_all.expenditure_type%TYPE
53 ,project_accounting_context po_req_distributions_all.project_accounting_context%TYPE
54 ,expenditure_organization_id po_req_distributions_all.expenditure_organization_id%TYPE
55 ,gl_closed_date po_req_distributions_all.gl_closed_date%TYPE
56 ,source_req_distribution_id po_req_distributions_all.source_req_distribution_id%TYPE
57 ,distribution_num po_req_distributions_all.distribution_num%TYPE
58 ,project_related_flag po_req_distributions_all.project_related_flag%TYPE
59 ,expenditure_item_date po_req_distributions_all.expenditure_item_date%TYPE
60 ,org_id po_req_distributions_all.org_id%TYPE
61 ,allocation_type po_req_distributions_all.allocation_type%TYPE
62 ,allocation_value po_req_distributions_all.allocation_value%TYPE
63 ,award_id po_req_distributions_all.award_id%TYPE
64 ,end_item_unit_number po_req_distributions_all.end_item_unit_number%TYPE
65 ,recoverable_tax po_req_distributions_all.recoverable_tax%TYPE
66 ,nonrecoverable_tax po_req_distributions_all.nonrecoverable_tax%TYPE
67 ,recovery_rate po_req_distributions_all.recovery_rate%TYPE
68 ,tax_recovery_override_flag po_req_distributions_all.tax_recovery_override_flag%TYPE
69 ,oke_contract_line_id po_req_distributions_all.oke_contract_line_id%TYPE
70 ,oke_contract_deliverable_id po_req_distributions_all.oke_contract_deliverable_id%TYPE
71 );
72
73 -- Operations
74 --G_OPR_INSERT CONSTANT VARCHAR2(30) := 'INSERT';
75 G_OPR_CREATE CONSTANT VARCHAR2(30) := 'CREATE';
76 G_OPR_UPDATE CONSTANT VARCHAR2(30) := 'UPDATE';
77 G_OPR_DELETE CONSTANT VARCHAR2(30) := 'DELETE';
78 G_OPR_LOCK CONSTANT VARCHAR2(30) := 'LOCK';
79 G_OPR_CANCEL CONSTANT VARCHAR2(30) := 'CANCEL';
80
81 -- Process Types
82 G_PRC_REQUISITION CONSTANT VARCHAR2(30) := 'REQUISITION';
83 G_PRC_ORDER CONSTANT VARCHAR2(30) := 'ORDER';
84 G_PRC_BOTH CONSTANT VARCHAR2(30) := 'BOTH';
85 --G_OPR_NONE CONSTANT VARCHAR2(30) := FND_API.G_MISS_CHAR;
86
87 PROCEDURE process_order(
88 p_api_version IN NUMBER
89 ,p_Init_Msg_List IN VARCHAR2 := FND_API.G_TRUE
90 ,p_commit IN VARCHAR2 := FND_API.G_FALSE
91 ,px_header_rec IN OUT NOCOPY csp_parts_requirement.Header_rec_type
92 ,px_line_table IN OUT NOCOPY csp_parts_requirement.Line_Tbl_type
93 ,p_process_type IN VARCHAR2 := 'BOTH'
94 ,p_book_order IN VARCHAR2 := 'Y'
95 ,x_return_status OUT NOCOPY VARCHAR2
96 ,x_msg_count OUT NOCOPY NUMBER
97 ,x_msg_data OUT NOCOPY VARCHAR2
98 );
99
100 -- This procedure populates the ReqImport interface tables with Parts Requirements from Spares
101 -- for creating purchase requisitions when the source type is supplier.
102 PROCEDURE process_purchase_req(
103 p_api_version IN NUMBER
104 ,p_Init_Msg_List IN VARCHAR2 := FND_API.G_TRUE
105 ,p_commit IN VARCHAR2 := FND_API.G_FALSE
106 ,px_header_rec IN OUT NOCOPY csp_parts_requirement.header_rec_type
107 ,px_line_table IN OUT NOCOPY csp_parts_requirement.Line_Tbl_type
108 ,x_return_status OUT NOCOPY VARCHAR2
109 ,x_msg_count OUT NOCOPY NUMBER
110 ,x_msg_data OUT NOCOPY VARCHAR2
111 );
112
113 PROCEDURE cancel_order_line(
114 p_order_line_id IN NUMBER,
115 p_cancel_reason IN varchar2,
116 x_return_status OUT NOCOPY VARCHAR2,
117 x_msg_count OUT NOCOPY NUMBER,
118 x_msg_data OUT NOCOPY VARCHAR2);
119
120 PROCEDURE book_order (
121 p_oe_header_id IN NUMBER
122 ,x_return_status OUT NOCOPY VARCHAR2
123 ,x_msg_count OUT NOCOPY NUMBER
124 ,x_msg_data OUT NOCOPY VARCHAR2
125 );
126
127 PROCEDURE upd_oe_line_ship_method (
128 p_oe_line_id IN NUMBER
129 ,p_ship_method IN VARCHAR2
130 ,x_return_status OUT NOCOPY VARCHAR2
131 ,x_msg_count OUT NOCOPY NUMBER
132 ,x_msg_data OUT NOCOPY VARCHAR2
133 );
134
135 PROCEDURE upd_oe_ship_to_add (
136 p_req_header_id IN NUMBER
137 ,p_new_hr_loc_id IN NUMBER
138 ,p_new_add_type IN VARCHAR2
139 ,p_update_req_header IN VARCHAR2
140 ,p_commit IN VARCHAR2 := FND_API.G_FALSE
141 ,x_return_status OUT NOCOPY VARCHAR2
142 ,x_msg_count OUT NOCOPY NUMBER
143 ,x_msg_data OUT NOCOPY VARCHAR2
144 );
145
146 PROCEDURE Cancel_Order(
147 p_header_rec IN csp_parts_requirement.header_rec_type
148 ,p_line_table IN csp_parts_requirement.Line_Tbl_type
149 ,p_process_Type IN VARCHAR2
150 ,x_return_status OUT NOCOPY VARCHAR2
151 ,x_msg_count OUT NOCOPY NUMBER
152 ,x_msg_data OUT NOCOPY VARCHAR2
153 );
154
155 END; -- Package spec