DBA Data[Home] [Help]

APPS.FLM_KANBANCARD_PUB dependencies on INV_KANBAN_PVT

Line 122: l_kanban_card_rec inv_kanban_pvt.kanban_card_rec_type;

118: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
119: l_new_card_id number;
120: l_new_card_number number;
121: l_new_replenish_cycle_id Number;
122: l_kanban_card_rec inv_kanban_pvt.kanban_card_rec_type;
123: l_pull_seq_rec INV_Kanban_PVT.Pull_Sequence_Rec_Type;
124:
125: BEGIN
126:

Line 123: l_pull_seq_rec INV_Kanban_PVT.Pull_Sequence_Rec_Type;

119: l_new_card_id number;
120: l_new_card_number number;
121: l_new_replenish_cycle_id Number;
122: l_kanban_card_rec inv_kanban_pvt.kanban_card_rec_type;
123: l_pull_seq_rec INV_Kanban_PVT.Pull_Sequence_Rec_Type;
124:
125: BEGIN
126:
127: if p_kanban_id is null then

Line 300: --l_kanban_card_rec inv_kanban_pvt.kanban_card_rec_type;

296: X_RET_MSG_CODE OUT NOCOPY NUMBER,
297: X_ERR_MSG OUT NOCOPY VARCHAR2)
298: IS
299: l_card_status_to NUMBER;
300: --l_kanban_card_rec inv_kanban_pvt.kanban_card_rec_type;
301: l_new_card_id number;
302: l_new_card_number number;
303: l_new_replenish_cycle_id Number;
304: l_pull_seq_rec INV_Kanban_PVT.Pull_Sequence_Rec_Type;

Line 304: l_pull_seq_rec INV_Kanban_PVT.Pull_Sequence_Rec_Type;

300: --l_kanban_card_rec inv_kanban_pvt.kanban_card_rec_type;
301: l_new_card_id number;
302: l_new_card_number number;
303: l_new_replenish_cycle_id Number;
304: l_pull_seq_rec INV_Kanban_PVT.Pull_Sequence_Rec_Type;
305: l_active_cards_count number;
306: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
307: l_supply_status_to number;
308: l_current_replnsh_cycle_id number;

Line 332: if p_card_status in (INV_Kanban_PVT.G_Card_Status_Hold,

328: X_ERR_MSG := fnd_message.get;
329: X_RETCODE := 'E';
330: return;
331: end if;
332: if p_card_status in (INV_Kanban_PVT.G_Card_Status_Hold,
333: INV_Kanban_PVT.G_Card_Status_Cancel,
334: INV_Kanban_PVT.G_Card_Status_Planned) then
335: -- supply status cannot be modified for cards in active,on-hold,plan cards.
336: fnd_message.set_name('FLM', 'FLM_INV_CARD_STS_FOR_STS_CHG');

Line 333: INV_Kanban_PVT.G_Card_Status_Cancel,

329: X_RETCODE := 'E';
330: return;
331: end if;
332: if p_card_status in (INV_Kanban_PVT.G_Card_Status_Hold,
333: INV_Kanban_PVT.G_Card_Status_Cancel,
334: INV_Kanban_PVT.G_Card_Status_Planned) then
335: -- supply status cannot be modified for cards in active,on-hold,plan cards.
336: fnd_message.set_name('FLM', 'FLM_INV_CARD_STS_FOR_STS_CHG');
337: X_ERR_MSG := fnd_message.get;

Line 334: INV_Kanban_PVT.G_Card_Status_Planned) then

330: return;
331: end if;
332: if p_card_status in (INV_Kanban_PVT.G_Card_Status_Hold,
333: INV_Kanban_PVT.G_Card_Status_Cancel,
334: INV_Kanban_PVT.G_Card_Status_Planned) then
335: -- supply status cannot be modified for cards in active,on-hold,plan cards.
336: fnd_message.set_name('FLM', 'FLM_INV_CARD_STS_FOR_STS_CHG');
337: X_ERR_MSG := fnd_message.get;
338: X_RETCODE := 'E';

