DBA Data[Home] [Help]

PACKAGE: APPS.AHL_PRD_MATERIAL_TXN_PUB

Source


1 PACKAGE AHL_PRD_MATERIAL_TXN_PUB AS
2  /* $Header: AHLPMTXS.pls 120.3.12010000.3 2009/01/06 01:19:46 sracha ship $ */
3 /*#
4  * Package containing API to perform material issue and return
5  * transactions against cMRO workorders.
6  * @rep:scope public
7  * @rep:product AHL
8  * @rep:displayname Workorder Material Transactions
9  * @rep:lifecycle active
10  * @rep:category BUSINESS_ENTITY AHL_MAINT_WORKORDER
11  */
12 
13 -- Material Transaction record structure.
14 Type Ahl_Material_Txn_Rec_Type Is Record (
15 
16          Ahl_mtltxn_Id            NUMBER,  -- returned by the API.
17 
18          -- either workorder Id or workorder Name are mandatory.
19          Workorder_Id             NUMBER,
20          Workorder_Name           VARCHAR2(80),
21 
22          -- Operation sequence is mandatory.
23          Operation_Seq_Num        NUMBER,
24 
25          -- Either of Transaction_Type_Id or Transaction_Type_Name is mandatory.
26          -- Transaction_Type_Id = 35 for WIP Issue.
27          -- Transaction_Type_Id = 43 for WIP Return.
28          Transaction_Type_Id      NUMBER,
29          Transaction_Type_Name    VARCHAR2(240),
30 
31          -- Either of Inventory_Item_Id or Inventory_Item_Segments is mandatory.
32          Inventory_Item_Id        NUMBER,
33          Inventory_Item_Segments  VARCHAR2(240),
34 
35          -- Either of UOM Code or Unit_Of_Measure is mandatory.
36          Uom_Code                 VARCHAR2(3),
37          Unit_Of_Measure          VARCHAR2(25),
38 
39          -- Quantity is mandatory.
40          Quantity                 NUMBER,
41 
42          -- Serial_Number is mandatory for serial controlled items.
43          Serial_Number            VARCHAR2(30),
44 
45          -- Lot_Number is mandatory for lot controlled items.
46          Lot_Number               VARCHAR2(30),
47 
48          -- Revision is mandatory for revision controlled item.
49          Revision                 VARCHAR2(3),
50 
51          -- Subinventory defaults from WIP Paramaters if not provided.
52          Subinventory_Name        VARCHAR2(10),
53 
54          -- Locator defaults from WIP Parameters if not provided.
55          -- Input Locator_Segments as segment values.
56          -- Locator will be created if locator segment does not exist and
57          -- dynamic locator creation is enabled.
58          Locator_Id               NUMBER,
59          Locator_Segments         VARCHAR2(240),
60          --
61          Transaction_Date         DATE,
62          Transaction_Reference    VARCHAR2(240),
63 
64          -- Either of recepient_id or recepient_name is mandatory if profile
65          -- 'AHL:Receipient required when transacting Materials' is set to 'Yes'. When it is not
66          -- mandatory, this defaults to logged in user.
67          recepient_id             NUMBER,
68          recepient_name           VARCHAR2(60),
69 
70          -- disposition information if transaction is to be associated to one.
71          disposition_id           NUMBER,
72 
73          -- Following attributes are used only during material returns.
74          -- Either Condition or Condition_desc is mandatory.
75          -- Qa_Collection_Id is mandatory if QA plan is associated when
76          -- returning material to MRB.
77          -- Sr_Summary is mandatory when returning material in unservicable or
78          -- MRB condition to inventory.
79          Item_Instance_Number     VARCHAR2(80),
80          Item_Instance_ID         NUMBER,
81          Condition                NUMBER,
82          Condition_desc           VARCHAR2(80),
83          Reason_Id                NUMBER,
84          Reason_Name              VARCHAR2(240),
85          Problem_Code             VARCHAR2(30),
86          Problem_Code_Meaning     VARCHAR2(80),
87          Sr_Summary               VARCHAR2(80),
88          Qa_Collection_Id         NUMBER,
89 
90          -- 5/15/07: Added for ER# 6086051.
91          -- Option for creating workorder for the non-routine. Valid values based on
92          -- lookup type AHL_SR_WO_CREATE_OPTIONS. See details below:
93          --
94          -- Lookup Code                         Meaning
95          -------------------------------------------------------------------
96          -- CREATE_RELEASE_WO             	Create and Release Workorder
97          -- CREATE_SR_NO                  	Do not create Non-Routine
98          -- CREATE_WO                     	Create Unreleased Workorder
99          -- CREATE_WO_NO                  	Do not create Workorder
100 
101          -- For serialized items, default is to create non-routine and no workorder.
102          -- For non-serialized items, default is not to create a non-routine and workorder.
103          create_wo_option         VARCHAR2(30),
104 
105          -- Target_Visit_Id and Target_Visit_Num are currently not used.
106          Target_Visit_Id          NUMBER,
107          Target_Visit_Num         NUMBER,
108 
109          -- Material txns DFF attributes.
110          ATTRIBUTE_CATEGORY       VARCHAR2(30),
111          ATTRIBUTE1               VARCHAR2(150),
112          ATTRIBUTE2               VARCHAR2(150),
113          ATTRIBUTE3               VARCHAR2(150),
114          ATTRIBUTE4               VARCHAR2(150),
115          ATTRIBUTE5               VARCHAR2(150),
116          ATTRIBUTE6               VARCHAR2(150),
117          ATTRIBUTE7               VARCHAR2(150),
118          ATTRIBUTE8               VARCHAR2(150),
119          ATTRIBUTE9               VARCHAR2(150),
120          ATTRIBUTE10              VARCHAR2(150),
121          ATTRIBUTE11              VARCHAR2(150),
122          ATTRIBUTE12              VARCHAR2(150),
123          ATTRIBUTE13              VARCHAR2(150),
124          ATTRIBUTE14              VARCHAR2(150),
125          ATTRIBUTE15              VARCHAR2(150)
126          );
127 
128 --  Declare Table record structure.
129 TYPE Ahl_Material_Txn_Tbl_Type IS TABLE OF Ahl_Material_Txn_Rec_Type INDEX BY BINARY_INTEGER;
130 
131 /*#
132  * Use this procedure to perform material issues from a SubInventory to a
133  * Workorder OR return material from a Workorder to a SubInventory.
134  * @param p_api_version Api Version Number
135  * @param p_init_msg_list Initialize the message stack, default value FND_API.G_TRUE
136  * @param p_commit to decide whether to commit the transaction or not, default value FND_API.G_FALSE
137  * @param p_default - currently not used. Pass FND_API.G_FALSE;default value FND_API.G_FALSE
138  * @param p_x_material_txn_tbl - Table of type AHL_PRD_MATERIAL_TXN_PUB.Ahl_Material_Txn_Tbl_Type to
139  * contain material transaction details to be processed. Review record structure Ahl_Material_Txn_Rec_Type
140  * for transaction attribute details.
141  * @param x_return_status return status
142  * @param x_msg_count return message count
143  * @param x_msg_data return message data
144  * @rep:scope public
145  * @rep:lifecycle active
146  * @rep:displayname Perform material issue and return transactions
147  */
148 
149 PROCEDURE PERFORM_MATERIAL_TXN (
150    p_api_version            IN            NUMBER,
151    p_init_msg_list          IN            VARCHAR2   := FND_API.G_FALSE,
152    p_commit                 IN            VARCHAR2   := FND_API.G_FALSE,
153    p_default                IN            VARCHAR2   := FND_API.G_FALSE,
154    p_x_material_txn_tbl     IN OUT NOCOPY AHL_PRD_MATERIAL_TXN_PUB.Ahl_Material_Txn_Tbl_Type,
155    x_return_status             OUT NOCOPY VARCHAR2,
156    x_msg_count                 OUT NOCOPY NUMBER,
157    x_msg_data                  OUT NOCOPY VARCHAR2
158 );
159 
160 
161 END AHL_PRD_MATERIAL_TXN_PUB;