DBA Data[Home] [Help]

APPS.INV_KANBAN_PVT dependencies on INV_KANBAN_PVT

Line 1: PACKAGE BODY INV_Kanban_PVT as

1: PACKAGE BODY INV_Kanban_PVT as
2: /* $Header: INVVKBNB.pls 120.11.12010000.2 2008/07/29 13:48:23 ptkumar ship $ */
3:
4: -- Global constant holding the package name
5:

Line 6: G_PKG_NAME CONSTANT VARCHAR2(30) := 'INV_KANBAN_PVT';

2: /* $Header: INVVKBNB.pls 120.11.12010000.2 2008/07/29 13:48:23 ptkumar ship $ */
3:
4: -- Global constant holding the package name
5:
6: G_PKG_NAME CONSTANT VARCHAR2(30) := 'INV_KANBAN_PVT';
7: TYPE Kanban_Card_Tbl_Type IS TABLE OF INV_Kanban_PVT.Kanban_Card_Rec_Type
8: INDEX BY BINARY_INTEGER;
9:
10:

Line 7: TYPE Kanban_Card_Tbl_Type IS TABLE OF INV_Kanban_PVT.Kanban_Card_Rec_Type

3:
4: -- Global constant holding the package name
5:
6: G_PKG_NAME CONSTANT VARCHAR2(30) := 'INV_KANBAN_PVT';
7: TYPE Kanban_Card_Tbl_Type IS TABLE OF INV_Kanban_PVT.Kanban_Card_Rec_Type
8: INDEX BY BINARY_INTEGER;
9:
10:
11: PROCEDURE mydebug(msg IN VARCHAR2) IS

Line 13: inv_log_util.trace(msg, 'INV_KANBAN_PVT', 9);

9:
10:
11: PROCEDURE mydebug(msg IN VARCHAR2) IS
12: BEGIN
13: inv_log_util.trace(msg, 'INV_KANBAN_PVT', 9);
14: END mydebug;
15:
16:
17: --

Line 49: X_Current_Plan := INV_Kanban_PVT.G_Current_Plan;

45:
46: X_Ret_Success := FND_API.G_RET_STS_SUCCESS;
47: X_Ret_Error := FND_API.G_RET_STS_ERROR;
48: X_Ret_Unexp_Error := FND_API.G_RET_STS_UNEXP_ERROR;
49: X_Current_Plan := INV_Kanban_PVT.G_Current_Plan;
50: X_Source_Type_InterOrg := INV_Kanban_PVT.G_Source_Type_InterOrg;
51: X_Source_Type_Supplier := INV_Kanban_PVT.G_Source_Type_Supplier;
52: X_Source_Type_IntraOrg := INV_Kanban_PVT.G_Source_Type_IntraOrg;
53: X_Source_Type_Production := INV_Kanban_PVT.G_Source_Type_Production;

Line 50: X_Source_Type_InterOrg := INV_Kanban_PVT.G_Source_Type_InterOrg;

46: X_Ret_Success := FND_API.G_RET_STS_SUCCESS;
47: X_Ret_Error := FND_API.G_RET_STS_ERROR;
48: X_Ret_Unexp_Error := FND_API.G_RET_STS_UNEXP_ERROR;
49: X_Current_Plan := INV_Kanban_PVT.G_Current_Plan;
50: X_Source_Type_InterOrg := INV_Kanban_PVT.G_Source_Type_InterOrg;
51: X_Source_Type_Supplier := INV_Kanban_PVT.G_Source_Type_Supplier;
52: X_Source_Type_IntraOrg := INV_Kanban_PVT.G_Source_Type_IntraOrg;
53: X_Source_Type_Production := INV_Kanban_PVT.G_Source_Type_Production;
54: X_Card_Type_Replenishable := INV_Kanban_PVT.G_Card_Type_Replenishable;

Line 51: X_Source_Type_Supplier := INV_Kanban_PVT.G_Source_Type_Supplier;

47: X_Ret_Error := FND_API.G_RET_STS_ERROR;
48: X_Ret_Unexp_Error := FND_API.G_RET_STS_UNEXP_ERROR;
49: X_Current_Plan := INV_Kanban_PVT.G_Current_Plan;
50: X_Source_Type_InterOrg := INV_Kanban_PVT.G_Source_Type_InterOrg;
51: X_Source_Type_Supplier := INV_Kanban_PVT.G_Source_Type_Supplier;
52: X_Source_Type_IntraOrg := INV_Kanban_PVT.G_Source_Type_IntraOrg;
53: X_Source_Type_Production := INV_Kanban_PVT.G_Source_Type_Production;
54: X_Card_Type_Replenishable := INV_Kanban_PVT.G_Card_Type_Replenishable;
55: X_Card_Type_NonReplenishable := INV_Kanban_PVT.G_Card_Type_NonReplenishable;

Line 52: X_Source_Type_IntraOrg := INV_Kanban_PVT.G_Source_Type_IntraOrg;

48: X_Ret_Unexp_Error := FND_API.G_RET_STS_UNEXP_ERROR;
49: X_Current_Plan := INV_Kanban_PVT.G_Current_Plan;
50: X_Source_Type_InterOrg := INV_Kanban_PVT.G_Source_Type_InterOrg;
51: X_Source_Type_Supplier := INV_Kanban_PVT.G_Source_Type_Supplier;
52: X_Source_Type_IntraOrg := INV_Kanban_PVT.G_Source_Type_IntraOrg;
53: X_Source_Type_Production := INV_Kanban_PVT.G_Source_Type_Production;
54: X_Card_Type_Replenishable := INV_Kanban_PVT.G_Card_Type_Replenishable;
55: X_Card_Type_NonReplenishable := INV_Kanban_PVT.G_Card_Type_NonReplenishable;
56: X_Card_Status_Active := INV_Kanban_PVT.G_Card_Status_Active;

Line 53: X_Source_Type_Production := INV_Kanban_PVT.G_Source_Type_Production;

49: X_Current_Plan := INV_Kanban_PVT.G_Current_Plan;
50: X_Source_Type_InterOrg := INV_Kanban_PVT.G_Source_Type_InterOrg;
51: X_Source_Type_Supplier := INV_Kanban_PVT.G_Source_Type_Supplier;
52: X_Source_Type_IntraOrg := INV_Kanban_PVT.G_Source_Type_IntraOrg;
53: X_Source_Type_Production := INV_Kanban_PVT.G_Source_Type_Production;
54: X_Card_Type_Replenishable := INV_Kanban_PVT.G_Card_Type_Replenishable;
55: X_Card_Type_NonReplenishable := INV_Kanban_PVT.G_Card_Type_NonReplenishable;
56: X_Card_Status_Active := INV_Kanban_PVT.G_Card_Status_Active;
57: X_Card_Status_Hold := INV_Kanban_PVT.G_Card_Status_Hold;

Line 54: X_Card_Type_Replenishable := INV_Kanban_PVT.G_Card_Type_Replenishable;

50: X_Source_Type_InterOrg := INV_Kanban_PVT.G_Source_Type_InterOrg;
51: X_Source_Type_Supplier := INV_Kanban_PVT.G_Source_Type_Supplier;
52: X_Source_Type_IntraOrg := INV_Kanban_PVT.G_Source_Type_IntraOrg;
53: X_Source_Type_Production := INV_Kanban_PVT.G_Source_Type_Production;
54: X_Card_Type_Replenishable := INV_Kanban_PVT.G_Card_Type_Replenishable;
55: X_Card_Type_NonReplenishable := INV_Kanban_PVT.G_Card_Type_NonReplenishable;
56: X_Card_Status_Active := INV_Kanban_PVT.G_Card_Status_Active;
57: X_Card_Status_Hold := INV_Kanban_PVT.G_Card_Status_Hold;
58: X_Card_Status_Cancel := INV_Kanban_PVT.G_Card_Status_Cancel;