Line 349: if trunc(p_supply_status_to) = INV_Kanban_PVT.G_Supply_Status_Empty then

345: X_RETCODE := 'E';
346: return;
347: end if;
348: if validate_supply_status_change(p_kanban_card_id,p_supply_status,p_supply_status_to) = 1 then
349: if trunc(p_supply_status_to) = INV_Kanban_PVT.G_Supply_Status_Empty then
350: if trunc(p_disable_date) <= trunc(sysdate) then
351: -- card is cancelled since it is disabled.
352: fnd_message.set_name('FLM', 'FLM_DISCARD_DISABLE_CARD');
353: X_ERR_MSG := fnd_message.get;

Line 356: l_card_status_to := INV_Kanban_PVT.G_Card_Status_Cancel;

352: fnd_message.set_name('FLM', 'FLM_DISCARD_DISABLE_CARD');
353: X_ERR_MSG := fnd_message.get;
354: X_RETCODE := 'W';
355: X_RET_MSG_CODE := 1;
356: l_card_status_to := INV_Kanban_PVT.G_Card_Status_Cancel;
357: end if;
358: if nvl(p_max_replenishments,nvl(p_replenishment_count,0)+2) <= nvl(p_replenishment_count,0) then
359: -- card is cancelled since it has reached the maximum replenishment counts.
360: fnd_message.set_name('FLM', 'FLM_CANCEL_KAN_MAX_REPLENISH');

Line 364: l_card_status_to := INV_Kanban_PVT.G_Card_Status_Cancel;

360: fnd_message.set_name('FLM', 'FLM_CANCEL_KAN_MAX_REPLENISH');
361: X_ERR_MSG := fnd_message.get;
362: X_RETCODE := 'W';
363: X_RET_MSG_CODE := 1;
364: l_card_status_to := INV_Kanban_PVT.G_Card_Status_Cancel;
365: end if;
366: if p_pull_sequence_id <> INV_Kanban_PVT.G_No_Pull_Sequence then
367: l_pull_seq_rec := INV_PullSequence_PKG.Query_Row (p_pull_sequence_id => p_pull_sequence_id);
368: -- Should exclude NRK's and Temporary cards as well

Line 366: if p_pull_sequence_id <> INV_Kanban_PVT.G_No_Pull_Sequence then

362: X_RETCODE := 'W';
363: X_RET_MSG_CODE := 1;
364: l_card_status_to := INV_Kanban_PVT.G_Card_Status_Cancel;
365: end if;
366: if p_pull_sequence_id <> INV_Kanban_PVT.G_No_Pull_Sequence then
367: l_pull_seq_rec := INV_PullSequence_PKG.Query_Row (p_pull_sequence_id => p_pull_sequence_id);
368: -- Should exclude NRK's and Temporary cards as well
369: -- Should exclude Plan cards as well. Bug 12615793.
370: select count(1)

Line 373: where card_status in (INV_Kanban_PVT.G_Card_Status_Active,INV_Kanban_PVT.G_Card_Status_Hold)

369: -- Should exclude Plan cards as well. Bug 12615793.
370: select count(1)
371: into l_active_cards_count
372: from mtl_kanban_cards
373: where card_status in (INV_Kanban_PVT.G_Card_Status_Active,INV_Kanban_PVT.G_Card_Status_Hold)
374: and pull_sequence_id = p_pull_sequence_id
375: and kanban_card_type = INV_Kanban_Pvt.g_card_type_replenishable
376: and max_replenishments is null
377: and disable_date is null;

Line 375: and kanban_card_type = INV_Kanban_Pvt.g_card_type_replenishable

