29: ** DEFAULT = FND_API.G_FALSE,
30: ** p_kanban_card_id In VARCHAR2 (required)
31: ** kanban card id to be updated
32: ** p_supply_status IN varchar2 (required)
33: ** INV_KANBAN_PVT.G_Supply_Status_New
34: ** INV_KANBAN_PVT.G_Supply_Status_Full
35: ** INV_KANBAN_PVT.G_Supply_Status_Empty
36: ** INV_KANBAN_PVT.G_Supply_Status_InProcess
37: ** INV_KANBAN_PVT.G_Supply_Status_InTransit
30: ** p_kanban_card_id In VARCHAR2 (required)
31: ** kanban card id to be updated
32: ** p_supply_status IN varchar2 (required)
33: ** INV_KANBAN_PVT.G_Supply_Status_New
34: ** INV_KANBAN_PVT.G_Supply_Status_Full
35: ** INV_KANBAN_PVT.G_Supply_Status_Empty
36: ** INV_KANBAN_PVT.G_Supply_Status_InProcess
37: ** INV_KANBAN_PVT.G_Supply_Status_InTransit
38: ** p_document_type IN NUMBER
31: ** kanban card id to be updated
32: ** p_supply_status IN varchar2 (required)
33: ** INV_KANBAN_PVT.G_Supply_Status_New
34: ** INV_KANBAN_PVT.G_Supply_Status_Full
35: ** INV_KANBAN_PVT.G_Supply_Status_Empty
36: ** INV_KANBAN_PVT.G_Supply_Status_InProcess
37: ** INV_KANBAN_PVT.G_Supply_Status_InTransit
38: ** p_document_type IN NUMBER
39: ** INV_KANBAN_PVT.G_Doc_type_PO 1;
32: ** p_supply_status IN varchar2 (required)
33: ** INV_KANBAN_PVT.G_Supply_Status_New
34: ** INV_KANBAN_PVT.G_Supply_Status_Full
35: ** INV_KANBAN_PVT.G_Supply_Status_Empty
36: ** INV_KANBAN_PVT.G_Supply_Status_InProcess
37: ** INV_KANBAN_PVT.G_Supply_Status_InTransit
38: ** p_document_type IN NUMBER
39: ** INV_KANBAN_PVT.G_Doc_type_PO 1;
40: ** INV_KANBAN_PVT.G_Doc_type_Release 2;
33: ** INV_KANBAN_PVT.G_Supply_Status_New
34: ** INV_KANBAN_PVT.G_Supply_Status_Full
35: ** INV_KANBAN_PVT.G_Supply_Status_Empty
36: ** INV_KANBAN_PVT.G_Supply_Status_InProcess
37: ** INV_KANBAN_PVT.G_Supply_Status_InTransit
38: ** p_document_type IN NUMBER
39: ** INV_KANBAN_PVT.G_Doc_type_PO 1;
40: ** INV_KANBAN_PVT.G_Doc_type_Release 2;
41: ** INV_KANBAN_PVT.G_Doc_type_Internal_Req 3;
35: ** INV_KANBAN_PVT.G_Supply_Status_Empty
36: ** INV_KANBAN_PVT.G_Supply_Status_InProcess
37: ** INV_KANBAN_PVT.G_Supply_Status_InTransit
38: ** p_document_type IN NUMBER
39: ** INV_KANBAN_PVT.G_Doc_type_PO 1;
40: ** INV_KANBAN_PVT.G_Doc_type_Release 2;
41: ** INV_KANBAN_PVT.G_Doc_type_Internal_Req 3;
42: ** INV_KANBAN_PVT.G_Doc_type_Transfer_Order 4;
43: ** INV_KANBAN_PVT.G_Doc_type_Discrete_Job 5;
36: ** INV_KANBAN_PVT.G_Supply_Status_InProcess
37: ** INV_KANBAN_PVT.G_Supply_Status_InTransit
38: ** p_document_type IN NUMBER
39: ** INV_KANBAN_PVT.G_Doc_type_PO 1;
40: ** INV_KANBAN_PVT.G_Doc_type_Release 2;
41: ** INV_KANBAN_PVT.G_Doc_type_Internal_Req 3;
42: ** INV_KANBAN_PVT.G_Doc_type_Transfer_Order 4;
43: ** INV_KANBAN_PVT.G_Doc_type_Discrete_Job 5;
44: ** INV_KANBAN_PVT.G_Doc_type_Rep_Schedule 6;
37: ** INV_KANBAN_PVT.G_Supply_Status_InTransit
38: ** p_document_type IN NUMBER
39: ** INV_KANBAN_PVT.G_Doc_type_PO 1;
40: ** INV_KANBAN_PVT.G_Doc_type_Release 2;
41: ** INV_KANBAN_PVT.G_Doc_type_Internal_Req 3;
42: ** INV_KANBAN_PVT.G_Doc_type_Transfer_Order 4;
43: ** INV_KANBAN_PVT.G_Doc_type_Discrete_Job 5;
44: ** INV_KANBAN_PVT.G_Doc_type_Rep_Schedule 6;
45: ** INV_KANBAN_PVT.G_Doc_type_Flow_Schedule 7;
38: ** p_document_type IN NUMBER
39: ** INV_KANBAN_PVT.G_Doc_type_PO 1;
40: ** INV_KANBAN_PVT.G_Doc_type_Release 2;
41: ** INV_KANBAN_PVT.G_Doc_type_Internal_Req 3;
42: ** INV_KANBAN_PVT.G_Doc_type_Transfer_Order 4;
43: ** INV_KANBAN_PVT.G_Doc_type_Discrete_Job 5;
44: ** INV_KANBAN_PVT.G_Doc_type_Rep_Schedule 6;
45: ** INV_KANBAN_PVT.G_Doc_type_Flow_Schedule 7;
46: ** INV_KANBAN_PVT.G_Doc_type_lot_job 8;
39: ** INV_KANBAN_PVT.G_Doc_type_PO 1;
40: ** INV_KANBAN_PVT.G_Doc_type_Release 2;
41: ** INV_KANBAN_PVT.G_Doc_type_Internal_Req 3;
42: ** INV_KANBAN_PVT.G_Doc_type_Transfer_Order 4;
43: ** INV_KANBAN_PVT.G_Doc_type_Discrete_Job 5;
44: ** INV_KANBAN_PVT.G_Doc_type_Rep_Schedule 6;
45: ** INV_KANBAN_PVT.G_Doc_type_Flow_Schedule 7;
46: ** INV_KANBAN_PVT.G_Doc_type_lot_job 8;
47: ** p_Document_Header_Id IN NUMBER
40: ** INV_KANBAN_PVT.G_Doc_type_Release 2;
41: ** INV_KANBAN_PVT.G_Doc_type_Internal_Req 3;
42: ** INV_KANBAN_PVT.G_Doc_type_Transfer_Order 4;
43: ** INV_KANBAN_PVT.G_Doc_type_Discrete_Job 5;
44: ** INV_KANBAN_PVT.G_Doc_type_Rep_Schedule 6;
45: ** INV_KANBAN_PVT.G_Doc_type_Flow_Schedule 7;
46: ** INV_KANBAN_PVT.G_Doc_type_lot_job 8;
47: ** p_Document_Header_Id IN NUMBER
48: ** Document header id displayed on card activity
41: ** INV_KANBAN_PVT.G_Doc_type_Internal_Req 3;
42: ** INV_KANBAN_PVT.G_Doc_type_Transfer_Order 4;
43: ** INV_KANBAN_PVT.G_Doc_type_Discrete_Job 5;
44: ** INV_KANBAN_PVT.G_Doc_type_Rep_Schedule 6;
45: ** INV_KANBAN_PVT.G_Doc_type_Flow_Schedule 7;
46: ** INV_KANBAN_PVT.G_Doc_type_lot_job 8;
47: ** p_Document_Header_Id IN NUMBER
48: ** Document header id displayed on card activity
49: ** p_Document_detail_Id IN NUMBER
42: ** INV_KANBAN_PVT.G_Doc_type_Transfer_Order 4;
43: ** INV_KANBAN_PVT.G_Doc_type_Discrete_Job 5;
44: ** INV_KANBAN_PVT.G_Doc_type_Rep_Schedule 6;
45: ** INV_KANBAN_PVT.G_Doc_type_Flow_Schedule 7;
46: ** INV_KANBAN_PVT.G_Doc_type_lot_job 8;
47: ** p_Document_Header_Id IN NUMBER
48: ** Document header id displayed on card activity
49: ** p_Document_detail_Id IN NUMBER
50: ** Document detail id displayed on card activity
101: THEN
102: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
103: END IF;
104:
105: mydebug('Calling INV_Kanban_PVT.Update_Card_Supply_Status');
106:
107: INV_KANBAN_PVT.UPDATE_CARD_SUPPLY_STATUS
108: ( p_api_version_number => 1.0
109: , p_init_msg_list => p_init_msg_list
103: END IF;
104:
105: mydebug('Calling INV_Kanban_PVT.Update_Card_Supply_Status');
106:
107: INV_KANBAN_PVT.UPDATE_CARD_SUPPLY_STATUS
108: ( p_api_version_number => 1.0
109: , p_init_msg_list => p_init_msg_list
110: , p_validation_level => FND_API.G_VALID_LEVEL_FULL
111: , p_commit => p_commit
181: MTL_KANBAN_PULL_SEQUENCES
182: where
183: pull_sequence_id = p_pull_sequence_id;
184:
185: l_kanban_card_ids INV_Kanban_PVT.kanban_card_id_tbl_type;
186: l_pull_seq_rec INV_Kanban_PVT.pull_sequence_rec_type;
187: l_return_status varchar2(1) := FND_API.G_RET_STS_SUCCESS;
188: l_pullseq_found BOOLEAN := FALSE;
189: BEGIN
182: where
183: pull_sequence_id = p_pull_sequence_id;
184:
185: l_kanban_card_ids INV_Kanban_PVT.kanban_card_id_tbl_type;
186: l_pull_seq_rec INV_Kanban_PVT.pull_sequence_rec_type;
187: l_return_status varchar2(1) := FND_API.G_RET_STS_SUCCESS;
188: l_pullseq_found BOOLEAN := FALSE;
189: BEGIN
190:
209: l_pull_seq_rec.source_subinventory := pullseq_rec.source_subinventory;
210: l_pull_seq_rec.source_locator_id := pullseq_rec.source_locator_id;
211: l_pull_seq_rec.wip_line_id := pullseq_rec.wip_line_id;
212: l_pull_seq_rec.release_kanban_flag := pullseq_rec.release_kanban_flag;
213: l_pull_seq_rec.Kanban_Card_Type := INV_Kanban_Pvt.g_card_type_nonreplenishable;
214:
215: -- No need to check for non replenishable cards
216: -- if INV_kanban_PVT.Ok_To_Create_Kanban_Cards(p_pull_sequence_id => p_Pull_sequence_id ) then
217:
212: l_pull_seq_rec.release_kanban_flag := pullseq_rec.release_kanban_flag;
213: l_pull_seq_rec.Kanban_Card_Type := INV_Kanban_Pvt.g_card_type_nonreplenishable;
214:
215: -- No need to check for non replenishable cards
216: -- if INV_kanban_PVT.Ok_To_Create_Kanban_Cards(p_pull_sequence_id => p_Pull_sequence_id ) then
217:
218: mydebug('OK to create kanban cards');
219:
220: INV_kanban_PVT.create_kanban_cards( X_return_status => l_return_status,
216: -- if INV_kanban_PVT.Ok_To_Create_Kanban_Cards(p_pull_sequence_id => p_Pull_sequence_id ) then
217:
218: mydebug('OK to create kanban cards');
219:
220: INV_kanban_PVT.create_kanban_cards( X_return_status => l_return_status,
221: x_kanban_card_ids => l_kanban_card_ids,
222: p_pull_sequence_rec => l_pull_seq_rec,
223: p_supply_status => inv_kanban_pvt.g_supply_status_new);
224:
219:
220: INV_kanban_PVT.create_kanban_cards( X_return_status => l_return_status,
221: x_kanban_card_ids => l_kanban_card_ids,
222: p_pull_sequence_rec => l_pull_seq_rec,
223: p_supply_status => inv_kanban_pvt.g_supply_status_new);
224:
225: mydebug('INV_kanban_PVT.create_kanban_cards ret_sts '||l_return_status);
226:
227: if l_return_status = FND_API.G_RET_STS_ERROR then
221: x_kanban_card_ids => l_kanban_card_ids,
222: p_pull_sequence_rec => l_pull_seq_rec,
223: p_supply_status => inv_kanban_pvt.g_supply_status_new);
224:
225: mydebug('INV_kanban_PVT.create_kanban_cards ret_sts '||l_return_status);
226:
227: if l_return_status = FND_API.G_RET_STS_ERROR then
228: Raise FND_API.G_EXC_ERROR;
229: elsif l_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
239: mydebug(' No cards created') ;
240: x_kanban_card_id := NULL;
241: END IF;
242:
243: --ELSE --if INV_kanban_PVT.Ok_To_Create_Kanban_Cards(p_pull_sequence_id => p_Pull_sequence_id )
244: -- mydebug('Not OK to create kanban cards');
245: -- Raise FND_API.G_EXC_ERROR;
246: --END if;--if INV_kanban_PVT.Ok_To_Create_Kanban_Cards(p_pull_sequence_id => p_Pull_sequence_id )
247:
242:
243: --ELSE --if INV_kanban_PVT.Ok_To_Create_Kanban_Cards(p_pull_sequence_id => p_Pull_sequence_id )
244: -- mydebug('Not OK to create kanban cards');
245: -- Raise FND_API.G_EXC_ERROR;
246: --END if;--if INV_kanban_PVT.Ok_To_Create_Kanban_Cards(p_pull_sequence_id => p_Pull_sequence_id )
247:
248: END LOOP;--FOR pullseq_rec IN pullseq LOOP
249:
250: IF l_pullseq_found = FALSE THEN