Line 55: X_Card_Type_NonReplenishable := INV_Kanban_PVT.G_Card_Type_NonReplenishable;

51: X_Source_Type_Supplier := INV_Kanban_PVT.G_Source_Type_Supplier;
52: X_Source_Type_IntraOrg := INV_Kanban_PVT.G_Source_Type_IntraOrg;
53: X_Source_Type_Production := INV_Kanban_PVT.G_Source_Type_Production;
54: X_Card_Type_Replenishable := INV_Kanban_PVT.G_Card_Type_Replenishable;
55: X_Card_Type_NonReplenishable := INV_Kanban_PVT.G_Card_Type_NonReplenishable;
56: X_Card_Status_Active := INV_Kanban_PVT.G_Card_Status_Active;
57: X_Card_Status_Hold := INV_Kanban_PVT.G_Card_Status_Hold;
58: X_Card_Status_Cancel := INV_Kanban_PVT.G_Card_Status_Cancel;
59: X_No_Pull_sequence := INV_Kanban_PVT.G_No_Pull_sequence;

Line 56: X_Card_Status_Active := INV_Kanban_PVT.G_Card_Status_Active;

52: X_Source_Type_IntraOrg := INV_Kanban_PVT.G_Source_Type_IntraOrg;
53: X_Source_Type_Production := INV_Kanban_PVT.G_Source_Type_Production;
54: X_Card_Type_Replenishable := INV_Kanban_PVT.G_Card_Type_Replenishable;
55: X_Card_Type_NonReplenishable := INV_Kanban_PVT.G_Card_Type_NonReplenishable;
56: X_Card_Status_Active := INV_Kanban_PVT.G_Card_Status_Active;
57: X_Card_Status_Hold := INV_Kanban_PVT.G_Card_Status_Hold;
58: X_Card_Status_Cancel := INV_Kanban_PVT.G_Card_Status_Cancel;
59: X_No_Pull_sequence := INV_Kanban_PVT.G_No_Pull_sequence;
60: X_Doc_Type_Po := INV_Kanban_PVT.G_Doc_Type_Po;

Line 57: X_Card_Status_Hold := INV_Kanban_PVT.G_Card_Status_Hold;

53: X_Source_Type_Production := INV_Kanban_PVT.G_Source_Type_Production;
54: X_Card_Type_Replenishable := INV_Kanban_PVT.G_Card_Type_Replenishable;
55: X_Card_Type_NonReplenishable := INV_Kanban_PVT.G_Card_Type_NonReplenishable;
56: X_Card_Status_Active := INV_Kanban_PVT.G_Card_Status_Active;
57: X_Card_Status_Hold := INV_Kanban_PVT.G_Card_Status_Hold;
58: X_Card_Status_Cancel := INV_Kanban_PVT.G_Card_Status_Cancel;
59: X_No_Pull_sequence := INV_Kanban_PVT.G_No_Pull_sequence;
60: X_Doc_Type_Po := INV_Kanban_PVT.G_Doc_Type_Po;
61: X_Doc_Type_Release := INV_Kanban_PVT.G_Doc_Type_Release;

Line 58: X_Card_Status_Cancel := INV_Kanban_PVT.G_Card_Status_Cancel;

54: X_Card_Type_Replenishable := INV_Kanban_PVT.G_Card_Type_Replenishable;
55: X_Card_Type_NonReplenishable := INV_Kanban_PVT.G_Card_Type_NonReplenishable;
56: X_Card_Status_Active := INV_Kanban_PVT.G_Card_Status_Active;
57: X_Card_Status_Hold := INV_Kanban_PVT.G_Card_Status_Hold;
58: X_Card_Status_Cancel := INV_Kanban_PVT.G_Card_Status_Cancel;
59: X_No_Pull_sequence := INV_Kanban_PVT.G_No_Pull_sequence;
60: X_Doc_Type_Po := INV_Kanban_PVT.G_Doc_Type_Po;
61: X_Doc_Type_Release := INV_Kanban_PVT.G_Doc_Type_Release;
62: X_Doc_Type_Internal_Req := INV_Kanban_PVT.G_Doc_Type_Internal_Req;

Line 59: X_No_Pull_sequence := INV_Kanban_PVT.G_No_Pull_sequence;

55: X_Card_Type_NonReplenishable := INV_Kanban_PVT.G_Card_Type_NonReplenishable;
56: X_Card_Status_Active := INV_Kanban_PVT.G_Card_Status_Active;
57: X_Card_Status_Hold := INV_Kanban_PVT.G_Card_Status_Hold;
58: X_Card_Status_Cancel := INV_Kanban_PVT.G_Card_Status_Cancel;
59: X_No_Pull_sequence := INV_Kanban_PVT.G_No_Pull_sequence;
60: X_Doc_Type_Po := INV_Kanban_PVT.G_Doc_Type_Po;
61: X_Doc_Type_Release := INV_Kanban_PVT.G_Doc_Type_Release;
62: X_Doc_Type_Internal_Req := INV_Kanban_PVT.G_Doc_Type_Internal_Req;
63:

Line 60: X_Doc_Type_Po := INV_Kanban_PVT.G_Doc_Type_Po;

56: X_Card_Status_Active := INV_Kanban_PVT.G_Card_Status_Active;
57: X_Card_Status_Hold := INV_Kanban_PVT.G_Card_Status_Hold;
58: X_Card_Status_Cancel := INV_Kanban_PVT.G_Card_Status_Cancel;
59: X_No_Pull_sequence := INV_Kanban_PVT.G_No_Pull_sequence;
60: X_Doc_Type_Po := INV_Kanban_PVT.G_Doc_Type_Po;
61: X_Doc_Type_Release := INV_Kanban_PVT.G_Doc_Type_Release;
62: X_Doc_Type_Internal_Req := INV_Kanban_PVT.G_Doc_Type_Internal_Req;
63:
64: End Get_Constants;

Line 61: X_Doc_Type_Release := INV_Kanban_PVT.G_Doc_Type_Release;

57: X_Card_Status_Hold := INV_Kanban_PVT.G_Card_Status_Hold;
58: X_Card_Status_Cancel := INV_Kanban_PVT.G_Card_Status_Cancel;
59: X_No_Pull_sequence := INV_Kanban_PVT.G_No_Pull_sequence;
60: X_Doc_Type_Po := INV_Kanban_PVT.G_Doc_Type_Po;
61: X_Doc_Type_Release := INV_Kanban_PVT.G_Doc_Type_Release;
62: X_Doc_Type_Internal_Req := INV_Kanban_PVT.G_Doc_Type_Internal_Req;
63:
64: End Get_Constants;
65: --

Line 62: X_Doc_Type_Internal_Req := INV_Kanban_PVT.G_Doc_Type_Internal_Req;

58: X_Card_Status_Cancel := INV_Kanban_PVT.G_Card_Status_Cancel;
59: X_No_Pull_sequence := INV_Kanban_PVT.G_No_Pull_sequence;
60: X_Doc_Type_Po := INV_Kanban_PVT.G_Doc_Type_Po;
61: X_Doc_Type_Release := INV_Kanban_PVT.G_Doc_Type_Release;
62: X_Doc_Type_Internal_Req := INV_Kanban_PVT.G_Doc_Type_Internal_Req;
63:
64: End Get_Constants;
65: --
66: --

Line 135: If p_kanban_plan_id = INV_kanban_PVT.G_Current_Plan