371: into l_active_cards_count
372: from mtl_kanban_cards
373: where card_status in (INV_Kanban_PVT.G_Card_Status_Active,INV_Kanban_PVT.G_Card_Status_Hold)
374: and pull_sequence_id = p_pull_sequence_id
375: and kanban_card_type = INV_Kanban_Pvt.g_card_type_replenishable
376: and max_replenishments is null
377: and disable_date is null;
378: -- Add Null Check for Bug 12615793.
379: if l_pull_seq_rec.planning_effectivity is null or

Line 385: nvl(p_kanban_card_type,INV_Kanban_Pvt.g_card_type_replenishable) = INV_Kanban_Pvt.g_card_type_replenishable then

381: -- Add additional code here if some additional logic is required for multiple suppliers..
382: if l_active_cards_count > nvl(l_pull_seq_rec.number_of_cards,0) and
383: p_max_replenishments is null and
384: p_disable_date is null and
385: nvl(p_kanban_card_type,INV_Kanban_Pvt.g_card_type_replenishable) = INV_Kanban_Pvt.g_card_type_replenishable then
386: l_card_status_to := INV_Kanban_PVT.G_Card_Status_Cancel;
387: -- card is cancelled since the pull sequence definition requires less no. of cards than what is required.
388: fnd_message.set_name('FLM', 'FLM_CANCEL_EXCEED_CARDS');
389: X_ERR_MSG := fnd_message.get;

Line 386: l_card_status_to := INV_Kanban_PVT.G_Card_Status_Cancel;

382: if l_active_cards_count > nvl(l_pull_seq_rec.number_of_cards,0) and
383: p_max_replenishments is null and
384: p_disable_date is null and
385: nvl(p_kanban_card_type,INV_Kanban_Pvt.g_card_type_replenishable) = INV_Kanban_Pvt.g_card_type_replenishable then
386: l_card_status_to := INV_Kanban_PVT.G_Card_Status_Cancel;
387: -- card is cancelled since the pull sequence definition requires less no. of cards than what is required.
388: fnd_message.set_name('FLM', 'FLM_CANCEL_EXCEED_CARDS');
389: X_ERR_MSG := fnd_message.get;
390: X_RETCODE := 'W';

Line 398: nvl(p_kanban_card_type,INV_Kanban_Pvt.g_card_type_replenishable) = INV_Kanban_Pvt.g_card_type_replenishable then

394: else
395: if l_active_cards_count > nvl(l_pull_seq_rec.future_no_of_cards,0) and
396: p_max_replenishments is null and
397: p_disable_date is null and
398: nvl(p_kanban_card_type,INV_Kanban_Pvt.g_card_type_replenishable) = INV_Kanban_Pvt.g_card_type_replenishable then
399: l_card_status_to := INV_Kanban_PVT.G_Card_Status_Cancel;
400: -- card is cancelled since the pull sequence definition requires less no. of cards than what is required.
401: fnd_message.set_name('FLM', 'FLM_CANCEL_EXCEED_CARDS');
402: X_ERR_MSG := fnd_message.get;

Line 399: l_card_status_to := INV_Kanban_PVT.G_Card_Status_Cancel;

395: if l_active_cards_count > nvl(l_pull_seq_rec.future_no_of_cards,0) and
396: p_max_replenishments is null and
397: p_disable_date is null and
398: nvl(p_kanban_card_type,INV_Kanban_Pvt.g_card_type_replenishable) = INV_Kanban_Pvt.g_card_type_replenishable then
399: l_card_status_to := INV_Kanban_PVT.G_Card_Status_Cancel;
400: -- card is cancelled since the pull sequence definition requires less no. of cards than what is required.
401: fnd_message.set_name('FLM', 'FLM_CANCEL_EXCEED_CARDS');
402: X_ERR_MSG := fnd_message.get;
403: X_RETCODE := 'W';

Line 414: if p_source_type = INV_Kanban_PVT.G_Source_Type_Supplier then

