DBA Data[Home] [Help]

APPS.WIP_WS_SHORTAGE dependencies on WIP_WS_SHORTAGE

Line 1: PACKAGE BODY WIP_WS_SHORTAGE AS

1: PACKAGE BODY WIP_WS_SHORTAGE AS
2: /* $Header: wipwsshb.pls 120.18.12020000.3 2012/11/05 21:43:18 dalu ship $ */
3:
4:
5:

Line 58: wip_logger.entryPoint(p_procName => 'WIP_WS_SHORTAGE.get_org_comp_calc_param',

54: x_pref_exists := 'Y';
55: if (g_logLevel <= wip_constants.trace_logging) then
56: l_params(1).paramName := 'p_org_id';
57: l_params(1).paramValue := p_org_id;
58: wip_logger.entryPoint(p_procName => 'WIP_WS_SHORTAGE.get_org_comp_calc_param',
59: p_params => l_params,
60: x_returnStatus => l_returnStatus);
61: if(l_returnStatus <> fnd_api.g_ret_sts_success) then
62: raise fnd_api.g_exc_unexpected_error;

Line 124: wip_logger.exitPoint(p_procName => 'WIP_WS_SHORTAGE.get_org_comp_calc_param',

120: g_org_comp_calc_rec.inc_unreleased_jobs := 1;
121: g_org_comp_calc_rec.inc_onhold_jobs := 2;
122: */
123: if (g_logLevel <= wip_constants.trace_logging) then
124: wip_logger.exitPoint(p_procName => 'WIP_WS_SHORTAGE.get_org_comp_calc_param',
125: p_procReturnStatus => l_returnStatus,
126: p_msg => 'Request processed successfully!',
127: x_returnStatus => l_returnStatus);
128: end if;

Line 133: wip_logger.exitPoint(p_procName => 'WIP_WS_SHORTAGE.get_org_comp_calc_param',

129:
130: EXCEPTION
131: WHEN OTHERS THEN
132: if (g_logLevel <= wip_constants.trace_logging) then
133: wip_logger.exitPoint(p_procName => 'WIP_WS_SHORTAGE.get_org_comp_calc_param',
134: p_procReturnStatus => l_returnStatus,
135: p_msg => 'unexpected error: ' || SQLERRM,
136: x_returnStatus => l_returnStatus);
137: end if;

Line 515: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: Entered' );

511: l_temp_where VARCHAR2(4000);
512: l_all_clause VARCHAR2(240);
513:
514: BEGIN
515: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: Entered' );
516: l_job_status_clause := ' and wdj.status_type in ('|| get_pref_job_statuses() || ')';
517: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: l_job_status_clause='||l_job_status_clause );
518: l_job_type_clause := ' and wdj.job_type in ('||get_job_types() || ')';
519: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: l_job_type_clause='||l_job_type_clause );

Line 517: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: l_job_status_clause='||l_job_status_clause );

513:
514: BEGIN
515: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: Entered' );
516: l_job_status_clause := ' and wdj.status_type in ('|| get_pref_job_statuses() || ')';
517: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: l_job_status_clause='||l_job_status_clause );
518: l_job_type_clause := ' and wdj.job_type in ('||get_job_types() || ')';
519: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: l_job_type_clause='||l_job_type_clause );
520:
521: l_sql := l_sql || 'select distinct wro.inventory_item_id, ';

Line 519: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: l_job_type_clause='||l_job_type_clause );

515: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: Entered' );
516: l_job_status_clause := ' and wdj.status_type in ('|| get_pref_job_statuses() || ')';
517: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: l_job_status_clause='||l_job_status_clause );
518: l_job_type_clause := ' and wdj.job_type in ('||get_job_types() || ')';
519: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: l_job_type_clause='||l_job_type_clause );
520:
521: l_sql := l_sql || 'select distinct wro.inventory_item_id, ';
522: l_sql := l_sql || ' decode(wro.supply_subinventory, null, ';
523: l_sql := l_sql || ' (decode(msi.wip_supply_subinventory, null, wp.default_pull_supply_subinv, msi.wip_supply_subinventory)),';

Line 646: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: l_sql='||l_sql );

642: l_sql := l_sql || l_temp_where;
643:
644: l_sql := l_sql || ' order by inventory_item_id ';
645:
646: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: l_sql='||l_sql );
647:
648: l_cursor := dbms_sql.open_cursor;
649: dbms_sql.parse(l_cursor, l_sql, dbms_sql.native);
650: dbms_sql.define_column(l_cursor, 1, l_inv_item_id);

Line 687: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: component='||l_inv_item_id||', subinv_code='||l_subinv_code );

683: LOOP
684: EXIT WHEN DBMS_SQL.FETCH_ROWS (l_cursor) = 0;
685: dbms_sql.column_value(l_cursor, 1, l_inv_item_id);
686: dbms_sql.column_value(l_cursor, 2, l_subinv_code);
687: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: component='||l_inv_item_id||', subinv_code='||l_subinv_code );
688: if(l_inv_item_id <> l_old_inv_item_id) then
689: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: calling orgonhand for component='||l_inv_item_id );
690: l_comp_avail := get_org_component_onhand(p_org_id, l_inv_item_id);
691: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: back from orgcomponent onhand, component ='||l_inv_item_id||', onhand='||l_comp_avail );

Line 689: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: calling orgonhand for component='||l_inv_item_id );

685: dbms_sql.column_value(l_cursor, 1, l_inv_item_id);
686: dbms_sql.column_value(l_cursor, 2, l_subinv_code);
687: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: component='||l_inv_item_id||', subinv_code='||l_subinv_code );
688: if(l_inv_item_id <> l_old_inv_item_id) then
689: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: calling orgonhand for component='||l_inv_item_id );
690: l_comp_avail := get_org_component_onhand(p_org_id, l_inv_item_id);
691: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: back from orgcomponent onhand, component ='||l_inv_item_id||', onhand='||l_comp_avail );
692: insert_critical_component(p_org_id, l_inv_item_id, null, null, l_comp_avail);
693: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: back from insert_critical_component, org='||p_org_id||', item ='||l_inv_item_id||', onhand='||l_comp_avail );

Line 691: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: back from orgcomponent onhand, component ='||l_inv_item_id||', onhand='||l_comp_avail );

687: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: component='||l_inv_item_id||', subinv_code='||l_subinv_code );
688: if(l_inv_item_id <> l_old_inv_item_id) then
689: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: calling orgonhand for component='||l_inv_item_id );
690: l_comp_avail := get_org_component_onhand(p_org_id, l_inv_item_id);
691: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: back from orgcomponent onhand, component ='||l_inv_item_id||', onhand='||l_comp_avail );
692: insert_critical_component(p_org_id, l_inv_item_id, null, null, l_comp_avail);
693: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: back from insert_critical_component, org='||p_org_id||', item ='||l_inv_item_id||', onhand='||l_comp_avail );
694: end if;
695:

Line 693: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: back from insert_critical_component, org='||p_org_id||', item ='||l_inv_item_id||', onhand='||l_comp_avail );

689: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: calling orgonhand for component='||l_inv_item_id );
690: l_comp_avail := get_org_component_onhand(p_org_id, l_inv_item_id);
691: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: back from orgcomponent onhand, component ='||l_inv_item_id||', onhand='||l_comp_avail );
692: insert_critical_component(p_org_id, l_inv_item_id, null, null, l_comp_avail);
693: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: back from insert_critical_component, org='||p_org_id||', item ='||l_inv_item_id||', onhand='||l_comp_avail );
694: end if;
695:
696: if(g_org_comp_calc_rec.shortage_calc_level = 2) then
697: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: shortage calc=subinv, calling subinv onhand, org='||p_org_id||', item ='||l_inv_item_id||', subinv='||l_subinv_code);

Line 697: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: shortage calc=subinv, calling subinv onhand, org='||p_org_id||', item ='||l_inv_item_id||', subinv='||l_subinv_code);

693: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: back from insert_critical_component, org='||p_org_id||', item ='||l_inv_item_id||', onhand='||l_comp_avail );
694: end if;
695:
696: if(g_org_comp_calc_rec.shortage_calc_level = 2) then
697: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: shortage calc=subinv, calling subinv onhand, org='||p_org_id||', item ='||l_inv_item_id||', subinv='||l_subinv_code);
698: l_comp_avail := get_subinv_component_onhand(p_org_id, l_subinv_code, l_inv_item_id);
699: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: shortage calc=subinv, back from subinv onhand, org='||p_org_id||', item ='||l_inv_item_id||', subinv='||l_subinv_code||', subinv onhand='||l_comp_avail);
700: insert_critical_component(p_org_id, l_inv_item_id, l_subinv_code, null, l_comp_avail);
701: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: shortage calc=subinv, back from insert_critical_component, org='||p_org_id||', item ='||l_inv_item_id);

Line 699: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: shortage calc=subinv, back from subinv onhand, org='||p_org_id||', item ='||l_inv_item_id||', subinv='||l_subinv_code||', subinv onhand='||l_comp_avail);

695:
696: if(g_org_comp_calc_rec.shortage_calc_level = 2) then
697: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: shortage calc=subinv, calling subinv onhand, org='||p_org_id||', item ='||l_inv_item_id||', subinv='||l_subinv_code);
698: l_comp_avail := get_subinv_component_onhand(p_org_id, l_subinv_code, l_inv_item_id);
699: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: shortage calc=subinv, back from subinv onhand, org='||p_org_id||', item ='||l_inv_item_id||', subinv='||l_subinv_code||', subinv onhand='||l_comp_avail);
700: insert_critical_component(p_org_id, l_inv_item_id, l_subinv_code, null, l_comp_avail);
701: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: shortage calc=subinv, back from insert_critical_component, org='||p_org_id||', item ='||l_inv_item_id);
702: end if;
703: l_old_inv_item_id := l_inv_item_id;

Line 701: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: shortage calc=subinv, back from insert_critical_component, org='||p_org_id||', item ='||l_inv_item_id);

697: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: shortage calc=subinv, calling subinv onhand, org='||p_org_id||', item ='||l_inv_item_id||', subinv='||l_subinv_code);
698: l_comp_avail := get_subinv_component_onhand(p_org_id, l_subinv_code, l_inv_item_id);
699: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: shortage calc=subinv, back from subinv onhand, org='||p_org_id||', item ='||l_inv_item_id||', subinv='||l_subinv_code||', subinv onhand='||l_comp_avail);
700: insert_critical_component(p_org_id, l_inv_item_id, l_subinv_code, null, l_comp_avail);
701: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_pref_critical_components: shortage calc=subinv, back from insert_critical_component, org='||p_org_id||', item ='||l_inv_item_id);
702: end if;
703: l_old_inv_item_id := l_inv_item_id;
704: END LOOP;
705: dbms_sql.close_cursor(l_cursor);

Line 738: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_ops:Entered');

734: l_return_status VARCHAR2(1);
735: l_return_code NUMBER;
736: i NUMBER;
737: BEGIN
738: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_ops:Entered');
739: l_job_status_clause := 'and wdj.status_type in ('|| get_pref_job_statuses() || ')';
740: l_job_type_clause := 'and wdj.job_type in ('||get_job_types() || ')';
741:
742: l_sql := l_sql || 'SELECT wo.organization_id, ';

Line 764: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_ops:l_sql='||l_sql);

760: l_sql := l_sql || 'ORDER BY wo.first_unit_start_date, ';
761: l_sql := l_sql || ' wdj.scheduled_start_date, ';
762: l_sql := l_sql || ' wo.operation_seq_num ';
763:
764: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_ops:l_sql='||l_sql);
765:
766: l_cursor := dbms_sql.open_cursor;
767: dbms_sql.parse(l_cursor, l_sql, dbms_sql.native);
768: dbms_sql.define_column(l_cursor, 1, l_org_id);

Line 794: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_ops:Adding job op, l_org_id='||l_org_id||',l_wip_ent_id='||l_wip_ent_id||

790: dbms_sql.column_value(l_cursor, 6, l_op_sch_qty);
791: dbms_sql.column_value(l_cursor, 7, l_op_start_qty);
792: dbms_sql.column_value(l_cursor, 8, l_op_open_qty);
793:
794: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_ops:Adding job op, l_org_id='||l_org_id||',l_wip_ent_id='||l_wip_ent_id||
795: ',l_op_seq_num='||l_op_seq_num||',l_dept_id='||l_dept_id||',l_op_fusd='||l_op_fusd||',l_op_start_qty='||l_op_start_qty||
796: ',l_op_open_qty='||l_op_open_qty||',l_op_sch_qty='||l_op_sch_qty);
797:
798: g_wip_job_op_tbl(i).ORGANIZATION_ID := l_org_id;

Line 812: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_ops:Calling custom procedure for reordering operations');

808: dbms_sql.close_cursor(l_cursor);
809:
810: --call custom hook procedure to reorder operations if necessary
811: begin
812: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_ops:Calling custom procedure for reordering operations');
813: wip_ws_custom.reorder_ops_for_shortage(g_wip_job_op_tbl, l_return_status, l_return_code);
814: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_ops:back from custom procedure for reordering operations with status='||l_return_status);
815:
816: if(l_return_status <> 'S') then

Line 814: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_ops:back from custom procedure for reordering operations with status='||l_return_status);

810: --call custom hook procedure to reorder operations if necessary
811: begin
812: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_ops:Calling custom procedure for reordering operations');
813: wip_ws_custom.reorder_ops_for_shortage(g_wip_job_op_tbl, l_return_status, l_return_code);
814: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_ops:back from custom procedure for reordering operations with status='||l_return_status);
815:
816: if(l_return_status <> 'S') then
817: raise fnd_api.g_exc_unexpected_error;
818: end if;

Line 874: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components:Entered');

870: l_qty_open NUMBER;
871: l_yield NUMBER;
872: BEGIN
873:
874: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components:Entered');
875:
876: l_sql := l_sql || 'select wro.inventory_item_id, ';
877: l_sql := l_sql || ' decode(wro.supply_subinventory, null, ';
878: l_sql := l_sql || ' (decode(msi.wip_supply_subinventory, null, wp.default_pull_supply_subinv, msi.wip_supply_subinventory)),';

Line 902: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components:l_cat_ids='||l_cat_ids);

898: l_sql := l_sql || ' and msi.inventory_item_id = wro.inventory_item_id ';
899:
900: /*
901: l_cat_ids := get_pref_comp_cat(p_org_id);
902: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components:l_cat_ids='||l_cat_ids);
903: l_item_ids := get_pref_comp_id(p_org_id);
904: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components:l_item_ids='||l_item_ids);
905:
906: if(l_cat_ids is not null) then

Line 904: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components:l_item_ids='||l_item_ids);

900: /*
901: l_cat_ids := get_pref_comp_cat(p_org_id);
902: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components:l_cat_ids='||l_cat_ids);
903: l_item_ids := get_pref_comp_id(p_org_id);
904: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components:l_item_ids='||l_item_ids);
905:
906: if(l_cat_ids is not null) then
907: l_cat_clause := ' and exists (select inventory_item_id ' ||
908: ' from mtl_item_categories ' ||

Line 923: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components:l_cat_ids='||l_cat_ids);

919: end if;
920: */
921:
922: l_cat_ids := get_pref_comp_cat(p_org_id);
923: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components:l_cat_ids='||l_cat_ids);
924: l_item_ids := get_pref_comp_id(p_org_id);
925: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components:l_item_ids='||l_item_ids);
926:
927: if(is_all_component_selected(p_org_id)) then

Line 925: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components:l_item_ids='||l_item_ids);

921:
922: l_cat_ids := get_pref_comp_cat(p_org_id);
923: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components:l_cat_ids='||l_cat_ids);
924: l_item_ids := get_pref_comp_id(p_org_id);
925: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components:l_item_ids='||l_item_ids);
926:
927: if(is_all_component_selected(p_org_id)) then
928: l_all_clause := ' 1=1 ';
929: end if;

Line 1019: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components:l_sql='||l_sql);

1015:
1016:
1017:
1018:
1019: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components:l_sql='||l_sql);
1020:
1021: IF (g_wip_job_op_tbl.COUNT > 0) THEN
1022: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components:g_wip_job_op_tbl.count>0');
1023: FOR i in g_wip_job_op_tbl.FIRST .. g_wip_job_op_tbl.LAST LOOP

Line 1022: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components:g_wip_job_op_tbl.count>0');

1018:
1019: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components:l_sql='||l_sql);
1020:
1021: IF (g_wip_job_op_tbl.COUNT > 0) THEN
1022: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components:g_wip_job_op_tbl.count>0');
1023: FOR i in g_wip_job_op_tbl.FIRST .. g_wip_job_op_tbl.LAST LOOP
1024: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components:Entered in for loop for org_id='||g_wip_job_op_tbl(i).ORGANIZATION_ID||
1025: ',wip_ent_id='||g_wip_job_op_tbl(i).WIP_ENTITY_ID||',op_seq_num='||g_wip_job_op_tbl(i).OPERATION_SEQ_NUM);
1026:

Line 1024: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components:Entered in for loop for org_id='||g_wip_job_op_tbl(i).ORGANIZATION_ID||

1020:
1021: IF (g_wip_job_op_tbl.COUNT > 0) THEN
1022: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components:g_wip_job_op_tbl.count>0');
1023: FOR i in g_wip_job_op_tbl.FIRST .. g_wip_job_op_tbl.LAST LOOP
1024: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components:Entered in for loop for org_id='||g_wip_job_op_tbl(i).ORGANIZATION_ID||
1025: ',wip_ent_id='||g_wip_job_op_tbl(i).WIP_ENTITY_ID||',op_seq_num='||g_wip_job_op_tbl(i).OPERATION_SEQ_NUM);
1026:
1027:
1028: l_cursor := dbms_sql.open_cursor;

