DBA Data[Home] [Help]

APPS.FLM_KANBAN_CONSOLIDATION dependencies on INV_KANBAN_PVT

Line 5: TYPE t_cards_to_consolidate is table of INV_Kanban_PVT.Kanban_Card_Rec_Type index by binary_integer;

1: PACKAGE BODY FLM_KANBAN_CONSOLIDATION AS
2: /* $Header: flmkconb.pls 120.2 2011/10/19 11:14:34 sisankar noship $ */
3:
4: G_PKG_NAME CONSTANT VARCHAR2(30) := 'FLM_KANBAN_CONSOLIDATION';
5: TYPE t_cards_to_consolidate is table of INV_Kanban_PVT.Kanban_Card_Rec_Type index by binary_integer;
6:
7: FUNCTION Get_Next_Replenish_Cycle_Id Return Number
8: Is
9: l_next_replenish_cycle_Id Number;

Line 165: l_Kanban_Card_Rec_Tbl(l_order_count).Supply_Status := INV_Kanban_PVT.G_Supply_Status_Empty;

161: l_task_id,
162: l_project_accounting_context,
163: l_group_code);
164:
165: l_Kanban_Card_Rec_Tbl(l_order_count).Supply_Status := INV_Kanban_PVT.G_Supply_Status_Empty;
166: l_Kanban_Card_Rec_Tbl(l_order_count).Current_Replnsh_Cycle_Id := l_Current_Replenish_Cycle_Id;
167: l_Kanban_Card_Rec_Tbl(l_order_count).replenishment_count := nvl(l_Kanban_Card_Rec_Tbl(l_order_count).replenishment_count,0)+1;
168: l_Kanban_Card_Rec_Tbl(l_order_count).Last_Update_Date := SYSDATE;
169: l_Kanban_Card_Rec_Tbl(l_order_count).Last_Updated_By := FND_GLOBAL.USER_ID;

Line 172: Set Supply_Status = INV_Kanban_PVT.G_Supply_Status_Empty,

168: l_Kanban_Card_Rec_Tbl(l_order_count).Last_Update_Date := SYSDATE;
169: l_Kanban_Card_Rec_Tbl(l_order_count).Last_Updated_By := FND_GLOBAL.USER_ID;
170: fnd_file.put_line(fnd_file.log,'after card upd');
171: Update Mtl_Kanban_Cards
172: Set Supply_Status = INV_Kanban_PVT.G_Supply_Status_Empty,
173: Current_Replnsh_Cycle_Id = l_Current_Replenish_Cycle_Id,
174: replenishment_count = nvl(replenishment_count,0)+1,
175: Last_Update_Date = SYSDATE,
176: Last_Updated_By = FND_GLOBAL.USER_ID

Line 385: l_Kanban_Card_Rec_Tbl(l_order_count).Supply_Status := INV_Kanban_PVT.G_Supply_Status_InProcess;

381: Loop
382: l_Kanban_Card_Rec_Tbl(l_order_count).document_header_id := l_x_trolin_tbl(l_order_count).header_id;
383: l_Kanban_Card_Rec_Tbl(l_order_count).document_detail_id := l_x_trolin_tbl(l_order_count).Line_id;
384: l_Kanban_Card_Rec_Tbl(l_order_count).document_type := 4;
385: l_Kanban_Card_Rec_Tbl(l_order_count).Supply_Status := INV_Kanban_PVT.G_Supply_Status_InProcess;
386: l_Kanban_Card_Rec_Tbl(l_order_count).Current_Replnsh_Cycle_Id := l_Current_Replenish_Cycle_Id;
387: l_Kanban_Card_Rec_Tbl(l_order_count).replenishment_count := nvl(l_Kanban_Card_Rec_Tbl(l_order_count).replenishment_count,0)+1;
388: l_Kanban_Card_Rec_Tbl(l_order_count).Last_Update_Date := SYSDATE;
389: l_Kanban_Card_Rec_Tbl(l_order_count).Last_Updated_By := FND_GLOBAL.USER_ID;

Line 392: Set Supply_Status = INV_Kanban_PVT.G_Supply_Status_InProcess,

388: l_Kanban_Card_Rec_Tbl(l_order_count).Last_Update_Date := SYSDATE;
389: l_Kanban_Card_Rec_Tbl(l_order_count).Last_Updated_By := FND_GLOBAL.USER_ID;
390:
391: Update Mtl_Kanban_Cards
392: Set Supply_Status = INV_Kanban_PVT.G_Supply_Status_InProcess,
393: Current_Replnsh_Cycle_Id = l_Current_Replenish_Cycle_Id,
394: replenishment_count = nvl(replenishment_count,0)+1,
395: Last_Update_Date = SYSDATE,
396: Last_Updated_By = FND_GLOBAL.USER_ID

Line 404: INV_Kanban_PVT.Auto_Allocate_Kanban(l_Kanban_Card_Rec_Tbl(1).document_header_id,l_return_status, l_msg_count,l_msg_data);