131: l_return_status Varchar2(1) := FND_API.G_RET_STS_SUCCESS;
132:
133: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
134: Begin
135: If p_kanban_plan_id = INV_kanban_PVT.G_Current_Plan
136: then
137: For pull_sequences in get_pull_sequences
138: loop
139: If Ok_To_Delete_Pull_Sequence(pull_sequences.pull_sequence_id)

Line 181: (p_Pull_Sequence_Rec INV_Kanban_PVT.Pull_sequence_Rec_Type)

177: -- fields are present.
178: --
179: --
180: PROCEDURE Validate_Pull_Sequence
181: (p_Pull_Sequence_Rec INV_Kanban_PVT.Pull_sequence_Rec_Type)
182: IS
183: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
184: Begin
185: if p_Pull_Sequence_Rec.Organization_Id is null

Line 223: if p_Pull_Sequence_Rec.source_type = INV_Kanban_PVT.G_Source_type_IntraOrg

219: FND_MSG_PUB.Add;
220: Raise FND_API.G_EXC_ERROR;
221: end if;
222:
223: if p_Pull_Sequence_Rec.source_type = INV_Kanban_PVT.G_Source_type_IntraOrg
224: And p_Pull_Sequence_Rec.source_subinventory is null
225: then
226: FND_MESSAGE.SET_NAME('INV','INV_ATTRIBUTE_REQUIRED');
227: FND_MESSAGE.SET_TOKEN('ATTRIBUTE','INV_SOURCE_SUBINV',TRUE);

Line 233: /*if p_Pull_Sequence_Rec.source_type = INV_Kanban_PVT.G_Source_type_Production

229: Raise FND_API.G_EXC_ERROR;
230: end if;
231:
232: /*Code modification for bug2186198*/
233: /*if p_Pull_Sequence_Rec.source_type = INV_Kanban_PVT.G_Source_type_Production
234: And p_Pull_Sequence_Rec.wip_line_id is null
235: then
236: FND_MESSAGE.SET_NAME('INV','INV_ATTRIBUTE_REQUIRED');
237: FND_MESSAGE.SET_TOKEN('ATTRIBUTE','INV_WIP_LINE');

Line 273: p_Pull_Sequence_Rec INV_Kanban_PVT.Pull_sequence_Rec_Type)

269: --
270: --
271: PROCEDURE Insert_Pull_Sequence
272: (x_return_status Out NOCOPY Varchar2,
273: p_Pull_Sequence_Rec INV_Kanban_PVT.Pull_sequence_Rec_Type)
274: IS
275: l_Pull_Sequence_Rec INV_Kanban_PVT.Pull_sequence_Rec_Type;
276: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
277: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);

Line 275: l_Pull_Sequence_Rec INV_Kanban_PVT.Pull_sequence_Rec_Type;

271: PROCEDURE Insert_Pull_Sequence
272: (x_return_status Out NOCOPY Varchar2,
273: p_Pull_Sequence_Rec INV_Kanban_PVT.Pull_sequence_Rec_Type)
274: IS
275: l_Pull_Sequence_Rec INV_Kanban_PVT.Pull_sequence_Rec_Type;
276: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
277: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
278: Begin
279: FND_MSG_PUB.initialize;

Line 326: x_Pull_Sequence_Rec IN OUT NOCOPY INV_Kanban_PVT.Pull_sequence_Rec_Type)

322: --
323: --
324: PROCEDURE Update_Pull_sequence
325: (x_return_status Out NOCOPY Varchar2,
326: x_Pull_Sequence_Rec IN OUT NOCOPY INV_Kanban_PVT.Pull_sequence_Rec_Type)
327: IS
328: l_Pull_Sequence_Rec INV_Kanban_PVT.Pull_Sequence_Rec_Type;
329: l_Old_Pull_Sequence_Rec INV_Kanban_PVT.Pull_Sequence_Rec_Type;
330: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;

Line 328: l_Pull_Sequence_Rec INV_Kanban_PVT.Pull_Sequence_Rec_Type;

324: PROCEDURE Update_Pull_sequence
325: (x_return_status Out NOCOPY Varchar2,
326: x_Pull_Sequence_Rec IN OUT NOCOPY INV_Kanban_PVT.Pull_sequence_Rec_Type)
327: IS
328: l_Pull_Sequence_Rec INV_Kanban_PVT.Pull_Sequence_Rec_Type;
329: l_Old_Pull_Sequence_Rec INV_Kanban_PVT.Pull_Sequence_Rec_Type;
330: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
331: l_org_code VARCHAR2(3);
332: l_item_name VARCHAR2(30);

Line 329: l_Old_Pull_Sequence_Rec INV_Kanban_PVT.Pull_Sequence_Rec_Type;

325: (x_return_status Out NOCOPY Varchar2,
326: x_Pull_Sequence_Rec IN OUT NOCOPY INV_Kanban_PVT.Pull_sequence_Rec_Type)
327: IS
328: l_Pull_Sequence_Rec INV_Kanban_PVT.Pull_Sequence_Rec_Type;
329: l_Old_Pull_Sequence_Rec INV_Kanban_PVT.Pull_Sequence_Rec_Type;
330: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
331: l_org_code VARCHAR2(3);
332: l_item_name VARCHAR2(30);
333: l_loc_name VARCHAR2(30);

Line 471: p_Pull_Sequence_tbl INV_Kanban_PVT.Pull_sequence_Id_Tbl_Type,

467: ------------------------------------------------------------------------------
468: -- PROCEDURE : UPDATE_PULL_SEQUENCE_TBL
469: ------------------------------------------------------------------------------
470: PROCEDURE Update_Pull_sequence_Tbl (x_return_status Out NOCOPY Varchar2,
471: p_Pull_Sequence_tbl INV_Kanban_PVT.Pull_sequence_Id_Tbl_Type,
472: x_update_flag Varchar2,
473: p_operation_tbl INV_Kanban_PVT.operation_tbl_type := G_operation_tbl)
474: IS
475: l_record_count NUMBER := 0;

Line 473: p_operation_tbl INV_Kanban_PVT.operation_tbl_type := G_operation_tbl)

469: ------------------------------------------------------------------------------
470: PROCEDURE Update_Pull_sequence_Tbl (x_return_status Out NOCOPY Varchar2,
471: p_Pull_Sequence_tbl INV_Kanban_PVT.Pull_sequence_Id_Tbl_Type,
472: x_update_flag Varchar2,
473: p_operation_tbl INV_Kanban_PVT.operation_tbl_type := G_operation_tbl)
474: IS
475: l_record_count NUMBER := 0;
476: l_PullSeqTable INV_Kanban_PVT.Pull_Sequence_id_Tbl_Type;
477: l_report_id NUMBER := 0;

Line 476: l_PullSeqTable INV_Kanban_PVT.Pull_Sequence_id_Tbl_Type;

472: x_update_flag Varchar2,
473: p_operation_tbl INV_Kanban_PVT.operation_tbl_type := G_operation_tbl)
474: IS
475: l_record_count NUMBER := 0;
476: l_PullSeqTable INV_Kanban_PVT.Pull_Sequence_id_Tbl_Type;
477: l_report_id NUMBER := 0;
478: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
479: v_req_id NUMBER;
480: v_generate_cards BOOLEAN := FALSE;

Line 481: l_Pull_sequence_rec INV_Kanban_PVT.Pull_sequence_Rec_Type;

477: l_report_id NUMBER := 0;
478: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
479: v_req_id NUMBER;
480: v_generate_cards BOOLEAN := FALSE;
481: l_Pull_sequence_rec INV_Kanban_PVT.Pull_sequence_Rec_Type;
482:
483:
484: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
485:

Line 486: l_operation_tbl INV_Kanban_PVT.operation_tbl_type; --Operation to be performed update/insert

482:
483:
484: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
485:
486: l_operation_tbl INV_Kanban_PVT.operation_tbl_type; --Operation to be performed update/insert
487: l_report_generate_id NUMBER := 0; --Report id for generating cards
488: l_report_print_id NUMBER := 0; --Report id for printing cards
489: l_count_generate NUMBER := 0; --Count of number of cards to be generated
490: l_count_print NUMBER := 0; -- Count of number of cards to be printed

Line 521: INV_Kanban_PVT.update_pull_sequence(

517: END IF;
518:
519: IF (l_operation_tbl.COUNT > 0) THEN
520: IF(l_operation_tbl(l_record_count) = 0 ) THEN
521: INV_Kanban_PVT.update_pull_sequence(
522: l_return_status,
523: l_Pull_sequence_rec);
524: ELSE
525: OPEN C2;

Line 529: INV_Kanban_PVT.insert_pull_sequence(

525: OPEN C2;
526: FETCH C2 INTO l_Pull_Sequence_Rec.pull_sequence_id;
527: CLOSE C2;
528:
529: INV_Kanban_PVT.insert_pull_sequence(
530: l_return_status,
531: l_Pull_sequence_rec);
532: END IF;
533:

Line 536: INV_Kanban_PVT.update_pull_sequence(

532: END IF;
533:
534: ELSE
535: -- Existing Functionality
536: INV_Kanban_PVT.update_pull_sequence(
537: l_return_status,
538: l_Pull_sequence_rec);
539:
540: END IF; -- end of l_operation_tbl.COUNT > 0 if loop

Line 548: IF INV_kanban_PVT.Ok_To_Create_Kanban_Cards( p_pull_sequence_id =>

544: FND_API.G_RET_STS_UNEXP_ERROR) THEN
545: RAISE FND_API.G_EXC_ERROR;
546: END IF;
547: ELSE
548: IF INV_kanban_PVT.Ok_To_Create_Kanban_Cards( p_pull_sequence_id =>
549: l_PullSeqtable(l_record_count) ) then
550: v_generate_cards := TRUE;
551: ELSE
552: v_generate_cards := FALSE;

Line 719: l_kanban_card_rec INV_Kanban_PVT.Kanban_Card_Rec_Type;

715: p_need_by_date DATE,
716: p_source_wip_entity_id NUMBER)
717:
718: IS
719: l_kanban_card_rec INV_Kanban_PVT.Kanban_Card_Rec_Type;
720: l_return_status Varchar2(1) := FND_API.G_RET_STS_SUCCESS;
721: l_supply_status_from Varchar2(30);
722: l_supply_status_to Varchar2(30);
723: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);

Line 783: IF ( p_supply_status IN (INV_Kanban_PVT.G_Supply_Status_InProcess,INV_Kanban_PVT.G_Supply_Status_Full) AND

779: /*Bug 3740514 --If the supply status is Full and the source is Supplier,calling
780: a new procedure update_card_and_card_status to check if the correct
781: Release is being updated.*/
782:
783: IF ( p_supply_status IN (INV_Kanban_PVT.G_Supply_Status_InProcess,INV_Kanban_PVT.G_Supply_Status_Full) AND
784: l_Kanban_Card_Rec.source_type = INV_Kanban_PVT.G_Source_Type_Supplier) THEN
785: update_card_and_card_status(
786: p_kanban_card_id => l_kanban_card_rec.kanban_card_id,
787: p_supply_status => p_supply_status,/*4490269*/

Line 784: l_Kanban_Card_Rec.source_type = INV_Kanban_PVT.G_Source_Type_Supplier) THEN

