1 PACKAGE eam_asset_move_pub AUTHID CURRENT_USER AS
2 /* $Header: EAMPAMTS.pls 120.4.12020000.3 2013/02/11 10:37:47 vchidura ship $ */
3
4
5 /* Prepare*/
6
7 -- Get all the assets in the Hierarchy
8 -- Validate whether an Asset needs to be processed or not for Asset Move (All Hierarchy Assets)
9 -- Populate Temporary Table with Valid/Invalid Move Status & Error Message for Asset Not moving
10
11 /* Move */
12
13 -- Get all the GTT entries which are to be processed
14 -- Add the to be processed Transaction Records to MTL_TRANSACTIONS_INTERFACE and MTL_SERIAL_NUMBERS_INTERFACE
15 -- Invoke the Transaction Processor
16 -- Capture Transaction Status for each record in the MTL_TRANSACTIONS_INTERFACE and MTL_SERIAL_NUMBERS_INTERFACE
17
18
19 TYPE asset_move_hierarchy_REC_TYPE IS RECORD
20 (instance_id NUMBER,
21 serial_number VARCHAR2(30),
22 gen_object_id NUMBER,
23 inventory_item_id NUMBER,
24 current_org_id NUMBER,
25 current_subinventory_code VARCHAR2(30),
26 maintainable_flag VARCHAR2(1),
27 eam_item_type NUMBER,
28 maint_org_id NUMBER,
29 prepare_status VARCHAR2(30),
30 prepare_msg VARCHAR2(30)
31 );
32
33 TYPE asset_move_hierarchy_tbl_type is TABLE OF asset_move_hierarchy_REC_TYPE INDEX BY BINARY_INTEGER;
34
35 -- p_context determines whether its a prepare move/ actual asset move
36
37
38 PROCEDURE prepareMoveAsset(
39 x_return_status OUT NOCOPY VARCHAR2,
40 x_return_message OUT NOCOPY VARCHAR2,
41 p_parent_instance_id IN NUMBER,
42 p_dest_org_id IN NUMBER,
43 p_includeChild IN VARCHAR2,
44 p_move_type IN NUMBER,
45 p_curr_org_id IN NUMBER,
46 p_curr_subinv_code IN VARCHAR2,
47 p_shipment_no IN VARCHAR2,
48 p_dest_subinv_code IN VARCHAR2,
49 p_context IN VARCHAR2,
50 p_dest_locator_id IN NUMBER :=NULL,
51 p_misc_rec_txn_type IN NUMBER :=NULL
52 );
53
54 PROCEDURE getAssetHierarchy(
55 p_parent_instance_id IN NUMBER,
56 p_includeChild IN VARCHAR2 ,
57 x_asset_move_hierarchy_tbl OUT NOCOPY asset_move_hierarchy_tbl_type,
58 p_curr_org_id IN NUMBER
59 );
60
61 PROCEDURE populateTemp(
62 p_header_id IN NUMBER,
63 p_asset_move_hierarchy_tbl asset_move_hierarchy_tbl_type,
64 p_parent_instance_id IN NUMBER
65 );
66
67 PROCEDURE addAssetsToInterface(
68 p_header_id IN NUMBER,
69 p_inventory_item_id IN NUMBER,
70 p_CURRENT_ORGANIZATION_ID IN NUMBER,
71 p_current_subinventory_code IN VARCHAR2,
72 p_transfer_organization_id IN NUMBER,
73 p_transfer_subinventory_code IN VARCHAR2,
74 p_transaction_type_id IN NUMBER,
75 p_shipment_number IN VARCHAR2 := NULL,
76 p_transfer_locator_id IN NUMBER := NULL,
77 p_misc_rec_txn_type IN NUMBER :=NULL,
78 x_locator_error_flag OUT NOCOPY NUMBER,
79 x_locator_error_mssg OUT NOCOPY VARCHAR2
80
81 );
82
83
84 PROCEDURE processAssetMoveTxn(
85 p_txn_header_id IN NUMBER,
86 p_move_txn_type_id IN NUMBER,
87 x_return_status OUT NOCOPY VARCHAR2,
88 x_return_message OUT NOCOPY VARCHAR2
89 );
90
91 Procedure Get_LocatorControl_Code(
92 p_org IN NUMBER,
93 p_subinv IN VARCHAR2,
94 p_item_id IN NUMBER,
95 p_action IN NUMBER,
96 x_locator_ctrl OUT NOCOPY NUMBER,
97 x_error_flag OUT NOCOPY NUMBER, -- returns 0 if no error ,1 if any error .
98 x_error_mssg OUT NOCOPY VARCHAR2
99 ) ;
100
101 Function Dynamic_Entry_Not_Allowed(
102 p_restrict_flag IN NUMBER,
103 p_neg_flag IN NUMBER,
104 p_action IN NUMBER) return Boolean;
105 --Added for 7370638-AMWB-MR
106 PROCEDURE addAssetsForMiscReceipt(p_header_id IN NUMBER,
107 p_batch_transaction_id IN NUMBER,
108 p_serial_number IN VARCHAR2,
109 p_CURRENT_ORGANIZATION_ID IN NUMBER,
110 p_inventory_item_id IN NUMBER,
111 p_current_subinventory_code IN VARCHAR2,
112 p_intermediate_locator_id IN NUMBER,
113 p_misc_rec_txn_type IN NUMBER :=NULL
114 ) ;
115
116 --Added for 13807948-AMWB-MiscIssue
117 --Blank Stub that is fully extendable by the customers to perform Miscellaneous Issue Transactions
118 PROCEDURE addAssetsForMiscIssue(p_header_id IN NUMBER,
119 p_batch_transaction_id IN NUMBER,
120 p_serial_number IN VARCHAR2,
121 p_ORGANIZATION_ID IN NUMBER,
122 p_inventory_item_id IN NUMBER,
123 p_subinventory_code IN VARCHAR2,
124 p_locator_id IN NUMBER
125 ) ;
126
127 END eam_asset_move_pub;