Line 1071: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components: point 10 - before dbms_sql.execute');

1067: dbms_sql.bind_variable(l_cursor, ':pref_val_dtl_org_att3', g_pref_val_dtl_org_att);
1068:
1069: end if;
1070:
1071: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components: point 10 - before dbms_sql.execute');
1072: l_dummy := dbms_sql.execute(l_cursor);
1073: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components: point 20 - after dbms_sql.execute');
1074: LOOP
1075: EXIT WHEN DBMS_SQL.FETCH_ROWS (l_cursor) = 0;

Line 1073: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components: point 20 - after dbms_sql.execute');

1069: end if;
1070:
1071: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components: point 10 - before dbms_sql.execute');
1072: l_dummy := dbms_sql.execute(l_cursor);
1073: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components: point 20 - after dbms_sql.execute');
1074: LOOP
1075: EXIT WHEN DBMS_SQL.FETCH_ROWS (l_cursor) = 0;
1076: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components: point 50');
1077: dbms_sql.column_value(l_cursor, 1, l_inv_item_id);

Line 1076: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components: point 50');

1072: l_dummy := dbms_sql.execute(l_cursor);
1073: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components: point 20 - after dbms_sql.execute');
1074: LOOP
1075: EXIT WHEN DBMS_SQL.FETCH_ROWS (l_cursor) = 0;
1076: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components: point 50');
1077: dbms_sql.column_value(l_cursor, 1, l_inv_item_id);
1078: dbms_sql.column_value(l_cursor, 2, l_subinv_code);
1079: dbms_sql.column_value(l_cursor, 3, l_req_qty);
1080: dbms_sql.column_value(l_cursor, 4, l_qty_issued);