780: a new procedure update_card_and_card_status to check if the correct
781: Release is being updated.*/
782:
783: IF ( p_supply_status IN (INV_Kanban_PVT.G_Supply_Status_InProcess,INV_Kanban_PVT.G_Supply_Status_Full) AND
784: l_Kanban_Card_Rec.source_type = INV_Kanban_PVT.G_Source_Type_Supplier) THEN
785: update_card_and_card_status(
786: p_kanban_card_id => l_kanban_card_rec.kanban_card_id,
787: p_supply_status => p_supply_status,/*4490269*/
788: p_update => l_update);

Line 812: (INV_Kanban_PVT.G_Card_Status_Cancel,

808: END IF;
809: ELSE
810: mydebug('Supply status change not OK');
811: If l_kanban_card_rec.card_status in
812: (INV_Kanban_PVT.G_Card_Status_Cancel,
813: INV_Kanban_PVT.G_Card_Status_Hold)
814: then
815: FND_MESSAGE.SET_TOKEN('CARD_NUMBER',l_kanban_card_rec.kanban_card_number);
816: End If;

Line 813: INV_Kanban_PVT.G_Card_Status_Hold)

809: ELSE
810: mydebug('Supply status change not OK');
811: If l_kanban_card_rec.card_status in
812: (INV_Kanban_PVT.G_Card_Status_Cancel,
813: INV_Kanban_PVT.G_Card_Status_Hold)
814: then
815: FND_MESSAGE.SET_TOKEN('CARD_NUMBER',l_kanban_card_rec.kanban_card_number);
816: End If;
817: l_return_status := FND_API.G_RET_STS_ERROR;

Line 896: l_Supply_Status := INV_KANBAN_PVT.G_Supply_Status_InProcess;

892: mtl_material_transactions where
893: move_order_line_id = l_move_order_line_id and
894: transaction_quantity < 0;
895: if (nvl(l_quantity_delivered,0) < l_quantity) then
896: l_Supply_Status := INV_KANBAN_PVT.G_Supply_Status_InProcess;
897: end if;
898: end if;
899: Exception When Others Then
900: Null;

Line 1114: AND (card_status = INV_Kanban_PVT.G_Card_Status_Active or

1110: Select 'x'
1111: INTO l_dummy
1112: FROM MTL_KANBAN_CARDS
1113: WHERE pull_sequence_id = p_pull_sequence_id
1114: AND (card_status = INV_Kanban_PVT.G_Card_Status_Active or
1115: card_status = INV_Kanban_PVT.G_Card_Status_Hold);
1116: Raise Too_Many_Rows;
1117:
1118: Exception

Line 1115: card_status = INV_Kanban_PVT.G_Card_Status_Hold);

1111: INTO l_dummy
1112: FROM MTL_KANBAN_CARDS
1113: WHERE pull_sequence_id = p_pull_sequence_id
1114: AND (card_status = INV_Kanban_PVT.G_Card_Status_Active or
1115: card_status = INV_Kanban_PVT.G_Card_Status_Hold);
1116: Raise Too_Many_Rows;
1117:
1118: Exception
1119: When No_data_found Then

Line 1163: AND (card_status = INV_Kanban_PVT.G_Card_Status_Active or

1159: Select 'x'
1160: INTO l_dummy
1161: FROM MTL_KANBAN_CARDS
1162: WHERE pull_sequence_id = p_pull_sequence_id
1163: AND (card_status = INV_Kanban_PVT.G_Card_Status_Active or
1164: card_status = INV_Kanban_PVT.G_Card_Status_Hold)
1165: -- AND nvl(p_kanban_size,-1) > 0
1166: -- AND kanban_size <> nvl(p_kanban_size,-1)
1167: AND source_type = nvl(p_source_type,-1)

Line 1164: card_status = INV_Kanban_PVT.G_Card_Status_Hold)