400:
401: End Loop;
402:
403: IF l_auto_allocate_flag = 1 THEN
404: INV_Kanban_PVT.Auto_Allocate_Kanban(l_Kanban_Card_Rec_Tbl(1).document_header_id,l_return_status, l_msg_count,l_msg_data);
405:
406: SELECT MTRH.request_number INTO l_mo_request_number
407: FROM Mtl_Txn_Request_Headers MTRH
408: WHERE MTRH.Header_id = l_Kanban_Card_Rec_Tbl(1).document_header_id;

Line 551: if l_kanban_card_Rec_Tbl(1).source_Type = INV_Kanban_PVT.G_Source_Type_InterOrg Then

547: and c.exception_set_id = o.CALENDAR_EXCEPTION_SET_ID
548: and c.calendar_date = trunc(sysdate);
549: END IF;
550: fnd_file.put_line(fnd_file.log,'sourcetype code');
551: if l_kanban_card_Rec_Tbl(1).source_Type = INV_Kanban_PVT.G_Source_Type_InterOrg Then
552: fnd_file.put_line(fnd_file.log,'inter1');
553: l_sql_stmt_no := 40;
554: select distinct org.location_id
555: into l_deliver_location_id

Line 564: Elsif l_kanban_card_Rec_Tbl(1).source_Type = INV_Kanban_PVT.G_Source_Type_Supplier Then

560: l_kanban_card_Rec_Tbl(1).Organization_id
561: and org.location_id = loc.location_id
562: and pla.location_id = loc.location_id;
563:
564: Elsif l_kanban_card_Rec_Tbl(1).source_Type = INV_Kanban_PVT.G_Source_Type_Supplier Then
565: fnd_file.put_line(fnd_file.log,'supplier2');
566: l_sql_stmt_no := 40;
567: select org.location_id
568: into l_deliver_location_id

Line 603: If l_kanban_card_Rec_Tbl(1).source_type = INV_Kanban_PVT.G_Source_Type_InterOrg then

599: into l_buyer_id
600: from fnd_user
601: where user_id = FND_GLOBAL.USER_ID;
602:
603: If l_kanban_card_Rec_Tbl(1).source_type = INV_Kanban_PVT.G_Source_Type_InterOrg then
604: l_source_type_code := 'INVENTORY';
605: l_Requisition_type := 'INTERNAL';
606: fnd_file.put_line(fnd_file.log,'inter-final');
607: Create_Requisition( l_buyer_id, l_interface_source_code,

Line 617: elsIf l_kanban_card_Rec_Tbl(1).source_type = INV_Kanban_PVT.G_Source_Type_Supplier Then

613: l_charge_account_id, l_accrual_account_id,
614: l_invoice_var_account_id, l_budget_account_id,
615: l_autosource_flag, l_po_org_id);
616:
617: elsIf l_kanban_card_Rec_Tbl(1).source_type = INV_Kanban_PVT.G_Source_Type_Supplier Then
618: l_source_type_code := 'VENDOR';
619: l_Requisition_type := 'PURCHASE';
620: fnd_file.put_line(fnd_file.log,'supplier-final');
621: Create_Requisition( l_buyer_id, l_interface_source_code,

Line 631: elsIf l_kanban_card_Rec_Tbl(1).source_type = INV_Kanban_PVT.G_Source_Type_IntraOrg Then

627: l_charge_account_id, l_accrual_account_id,
628: l_invoice_var_account_id, l_budget_account_id,
629: l_autosource_flag, l_po_org_id);
630:
631: elsIf l_kanban_card_Rec_Tbl(1).source_type = INV_Kanban_PVT.G_Source_Type_IntraOrg Then
632: l_source_type_code := 'INVENTORY';
633: l_Requisition_type := 'TRANSFER';
634: fnd_file.put_line(fnd_file.log,'intra-final');
635: Create_Transfer_Order(l_kanban_card_Rec_Tbl,l_need_by_date,l_Primary_Uom_Code);

Line 731: and trunc(mkc.supply_status) = INV_Kanban_PVT.G_Supply_Status_Consolidate

727: mtl_kanban_pull_sequences mkps
728: where mkps.organization_id = p_organization_id
729: and nvl(mkps.consolidation_group,'####') = nvl(p_group_code,'####')
730: and mkps.pull_sequence_id = mkc.pull_sequence_id
731: and trunc(mkc.supply_status) = INV_Kanban_PVT.G_Supply_Status_Consolidate
732: and mkc.card_status = INV_Kanban_PVT.G_Card_Status_Active
733: order by mkc.source_type,mkc.pull_sequence_id,
734: mkc.supplier_id,mkc.supplier_site_id,
735: mkc.source_organization_id,mkc.source_subinventory,mkc.source_locator_id;

Line 732: and mkc.card_status = INV_Kanban_PVT.G_Card_Status_Active

728: where mkps.organization_id = p_organization_id
729: and nvl(mkps.consolidation_group,'####') = nvl(p_group_code,'####')
730: and mkps.pull_sequence_id = mkc.pull_sequence_id
731: and trunc(mkc.supply_status) = INV_Kanban_PVT.G_Supply_Status_Consolidate
732: and mkc.card_status = INV_Kanban_PVT.G_Card_Status_Active
733: order by mkc.source_type,mkc.pull_sequence_id,
734: mkc.supplier_id,mkc.supplier_site_id,
735: mkc.source_organization_id,mkc.source_subinventory,mkc.source_locator_id;
736:

Line 758: ( (v_cards_to_consolidate(l_card_counter).source_type = INV_Kanban_PVT.G_Source_Type_Supplier and

754: l_prev_src_locator := nvl(v_cards_to_consolidate(l_card_counter).source_locator_id,-10);
755: end if;
756: if v_cards_to_consolidate(l_card_counter).source_type = l_prev_source_type and
757: v_cards_to_consolidate(l_card_counter).pull_sequence_id = l_prev_pull_seq and
758: ( (v_cards_to_consolidate(l_card_counter).source_type = INV_Kanban_PVT.G_Source_Type_Supplier and
759: nvl(v_cards_to_consolidate(l_card_counter).supplier_id,-10) = l_prev_supplier and
760: nvl(v_cards_to_consolidate(l_card_counter).supplier_site_id,-10) = l_prev_supplier_site) or
761: (v_cards_to_consolidate(l_card_counter).source_type = INV_Kanban_PVT.G_Source_Type_InterOrg and
762: nvl(v_cards_to_consolidate(l_card_counter).source_organization_id,-10) = l_prev_src_org and

Line 761: (v_cards_to_consolidate(l_card_counter).source_type = INV_Kanban_PVT.G_Source_Type_InterOrg and

757: v_cards_to_consolidate(l_card_counter).pull_sequence_id = l_prev_pull_seq and
758: ( (v_cards_to_consolidate(l_card_counter).source_type = INV_Kanban_PVT.G_Source_Type_Supplier and
759: nvl(v_cards_to_consolidate(l_card_counter).supplier_id,-10) = l_prev_supplier and
760: nvl(v_cards_to_consolidate(l_card_counter).supplier_site_id,-10) = l_prev_supplier_site) or
761: (v_cards_to_consolidate(l_card_counter).source_type = INV_Kanban_PVT.G_Source_Type_InterOrg and
762: nvl(v_cards_to_consolidate(l_card_counter).source_organization_id,-10) = l_prev_src_org and
763: nvl(v_cards_to_consolidate(l_card_counter).source_subinventory,'####') = l_prev_src_subinv and
764: nvl(v_cards_to_consolidate(l_card_counter).source_locator_id,-10) = l_prev_src_locator) or
765: (v_cards_to_consolidate(l_card_counter).source_type = INV_Kanban_PVT.G_Source_Type_IntraOrg and

Line 765: (v_cards_to_consolidate(l_card_counter).source_type = INV_Kanban_PVT.G_Source_Type_IntraOrg and

761: (v_cards_to_consolidate(l_card_counter).source_type = INV_Kanban_PVT.G_Source_Type_InterOrg and
762: nvl(v_cards_to_consolidate(l_card_counter).source_organization_id,-10) = l_prev_src_org and
763: nvl(v_cards_to_consolidate(l_card_counter).source_subinventory,'####') = l_prev_src_subinv and
764: nvl(v_cards_to_consolidate(l_card_counter).source_locator_id,-10) = l_prev_src_locator) or
765: (v_cards_to_consolidate(l_card_counter).source_type = INV_Kanban_PVT.G_Source_Type_IntraOrg and
766: nvl(v_cards_to_consolidate(l_card_counter).source_subinventory,'####') = l_prev_src_subinv and
767: nvl(v_cards_to_consolidate(l_card_counter).source_locator_id,-10) = l_prev_src_locator) ) then
768: l_count := l_count +1;
769: v_consolidated_card(l_count) := v_cards_to_consolidate(l_card_counter);

Line 781: if v_cards_to_consolidate(l_card_counter).source_type in (INV_Kanban_PVT.G_Source_Type_InterOrg,

777: v_consolidated_card.delete;
778: l_count := 1;
779: v_consolidated_card(l_count) := v_cards_to_consolidate(l_card_counter);
780: end if;
781: if v_cards_to_consolidate(l_card_counter).source_type in (INV_Kanban_PVT.G_Source_Type_InterOrg,
782: INV_Kanban_PVT.G_Source_Type_Supplier) then
783: l_runReqImp := 1;
784: end if;
785: l_prev_pull_seq := v_cards_to_consolidate(l_card_counter).pull_sequence_id;

Line 782: INV_Kanban_PVT.G_Source_Type_Supplier) then

778: l_count := 1;
779: v_consolidated_card(l_count) := v_cards_to_consolidate(l_card_counter);
780: end if;
781: if v_cards_to_consolidate(l_card_counter).source_type in (INV_Kanban_PVT.G_Source_Type_InterOrg,
782: INV_Kanban_PVT.G_Source_Type_Supplier) then
783: l_runReqImp := 1;
784: end if;
785: l_prev_pull_seq := v_cards_to_consolidate(l_card_counter).pull_sequence_id;
786: l_prev_source_type := v_cards_to_consolidate(l_card_counter).source_type;