Line 1088: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components:add_critical_component=l_inv_item_id='||l_inv_item_id||

1084: dbms_sql.column_value(l_cursor, 8, l_wip_supply_type);
1085: dbms_sql.column_value(l_cursor, 9, l_uom_code);
1086: dbms_sql.column_value(l_cursor, 10, l_yield);
1087:
1088: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components:add_critical_component=l_inv_item_id='||l_inv_item_id||
1089: ',l_qpa='||l_qpa||',l_req_qty='||l_req_qty||',l_qty_issued='||l_qty_issued||
1090: ',l_op_open_qty='||g_wip_job_op_tbl(i).OPEN_QTY||
1091: ',l_qty_allocated='||l_qty_allocated||',l_comp_open_qty='||to_char((g_wip_job_op_tbl(i).OPEN_QTY * l_qpa) - l_qty_issued - l_qty_allocated));
1092:

Line 1121: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components:add_critical_component=l_inv_item_id='||l_inv_item_id||', l_subinv='||l_subinv_code);

1117: g_wip_job_critical_comp_tbl(j).PRIMARY_UOM_CODE := l_uom_code;
1118:
1119: --add another record for subinv if preference is set
1120: if(g_org_comp_calc_rec.shortage_calc_level = 2) then
1121: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_components:add_critical_component=l_inv_item_id='||l_inv_item_id||', l_subinv='||l_subinv_code);
1122: j := g_wip_job_critical_comp_tbl.LAST;
1123: if (j is NULL) then j:= 0; end if; j := j+1;
1124: g_wip_job_critical_comp_tbl(j).ORGANIZATION_ID := p_org_id;
1125: g_wip_job_critical_comp_tbl(j).WIP_ENTITY_ID := g_wip_job_op_tbl(i).WIP_ENTITY_ID;

Line 1240: wip_ws_util.trace_log('WIP_WS_SHORTAGE:get_job_critical_resources:Entered ');

1236: select organization_id, resource_id, department_id from wip_ws_critical_res_temp;
1237:
1238:
1239: BEGIN
1240: wip_ws_util.trace_log('WIP_WS_SHORTAGE:get_job_critical_resources:Entered ');
1241:
1242: IF (g_wip_job_op_tbl.COUNT > 0) THEN
1243: FOR i in g_wip_job_op_tbl.FIRST .. g_wip_job_op_tbl.LAST LOOP
1244: wip_ws_util.trace_log('WIP_WS_SHORTAGE:get_job_critical_resources: Check critical resources in operation ');

Line 1244: wip_ws_util.trace_log('WIP_WS_SHORTAGE:get_job_critical_resources: Check critical resources in operation ');

1240: wip_ws_util.trace_log('WIP_WS_SHORTAGE:get_job_critical_resources:Entered ');
1241:
1242: IF (g_wip_job_op_tbl.COUNT > 0) THEN
1243: FOR i in g_wip_job_op_tbl.FIRST .. g_wip_job_op_tbl.LAST LOOP
1244: wip_ws_util.trace_log('WIP_WS_SHORTAGE:get_job_critical_resources: Check critical resources in operation ');
1245: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_resources:Entered in operation for loop for org_id='||g_wip_job_op_tbl(i).ORGANIZATION_ID||
1246: ',wip_ent_id='||g_wip_job_op_tbl(i).WIP_ENTITY_ID||',op_seq_num='||g_wip_job_op_tbl(i).OPERATION_SEQ_NUM);
1247: prev_res_id := null;
1248: FOR c_res_req_csr in res_req_csr(p_org_id,g_wip_job_op_tbl(i).WIP_ENTITY_ID, g_wip_job_op_tbl(i).OPERATION_SEQ_NUM) LOOP

Line 1245: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_resources:Entered in operation for loop for org_id='||g_wip_job_op_tbl(i).ORGANIZATION_ID||

1241:
1242: IF (g_wip_job_op_tbl.COUNT > 0) THEN
1243: FOR i in g_wip_job_op_tbl.FIRST .. g_wip_job_op_tbl.LAST LOOP
1244: wip_ws_util.trace_log('WIP_WS_SHORTAGE:get_job_critical_resources: Check critical resources in operation ');
1245: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_resources:Entered in operation for loop for org_id='||g_wip_job_op_tbl(i).ORGANIZATION_ID||
1246: ',wip_ent_id='||g_wip_job_op_tbl(i).WIP_ENTITY_ID||',op_seq_num='||g_wip_job_op_tbl(i).OPERATION_SEQ_NUM);
1247: prev_res_id := null;
1248: FOR c_res_req_csr in res_req_csr(p_org_id,g_wip_job_op_tbl(i).WIP_ENTITY_ID, g_wip_job_op_tbl(i).OPERATION_SEQ_NUM) LOOP
1249: IF(c_res_req_csr.resource_id <> nvl(prev_res_id , -1)) THEN

Line 1251: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_resources:Entered in resource for loop for resource id='||c_res_req_csr.RESOURCE_ID||

1247: prev_res_id := null;
1248: FOR c_res_req_csr in res_req_csr(p_org_id,g_wip_job_op_tbl(i).WIP_ENTITY_ID, g_wip_job_op_tbl(i).OPERATION_SEQ_NUM) LOOP
1249: IF(c_res_req_csr.resource_id <> nvl(prev_res_id , -1)) THEN
1250: prev_res_id := c_res_req_csr.resource_id;
1251: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_resources:Entered in resource for loop for resource id='||c_res_req_csr.RESOURCE_ID||
1252: ',qty_open='||c_res_req_csr.open_quantity);
1253:
1254: j := g_wip_job_critical_res_tbl.LAST;
1255: if (j is NULL) then j:=0; end if; j:=j+1;

Line 1277: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_resources:calling wip_ws_util.retrive_first_shift');

1273: l_req_date := g_wip_job_critical_res_tbl(j).DATE_REQUIRED; -- bug 9484419
1274: if(g_wip_job_critical_res_tbl(j).DATE_REQUIRED < sysdate) then
1275: l_req_date := sysdate;
1276: end if;
1277: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_resources:calling wip_ws_util.retrive_first_shift');
1278: --get shift id for each resource
1279: wip_ws_util.retrieve_first_shift(
1280: p_org_id => g_wip_job_critical_res_tbl(j).ORGANIZATION_ID,
1281: p_dept_id => g_wip_job_critical_res_tbl(j).DEPARTMENT_ID,

Line 1291: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_resources:back from retrieve_first_shift with shift_num='||

1287: x_shift_end_date => l_shift_end_date,
1288: x_shift_string => l_shift_string
1289: );
1290:
1291: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_resources:back from retrieve_first_shift with shift_num='||
1292: l_shift_num||',shift_seq='||l_shift_seq);
1293:
1294: g_wip_job_critical_res_tbl(j).SHIFT_NUM := l_shift_num;
1295: g_wip_job_critical_res_tbl(j).SHIFT_SEQ := l_shift_seq;

Line 1320: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_resources:Critical Resource:'||

1316:
1317: wip_ws_util.trace_log( 'Printing critical job op resources');
1318: IF (g_wip_job_critical_res_tbl.COUNT > 0) THEN
1319: FOR j in g_wip_job_critical_res_tbl.FIRST .. g_wip_job_critical_res_tbl.LAST LOOP
1320: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_resources:Critical Resource:'||
1321: 'org_id='||g_wip_job_critical_res_tbl(j).ORGANIZATION_ID ||
1322: ',wip_ent_id='||g_wip_job_critical_res_tbl(j).WIP_ENTITY_ID ||
1323: ',op_seq_num='||g_wip_job_critical_res_tbl(j).OPERATION_SEQ_NUM ||
1324: 'res_id,='||g_wip_job_critical_res_tbl(j).RESOURCE_ID ||

Line 1338: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_resources:Critical Resource in temp table:'||

1334: END IF;
1335:
1336: wip_ws_util.trace_log( 'Printing critical resources');
1337: for c_critical_res_csr in critical_res_csr loop
1338: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:get_job_critical_resources:Critical Resource in temp table:'||
1339: 'org_id='||c_critical_res_csr.ORGANIZATION_ID ||
1340: ',res_id='||c_critical_res_csr.RESOURCE_ID ||
1341: ',dept_id='||c_critical_res_csr.DEPARTMENT_ID);
1342:

Line 1377: wip_ws_util.trace_log('WIP_WS_SHORTAGE:get_wip_supply: '||

1373: l_qty NUMBER := 0;
1374: BEGIN
1375: for c_job_csr in job_csr(p_org_id, p_inv_item_id, p_rcpt_date) loop
1376: l_qty := l_qty + (c_job_csr.item_qty - nvl(c_job_csr.reservation_qty,0));
1377: wip_ws_util.trace_log('WIP_WS_SHORTAGE:get_wip_supply: '||
1378: 'c_job_csr.wip_entity_id = '||c_job_csr.wip_entity_id||
1379: 'c_job_csr.item_qty = '||c_job_csr.item_qty||
1380: 'c_job_csr.reservation_qty = '||c_job_csr.reservation_qty);
1381: end loop;

Line 1411: wip_ws_util.trace_log('WIP_WS_SHORTAGE:get_flow_supply: '||

1407: l_qty NUMBER := 0;
1408: BEGIN
1409: for c_flow_sched_csr in flow_sched_csr(p_org_id, p_inv_item_id, p_rcpt_date) loop
1410: l_qty := c_flow_sched_csr.item_qty;
1411: wip_ws_util.trace_log('WIP_WS_SHORTAGE:get_flow_supply: '||
1412: 'flow_sched_csr.wip_entity_id = '||c_flow_sched_csr.wip_entity_id||
1413: 'flow_sched_csr.item_qty = '||c_flow_sched_csr.item_qty);
1414: end loop;
1415: if (l_qty < 0 or l_qty is null) then l_qty := 0; end if;

Line 1448: wip_ws_util.trace_log('WIP_WS_SHORTAGE:get_wip_negreq_supply: '||

1444: l_qty NUMBER := 0;
1445: BEGIN
1446: for c_wip_negreq_csr in wip_negreq_csr(p_org_id, p_inv_item_id, p_rcpt_date) loop
1447: l_qty := c_wip_negreq_csr.item_qty;
1448: wip_ws_util.trace_log('WIP_WS_SHORTAGE:get_wip_negreq_supply: '||
1449: 'wip_negreq_csr.item_qty = '||c_wip_negreq_csr.item_qty);
1450: end loop;
1451: if (l_qty < 0 or l_qty is null) then l_qty := 0; end if;
1452: return l_qty;

Line 1499: wip_ws_util.trace_log('WIP_WS_SHORTAGE:get_rep_sch_supply: '||

1495: l_qty NUMBER := 0;
1496: BEGIN
1497: for c_rep_sched_csr in rep_sched_csr(p_org_id, p_inv_item_id, p_rcpt_date) loop
1498: l_qty := c_rep_sched_csr.item_qty;
1499: wip_ws_util.trace_log('WIP_WS_SHORTAGE:get_rep_sch_supply: '||
1500: 'rep_sched_csr.item_qty = '||c_rep_sched_csr.item_qty);
1501: end loop;
1502: if (l_qty < 0 or l_qty is null) then l_qty := 0; end if;
1503: return l_qty;

Line 1543: wip_ws_util.trace_log('WIP_WS_SHORTAGE:get_po_supply: '||

1539: l_qty NUMBER := 0;
1540: BEGIN
1541: for c_po_csr in po_csr(p_org_id, p_inv_item_id, p_rcpt_date) loop
1542: l_qty := l_qty + (nvl(c_po_csr.item_qty,0) - nvl(c_po_csr.reservation_qty,0));
1543: wip_ws_util.trace_log('WIP_WS_SHORTAGE:get_po_supply: '||
1544: 'po_csr.PO_HEADER_ID = '||c_po_csr.PO_HEADER_ID||
1545: 'po_csr.item_qty = '||c_po_csr.item_qty||
1546: 'po_csr.reservation_qty = '||c_po_csr.reservation_qty);
1547: end loop;

Line 1591: wip_ws_util.trace_log('WIP_WS_SHORTAGE:get_req_supply: '||

1587: l_qty NUMBER := 0;
1588: BEGIN
1589: for c_req_csr in req_csr(p_org_id, p_inv_item_id, p_rcpt_date) loop
1590: l_qty := l_qty + (c_req_csr.item_qty - nvl(c_req_csr.reservation_qty,0));
1591: wip_ws_util.trace_log('WIP_WS_SHORTAGE:get_req_supply: '||
1592: 'req_csr.requisition_line_id = '||c_req_csr.requisition_line_id||
1593: 'req_csr.REQUISITION_HEADER_ID = '||c_req_csr.REQUISITION_HEADER_ID||
1594: 'req_csr.item_qty = '||c_req_csr.item_qty||
1595: 'req_csr.reservation_qty = '||c_req_csr.reservation_qty);

Line 1639: wip_ws_util.trace_log('WIP_WS_SHORTAGE:get_intransit_ship_supply: '||

1635: l_qty NUMBER := 0;
1636: BEGIN
1637: for c_intransit_ship_csr in intransit_ship_csr(p_org_id, p_inv_item_id, p_rcpt_date) loop
1638: l_qty := l_qty + (c_intransit_ship_csr.item_qty - nvl(c_intransit_ship_csr.reservation_qty,0));
1639: wip_ws_util.trace_log('WIP_WS_SHORTAGE:get_intransit_ship_supply: '||
1640: 'intransit_ship_csr.requisition_line_id = '||c_intransit_ship_csr.requisition_line_id||
1641: 'intransit_ship_csr.REQUISITION_HEADER_ID = '||c_intransit_ship_csr.REQUISITION_HEADER_ID||
1642: 'intransit_ship_csr.item_qty = '||c_intransit_ship_csr.item_qty||
1643: 'intransit_ship_csr.reservation_qty = '||c_intransit_ship_csr.reservation_qty);

Line 1709: wip_ws_util.trace_log('WIP_WS_SHORTAGE:get_intransit_receipt_supply: '||

1705: l_qty NUMBER := 0;
1706: BEGIN
1707: for c_intransit_receipt_csr in intransit_receipt_csr(p_org_id, p_inv_item_id, p_rcpt_date) loop
1708: l_qty := l_qty + (c_intransit_receipt_csr.item_qty - nvl(c_intransit_receipt_csr.reservation_qty,0));
1709: wip_ws_util.trace_log('WIP_WS_SHORTAGE:get_intransit_receipt_supply: '||
1710: 'c_intransit_receipt_csr.item_qty = '||c_intransit_receipt_csr.item_qty||
1711: 'c_intransit_receipt_csr.reservation_qty = '||c_intransit_receipt_csr.reservation_qty);
1712: end loop;
1713: if(l_qty < 0 or l_qty is null) then l_qty := 0; end if;

Line 1751: wip_ws_util.trace_log('WIP_WS_SHORTAGE:get_po_rcv_supply: '||

1747: l_qty NUMBER := 0;
1748: BEGIN
1749: for c_po_rcv_csr in po_rcv_csr(p_org_id, p_inv_item_id, p_rcpt_date) loop
1750: l_qty := l_qty + (c_po_rcv_csr.item_qty - nvl(c_po_rcv_csr.reservation_qty,0));
1751: wip_ws_util.trace_log('WIP_WS_SHORTAGE:get_po_rcv_supply: '||
1752: 'c_po_rcv_csr.PO_HEADER_ID = '||c_po_rcv_csr.PO_HEADER_ID||
1753: 'c_po_rcv_csr.item_qty = '||c_po_rcv_csr.item_qty||
1754: 'c_po_rcv_csr.reservation_qty = '||c_po_rcv_csr.reservation_qty);
1755: end loop;

Line 1781: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: '||

1777: req_supply NUMBER := 0;
1778: intransit_receipt_supply NUMBER := 0;
1779: po_rcv_supply NUMBER := 0;
1780: BEGIN
1781: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: '||
1782: 'p_org_id = '||p_org_id||
1783: 'p_inv_item_id = '||p_inv_item_id||
1784: 'p_rcpt_date = '||p_rcpt_date);
1785:

Line 1787: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: wip_supply = '||wip_supply);

1783: 'p_inv_item_id = '||p_inv_item_id||
1784: 'p_rcpt_date = '||p_rcpt_date);
1785:
1786: wip_supply := get_wip_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1787: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: wip_supply = '||wip_supply);
1788: neg_wip_supply := get_wip_negreq_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1789: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: neg_wip_supply = '||neg_wip_supply);
1790: flow_supply := get_flow_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1791: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: flow_supply = '||flow_supply);

Line 1789: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: neg_wip_supply = '||neg_wip_supply);

1785:
1786: wip_supply := get_wip_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1787: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: wip_supply = '||wip_supply);
1788: neg_wip_supply := get_wip_negreq_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1789: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: neg_wip_supply = '||neg_wip_supply);
1790: flow_supply := get_flow_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1791: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: flow_supply = '||flow_supply);
1792: rep_sch_supply := get_rep_sch_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1793: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: rep_sch_supply = '||rep_sch_supply);

Line 1791: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: flow_supply = '||flow_supply);

1787: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: wip_supply = '||wip_supply);
1788: neg_wip_supply := get_wip_negreq_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1789: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: neg_wip_supply = '||neg_wip_supply);
1790: flow_supply := get_flow_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1791: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: flow_supply = '||flow_supply);
1792: rep_sch_supply := get_rep_sch_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1793: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: rep_sch_supply = '||rep_sch_supply);
1794: po_supply := get_po_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1795: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: po_supply = '||po_supply);

Line 1793: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: rep_sch_supply = '||rep_sch_supply);

1789: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: neg_wip_supply = '||neg_wip_supply);
1790: flow_supply := get_flow_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1791: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: flow_supply = '||flow_supply);
1792: rep_sch_supply := get_rep_sch_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1793: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: rep_sch_supply = '||rep_sch_supply);
1794: po_supply := get_po_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1795: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: po_supply = '||po_supply);
1796: intransit_ship_supply := get_intransit_ship_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1797: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: intransit_ship_supply = '||intransit_ship_supply);

Line 1795: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: po_supply = '||po_supply);

1791: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: flow_supply = '||flow_supply);
1792: rep_sch_supply := get_rep_sch_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1793: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: rep_sch_supply = '||rep_sch_supply);
1794: po_supply := get_po_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1795: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: po_supply = '||po_supply);
1796: intransit_ship_supply := get_intransit_ship_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1797: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: intransit_ship_supply = '||intransit_ship_supply);
1798: req_supply := get_req_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1799: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: req_supply = '||req_supply);

Line 1797: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: intransit_ship_supply = '||intransit_ship_supply);

1793: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: rep_sch_supply = '||rep_sch_supply);
1794: po_supply := get_po_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1795: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: po_supply = '||po_supply);
1796: intransit_ship_supply := get_intransit_ship_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1797: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: intransit_ship_supply = '||intransit_ship_supply);
1798: req_supply := get_req_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1799: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: req_supply = '||req_supply);
1800: intransit_receipt_supply := get_intransit_receipt_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1801: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: intransit_receipt_supply = '||intransit_receipt_supply);

Line 1799: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: req_supply = '||req_supply);

1795: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: po_supply = '||po_supply);
1796: intransit_ship_supply := get_intransit_ship_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1797: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: intransit_ship_supply = '||intransit_ship_supply);
1798: req_supply := get_req_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1799: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: req_supply = '||req_supply);
1800: intransit_receipt_supply := get_intransit_receipt_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1801: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: intransit_receipt_supply = '||intransit_receipt_supply);
1802: po_rcv_supply := get_po_rcv_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1803: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: po_rcv_supply = '||po_rcv_supply);

Line 1801: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: intransit_receipt_supply = '||intransit_receipt_supply);

1797: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: intransit_ship_supply = '||intransit_ship_supply);
1798: req_supply := get_req_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1799: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: req_supply = '||req_supply);
1800: intransit_receipt_supply := get_intransit_receipt_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1801: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: intransit_receipt_supply = '||intransit_receipt_supply);
1802: po_rcv_supply := get_po_rcv_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1803: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: po_rcv_supply = '||po_rcv_supply);
1804:
1805: return (wip_supply + neg_wip_supply + flow_supply + rep_sch_supply + po_supply +

Line 1803: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: po_rcv_supply = '||po_rcv_supply);

1799: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: req_supply = '||req_supply);
1800: intransit_receipt_supply := get_intransit_receipt_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1801: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: intransit_receipt_supply = '||intransit_receipt_supply);
1802: po_rcv_supply := get_po_rcv_supply(p_org_id, p_inv_item_id, p_rcpt_date);
1803: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts: po_rcv_supply = '||po_rcv_supply);
1804:
1805: return (wip_supply + neg_wip_supply + flow_supply + rep_sch_supply + po_supply +
1806: intransit_ship_supply + req_supply + intransit_receipt_supply + po_rcv_supply);
1807:

Line 1824: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts:Entered');

1820: and supply_subinventory is null;
1821: l_rcpt NUMBER;
1822:
1823: BEGIN
1824: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_expected_receipts:Entered');
1825: for c_comp in comp LOOP
1826: l_rcpt := calc_expected_receipts(p_org_id, c_comp.inventory_item_id, p_rcpt_date);
1827: if(nvl(l_rcpt, -1) < 0) then l_rcpt := 0; end if;
1828: update wip_ws_critical_comp_temp

Line 1866: wip_ws_util.trace_log('WIP_WS_SHORTAGE:insert_components:Entered: Number of records to insert='||g_wip_job_critical_comp_tbl.COUNT);

1862: */
1863: PROCEDURE insert_components IS
1864: BEGIN
1865: wip_ws_util.log_time('insert_components: Inserting component shortage records');
1866: wip_ws_util.trace_log('WIP_WS_SHORTAGE:insert_components:Entered: Number of records to insert='||g_wip_job_critical_comp_tbl.COUNT);
1867: --FOR i in 1..g_wip_job_critical_comp_tbl.COUNT LOOP
1868: IF(g_wip_job_critical_comp_tbl.COUNT > 0) THEN
1869: FOR i in g_wip_job_critical_comp_tbl.FIRST..g_wip_job_critical_comp_tbl.LAST LOOP
1870: wip_ws_util.trace_log('WIP_WS_SHORTAGE:insert_components:inv_item='||g_wip_job_critical_comp_tbl(i).INVENTORY_ITEM_ID||

Line 1870: wip_ws_util.trace_log('WIP_WS_SHORTAGE:insert_components:inv_item='||g_wip_job_critical_comp_tbl(i).INVENTORY_ITEM_ID||

1866: wip_ws_util.trace_log('WIP_WS_SHORTAGE:insert_components:Entered: Number of records to insert='||g_wip_job_critical_comp_tbl.COUNT);
1867: --FOR i in 1..g_wip_job_critical_comp_tbl.COUNT LOOP
1868: IF(g_wip_job_critical_comp_tbl.COUNT > 0) THEN
1869: FOR i in g_wip_job_critical_comp_tbl.FIRST..g_wip_job_critical_comp_tbl.LAST LOOP
1870: wip_ws_util.trace_log('WIP_WS_SHORTAGE:insert_components:inv_item='||g_wip_job_critical_comp_tbl(i).INVENTORY_ITEM_ID||
1871: ',org_id='||g_wip_job_critical_comp_tbl(i).ORGANIZATION_ID||
1872: ',wip_entity_id='||g_wip_job_critical_comp_tbl(i).WIP_ENTITY_ID||
1873: ',operation_seq_num='||g_wip_job_critical_comp_tbl(i).OPERATION_SEQ_NUM);
1874: insert into wip_ws_comp_shortage(

Line 1942: wip_ws_util.trace_log('WIP_WS_SHORTAGE:insert_resources:Entered: Number of records to insert='||g_wip_job_critical_res_tbl.COUNT);

1938: * shortage table
1939: */
1940: PROCEDURE insert_resources IS
1941: BEGIN
1942: wip_ws_util.trace_log('WIP_WS_SHORTAGE:insert_resources:Entered: Number of records to insert='||g_wip_job_critical_res_tbl.COUNT);
1943: wip_ws_util.log_time('insert_resources: Inserting resource shortage records');
1944: --FOR i in 1..g_wip_job_critical_res_tbl.COUNT LOOP
1945: IF(g_wip_job_critical_res_tbl.COUNT > 0) THEN
1946: FOR i in g_wip_job_critical_res_tbl.FIRST..g_wip_job_critical_res_tbl.LAST LOOP

Line 1947: wip_ws_util.trace_log('WIP_WS_SHORTAGE:insert_resources:resource'||g_wip_job_critical_res_tbl(i).RESOURCE_ID||

1943: wip_ws_util.log_time('insert_resources: Inserting resource shortage records');
1944: --FOR i in 1..g_wip_job_critical_res_tbl.COUNT LOOP
1945: IF(g_wip_job_critical_res_tbl.COUNT > 0) THEN
1946: FOR i in g_wip_job_critical_res_tbl.FIRST..g_wip_job_critical_res_tbl.LAST LOOP
1947: wip_ws_util.trace_log('WIP_WS_SHORTAGE:insert_resources:resource'||g_wip_job_critical_res_tbl(i).RESOURCE_ID||
1948: ',org_id='||g_wip_job_critical_res_tbl(i).ORGANIZATION_ID||
1949: ',wip_entity_id='||g_wip_job_critical_res_tbl(i).WIP_ENTITY_ID||
1950: ',operation_seq_num='||g_wip_job_critical_res_tbl(i).OPERATION_SEQ_NUM);
1951:

Line 2042: wip_ws_util.trace_log('WIP_WS_SHORTAGE:write_db:Entered');

2038: */
2039: PROCEDURE write_db(p_org_id NUMBER) IS
2040: BEGIN
2041: wip_ws_util.log_time('write_db: Entering write_db');
2042: wip_ws_util.trace_log('WIP_WS_SHORTAGE:write_db:Entered');
2043: delete_components(p_org_id);
2044: wip_ws_util.trace_log('WIP_WS_SHORTAGE:write_db:done with delete_components');
2045: insert_components;
2046: wip_ws_util.trace_log('WIP_WS_SHORTAGE:write_db:done with insert_components');

Line 2044: wip_ws_util.trace_log('WIP_WS_SHORTAGE:write_db:done with delete_components');

2040: BEGIN
2041: wip_ws_util.log_time('write_db: Entering write_db');
2042: wip_ws_util.trace_log('WIP_WS_SHORTAGE:write_db:Entered');
2043: delete_components(p_org_id);
2044: wip_ws_util.trace_log('WIP_WS_SHORTAGE:write_db:done with delete_components');
2045: insert_components;
2046: wip_ws_util.trace_log('WIP_WS_SHORTAGE:write_db:done with insert_components');
2047: delete_resources(p_org_id);
2048: wip_ws_util.trace_log('WIP_WS_SHORTAGE:write_db:done with delete_resources');

Line 2046: wip_ws_util.trace_log('WIP_WS_SHORTAGE:write_db:done with insert_components');

2042: wip_ws_util.trace_log('WIP_WS_SHORTAGE:write_db:Entered');
2043: delete_components(p_org_id);
2044: wip_ws_util.trace_log('WIP_WS_SHORTAGE:write_db:done with delete_components');
2045: insert_components;
2046: wip_ws_util.trace_log('WIP_WS_SHORTAGE:write_db:done with insert_components');
2047: delete_resources(p_org_id);
2048: wip_ws_util.trace_log('WIP_WS_SHORTAGE:write_db:done with delete_resources');
2049: insert_resources;
2050:

Line 2048: wip_ws_util.trace_log('WIP_WS_SHORTAGE:write_db:done with delete_resources');

2044: wip_ws_util.trace_log('WIP_WS_SHORTAGE:write_db:done with delete_components');
2045: insert_components;
2046: wip_ws_util.trace_log('WIP_WS_SHORTAGE:write_db:done with insert_components');
2047: delete_resources(p_org_id);
2048: wip_ws_util.trace_log('WIP_WS_SHORTAGE:write_db:done with delete_resources');
2049: insert_resources;
2050:
2051: wip_ws_util.trace_log('WIP_WS_SHORTAGE:write_db:Finished');
2052: wip_ws_util.log_time('write_db: Done with write_db');

Line 2051: wip_ws_util.trace_log('WIP_WS_SHORTAGE:write_db:Finished');

2047: delete_resources(p_org_id);
2048: wip_ws_util.trace_log('WIP_WS_SHORTAGE:write_db:done with delete_resources');
2049: insert_resources;
2050:
2051: wip_ws_util.trace_log('WIP_WS_SHORTAGE:write_db:Finished');
2052: wip_ws_util.log_time('write_db: Done with write_db');
2053: END write_db;
2054:
2055:

Line 2088: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_res_shortage:Entered');

2084: and resource_id = p_res_id;
2085:
2086: BEGIN
2087: wip_ws_util.log_time('calc_res_shortage: Entering calc_res_shortage');
2088: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_res_shortage:Entered');
2089: get_job_critical_resources(p_org_id, g_period_end_time);
2090: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_res_shortage:Done with get_job_critical_resources ');
2091:
2092: IF(g_wip_job_critical_res_tbl.COUNT > 0) THEN

Line 2090: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_res_shortage:Done with get_job_critical_resources ');

2086: BEGIN
2087: wip_ws_util.log_time('calc_res_shortage: Entering calc_res_shortage');
2088: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_res_shortage:Entered');
2089: get_job_critical_resources(p_org_id, g_period_end_time);
2090: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_res_shortage:Done with get_job_critical_resources ');
2091:
2092: IF(g_wip_job_critical_res_tbl.COUNT > 0) THEN
2093: FOR i in g_wip_job_critical_res_tbl.FIRST .. g_wip_job_critical_res_tbl.LAST LOOP
2094: current_res_req_date := g_wip_job_critical_res_tbl(i).DATE_REQUIRED;

Line 2102: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_res_shortage:Point 20: Enter loop for: '||

2098: if(current_res_req_date < sysdate) then
2099: current_res_req_date := sysdate;
2100: end if;
2101:
2102: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_res_shortage:Point 20: Enter loop for: '||
2103: 'wip_ent_id='||g_wip_job_critical_res_tbl(i).WIP_ENTITY_ID||
2104: ',op_seq_num='||g_wip_job_critical_res_tbl(i).OPERATION_SEQ_NUM||
2105: ',dept_id='||g_wip_job_critical_res_tbl(i).DEPARTMENT_ID||
2106: ',res_id='||g_wip_job_critical_res_tbl(i).RESOURCE_ID

Line 2116: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_res_shortage:Point 30: Found resource in temp table: '||

2112: l_res_avail_shift := c_critical_res_csr.resource_shift_num;
2113: l_res_project_avail_qty := c_critical_res_csr.projected_avail_qty;
2114: l_res_onhand_qty := c_critical_res_csr.onhand_qty;
2115:
2116: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_res_shortage:Point 30: Found resource in temp table: '||
2117: 'l_res_avail_date='||l_res_avail_date||
2118: ',l_res_avail_shift='||l_res_avail_shift||
2119: ',l_res_project_avail_qty='||l_res_project_avail_qty||
2120: ',l_res_onhand_qty='||l_res_onhand_qty

Line 2134: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_res_shortage:Point 40: resource accessed first time:'||

2130: g_wip_job_critical_res_tbl(i).RESOURCE_ID,
2131: g_wip_job_critical_res_tbl(i).SHIFT_SEQ,
2132: g_wip_job_critical_res_tbl(i).SHIFT_NUM);
2133:
2134: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_res_shortage:Point 40: resource accessed first time:'||
2135: 'l_res_onhand_qty='||l_res_onhand_qty
2136: );
2137: end if;
2138:

Line 2145: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_res_shortage:Point 50: resource working in same day and shift as critical res found'||

2141: l_res_avail_shift = g_wip_job_critical_res_tbl(i).SHIFT_NUM) then
2142: --found a job resource working in the same day and shift as critical res record
2143: l_res_onhand_qty := l_res_project_avail_qty;
2144:
2145: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_res_shortage:Point 50: resource working in same day and shift as critical res found'||
2146: 'l_res_onhand_qty='||l_res_onhand_qty
2147: );
2148:
2149: else

Line 2159: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_res_shortage:Point 60: resource working in difference day or shift as critical res found'||

2155: g_wip_job_critical_res_tbl(i).RESOURCE_ID,
2156: g_wip_job_critical_res_tbl(i).SHIFT_SEQ,
2157: g_wip_job_critical_res_tbl(i).SHIFT_NUM);
2158:
2159: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_res_shortage:Point 60: resource working in difference day or shift as critical res found'||
2160: 'l_res_onhand_qty='||l_res_onhand_qty
2161: );
2162:
2163: end if;

Line 2172: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_res_shortage:Point 70:'||

2168: l_res_shortage := g_wip_job_critical_res_tbl(i).QUANTITY_OPEN - l_res_onhand_qty;
2169: end if;
2170: l_res_remain_qty := l_res_onhand_qty - g_wip_job_critical_res_tbl(i).QUANTITY_OPEN;
2171:
2172: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_res_shortage:Point 70:'||
2173: ',l_res_onhand_qty='||l_res_onhand_qty||
2174: ',l_res_shortage='||l_res_shortage||
2175: ',l_res_remain_qty='||l_res_remain_qty
2176: );

Line 2186: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_res_shortage:Point 80:Calling update in temp table');

2182: --g_wip_job_critical_res_tbl(i).RESOURCE_PROJ_AVAIL := l_res_remain_qty;
2183: g_wip_job_critical_res_tbl(i).RESOURCE_PROJ_AVAIL := l_res_onhand_qty;
2184: g_wip_job_critical_res_tbl(i).RESOURCE_SHORTAGE := l_res_shortage;
2185:
2186: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_res_shortage:Point 80:Calling update in temp table');
2187:
2188: --update critical resource record with availability info
2189: update_res_shift_avail(p_org_id, g_wip_job_critical_res_tbl(i).DEPARTMENT_ID,
2190: g_wip_job_critical_res_tbl(i).RESOURCE_ID, trunc(current_res_req_date),

Line 2193: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_res_shortage:Point 90:Done update in temp table');

2189: update_res_shift_avail(p_org_id, g_wip_job_critical_res_tbl(i).DEPARTMENT_ID,
2190: g_wip_job_critical_res_tbl(i).RESOURCE_ID, trunc(current_res_req_date),
2191: g_wip_job_critical_res_tbl(i).SHIFT_NUM, l_res_onhand_qty, l_res_remain_qty);
2192:
2193: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_res_shortage:Point 90:Done update in temp table');
2194: END LOOP;
2195: END IF;
2196: END calc_res_shortage;
2197:

Line 2230: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_comp_shortage:Entered');

2226: and nvl(supply_subinventory, 'NULL') = nvl(l_supply_subinv, 'NULL');
2227:
2228: BEGIN
2229: --this is the main procedure responsible for calculating component shortages
2230: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_comp_shortage:Entered');
2231:
2232: get_pref_critical_components (p_org_id, g_period_end_time);
2233: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_comp_shortage:Returned from get_pref_critical_components');
2234: get_job_ops(p_org_id, g_period_end_time);

Line 2233: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_comp_shortage:Returned from get_pref_critical_components');

2229: --this is the main procedure responsible for calculating component shortages
2230: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_comp_shortage:Entered');
2231:
2232: get_pref_critical_components (p_org_id, g_period_end_time);
2233: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_comp_shortage:Returned from get_pref_critical_components');
2234: get_job_ops(p_org_id, g_period_end_time);
2235: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_comp_shortage:Returned from get_job_ops');
2236: get_job_critical_components(p_org_id, g_period_end_time);
2237: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_comp_shortage:Returned from get_job_critical_components');

Line 2235: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_comp_shortage:Returned from get_job_ops');

2231:
2232: get_pref_critical_components (p_org_id, g_period_end_time);
2233: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_comp_shortage:Returned from get_pref_critical_components');
2234: get_job_ops(p_org_id, g_period_end_time);
2235: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_comp_shortage:Returned from get_job_ops');
2236: get_job_critical_components(p_org_id, g_period_end_time);
2237: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_comp_shortage:Returned from get_job_critical_components');
2238:
2239: previous_jobop_comp_start_time := null;

Line 2237: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_comp_shortage:Returned from get_job_critical_components');

2233: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_comp_shortage:Returned from get_pref_critical_components');
2234: get_job_ops(p_org_id, g_period_end_time);
2235: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_comp_shortage:Returned from get_job_ops');
2236: get_job_critical_components(p_org_id, g_period_end_time);
2237: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_comp_shortage:Returned from get_job_critical_components');
2238:
2239: previous_jobop_comp_start_time := null;
2240: current_jobop_comp_start_time := null;
2241: IF(g_wip_job_critical_comp_tbl.COUNT > 0) THEN

Line 2243: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_comp_shortage:job_critical_comp_loop point1, inv_item_id='||

2239: previous_jobop_comp_start_time := null;
2240: current_jobop_comp_start_time := null;
2241: IF(g_wip_job_critical_comp_tbl.COUNT > 0) THEN
2242: FOR i in g_wip_job_critical_comp_tbl.FIRST .. g_wip_job_critical_comp_tbl.LAST LOOP
2243: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_comp_shortage:job_critical_comp_loop point1, inv_item_id='||
2244: g_wip_job_critical_comp_tbl(i).INVENTORY_ITEM_ID||
2245: ',date_req='||g_wip_job_critical_comp_tbl(i).DATE_REQUIRED||
2246: ',subinv='||g_wip_job_critical_comp_tbl(i).SUPPLY_SUBINVENOTRY||
2247: ',quantity_open='||g_wip_job_critical_comp_tbl(i).QUANTITY_OPEN);

Line 2251: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, inc exp receipt=1');

2247: ',quantity_open='||g_wip_job_critical_comp_tbl(i).QUANTITY_OPEN);
2248:
2249: current_jobop_comp_start_time := g_wip_job_critical_comp_tbl(i).DATE_REQUIRED;
2250: if(g_org_comp_calc_rec.inc_expected_rcpts = 1) then
2251: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, inc exp receipt=1');
2252: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, previous_jobop_comp_start_date='||to_char(previous_jobop_comp_start_time, 'DD-MON-YYYY HH24:MI:SS'));
2253: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, previous_jobop_comp_start_time='||get_time_in_secs(previous_jobop_comp_start_time));
2254: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, current_jobop_comp_start_date='||to_char(current_jobop_comp_start_time, 'DD-MON-YYYY HH24:MI:SS'));
2255: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, current_jobop_comp_start_time='||get_time_in_secs(current_jobop_comp_start_time));

Line 2252: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, previous_jobop_comp_start_date='||to_char(previous_jobop_comp_start_time, 'DD-MON-YYYY HH24:MI:SS'));

2248:
2249: current_jobop_comp_start_time := g_wip_job_critical_comp_tbl(i).DATE_REQUIRED;
2250: if(g_org_comp_calc_rec.inc_expected_rcpts = 1) then
2251: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, inc exp receipt=1');
2252: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, previous_jobop_comp_start_date='||to_char(previous_jobop_comp_start_time, 'DD-MON-YYYY HH24:MI:SS'));
2253: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, previous_jobop_comp_start_time='||get_time_in_secs(previous_jobop_comp_start_time));
2254: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, current_jobop_comp_start_date='||to_char(current_jobop_comp_start_time, 'DD-MON-YYYY HH24:MI:SS'));
2255: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, current_jobop_comp_start_time='||get_time_in_secs(current_jobop_comp_start_time));
2256: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, supply_cutoff_time='||g_org_comp_calc_rec.supply_cutoff_time_in_sec);

Line 2253: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, previous_jobop_comp_start_time='||get_time_in_secs(previous_jobop_comp_start_time));

2249: current_jobop_comp_start_time := g_wip_job_critical_comp_tbl(i).DATE_REQUIRED;
2250: if(g_org_comp_calc_rec.inc_expected_rcpts = 1) then
2251: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, inc exp receipt=1');
2252: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, previous_jobop_comp_start_date='||to_char(previous_jobop_comp_start_time, 'DD-MON-YYYY HH24:MI:SS'));
2253: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, previous_jobop_comp_start_time='||get_time_in_secs(previous_jobop_comp_start_time));
2254: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, current_jobop_comp_start_date='||to_char(current_jobop_comp_start_time, 'DD-MON-YYYY HH24:MI:SS'));
2255: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, current_jobop_comp_start_time='||get_time_in_secs(current_jobop_comp_start_time));
2256: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, supply_cutoff_time='||g_org_comp_calc_rec.supply_cutoff_time_in_sec);
2257:

Line 2254: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, current_jobop_comp_start_date='||to_char(current_jobop_comp_start_time, 'DD-MON-YYYY HH24:MI:SS'));

2250: if(g_org_comp_calc_rec.inc_expected_rcpts = 1) then
2251: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, inc exp receipt=1');
2252: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, previous_jobop_comp_start_date='||to_char(previous_jobop_comp_start_time, 'DD-MON-YYYY HH24:MI:SS'));
2253: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, previous_jobop_comp_start_time='||get_time_in_secs(previous_jobop_comp_start_time));
2254: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, current_jobop_comp_start_date='||to_char(current_jobop_comp_start_time, 'DD-MON-YYYY HH24:MI:SS'));
2255: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, current_jobop_comp_start_time='||get_time_in_secs(current_jobop_comp_start_time));
2256: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, supply_cutoff_time='||g_org_comp_calc_rec.supply_cutoff_time_in_sec);
2257:
2258: --previous job op and current job op are on same day

Line 2255: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, current_jobop_comp_start_time='||get_time_in_secs(current_jobop_comp_start_time));

2251: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, inc exp receipt=1');
2252: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, previous_jobop_comp_start_date='||to_char(previous_jobop_comp_start_time, 'DD-MON-YYYY HH24:MI:SS'));
2253: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, previous_jobop_comp_start_time='||get_time_in_secs(previous_jobop_comp_start_time));
2254: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, current_jobop_comp_start_date='||to_char(current_jobop_comp_start_time, 'DD-MON-YYYY HH24:MI:SS'));
2255: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, current_jobop_comp_start_time='||get_time_in_secs(current_jobop_comp_start_time));
2256: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, supply_cutoff_time='||g_org_comp_calc_rec.supply_cutoff_time_in_sec);
2257:
2258: --previous job op and current job op are on same day
2259: if(trunc(previous_jobop_comp_start_time) = trunc(current_jobop_comp_start_time)) then

Line 2256: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, supply_cutoff_time='||g_org_comp_calc_rec.supply_cutoff_time_in_sec);

2252: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, previous_jobop_comp_start_date='||to_char(previous_jobop_comp_start_time, 'DD-MON-YYYY HH24:MI:SS'));
2253: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, previous_jobop_comp_start_time='||get_time_in_secs(previous_jobop_comp_start_time));
2254: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, current_jobop_comp_start_date='||to_char(current_jobop_comp_start_time, 'DD-MON-YYYY HH24:MI:SS'));
2255: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, current_jobop_comp_start_time='||get_time_in_secs(current_jobop_comp_start_time));
2256: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, supply_cutoff_time='||g_org_comp_calc_rec.supply_cutoff_time_in_sec);
2257:
2258: --previous job op and current job op are on same day
2259: if(trunc(previous_jobop_comp_start_time) = trunc(current_jobop_comp_start_time)) then
2260: if(get_time_in_secs(previous_jobop_comp_start_time) < g_org_comp_calc_rec.supply_cutoff_time_in_sec AND

Line 2262: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, include expected receipt code called for same day');

2258: --previous job op and current job op are on same day
2259: if(trunc(previous_jobop_comp_start_time) = trunc(current_jobop_comp_start_time)) then
2260: if(get_time_in_secs(previous_jobop_comp_start_time) < g_org_comp_calc_rec.supply_cutoff_time_in_sec AND
2261: get_time_in_secs(current_jobop_comp_start_time) >= g_org_comp_calc_rec.supply_cutoff_time_in_sec) then
2262: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, include expected receipt code called for same day');
2263: calc_expected_receipts(p_org_id, trunc(current_jobop_comp_start_time));
2264: end if;
2265: end if;
2266:

Line 2270: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, include expected receipt code called for prev day = null');

2266:
2267: --no previous job op and current job start time is past rcpt time, should happen for first jobop in list only
2268: if(previous_jobop_comp_start_time is null) then
2269: if (get_time_in_secs(current_jobop_comp_start_time) >= g_org_comp_calc_rec.supply_cutoff_time_in_sec) then
2270: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, include expected receipt code called for prev day = null');
2271: calc_expected_receipts(p_org_id, trunc(current_jobop_comp_start_time));
2272: end if;
2273: end if;
2274:

Line 2278: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, include expected receipt code called for first job of day');

2274:
2275: --previous job op was on previous day and current job op is current day, this would be executed for first job of day only
2276: if (trunc(previous_jobop_comp_start_time) < trunc(current_jobop_comp_start_time)) then
2277: if (get_time_in_secs(current_jobop_comp_start_time) >= g_org_comp_calc_rec.supply_cutoff_time_in_sec) then
2278: wip_ws_util.trace_log('WIP_WS_SHORTAGE:ks_debug, include expected receipt code called for first job of day');
2279: calc_expected_receipts(p_org_id, trunc(current_jobop_comp_start_time));
2280: end if;
2281: end if;
2282:

Line 2287: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_comp_shortage:opening critical comp avail csr');

2283: end if;
2284: l_inv_item_id := g_wip_job_critical_comp_tbl(i).INVENTORY_ITEM_ID;
2285: l_supply_subinv := g_wip_job_critical_comp_tbl(i).SUPPLY_SUBINVENOTRY;
2286:
2287: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_comp_shortage:opening critical comp avail csr');
2288: for c_critical_comp_csr in critical_comp_csr loop
2289: l_item_project_avail_qty := c_critical_comp_csr.projected_avail_qty;
2290: l_item_onhand_qty := c_critical_comp_csr.onhand_qty;
2291: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_comp_shortage:projected_avail='||l_item_project_avail_qty||', onhand='||l_item_onhand_qty||', rowid='||c_critical_comp_csr.rowid);

Line 2291: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_comp_shortage:projected_avail='||l_item_project_avail_qty||', onhand='||l_item_onhand_qty||', rowid='||c_critical_comp_csr.rowid);

2287: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_comp_shortage:opening critical comp avail csr');
2288: for c_critical_comp_csr in critical_comp_csr loop
2289: l_item_project_avail_qty := c_critical_comp_csr.projected_avail_qty;
2290: l_item_onhand_qty := c_critical_comp_csr.onhand_qty;
2291: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_comp_shortage:projected_avail='||l_item_project_avail_qty||', onhand='||l_item_onhand_qty||', rowid='||c_critical_comp_csr.rowid);
2292: end loop;
2293:
2294: if(l_item_project_avail_qty < 0) then l_item_project_avail_qty := 0; end if;
2295: g_wip_job_critical_comp_tbl(i).ONHAND_QTY := l_item_onhand_qty;

Line 2313: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_comp_shortage: after consumption projected_avail='||l_item_project_avail_qty||', onhand='||l_item_onhand_qty);

2309: if(l_item_project_avail_qty < 0 ) then
2310: l_item_project_avail_qty := 0;
2311: end if;
2312: end if;
2313: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_comp_shortage: after consumption projected_avail='||l_item_project_avail_qty||', onhand='||l_item_onhand_qty);
2314:
2315: update wip_ws_critical_comp_temp
2316: set projected_avail_qty = l_item_project_avail_qty
2317: where organization_id = p_org_id

Line 2324: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_comp_shortage:Point 100, total critical comp to be inserted='||g_wip_job_critical_comp_tbl.COUNT);

2320:
2321: previous_jobop_comp_start_time := current_jobop_comp_start_time;
2322: END LOOP;
2323: END IF;
2324: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_comp_shortage:Point 100, total critical comp to be inserted='||g_wip_job_critical_comp_tbl.COUNT);
2325:
2326: END calc_comp_shortage;
2327:
2328:

Line 2362: wip_logger.entryPoint(p_procName => 'WIP_WS_SHORTAGE.calc_shortage',

2358:
2359: if (g_logLevel <= wip_constants.trace_logging) then
2360: l_params(1).paramName := 'p_org_id';
2361: l_params(1).paramValue := p_org_id;
2362: wip_logger.entryPoint(p_procName => 'WIP_WS_SHORTAGE.calc_shortage',
2363: p_params => l_params,
2364: x_returnStatus => l_returnStatus);
2365: if(l_returnStatus <> fnd_api.g_ret_sts_success) then
2366: raise fnd_api.g_exc_unexpected_error;

Line 2383: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_shortage:calling get_org_comp_calc_param');

2379: l_conc_status := FND_CONCURRENT.SET_COMPLETION_STATUS('ERROR', 'Errors encountered in calculation program, please check the log file.');
2380: return;
2381: end if;
2382:
2383: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_shortage:calling get_org_comp_calc_param');
2384: get_org_comp_calc_param(p_org_id, l_pref_exists);
2385: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_shortage: returned from get_org_comp_calc_param with '||l_pref_exists);
2386: if(l_pref_exists = 'N') then
2387: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_shortage:No Preference exists for this organization');

Line 2385: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_shortage: returned from get_org_comp_calc_param with '||l_pref_exists);

2381: end if;
2382:
2383: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_shortage:calling get_org_comp_calc_param');
2384: get_org_comp_calc_param(p_org_id, l_pref_exists);
2385: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_shortage: returned from get_org_comp_calc_param with '||l_pref_exists);
2386: if(l_pref_exists = 'N') then
2387: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_shortage:No Preference exists for this organization');
2388: fnd_message.set_name('WIP','WIP_WS_SHORTAGE_NOPREF');
2389: raise FND_API.G_EXC_ERROR;

Line 2387: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_shortage:No Preference exists for this organization');

2383: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_shortage:calling get_org_comp_calc_param');
2384: get_org_comp_calc_param(p_org_id, l_pref_exists);
2385: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_shortage: returned from get_org_comp_calc_param with '||l_pref_exists);
2386: if(l_pref_exists = 'N') then
2387: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_shortage:No Preference exists for this organization');
2388: fnd_message.set_name('WIP','WIP_WS_SHORTAGE_NOPREF');
2389: raise FND_API.G_EXC_ERROR;
2390: end if;
2391:

Line 2388: fnd_message.set_name('WIP','WIP_WS_SHORTAGE_NOPREF');

2384: get_org_comp_calc_param(p_org_id, l_pref_exists);
2385: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_shortage: returned from get_org_comp_calc_param with '||l_pref_exists);
2386: if(l_pref_exists = 'N') then
2387: wip_ws_util.trace_log('WIP_WS_SHORTAGE:calc_shortage:No Preference exists for this organization');
2388: fnd_message.set_name('WIP','WIP_WS_SHORTAGE_NOPREF');
2389: raise FND_API.G_EXC_ERROR;
2390: end if;
2391:
2392: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:calc_shortage: calling get_period_end_time' );

Line 2392: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:calc_shortage: calling get_period_end_time' );

2388: fnd_message.set_name('WIP','WIP_WS_SHORTAGE_NOPREF');
2389: raise FND_API.G_EXC_ERROR;
2390: end if;
2391:
2392: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:calc_shortage: calling get_period_end_time' );
2393: g_period_end_time := get_period_end_time(p_org_id);
2394: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:calc_shortage:g_period_end_time='||to_char(g_period_end_time));
2395:
2396:

Line 2394: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:calc_shortage:g_period_end_time='||to_char(g_period_end_time));

2390: end if;
2391:
2392: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:calc_shortage: calling get_period_end_time' );
2393: g_period_end_time := get_period_end_time(p_org_id);
2394: wip_ws_util.trace_log( 'WIP_WS_SHORTAGE:calc_shortage:g_period_end_time='||to_char(g_period_end_time));
2395:
2396:
2397: wip_ws_util.log_time('WIPWSSHB:calc_shortage:Calling calc_comp_shortage');
2398: wip_ws_util.trace_log('WIPWSSHB:calc_shortage:Calling calc_comp_shortage');

Line 2419: wip_logger.exitPoint(p_procName => 'WIP_WS_SHORTAGE.calc_shortage',

2415: wip_ws_util.log_time('WIPWSSHB:calc_shortage:Done with db commit');
2416: wip_ws_util.trace_log('WIPWSSHB:calc_shortage:Done with db commit');
2417:
2418: if (g_logLevel <= wip_constants.trace_logging) then
2419: wip_logger.exitPoint(p_procName => 'WIP_WS_SHORTAGE.calc_shortage',
2420: p_procReturnStatus => retcode,
2421: p_msg => 'Request processed successfully!',
2422: x_returnStatus => l_returnStatus);
2423: end if;

Line 2431: fnd_message.set_token('ERROR_TEXT', 'wip_ws_shortage.calc_shortage: ' || SQLERRM);

2427: wip_ws_util.trace_log('WIPWSSHB:calc_shortage: Exception: Unexpected error');
2428: ROLLBACK TO WIP_SHORT_CALC_START;
2429: retcode := 2; -- End with error
2430: fnd_message.set_name('WIP', 'WIP_UNEXPECTED_ERROR');
2431: fnd_message.set_token('ERROR_TEXT', 'wip_ws_shortage.calc_shortage: ' || SQLERRM);
2432: errbuf := fnd_message.get;
2433: if (g_logLevel <= wip_constants.trace_logging) then
2434: wip_logger.exitPoint(p_procName => 'WIP_WS_SHORTAGE.calc_shortage',
2435: p_procReturnStatus => retcode,

Line 2434: wip_logger.exitPoint(p_procName => 'WIP_WS_SHORTAGE.calc_shortage',

2430: fnd_message.set_name('WIP', 'WIP_UNEXPECTED_ERROR');
2431: fnd_message.set_token('ERROR_TEXT', 'wip_ws_shortage.calc_shortage: ' || SQLERRM);
2432: errbuf := fnd_message.get;
2433: if (g_logLevel <= wip_constants.trace_logging) then
2434: wip_logger.exitPoint(p_procName => 'WIP_WS_SHORTAGE.calc_shortage',
2435: p_procReturnStatus => retcode,
2436: p_msg => 'unexpected error: ' || SQLERRM,
2437: x_returnStatus => l_returnStatus);
2438: end if;

Line 2449: wip_logger.exitPoint(p_procName => 'WIP_WS_SHORTAGE.calc_shortage',

2445: errbuf := fnd_message.get;
2446: fnd_file.put_line(fnd_file.log, errbuf);
2447: --end bug 6756693
2448: if (g_logLevel <= wip_constants.trace_logging) then
2449: wip_logger.exitPoint(p_procName => 'WIP_WS_SHORTAGE.calc_shortage',
2450: p_procReturnStatus => retcode,
2451: p_msg => 'expected error: ' || errbuf,
2452: x_returnStatus => l_returnStatus);
2453: end if;

Line 2460: wip_logger.exitPoint(p_procName => 'WIP_WS_SHORTAGE.calc_shortage',

2456: wip_ws_util.trace_log('WIPWSSHB:calc_shortage: Others Exception: '|| SQLERRM);
2457: ROLLBACK TO WIP_SHORT_CALC_START;
2458: retcode := 2; --End with error
2459: if (g_logLevel <= wip_constants.trace_logging) then
2460: wip_logger.exitPoint(p_procName => 'WIP_WS_SHORTAGE.calc_shortage',
2461: p_procReturnStatus => retcode,
2462: p_msg => 'error: ' || SQLERRM,
2463: x_returnStatus => l_returnStatus);
2464: end if;

Line 2466: fnd_message.set_token('ERROR_TEXT', 'wip_ws_shortage.calc_shortage: ' || SQLERRM);

2462: p_msg => 'error: ' || SQLERRM,
2463: x_returnStatus => l_returnStatus);
2464: end if;
2465: fnd_message.set_name('WIP', 'WIP_UNEXPECTED_ERROR');
2466: fnd_message.set_token('ERROR_TEXT', 'wip_ws_shortage.calc_shortage: ' || SQLERRM);
2467: errbuf := fnd_message.get;
2468:
2469: END calc_shortage;
2470:

Line 2473: END WIP_WS_SHORTAGE;

2469: END calc_shortage;
2470:
2471:
2472:
2473: END WIP_WS_SHORTAGE;