1160: INTO l_dummy
1161: FROM MTL_KANBAN_CARDS
1162: WHERE pull_sequence_id = p_pull_sequence_id
1163: AND (card_status = INV_Kanban_PVT.G_Card_Status_Active or
1164: card_status = INV_Kanban_PVT.G_Card_Status_Hold)
1165: -- AND nvl(p_kanban_size,-1) > 0
1166: -- AND kanban_size <> nvl(p_kanban_size,-1)
1167: AND source_type = nvl(p_source_type,-1)
1168: AND (((source_type = 1 or source_type = 3)

Line 1192: AND (card_status = INV_Kanban_PVT.G_Card_Status_Active or

1188: Select 'x'
1189: INTO l_dummy
1190: FROM MTL_KANBAN_CARDS
1191: WHERE pull_sequence_id = p_pull_sequence_id
1192: AND (card_status = INV_Kanban_PVT.G_Card_Status_Active or
1193: card_status = INV_Kanban_PVT.G_Card_Status_Hold)
1194: AND nvl(p_kanban_size,-1) > 0
1195: AND kanban_size <> nvl(p_kanban_size,-1)
1196: AND source_type = nvl(p_source_type,-1)

Line 1193: card_status = INV_Kanban_PVT.G_Card_Status_Hold)

1189: INTO l_dummy
1190: FROM MTL_KANBAN_CARDS
1191: WHERE pull_sequence_id = p_pull_sequence_id
1192: AND (card_status = INV_Kanban_PVT.G_Card_Status_Active or
1193: card_status = INV_Kanban_PVT.G_Card_Status_Hold)
1194: AND nvl(p_kanban_size,-1) > 0
1195: AND kanban_size <> nvl(p_kanban_size,-1)
1196: AND source_type = nvl(p_source_type,-1)
1197: AND (((source_type = 1 or source_type = 3)

Line 1407: if ( l_source_type = INV_KANBAN_PVT.G_Source_Type_Production ) then

1403: FND_MESSAGE.SET_TOKEN('SUB',p_subinventory);
1404: FND_MESSAGE.SET_TOKEN('LOC',x_loc_name);
1405: RETURN FALSE;
1406: end if;
1407: if ( l_source_type = INV_KANBAN_PVT.G_Source_Type_Production ) then
1408: l_proceed := 'Y';
1409: else
1410: FND_MESSAGE.SET_NAME('INV','INV_KANBAN_NOT_PRODUCTION');
1411: FND_MESSAGE.SET_TOKEN('CARD_NUM',x_kanban_num );

Line 1414: if ( l_supply_status in (INV_KANBAN_PVT.G_Supply_Status_Empty,

1410: FND_MESSAGE.SET_NAME('INV','INV_KANBAN_NOT_PRODUCTION');
1411: FND_MESSAGE.SET_TOKEN('CARD_NUM',x_kanban_num );
1412: RETURN FALSE;
1413: end if;
1414: if ( l_supply_status in (INV_KANBAN_PVT.G_Supply_Status_Empty,
1415: INV_KANBAN_PVT.G_Supply_Status_InProcess ) ) then
1416: Return TRUE;
1417: else
1418: begin

Line 1415: INV_KANBAN_PVT.G_Supply_Status_InProcess ) ) then

1411: FND_MESSAGE.SET_TOKEN('CARD_NUM',x_kanban_num );
1412: RETURN FALSE;
1413: end if;
1414: if ( l_supply_status in (INV_KANBAN_PVT.G_Supply_Status_Empty,
1415: INV_KANBAN_PVT.G_Supply_Status_InProcess ) ) then
1416: Return TRUE;
1417: else
1418: begin
1419: select 'x' into l_dummy

Line 1424: and source_type = INV_KANBAN_PVT.G_Source_Type_Production

1420: from mtl_kanban_card_activity
1421: where kanban_card_id = p_kanban_id
1422: and organization_id = p_org_id
1423: and document_header_id = p_wip_entity_id
1424: and source_type = INV_KANBAN_PVT.G_Source_Type_Production
1425: and supply_status = INV_KANBAN_PVT.G_Supply_Status_Full;
1426:
1427: Raise Too_many_rows;
1428:

Line 1425: and supply_status = INV_KANBAN_PVT.G_Supply_Status_Full;

1421: where kanban_card_id = p_kanban_id
1422: and organization_id = p_org_id
1423: and document_header_id = p_wip_entity_id
1424: and source_type = INV_KANBAN_PVT.G_Source_Type_Production
1425: and supply_status = INV_KANBAN_PVT.G_Supply_Status_Full;
1426:
1427: Raise Too_many_rows;
1428:
1429: exception

Line 1469: X_Kanban_Card_Ids OUT NOCOPY INV_Kanban_PVT.Kanban_Card_Id_Tbl_Type,

1465: --
1466: --
1467: PROCEDURE Create_Kanban_Cards
1468: ( X_return_status OUT NOCOPY VARCHAR2,
1469: X_Kanban_Card_Ids OUT NOCOPY INV_Kanban_PVT.Kanban_Card_Id_Tbl_Type,
1470: P_Pull_Sequence_Rec INV_Kanban_PVT.Pull_Sequence_Rec_Type,
1471: p_Supply_Status NUMBER
1472: )
1473: IS

Line 1470: P_Pull_Sequence_Rec INV_Kanban_PVT.Pull_Sequence_Rec_Type,

1466: --
1467: PROCEDURE Create_Kanban_Cards
1468: ( X_return_status OUT NOCOPY VARCHAR2,
1469: X_Kanban_Card_Ids OUT NOCOPY INV_Kanban_PVT.Kanban_Card_Id_Tbl_Type,
1470: P_Pull_Sequence_Rec INV_Kanban_PVT.Pull_Sequence_Rec_Type,
1471: p_Supply_Status NUMBER
1472: )
1473: IS
1474: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;

Line 1475: l_kanban_Card_tbl INV_Kanban_PVT.Kanban_Card_Id_Tbl_Type;

1471: p_Supply_Status NUMBER
1472: )
1473: IS
1474: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
1475: l_kanban_Card_tbl INV_Kanban_PVT.Kanban_Card_Id_Tbl_Type;
1476: l_Kanban_Card_Id number;
1477: l_Kanban_Card_Number number;
1478: l_supply_status Number;
1479: l_Card_status Number;

Line 1497: l_card_status := INV_Kanban_Pvt.G_Card_Status_Hold;

1493:
1494:
1495:
1496: IF(p_pull_sequence_rec.release_kanban_flag =2) THEN
1497: l_card_status := INV_Kanban_Pvt.G_Card_Status_Hold;
1498: l_supply_status := inv_kanban_pvt.g_supply_status_full;
1499: ELSE
1500: l_card_status := INV_Kanban_Pvt.G_Card_Status_Active;
1501: l_supply_status := p_Supply_Status;

Line 1498: l_supply_status := inv_kanban_pvt.g_supply_status_full;

1494:
1495:
1496: IF(p_pull_sequence_rec.release_kanban_flag =2) THEN
1497: l_card_status := INV_Kanban_Pvt.G_Card_Status_Hold;
1498: l_supply_status := inv_kanban_pvt.g_supply_status_full;
1499: ELSE
1500: l_card_status := INV_Kanban_Pvt.G_Card_Status_Active;
1501: l_supply_status := p_Supply_Status;
1502: END IF ;

Line 1500: l_card_status := INV_Kanban_Pvt.G_Card_Status_Active;

1496: IF(p_pull_sequence_rec.release_kanban_flag =2) THEN
1497: l_card_status := INV_Kanban_Pvt.G_Card_Status_Hold;
1498: l_supply_status := inv_kanban_pvt.g_supply_status_full;
1499: ELSE
1500: l_card_status := INV_Kanban_Pvt.G_Card_Status_Active;
1501: l_supply_status := p_Supply_Status;
1502: END IF ;
1503:
1504: l_Current_Replnsh_Cycle_Id := null;

Line 1547: INV_Kanban_Pvt.g_card_type_nonreplenishable then

1543:
1544: --Existing kanban cards need to be cancelled only when creating a
1545: --regular replenishable card
1546: IF p_pull_sequence_rec.kanban_card_type <>
1547: INV_Kanban_Pvt.g_card_type_nonreplenishable then
1548: -- we should not delete old kanban cards but change their status
1549: -- for historical purposes.
1550: --Delete_Kanban_Cards(p_Pull_Sequence_Rec.Pull_Sequence_Id);
1551: update_kanban_card_status

Line 1574: P_Kanban_Card_Type => Nvl(p_pull_sequence_rec.kanban_card_type,INV_Kanban_Pvt.g_card_type_replenishable),

1570: P_Organization_id => p_Pull_Sequence_Rec.Organization_id,
1571: P_Subinventory_name => p_Pull_Sequence_Rec.Subinventory_name,
1572: P_Supply_Status => l_Supply_Status,
1573: P_Card_Status => l_Card_Status,
1574: P_Kanban_Card_Type => Nvl(p_pull_sequence_rec.kanban_card_type,INV_Kanban_Pvt.g_card_type_replenishable),
1575: P_Source_type => p_Pull_Sequence_Rec.Source_type,
1576: P_Kanban_size => nvl(p_Pull_Sequence_Rec.Kanban_size,0),
1577: P_Last_Update_Date => SYSDATE,
1578: P_Last_Updated_By => FND_GLOBAL.USER_ID,

Line 2843: x_card_supply_status := INV_Kanban_PVT.G_Supply_Status_InProcess;

2839:
2840: p_Kanban_Card_Rec_Tbl(1).wip_line_id := v_wip_line_id;
2841: create_flow_schedule(p_kanban_card_rec_tbl, v_fixed_lead_time,
2842: v_var_lead_time );
2843: x_card_supply_status := INV_Kanban_PVT.G_Supply_Status_InProcess;
2844: elsif (v_cfm_flag = 3) AND (wsmpvers.get_osfm_release_version > '110508')
2845: THEN
2846:
2847: BEGIN

Line 2864: x_card_supply_status := INV_Kanban_PVT.G_Supply_Status_InProcess;

2860: IF l_is_lot_control = 'Y' then
2861:
2862: create_lot_based_job(p_kanban_card_rec_tbl, v_fixed_lead_time,
2863: v_var_lead_time );
2864: x_card_supply_status := INV_Kanban_PVT.G_Supply_Status_InProcess;
2865:
2866: END IF;
2867:
2868: /* Code modification for 2186198 */

Line 2898: x_card_supply_status := INV_Kanban_PVT.G_Supply_Status_InProcess;

2894: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2895: end ;
2896: create_rep_schedule(p_kanban_card_rec_tbl, v_fixed_lead_time,
2897: v_var_lead_time );
2898: x_card_supply_status := INV_Kanban_PVT.G_Supply_Status_InProcess;
2899:
2900: else
2901: Create_Wip_Discrete(p_kanban_card_rec_tbl, v_fixed_lead_time,
2902: v_var_lead_time);

Line 2903: x_card_supply_status := INV_Kanban_PVT.G_Supply_Status_Empty;

2899:
2900: else
2901: Create_Wip_Discrete(p_kanban_card_rec_tbl, v_fixed_lead_time,
2902: v_var_lead_time);
2903: x_card_supply_status := INV_Kanban_PVT.G_Supply_Status_Empty;
2904:
2905: end if;
2906:
2907: ELSE /* wip line id IS not NULL */

Line 2937: x_card_supply_status := INV_Kanban_PVT.G_Supply_Status_InProcess;

2933: IF v_cfm_flag = 1 THEN
2934:
2935: create_flow_schedule(p_kanban_card_rec_tbl, v_fixed_lead_time,
2936: v_var_lead_time );
2937: x_card_supply_status := INV_Kanban_PVT.G_Supply_Status_InProcess;
2938:
2939: elsif (v_cfm_flag = 3) AND (wsmpvers.get_osfm_release_version > '110508') THEN
2940:
2941: BEGIN

Line 2958: x_card_supply_status := INV_Kanban_PVT.G_Supply_Status_InProcess;

2954: IF l_is_lot_control = 'Y' then
2955:
2956: create_lot_based_job(p_kanban_card_rec_tbl, v_fixed_lead_time,
2957: v_var_lead_time );
2958: x_card_supply_status := INV_Kanban_PVT.G_Supply_Status_InProcess;
2959:
2960: END IF;
2961:
2962:

Line 2967: x_card_supply_status := INV_Kanban_PVT.G_Supply_Status_InProcess;

2963: elsif v_rep_flag = 'Y' THEN
2964:
2965: create_rep_schedule(p_kanban_card_rec_tbl, v_fixed_lead_time,
2966: v_var_lead_time );
2967: x_card_supply_status := INV_Kanban_PVT.G_Supply_Status_InProcess;
2968: ELSE
2969:
2970: Create_Wip_Discrete(p_kanban_card_rec_tbl, v_fixed_lead_time,
2971: v_var_lead_time);

Line 2972: x_card_supply_status := INV_Kanban_PVT.G_Supply_Status_Empty;

2968: ELSE
2969:
2970: Create_Wip_Discrete(p_kanban_card_rec_tbl, v_fixed_lead_time,
2971: v_var_lead_time);
2972: x_card_supply_status := INV_Kanban_PVT.G_Supply_Status_Empty;
2973: end if;
2974:
2975: END IF;
2976:

Line 3121: INV_Kanban_PVT.G_Source_Type_InterOrg

3117: and c.exception_set_id = o.CALENDAR_EXCEPTION_SET_ID
3118: and c.calendar_date = trunc(sysdate);
3119: END IF;
3120: if l_kanban_card_Rec_Tbl(1).source_Type =
3121: INV_Kanban_PVT.G_Source_Type_InterOrg
3122: Then
3123:
3124: -- MOAC: Replaced the po_location_associations
3125: -- view with a _ALL table.

Line 3139: INV_Kanban_PVT.G_Source_Type_Supplier

3135: and org.location_id = loc.location_id
3136: and pla.location_id = loc.location_id;
3137:
3138: Elsif l_kanban_card_Rec_Tbl(1).source_Type =
3139: INV_Kanban_PVT.G_Source_Type_Supplier
3140: Then
3141:
3142: l_sql_stmt_no := 40;
3143: select org.location_id

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

3202: -- return ('Unable to generate requisition');
3203: end if;
3204: */
3205:
3206: If l_kanban_card_Rec_Tbl(1).source_type = INV_Kanban_PVT.G_Source_Type_InterOrg
3207: then
3208: l_source_type_code := 'INVENTORY';
3209: l_Requisition_type := 'INTERNAL';
3210: mydebug('create requisition INVENTORY INTERNAL');

Line 3220: x_card_supply_status := INV_Kanban_PVT.G_Supply_Status_Empty;

3216: l_primary_uom_code, l_need_by_date,
3217: l_charge_account_id, l_accrual_account_id,
3218: l_invoice_var_account_id, l_budget_account_id,
3219: l_autosource_flag, l_po_org_id );
3220: x_card_supply_status := INV_Kanban_PVT.G_Supply_Status_Empty;
3221: elsIf l_kanban_card_Rec_Tbl(1).source_type = INV_Kanban_PVT.G_Source_Type_Supplier
3222: Then
3223: l_source_type_code := 'VENDOR';
3224: l_Requisition_type := 'PURCHASE';

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

3217: l_charge_account_id, l_accrual_account_id,
3218: l_invoice_var_account_id, l_budget_account_id,
3219: l_autosource_flag, l_po_org_id );
3220: x_card_supply_status := INV_Kanban_PVT.G_Supply_Status_Empty;
3221: elsIf l_kanban_card_Rec_Tbl(1).source_type = INV_Kanban_PVT.G_Source_Type_Supplier
3222: Then
3223: l_source_type_code := 'VENDOR';
3224: l_Requisition_type := 'PURCHASE';
3225: mydebug('create requisition VENDOR PURCHASE');

Line 3235: x_card_supply_status := INV_Kanban_PVT.G_Supply_Status_Empty;

3231: l_primary_uom_code, l_need_by_date,
3232: l_charge_account_id, l_accrual_account_id,
3233: l_invoice_var_account_id, l_budget_account_id,
3234: l_autosource_flag, l_po_org_id );
3235: x_card_supply_status := INV_Kanban_PVT.G_Supply_Status_Empty;
3236: elsIf l_kanban_card_Rec_Tbl(1).source_type =
3237: INV_Kanban_PVT.G_Source_Type_IntraOrg
3238: Then
3239: l_source_type_code := 'INVENTORY';