410: future_no_of_cards = null,
411: future_card_size = null,
412: planning_effectivity = null
413: where pull_sequence_id = p_pull_sequence_id;
414: if p_source_type = INV_Kanban_PVT.G_Source_Type_Supplier then
415: FLM_MULTIPLE_SUPPLIERS.multiple_supplier_kanban_cards( p_pull_seq_id =>l_pull_seq_rec.Pull_Sequence_Id,
416: x_retcode =>l_return_status ,
417: x_err_msg => X_ERR_MSG);
418: end if;

Line 424: ( p_source_type = INV_Kanban_PVT.G_Source_Type_Production and

420: l_new_card_size := nvl(l_pull_seq_rec.future_card_size,0);
421: end if;
422: if ( p_kanban_size <> l_new_card_size or
423: p_source_type <> l_pull_seq_rec.Source_type or
424: ( p_source_type = INV_Kanban_PVT.G_Source_Type_Production and
425: nvl(p_wip_line_id,-1) <> nvl(l_pull_seq_rec.wip_line_id,-1)
426: ) or
427: ( p_source_type = INV_Kanban_PVT.G_Source_Type_IntraOrg and
428: ( nvl(p_source_subinventory,'~~') <> nvl(l_pull_seq_rec.Source_Subinventory,'~~') or

Line 427: ( p_source_type = INV_Kanban_PVT.G_Source_Type_IntraOrg and

423: p_source_type <> l_pull_seq_rec.Source_type or
424: ( p_source_type = INV_Kanban_PVT.G_Source_Type_Production and
425: nvl(p_wip_line_id,-1) <> nvl(l_pull_seq_rec.wip_line_id,-1)
426: ) or
427: ( p_source_type = INV_Kanban_PVT.G_Source_Type_IntraOrg and
428: ( nvl(p_source_subinventory,'~~') <> nvl(l_pull_seq_rec.Source_Subinventory,'~~') or
429: nvl(p_source_locator_id,-1) <> nvl(l_pull_seq_rec.Source_Locator_id,-1)
430: )
431: ) or

Line 432: ( p_source_type = INV_Kanban_PVT.G_Source_Type_InterOrg and

428: ( nvl(p_source_subinventory,'~~') <> nvl(l_pull_seq_rec.Source_Subinventory,'~~') or
429: nvl(p_source_locator_id,-1) <> nvl(l_pull_seq_rec.Source_Locator_id,-1)
430: )
431: ) or
432: ( p_source_type = INV_Kanban_PVT.G_Source_Type_InterOrg and
433: ( nvl(p_source_organization_id,-1) <> nvl(l_pull_seq_rec.Source_Organization_id,-1) or
434: nvl(p_source_subinventory,'~~') <> nvl(l_pull_seq_rec.Source_Subinventory,'~~') or
435: nvl(p_source_locator_id,-1) <> nvl(l_pull_seq_rec.Source_Locator_id,-1)
436: )

Line 438: ( p_source_type = INV_Kanban_PVT.G_Source_Type_Supplier and

434: nvl(p_source_subinventory,'~~') <> nvl(l_pull_seq_rec.Source_Subinventory,'~~') or
435: nvl(p_source_locator_id,-1) <> nvl(l_pull_seq_rec.Source_Locator_id,-1)
436: )
437: ) or
438: ( p_source_type = INV_Kanban_PVT.G_Source_Type_Supplier and
439: replace_supplier_cards(p_kanban_card_id,p_pull_sequence_id,p_supplier_id,p_supplier_site_id) = 1
440: )
441: ) and
442: l_card_status_to <> INV_Kanban_PVT.G_Card_Status_Cancel then

Line 442: l_card_status_to <> INV_Kanban_PVT.G_Card_Status_Cancel then

438: ( p_source_type = INV_Kanban_PVT.G_Source_Type_Supplier and
439: replace_supplier_cards(p_kanban_card_id,p_pull_sequence_id,p_supplier_id,p_supplier_site_id) = 1
440: )
441: ) and
442: l_card_status_to <> INV_Kanban_PVT.G_Card_Status_Cancel then
443: l_supply_status_to := INV_Kanban_PVT.G_Supply_Status_Empty;
444: if nvl(p_verify,'N') = 'N' then
445: if p_source_type = INV_Kanban_PVT.G_Source_Type_Supplier then
446:

Line 443: l_supply_status_to := INV_Kanban_PVT.G_Supply_Status_Empty;

439: replace_supplier_cards(p_kanban_card_id,p_pull_sequence_id,p_supplier_id,p_supplier_site_id) = 1
440: )
441: ) and
442: l_card_status_to <> INV_Kanban_PVT.G_Card_Status_Cancel then
443: l_supply_status_to := INV_Kanban_PVT.G_Supply_Status_Empty;
444: if nvl(p_verify,'N') = 'N' then
445: if p_source_type = INV_Kanban_PVT.G_Source_Type_Supplier then
446:
447: FLM_MULTIPLE_SUPPLIERS.GET_SUPPLIER(p_pull_seq_id => l_pull_seq_rec.Pull_Sequence_Id,

Line 445: if p_source_type = INV_Kanban_PVT.G_Source_Type_Supplier then

441: ) and
442: l_card_status_to <> INV_Kanban_PVT.G_Card_Status_Cancel then
443: l_supply_status_to := INV_Kanban_PVT.G_Supply_Status_Empty;
444: if nvl(p_verify,'N') = 'N' then
445: if p_source_type = INV_Kanban_PVT.G_Source_Type_Supplier then
446:
447: FLM_MULTIPLE_SUPPLIERS.GET_SUPPLIER(p_pull_seq_id => l_pull_seq_rec.Pull_Sequence_Id,
448: P_ORG_ID => L_PULL_SEQ_REC.ORGANIZATION_ID,
449: p_cardstatus => l_card_status_to,

Line 470: , p_kanban_card_type => Nvl(l_pull_seq_rec.kanban_card_type,INV_Kanban_Pvt.g_card_type_replenishable)

466: , p_organization_id => l_pull_seq_rec.Organization_id
467: , p_subinventory_name => l_pull_seq_rec.Subinventory_name
468: , p_supply_status => l_supply_status_to
469: , p_card_status => l_card_status_to
470: , p_kanban_card_type => Nvl(l_pull_seq_rec.kanban_card_type,INV_Kanban_Pvt.g_card_type_replenishable)
471: , p_source_type => l_pull_seq_rec.Source_type
472: , p_kanban_size => nvl(l_new_card_size,0)
473: , p_last_update_date => SYSDATE
474: , p_last_updated_by => FND_GLOBAL.USER_ID

Line 517: l_card_status_to := INV_Kanban_PVT.G_Card_Status_Cancel;

513: , p_max_replenishments => p_max_replenishments
514: , p_disable_date => p_disable_date
515: , p_replacement_flag => NULL );
516: end if;
517: l_card_status_to := INV_Kanban_PVT.G_Card_Status_Cancel;
518: -- current card is cancelled and it's replaced with new card with number and number.
519: fnd_message.set_name('FLM', 'FLM_REPLACE_KANBAN_CARD');
520: fnd_message.set_token('NUMBER',l_new_card_number);
521: X_ERR_MSG := fnd_message.get;

Line 532: if l_card_status_to <> INV_Kanban_PVT.G_Card_Status_Cancel and

528: X_RETCODE := 'E';
529: return;
530: end if;
531: else
532: if l_card_status_to <> INV_Kanban_PVT.G_Card_Status_Cancel and
533: nvl(p_verify,'N') = 'N' then
534: inv_kanbancard_pkg.update_row(x_return_status => l_return_status
535: , p_kanban_card_id => p_kanban_card_id
536: , p_kanban_card_number => p_kanban_card_number

Line 668: elsif p_supply_status_to = INV_Kanban_PVT.G_Supply_Status_Consolidate then

664: X_RETCODE := 'S';
665: end if;
666: end if;
667: -- Cannot Manually change status to consolidate.
668: elsif p_supply_status_to = INV_Kanban_PVT.G_Supply_Status_Consolidate then
669: -- Cannot Manually change status to consolidate.
670: fnd_message.set_name('FLM', 'FLM_NO_CONS_STATUS_CHANGE');
671: X_ERR_MSG := fnd_message.get;
672: X_RETCODE := 'E';

Line 760: if p_card_status = INV_Kanban_PVT.G_Card_Status_Cancel then

756: return;
757: end if;
758: end if;
759: if p_card_status <> nvl(l_card_status_to,p_card_status) then
760: if p_card_status = INV_Kanban_PVT.G_Card_Status_Cancel then
761: -- Card status cannot be updated for cancelled card.
762: fnd_message.set_name('FLM', 'FLM_NO_STS_CHG_CANCEL_CARD');
763: X_ERR_MSG := fnd_message.get;
764: X_RETCODE := 'E';

Line 767: if l_card_status_to = INV_Kanban_PVT.G_Card_Status_Planned then

763: X_ERR_MSG := fnd_message.get;
764: X_RETCODE := 'E';
765: return;
766: end if;
767: if l_card_status_to = INV_Kanban_PVT.G_Card_Status_Planned then
768: -- Card status cannot be updated to planned once it's released.
769: fnd_message.set_name('FLM', 'FLM_NO_STS_CHG_PLAN_CARD');
770: X_ERR_MSG := fnd_message.get;
771: X_RETCODE := 'E';

Line 774: if l_card_status_to not in (INV_Kanban_PVT.G_Card_Status_Hold,

770: X_ERR_MSG := fnd_message.get;
771: X_RETCODE := 'E';
772: return;
773: end if;
774: if l_card_status_to not in (INV_Kanban_PVT.G_Card_Status_Hold,
775: INV_Kanban_PVT.G_Card_Status_Cancel,
776: INV_Kanban_PVT.G_Card_Status_Planned,
777: INV_Kanban_PVT.G_Card_Status_Active) then
778: -- Invalid Card Status.

Line 775: INV_Kanban_PVT.G_Card_Status_Cancel,

771: X_RETCODE := 'E';
772: return;
773: end if;
774: if l_card_status_to not in (INV_Kanban_PVT.G_Card_Status_Hold,
775: INV_Kanban_PVT.G_Card_Status_Cancel,
776: INV_Kanban_PVT.G_Card_Status_Planned,
777: INV_Kanban_PVT.G_Card_Status_Active) then
778: -- Invalid Card Status.
779: fnd_message.set_name('FLM', 'FLM_INVALID_CARD_STATUS');

Line 776: INV_Kanban_PVT.G_Card_Status_Planned,

772: return;
773: end if;
774: if l_card_status_to not in (INV_Kanban_PVT.G_Card_Status_Hold,
775: INV_Kanban_PVT.G_Card_Status_Cancel,
776: INV_Kanban_PVT.G_Card_Status_Planned,
777: INV_Kanban_PVT.G_Card_Status_Active) then
778: -- Invalid Card Status.
779: fnd_message.set_name('FLM', 'FLM_INVALID_CARD_STATUS');
780: X_ERR_MSG := fnd_message.get;

Line 777: INV_Kanban_PVT.G_Card_Status_Active) then

773: end if;
774: if l_card_status_to not in (INV_Kanban_PVT.G_Card_Status_Hold,
775: INV_Kanban_PVT.G_Card_Status_Cancel,
776: INV_Kanban_PVT.G_Card_Status_Planned,
777: INV_Kanban_PVT.G_Card_Status_Active) then
778: -- Invalid Card Status.
779: fnd_message.set_name('FLM', 'FLM_INVALID_CARD_STATUS');
780: X_ERR_MSG := fnd_message.get;
781: X_RETCODE := 'E';

Line 972: l_kanban_card_rec inv_kanban_pvt.kanban_card_rec_type;

968: l_kanban_size NUMBER;
969: l_replenish_quantity NUMBER;
970: l_total_received_quantity NUMBER;
971: l_transaction_source_type_id NUMBER;
972: l_kanban_card_rec inv_kanban_pvt.kanban_card_rec_type;
973: l_intransit_type NUMBER;
974:
975: Begin
976: X_RETCODE := FND_API.G_RET_STS_SUCCESS;

Line 993: if (trunc(l_kanban_card_rec.supply_status) = INV_KANBAN_PVT.G_Supply_Status_Full or l_replenish_quantity < 0) then

989: mydebug('In change_card_status_full: kanban card id='||p_Kanban_Card_Id||', replenish_quantity='||l_replenish_quantity);
990: l_kanban_card_rec := inv_kanbancard_pkg.query_row(p_Kanban_Card_Id => p_Kanban_Card_Id);
991:
992: -- if kanban card supply status is already full and receiving more qty or doing a return then return a message no status change
993: if (trunc(l_kanban_card_rec.supply_status) = INV_KANBAN_PVT.G_Supply_Status_Full or l_replenish_quantity < 0) then
994: fnd_message.set_name('FLM', 'FLM_KBN_CARD_STATUS_NOCHANGE');
995: X_ERR_MSG := fnd_message.get;
996: X_RETCODE := 'S';
997: mydebug('X_RETCODE='||X_RETCODE||', X_ERR_MSG='||X_ERR_MSG);

Line 1009: if l_source_type = INV_Kanban_PVT.G_Source_Type_InterOrg then

1005: l_kanban_size := l_kanban_card_rec.kanban_size;
1006: mydebug('Kanban card size='||l_kanban_size);
1007:
1008: -- get the receiving tolerance value and set transaction source type based on kanban source type
1009: if l_source_type = INV_Kanban_PVT.G_Source_Type_InterOrg then
1010: mydebug('Kanban card source type= Inter Org');
1011: l_rcv_tolerance := flm_kanban_config_params.get_kanban_tol_fs_inter(l_kanban_card_rec.organization_id);
1012: l_transaction_source_type_id := INV_GLOBALS.G_SOURCETYPE_INTREQ; --7
1013: elsif l_source_type = INV_Kanban_PVT.G_Source_Type_Supplier then

Line 1013: elsif l_source_type = INV_Kanban_PVT.G_Source_Type_Supplier then

1009: if l_source_type = INV_Kanban_PVT.G_Source_Type_InterOrg then
1010: mydebug('Kanban card source type= Inter Org');
1011: l_rcv_tolerance := flm_kanban_config_params.get_kanban_tol_fs_inter(l_kanban_card_rec.organization_id);
1012: l_transaction_source_type_id := INV_GLOBALS.G_SOURCETYPE_INTREQ; --7
1013: elsif l_source_type = INV_Kanban_PVT.G_Source_Type_Supplier then
1014: mydebug('Kanban card source type= Supplier');
1015: l_rcv_tolerance := flm_kanban_config_params.get_kanban_tol_fs_supplier(l_kanban_card_rec.organization_id);
1016: l_transaction_source_type_id := INV_GLOBALS.G_SOURCETYPE_PURCHASEORDER; --1
1017: elsif l_source_type = INV_Kanban_PVT.G_Source_Type_IntraOrg then

Line 1017: elsif l_source_type = INV_Kanban_PVT.G_Source_Type_IntraOrg then

1013: elsif l_source_type = INV_Kanban_PVT.G_Source_Type_Supplier then
1014: mydebug('Kanban card source type= Supplier');
1015: l_rcv_tolerance := flm_kanban_config_params.get_kanban_tol_fs_supplier(l_kanban_card_rec.organization_id);
1016: l_transaction_source_type_id := INV_GLOBALS.G_SOURCETYPE_PURCHASEORDER; --1
1017: elsif l_source_type = INV_Kanban_PVT.G_Source_Type_IntraOrg then
1018: mydebug('Kanban card source type= Intra Org');
1019: l_rcv_tolerance := flm_kanban_config_params.get_kanban_tol_fs_intra(l_kanban_card_rec.organization_id);
1020: l_transaction_source_type_id := INV_GLOBALS.G_SOURCETYPE_MOVEORDER; --4
1021: elsif l_source_type = INV_Kanban_PVT.G_Source_Type_Production then

Line 1021: elsif l_source_type = INV_Kanban_PVT.G_Source_Type_Production then

1017: elsif l_source_type = INV_Kanban_PVT.G_Source_Type_IntraOrg then
1018: mydebug('Kanban card source type= Intra Org');
1019: l_rcv_tolerance := flm_kanban_config_params.get_kanban_tol_fs_intra(l_kanban_card_rec.organization_id);
1020: l_transaction_source_type_id := INV_GLOBALS.G_SOURCETYPE_MOVEORDER; --4
1021: elsif l_source_type = INV_Kanban_PVT.G_Source_Type_Production then
1022: mydebug('Kanban card source type= Production');
1023: l_rcv_tolerance := flm_kanban_config_params.get_kanban_tol_fs_prod(l_kanban_card_rec.organization_id);
1024: l_transaction_source_type_id := INV_GLOBALS.G_SOURCETYPE_WIP; --5
1025: end if;

Line 1031: if l_source_type = INV_Kanban_PVT.G_Source_Type_Supplier then

1027: mydebug('receiving_tolerance='||l_rcv_tolerance);
1028:
1029: -- get the total replenish qty into l_total_received_quantity
1030: -- for supplier kanban, get the qty(quantity_delivered) from po_distributions_all table.
1031: if l_source_type = INV_Kanban_PVT.G_Source_Type_Supplier then
1032:
1033: SELECT Nvl(pda.quantity_delivered,0)
1034: INTO l_total_received_quantity
1035: FROM mtl_kanban_card_activity mkca,

Line 1048: elsif l_source_type = INV_Kanban_PVT.G_Source_Type_IntraOrg then

1044: AND mkca.replenishment_cycle_id = mkc.current_replnsh_cycle_id
1045: AND mkca.kanban_card_id = mkc.kanban_card_id
1046: AND mkc.kanban_card_id = pda.kanban_card_id;
1047:
1048: elsif l_source_type = INV_Kanban_PVT.G_Source_Type_IntraOrg then
1049:
1050: -- In this SQL locator is not added. If needed we can also add it.
1051: select nvl(sum(qty),0)
1052: into l_total_received_quantity

Line 1070: elsif l_source_type = INV_Kanban_PVT.G_Source_Type_InterOrg then

1066: AND mkc.kanban_card_id = mkca.kanban_card_id
1067: AND mkc.current_replnsh_cycle_id = mkca.replenishment_cycle_id
1068: );
1069:
1070: elsif l_source_type = INV_Kanban_PVT.G_Source_Type_InterOrg then
1071:
1072: SELECT intransit_type into l_intransit_type
1073: FROM MTL_INTERORG_PARAMETERS
1074: WHERE from_organization_id = l_kanban_card_rec.source_organization_id

Line 1155: P_SUPPLY_STATUS_TO => INV_KANBAN_PVT.G_Supply_Status_Full,

1151: mydebug('kanban card has received qty upto its tolerance level');
1152: if (p_validate_only = FND_API.G_FALSE) then
1153: mydebug('Calling update_card_status api');
1154: UPDATE_CARD_STATUS( P_KANBAN_ID => p_Kanban_Card_Id,
1155: P_SUPPLY_STATUS_TO => INV_KANBAN_PVT.G_Supply_Status_Full,
1156: P_CARD_STATUS_TO => l_kanban_card_rec.card_status,
1157: X_RETCODE => X_RETCODE,
1158: X_RET_MSG_CODE => X_RET_MSG_CODE,
1159: X_ERR_MSG => X_ERR_MSG);