DBA Data[Home] [Help]

PACKAGE: APPS.WMS_OP_INBOUND_PVT

Source


1 PACKAGE WMS_OP_INBOUND_PVT AUTHID CURRENT_USER AS
2 /*$Header: WMSOPIBS.pls 120.3.12020000.1 2012/06/26 08:38:34 appldev ship $*/
3 
4 
5 /*Record type to pass values to ACtivate*/
6 TYPE DEST_PARAM_REC_TYPE IS RECORD
7   (SUG_SUB_CODE               VARCHAR(10),
8    SUG_LOCATION_ID            NUMBER,
9    CARTONIZATION_ID           NUMBER
10    );
11 
12 
13 /**
14     *    <b> Init</b>:
15     * <p>This API is the document handler for Inbound document records and is called from
16     *    Init_op_plan_instance. This API createduplicates child the MMTT/MTLT records and
17     *    nulls out the relevant fields on parent MMTT record. </p>
18     *  @param x_return_status      -Return Status
19     *  @param x_msg_data           -Returns Message Data
20     *  @param x_msg_count          -Returns the message count
21     *  @param x_source_task_id     -Returns the Source Task Id of the child document record created.
22     *  @param x_error_code         -Returns Appropriate error code in case of any error.
23     *  @param p_source_task_id     -Identifier of the document record.
24     *  @param p_document_rec       -Record Type of MMTT
25     *  @param p_operation_type_id  -Operation Type id of the first operation
26     *
27    **/
28   PROCEDURE INIT(
29     x_return_status      OUT  NOCOPY    VARCHAR2
30   , x_msg_data           OUT  NOCOPY    fnd_new_messages.MESSAGE_TEXT%TYPE
31   , x_msg_count          OUT  NOCOPY    NUMBER
32   , x_source_task_id     OUT  NOCOPY    NUMBER
33   , x_error_code         OUT  NOCOPY    NUMBER
34   , p_source_task_id     IN             NUMBER
35   , p_document_rec       IN             mtl_material_transactions_temp%ROWTYPE
36   , p_operation_type_id  IN             NUMBER
37   , p_revert_loc_capacity IN             BOOLEAN DEFAULT FALSE
38   , p_subsequent_op_plan_id   IN        NUMBER DEFAULT NULL
39   );
40 
41 
42  /**
43     *    <b> Activate</b>:
44     * <p>This API is the document handler for Inbound document records and is called from
45     *    Activate_operation_instance. This API updates MMTT records and
46     *    with the suggested subinventory,locator </p>
47     *  @param x_return_status      -Return Status
48     *  @param x_msg_data           -Returns Message Data
49     *  @param x_msg_count          -Returns the message count
50     *  @param x_error_code         -Returns Appropriate error code in case of any error.
51     *  @param p_source_task_id     -Identifier of the document record.
52     *  @param p_update_param_rec   -Record Type of WMS_ATF_RUNTIME_PUB_APIS.DEST_PARAM_REC_TYPE
53     *
54    **/
55   PROCEDURE ACTIVATE(
56    x_return_status      OUT  NOCOPY    VARCHAR2
57  , x_msg_data           OUT  NOCOPY    fnd_new_messages.MESSAGE_TEXT%TYPE
58  , x_msg_count          OUT  NOCOPY    NUMBER
59  , x_error_code         OUT  NOCOPY    NUMBER
60  , p_source_task_id     IN             NUMBER
61  , p_update_param_rec   IN             DEST_PARAM_REC_TYPE
62  , p_document_rec       IN             MTL_MATERIAL_TRANSACTIONS_TEMP%ROWTYPE
63  );
64 
65 
66 
67 /**
68     *    <b> Complete </b>:
69     * <p>This API is the document handler for Inbound document records and is called from
70     *    Complete_operation_instance.
71     *
72     *    This API handles both situations where current operation is the last step and current operation is not the last step of a plan.
73     *    It maintains correct states for document tables (MMTT, MTRL, crossdock related tables etc.) for both cases.
74     *  @param x_return_status      -Return Status
75     *  @param x_msg_data           -Returns Message Data
76     *  @param x_msg_count          -Returns the message count
77     *  @param x_source_task_id     -Returns the transaction_temp_ID for the MMTT record created for the next operation
78     *  @param x_error_code         -Returns Appropriate error code in case of any error.
79     *  @param p_source_task_id     -Identifier of the document record.
80     *  @param p_document_rec       -Record Type of MMTT
81     *  @param p_operation_type_id  -Operation Type id of the current operation.
82     *  @param p_next_operation_type_id  -Operation Type id of the nextt operation.
83     *  @param p_sug_to_sub_code    -Suggested subinventory code in WOOI
84     *  @param p_sug_to_locator_id  -Suggested locator id in WOOI
85     *  @param p_is_last_operation_flag  - Flag to indicate if the current operation is the last step in the plan
86     *
87    **/
88       PROCEDURE complete
89       (
90        x_return_status      OUT  NOCOPY    VARCHAR2
91        , x_msg_data           OUT  NOCOPY    fnd_new_messages.MESSAGE_TEXT%TYPE
92        , x_msg_count          OUT  NOCOPY    NUMBER
93        , x_source_task_id     OUT  NOCOPY    NUMBER
94        , x_error_code         OUT  NOCOPY    NUMBER
95        , p_source_task_id     IN             NUMBER
96        , p_document_rec       IN             mtl_material_transactions_temp%ROWTYPE
97        , p_operation_type_id  IN             NUMBER
98        , p_next_operation_type_id  IN        NUMBER
99        , p_sug_to_sub_code         IN        VARCHAR2 DEFAULT NULL
100        , p_sug_to_locator_id       IN        NUMBER DEFAULT NULL
101        , p_is_last_operation_flag  IN        VARCHAR2
102        , p_subsequent_op_plan_id   IN        NUMBER DEFAULT NULL
103        );
104 
105 /**
106     *    <b> Cleanup </b>:
107     * <p>This API is the document handler for Inbound document records and is called from
108     *    Cleanup_Operation_Instance and Rollback_Operation_Instance </p>
109     *
110     *
111     *    This API clears the destination subinventory, locator, and drop to LPN
112     *    if ATF suggested these data.
113     *
114     *
115     *
116     *
117     *  @param x_return_status      -Return Status
118     *  @param x_msg_data           -Returns Message Data
119     *  @param x_msg_count          -Returns the message count
120     *  @param p_source_task_id     -Identifier of the document record.
121     *
122    **/
123       PROCEDURE cleanup
124       (
125        x_return_status      OUT  NOCOPY    VARCHAR2
126        , x_msg_data           OUT  NOCOPY    fnd_new_messages.MESSAGE_TEXT%TYPE
127        , x_msg_count          OUT  NOCOPY    NUMBER
128        , p_source_task_id     IN             NUMBER
129        );
130 
131 /**
132     *    <b> Cancel </b>:
133     * <p>This API is the document handler for Inbound document records and is called from
134     *    Cancel_Operation_Plan  </p>
135     *
136     *
137     *    This API deletes the parent MMTT record, deletes the child MMTT record,
138     *    update and close the move order line as appropriate.
139     *
140     *
141     *  @param x_return_status      -Return Status
142     *  @param x_msg_data           -Returns Message Data
143     *  @param x_msg_count          -Returns the message count
144     *  @param p_source_task_id     -Identifier of the document record.
145     *
146    **/
147       PROCEDURE cancel
148       (
149        x_return_status      OUT  NOCOPY    VARCHAR2
150        , x_msg_data           OUT  NOCOPY    fnd_new_messages.MESSAGE_TEXT%TYPE
151        , x_msg_count          OUT  NOCOPY    NUMBER
152        , p_source_task_id     IN             NUMBER
153        , p_retain_mmtt       IN   VARCHAR2 DEFAULT 'N'
154        , p_mmtt_error_code   IN   VARCHAR2 DEFAULT NULL
155        , p_mmtt_error_explanation   IN   VARCHAR2 DEFAULT NULL
156       );
157 
158   /**
159     * <b> Abort </b>:
160     * <p> This API is the document handler for Inbound document records and is called from
161     *    Abort_Operation_Plan  </p>
162     *
163     *
164     *    This API deletes the parent MMTT record, clear several fields of the child MMTT record,
165     *
166     *
167     *  @param x_return_status      -Return Status
168     *  @param x_msg_data           -Returns Message Data
169     *  @param x_msg_count          -Returns the message count
170     *  @param p_source_task_id     -Identifier of the document record.
171     *  @param p_document_rec       -MMTT PL/SQL record
172     *
173    **/
174       PROCEDURE ABORT
175       (
176        x_return_status      OUT  NOCOPY    VARCHAR2
177        , x_msg_data           OUT  NOCOPY    fnd_new_messages.MESSAGE_TEXT%TYPE
178        , x_msg_count          OUT  NOCOPY    NUMBER
179        , p_document_rec        IN            mtl_material_transactions_temp%ROWTYPE
180        , p_plan_orig_sub_code  IN  VARCHAR2
181        , p_plan_orig_loc_id    IN  NUMBER
182        , p_for_manual_drop     IN  BOOLEAN DEFAULT FALSE
183        );
184 
185  /** The revert_crossdock API reverts a sales order or wip crossdock by
186       *
187       * 1. Nulling out crossdock related data on MOL
188       * 2. Notify wip or wsh that material should still be backordered.
189       *
190       *
191       *  @param x_return_status                  -Return Status
192       *  @param x_msg_data                       -Returns Message Data
193       *  @param x_msg_count                      -Returns the message count
194       *  @param p_move_order_line_id             -Identifier of the MTRL record
195       *  @param p_crossdock_type                 -Crossdock type from MTRL
196       *  @param p_backorder_delivery_detail_id   -Back order detail ID from MTRL
197       *  @param p_repetitive_line_id             -Repetitive line ID from MMTT
198       *  @param p_operation_seq_number           -Operation sequence no from MMTT
199       *  @param p_inventory_item_id              -Inventory item used
200       *  @param p_primary_quantity               -Primary quantity of the item
201       *
202      **/
203 
204  PROCEDURE revert_crossdock
205    (x_return_status                  OUT   NOCOPY VARCHAR2
206     , x_msg_count                    OUT   NOCOPY NUMBER
207     , x_msg_data                     OUT   NOCOPY VARCHAR2
208     , p_move_order_line_id           IN NUMBER
209     , p_crossdock_type               IN NUMBER
210     , p_backorder_delivery_detail_id IN NUMBER
211     , p_repetitive_line_id           IN NUMBER
212     , p_operation_seq_number         IN NUMBER
213     , p_inventory_item_id            IN NUMBER
214     , p_primary_quantity             IN NUMBER
215     );
216 
217 END WMS_OP_INBOUND_PVT;