Line 3237: INV_Kanban_PVT.G_Source_Type_IntraOrg

3233: l_invoice_var_account_id, l_budget_account_id,
3234: l_autosource_flag, l_po_org_id );
3235: x_card_supply_status := INV_Kanban_PVT.G_Supply_Status_Empty;
3236: elsIf l_kanban_card_Rec_Tbl(1).source_type =
3237: INV_Kanban_PVT.G_Source_Type_IntraOrg
3238: Then
3239: l_source_type_code := 'INVENTORY';
3240: l_Requisition_type := 'TRANSFER';
3241: mydebug('create transfer order INVENTORY TRANSFER');

Line 3243: x_card_supply_status := INV_Kanban_PVT.G_Supply_Status_InProcess;

3239: l_source_type_code := 'INVENTORY';
3240: l_Requisition_type := 'TRANSFER';
3241: mydebug('create transfer order INVENTORY TRANSFER');
3242: Create_Transfer_Order(p_kanban_card_rec_tbl,l_need_by_date,l_Primary_Uom_Code);
3243: x_card_supply_status := INV_Kanban_PVT.G_Supply_Status_InProcess;
3244:
3245: elsIf l_kanban_card_Rec_Tbl(1).source_type =
3246: INV_Kanban_PVT.G_Source_Type_Production
3247: Then

