DBA Data[Home] [Help]

PACKAGE: APPS.CSP_PARTS_ORDER

Source


1 Package CSP_PARTS_ORDER AUTHID CURRENT_USER AS
2 /* $Header: cspvpods.pls 115.10 2003/04/01 19:55:26 jjalla noship $ */
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          ,x_return_status           OUT NOCOPY VARCHAR2
95          ,x_msg_count               OUT NOCOPY NUMBER
96          ,x_msg_data                OUT NOCOPY VARCHAR2
97         );
98 
99   -- This procedure populates the ReqImport interface tables with Parts Requirements from Spares
100   -- for creating purchase requisitions when the source type is supplier.
101   PROCEDURE process_purchase_req(
102           p_api_version             IN NUMBER
103          ,p_Init_Msg_List           IN VARCHAR2     := FND_API.G_TRUE
104          ,p_commit                  IN VARCHAR2     := FND_API.G_FALSE
105          ,px_header_rec             IN OUT NOCOPY csp_parts_requirement.header_rec_type
106          ,px_line_table             IN OUT NOCOPY csp_parts_requirement.Line_Tbl_type
107          ,x_return_status           OUT NOCOPY VARCHAR2
108          ,x_msg_count               OUT NOCOPY NUMBER
109          ,x_msg_data                OUT NOCOPY VARCHAR2
110         );
111 
112   PROCEDURE cancel_order_line(
113               p_order_line_id IN NUMBER,
114               p_cancel_reason IN varchar2,
115               x_return_status OUT NOCOPY VARCHAR2,
116               x_msg_count     OUT NOCOPY NUMBER,
117               x_msg_data      OUT NOCOPY VARCHAR2);
118 
119  END; -- Package spec