Line 3246: INV_Kanban_PVT.G_Source_Type_Production

3242: Create_Transfer_Order(p_kanban_card_rec_tbl,l_need_by_date,l_Primary_Uom_Code);
3243: x_card_supply_status := INV_Kanban_PVT.G_Supply_Status_InProcess;
3244:
3245: elsIf l_kanban_card_Rec_Tbl(1).source_type =
3246: INV_Kanban_PVT.G_Source_Type_Production
3247: Then
3248: l_source_type_code := 'PRODUCTION';
3249: l_Requisition_type := 'MAKE';
3250: mydebug('create wip job PRODUCTION MAKE ');

Line 3311: P_Kanban_Card_Rec In Out NOCOPY INV_Kanban_PVT.Kanban_Card_Rec_Type)

3307: PROCEDURE Check_And_Create_Replenishment
3308: (x_return_status Out NOCOPY Varchar2,
3309: X_Supply_Status Out NOCOPY Number,
3310: X_Current_Replenish_Cycle_Id Out NOCOPY Number,
3311: P_Kanban_Card_Rec In Out NOCOPY INV_Kanban_PVT.Kanban_Card_Rec_Type)
3312: IS
3313:
3314: l_Pull_Sequence_Rec Mtl_Kanban_Pull_Sequences%RowType;
3315: l_Wait_Kanban_card_Tbl Kanban_Card_Tbl_Type;

Line 3316: l_Kanban_Card_Rec INV_Kanban_PVT.Kanban_Card_Rec_Type;

3312: IS
3313:
3314: l_Pull_Sequence_Rec Mtl_Kanban_Pull_Sequences%RowType;
3315: l_Wait_Kanban_card_Tbl Kanban_Card_Tbl_Type;
3316: l_Kanban_Card_Rec INV_Kanban_PVT.Kanban_Card_Rec_Type;
3317: l_Wait_Kanban_Size Number := 0;
3318: l_Card_Count Number := 0;
3319: l_Order_Count Number := 0;
3320: l_Current_replenish_cycle_Id Number;

Line 3334: -- And Card_Status = INV_Kanban_PVT.G_Card_Status_Active

3330: NULL lot_subinventory_code,NULL lot_location_id,NULL lot_quantity,
3331: NULL replenish_quantity
3332: From Mtl_Kanban_Cards
3333: Where Pull_Sequence_Id = p_Kanban_Card_Rec.Pull_Sequence_Id
3334: -- And Card_Status = INV_Kanban_PVT.G_Card_Status_Active
3335: And Supply_Status = INV_Kanban_PVT.G_Supply_Status_Wait
3336: And Nvl(Supplier_Id,-1) = Nvl(p_Kanban_Card_Rec.Supplier_Id,-1)
3337: And Nvl(Supplier_Site_Id,-1) =
3338: Nvl(p_Kanban_Card_Rec.Supplier_Site_Id,-1)

Line 3335: And Supply_Status = INV_Kanban_PVT.G_Supply_Status_Wait

3331: NULL replenish_quantity
3332: From Mtl_Kanban_Cards
3333: Where Pull_Sequence_Id = p_Kanban_Card_Rec.Pull_Sequence_Id
3334: -- And Card_Status = INV_Kanban_PVT.G_Card_Status_Active
3335: And Supply_Status = INV_Kanban_PVT.G_Supply_Status_Wait
3336: And Nvl(Supplier_Id,-1) = Nvl(p_Kanban_Card_Rec.Supplier_Id,-1)
3337: And Nvl(Supplier_Site_Id,-1) =
3338: Nvl(p_Kanban_Card_Rec.Supplier_Site_Id,-1)
3339: And Nvl(Source_Organization_Id,-1) =

Line 3362: If P_Kanban_Card_rec.Pull_sequence_Id = INV_Kanban_PVT.G_No_Pull_Sequence

3358: l_Order_Count := 1;
3359:
3360: l_Kanban_Card_tbl(l_Order_Count) := p_kanban_card_rec;
3361:
3362: If P_Kanban_Card_rec.Pull_sequence_Id = INV_Kanban_PVT.G_No_Pull_Sequence
3363: OR (P_Kanban_Card_Rec.kanban_card_type = INV_Kanban_PVT.G_Card_Type_NonReplenishable)
3364: Then
3365: l_Current_Replenish_Cycle_Id := Get_Next_Replenish_Cycle_Id;
3366: l_Kanban_Card_tbl(l_Order_Count).current_replnsh_cycle_id :=

Line 3363: OR (P_Kanban_Card_Rec.kanban_card_type = INV_Kanban_PVT.G_Card_Type_NonReplenishable)

3359:
3360: l_Kanban_Card_tbl(l_Order_Count) := p_kanban_card_rec;
3361:
3362: If P_Kanban_Card_rec.Pull_sequence_Id = INV_Kanban_PVT.G_No_Pull_Sequence
3363: OR (P_Kanban_Card_Rec.kanban_card_type = INV_Kanban_PVT.G_Card_Type_NonReplenishable)
3364: Then
3365: l_Current_Replenish_Cycle_Id := Get_Next_Replenish_Cycle_Id;
3366: l_Kanban_Card_tbl(l_Order_Count).current_replnsh_cycle_id :=
3367: l_Current_Replenish_Cycle_Id;

Line 3466: X_Supply_Status := INV_Kanban_PVT.G_Supply_Status_Wait;

3462:
3463: End Loop;
3464: Else
3465:
3466: X_Supply_Status := INV_Kanban_PVT.G_Supply_Status_Wait;
3467: X_Current_Replenish_Cycle_Id := Null;
3468:
3469: End If;
3470: End If;

Line 3507: l_pull_seq_id_tbl INV_kanban_PVT.pull_sequence_id_Tbl_Type;

3503: End Check_And_Create_Replenishment;
3504:
3505: Procedure test IS
3506: i NUMBER := 0;
3507: l_pull_seq_id_tbl INV_kanban_PVT.pull_sequence_id_Tbl_Type;
3508: l_return_status VARCHAR2(1):= FND_API.G_RET_STS_SUCCESS;
3509: l_operation_tbl INV_Kanban_PVT.operation_tbl_type;/*This new local var has been added to
3510: keep in synch with the call to procedure update_pull_sequence_tbl */
3511: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);

Line 3509: l_operation_tbl INV_Kanban_PVT.operation_tbl_type;/*This new local var has been added to

3505: Procedure test IS
3506: i NUMBER := 0;
3507: l_pull_seq_id_tbl INV_kanban_PVT.pull_sequence_id_Tbl_Type;
3508: l_return_status VARCHAR2(1):= FND_API.G_RET_STS_SUCCESS;
3509: l_operation_tbl INV_Kanban_PVT.operation_tbl_type;/*This new local var has been added to
3510: keep in synch with the call to procedure update_pull_sequence_tbl */
3511: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
3512: begin
3513:

Line 3553: l_kanban_card_rec INV_Kanban_PVT.kanban_card_rec_type;

3549: (p_Card_Status IN Number,
3550: p_pull_sequence_id IN Number)
3551:
3552: IS
3553: l_kanban_card_rec INV_Kanban_PVT.kanban_card_rec_type;
3554: CURSOR get_kanban_card_ids IS
3555: SELECT kanban_card_id
3556: FROM mtl_kanban_cards
3557: WHERE pull_sequence_id = p_pull_sequence_id ;

Line 3674: ELSIF l_source_type_id = inv_kanban_pvt.g_source_type_production THEN

3670: --fnd_message.debug('Inside eligible');
3671:
3672: IF wsmpvers.get_osfm_release_version <= '110508' THEN
3673: RETURN 'N';
3674: ELSIF l_source_type_id = inv_kanban_pvt.g_source_type_production THEN
3675: --Source type production
3676: BEGIN
3677: select
3678: Nvl(repetitive_planning_flag,'N'), lot_control_code

Line 3803: IF p_supply_status = INV_Kanban_PVT.G_Supply_Status_Full THEN /*Bug 4490269*/

3799:
3800: p_update := TRUE; -- By Default update the kanban card and kanban card activity
3801:
3802: -- Bug 3987589; Added the AND condition 'AND document_type <> fnd_api.g_miss_num' and the exception block
3803: IF p_supply_status = INV_Kanban_PVT.G_Supply_Status_Full THEN /*Bug 4490269*/
3804:
3805: BEGIN
3806: SELECT document_type
3807: , replenishment_cycle_id

Line 3829: IF (l_doc_type_id IN (inv_kanban_pvt.g_doc_type_release,INV_kanban_PVT.G_Doc_type_PO)) THEN

3825: || l_max_rep_id);
3826:
3827: /* Only if the document type is Blanket Release, then continue */
3828:
3829: IF (l_doc_type_id IN (inv_kanban_pvt.g_doc_type_release,INV_kanban_PVT.G_Doc_type_PO)) THEN
3830: OPEN mtl_kca;
3831:
3832: FETCH mtl_kca
3833: INTO l_rep_cycl_id

Line 3859: END IF; -- if l_doc_type_id = INV_kanban_PVT.G_Doc_type_Release

3855: IF (l_del_qty = 0) THEN
3856: p_update := FALSE;
3857: END IF;
3858: END IF; -- if l_rep_cycl_id IS NOT NULL ....
3859: END IF; -- if l_doc_type_id = INV_kanban_PVT.G_Doc_type_Release
3860:
3861: /*Bug#4490268--If InProcess, then need to check for any pending requsitions/PO/Release*/
3862: ELSIF p_supply_status = INV_Kanban_PVT.G_Supply_Status_InProcess THEN
3863:

Line 3862: ELSIF p_supply_status = INV_Kanban_PVT.G_Supply_Status_InProcess THEN

3858: END IF; -- if l_rep_cycl_id IS NOT NULL ....
3859: END IF; -- if l_doc_type_id = INV_kanban_PVT.G_Doc_type_Release
3860:
3861: /*Bug#4490268--If InProcess, then need to check for any pending requsitions/PO/Release*/
3862: ELSIF p_supply_status = INV_Kanban_PVT.G_Supply_Status_InProcess THEN
3863:
3864: SELECT max(requisition_line_id) into l_max_req
3865: FROM po_requisition_lines
3866: WHERE kanban_card_id = p_kanban_card_id;

Line 3952: inv_pick_wave_pick_confirm_pub.tracelog('In Auto_Allocate_Kanban ...','INV_KANBAN_PVT');

3948:
3949: l_mo_line_rec mo_lines_cur%ROWTYPE;
3950: BEGIN
3951: IF (l_debug = 1 ) THEN
3952: inv_pick_wave_pick_confirm_pub.tracelog('In Auto_Allocate_Kanban ...','INV_KANBAN_PVT');
3953: END IF;
3954:
3955: OPEN mo_lines_cur;
3956:

Line 4002: 'lot_number:' || l_lot_number || ' transaction_temp_id' || l_txn_header_id ,'INV_KANBAN_PVT');

3998: IF (l_debug = 1 ) THEN
3999: inv_pick_wave_pick_confirm_pub.tracelog('In Auto_Allocate_Kanban : the line '||l_mo_line_rec.line_id ||' return status :'||
4000: x_return_status || 'number_of_rows:' || l_number_of_rows ||' detailed_qty:'||l_detailed_quantity ||
4001: ' revision:'||l_revision||' from_locator_id:'||l_from_locator_id||' to_location:'||l_to_locator_id ||
4002: 'lot_number:' || l_lot_number || ' transaction_temp_id' || l_txn_header_id ,'INV_KANBAN_PVT');
4003: END IF;
4004:
4005: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS
4006: OR l_mo_line_rec.quantity <> l_detailed_quantity )

Line 4020: inv_pick_wave_pick_confirm_pub.tracelog('In Auto_Allocate_Kanban : return status :'||x_return_status||' msg:'||x_msg_data,'INV_KANBAN_PVT');

4016: x_return_status := FND_API.G_RET_STS_SUCCESS;
4017: END IF;
4018:
4019: IF (l_debug = 1 ) THEN
4020: inv_pick_wave_pick_confirm_pub.tracelog('In Auto_Allocate_Kanban : return status :'||x_return_status||' msg:'||x_msg_data,'INV_KANBAN_PVT');
4021: END IF;
4022: EXCEPTION
4023: WHEN OTHERS THEN
4024: IF (l_debug = 1 ) THEN

Line 4025: inv_pick_wave_pick_confirm_pub.tracelog('In Auto_Allocate_Kanban : Exception : When Others','INV_KANBAN_PVT');

4021: END IF;
4022: EXCEPTION
4023: WHEN OTHERS THEN
4024: IF (l_debug = 1 ) THEN
4025: inv_pick_wave_pick_confirm_pub.tracelog('In Auto_Allocate_Kanban : Exception : When Others','INV_KANBAN_PVT');
4026: x_return_status := FND_API.G_RET_STS_ERROR;
4027: END IF;
4028: END Auto_Allocate_Kanban;
4029:

Line 4031: END INV_Kanban_PVT;

4027: END IF;
4028: END Auto_Allocate_Kanban;
4029:
4030:
4031: END INV_Kanban_PVT;