122: ,p_currency_cnv_date IN VARCHAR2
123: ,p_function_currency IN VARCHAR2
124: ,p_rate_not_found OUT NOCOPY VARCHAR2
125: ) IS
126: l_func_currency_code jmf_shikyu_cur_rpt_temp.func_currency_code%TYPE;
127: l_currency_cnv_date DATE;
128: l_api_name CONSTANT VARCHAR2(30) := 'cuar_get_cost_data';
129:
130:
140: END IF;
141:
142: l_func_currency_code :=p_function_currency ;
143:
144: DELETE FROM jmf_shikyu_cur_rpt_temp;
145: COMMIT;
146:
147: /* the input date format depends on server's setting.
148: To avoid the potential issues,use function which is not using mask.
347: ,haotl.NAME)
348: AND haotl.NAME <= nvl(lp_inv_org_name_to
349: ,haotl.NAME);
350:
351: l_source jmf_shikyu_cur_rpt_temp.SOURCE%TYPE;
352: l_inventory_org_name jmf_shikyu_cur_rpt_temp.inventory_org_name%TYPE;
353: l_project_num jmf_shikyu_cur_rpt_temp.project_num%TYPE;
354: l_task_num jmf_shikyu_cur_rpt_temp.task_num%TYPE;
355: l_vendor_name jmf_shikyu_cur_rpt_temp.vendor_name%TYPE;
348: AND haotl.NAME <= nvl(lp_inv_org_name_to
349: ,haotl.NAME);
350:
351: l_source jmf_shikyu_cur_rpt_temp.SOURCE%TYPE;
352: l_inventory_org_name jmf_shikyu_cur_rpt_temp.inventory_org_name%TYPE;
353: l_project_num jmf_shikyu_cur_rpt_temp.project_num%TYPE;
354: l_task_num jmf_shikyu_cur_rpt_temp.task_num%TYPE;
355: l_vendor_name jmf_shikyu_cur_rpt_temp.vendor_name%TYPE;
356: l_vendor_site_code jmf_shikyu_cur_rpt_temp.vendor_site_code%TYPE;
349: ,haotl.NAME);
350:
351: l_source jmf_shikyu_cur_rpt_temp.SOURCE%TYPE;
352: l_inventory_org_name jmf_shikyu_cur_rpt_temp.inventory_org_name%TYPE;
353: l_project_num jmf_shikyu_cur_rpt_temp.project_num%TYPE;
354: l_task_num jmf_shikyu_cur_rpt_temp.task_num%TYPE;
355: l_vendor_name jmf_shikyu_cur_rpt_temp.vendor_name%TYPE;
356: l_vendor_site_code jmf_shikyu_cur_rpt_temp.vendor_site_code%TYPE;
357: l_order_num jmf_shikyu_cur_rpt_temp.order_num%TYPE;
350:
351: l_source jmf_shikyu_cur_rpt_temp.SOURCE%TYPE;
352: l_inventory_org_name jmf_shikyu_cur_rpt_temp.inventory_org_name%TYPE;
353: l_project_num jmf_shikyu_cur_rpt_temp.project_num%TYPE;
354: l_task_num jmf_shikyu_cur_rpt_temp.task_num%TYPE;
355: l_vendor_name jmf_shikyu_cur_rpt_temp.vendor_name%TYPE;
356: l_vendor_site_code jmf_shikyu_cur_rpt_temp.vendor_site_code%TYPE;
357: l_order_num jmf_shikyu_cur_rpt_temp.order_num%TYPE;
358: l_line_num jmf_shikyu_cur_rpt_temp.line_num%TYPE;
351: l_source jmf_shikyu_cur_rpt_temp.SOURCE%TYPE;
352: l_inventory_org_name jmf_shikyu_cur_rpt_temp.inventory_org_name%TYPE;
353: l_project_num jmf_shikyu_cur_rpt_temp.project_num%TYPE;
354: l_task_num jmf_shikyu_cur_rpt_temp.task_num%TYPE;
355: l_vendor_name jmf_shikyu_cur_rpt_temp.vendor_name%TYPE;
356: l_vendor_site_code jmf_shikyu_cur_rpt_temp.vendor_site_code%TYPE;
357: l_order_num jmf_shikyu_cur_rpt_temp.order_num%TYPE;
358: l_line_num jmf_shikyu_cur_rpt_temp.line_num%TYPE;
359: l_item_id jmf_shikyu_cur_rpt_temp.item_id%TYPE;
352: l_inventory_org_name jmf_shikyu_cur_rpt_temp.inventory_org_name%TYPE;
353: l_project_num jmf_shikyu_cur_rpt_temp.project_num%TYPE;
354: l_task_num jmf_shikyu_cur_rpt_temp.task_num%TYPE;
355: l_vendor_name jmf_shikyu_cur_rpt_temp.vendor_name%TYPE;
356: l_vendor_site_code jmf_shikyu_cur_rpt_temp.vendor_site_code%TYPE;
357: l_order_num jmf_shikyu_cur_rpt_temp.order_num%TYPE;
358: l_line_num jmf_shikyu_cur_rpt_temp.line_num%TYPE;
359: l_item_id jmf_shikyu_cur_rpt_temp.item_id%TYPE;
360: l_item_name jmf_shikyu_cur_rpt_temp.item_name%TYPE;
353: l_project_num jmf_shikyu_cur_rpt_temp.project_num%TYPE;
354: l_task_num jmf_shikyu_cur_rpt_temp.task_num%TYPE;
355: l_vendor_name jmf_shikyu_cur_rpt_temp.vendor_name%TYPE;
356: l_vendor_site_code jmf_shikyu_cur_rpt_temp.vendor_site_code%TYPE;
357: l_order_num jmf_shikyu_cur_rpt_temp.order_num%TYPE;
358: l_line_num jmf_shikyu_cur_rpt_temp.line_num%TYPE;
359: l_item_id jmf_shikyu_cur_rpt_temp.item_id%TYPE;
360: l_item_name jmf_shikyu_cur_rpt_temp.item_name%TYPE;
361: l_item_desc jmf_shikyu_cur_rpt_temp.item_desc%TYPE;
354: l_task_num jmf_shikyu_cur_rpt_temp.task_num%TYPE;
355: l_vendor_name jmf_shikyu_cur_rpt_temp.vendor_name%TYPE;
356: l_vendor_site_code jmf_shikyu_cur_rpt_temp.vendor_site_code%TYPE;
357: l_order_num jmf_shikyu_cur_rpt_temp.order_num%TYPE;
358: l_line_num jmf_shikyu_cur_rpt_temp.line_num%TYPE;
359: l_item_id jmf_shikyu_cur_rpt_temp.item_id%TYPE;
360: l_item_name jmf_shikyu_cur_rpt_temp.item_name%TYPE;
361: l_item_desc jmf_shikyu_cur_rpt_temp.item_desc%TYPE;
362: l_unit_price jmf_shikyu_cur_rpt_temp.unit_price%TYPE;
355: l_vendor_name jmf_shikyu_cur_rpt_temp.vendor_name%TYPE;
356: l_vendor_site_code jmf_shikyu_cur_rpt_temp.vendor_site_code%TYPE;
357: l_order_num jmf_shikyu_cur_rpt_temp.order_num%TYPE;
358: l_line_num jmf_shikyu_cur_rpt_temp.line_num%TYPE;
359: l_item_id jmf_shikyu_cur_rpt_temp.item_id%TYPE;
360: l_item_name jmf_shikyu_cur_rpt_temp.item_name%TYPE;
361: l_item_desc jmf_shikyu_cur_rpt_temp.item_desc%TYPE;
362: l_unit_price jmf_shikyu_cur_rpt_temp.unit_price%TYPE;
363: l_currency jmf_shikyu_cur_rpt_temp.currency%TYPE;
356: l_vendor_site_code jmf_shikyu_cur_rpt_temp.vendor_site_code%TYPE;
357: l_order_num jmf_shikyu_cur_rpt_temp.order_num%TYPE;
358: l_line_num jmf_shikyu_cur_rpt_temp.line_num%TYPE;
359: l_item_id jmf_shikyu_cur_rpt_temp.item_id%TYPE;
360: l_item_name jmf_shikyu_cur_rpt_temp.item_name%TYPE;
361: l_item_desc jmf_shikyu_cur_rpt_temp.item_desc%TYPE;
362: l_unit_price jmf_shikyu_cur_rpt_temp.unit_price%TYPE;
363: l_currency jmf_shikyu_cur_rpt_temp.currency%TYPE;
364: l_quantity jmf_shikyu_cur_rpt_temp.quantity%TYPE;
357: l_order_num jmf_shikyu_cur_rpt_temp.order_num%TYPE;
358: l_line_num jmf_shikyu_cur_rpt_temp.line_num%TYPE;
359: l_item_id jmf_shikyu_cur_rpt_temp.item_id%TYPE;
360: l_item_name jmf_shikyu_cur_rpt_temp.item_name%TYPE;
361: l_item_desc jmf_shikyu_cur_rpt_temp.item_desc%TYPE;
362: l_unit_price jmf_shikyu_cur_rpt_temp.unit_price%TYPE;
363: l_currency jmf_shikyu_cur_rpt_temp.currency%TYPE;
364: l_quantity jmf_shikyu_cur_rpt_temp.quantity%TYPE;
365: l_uom_code jmf_shikyu_cur_rpt_temp.uom_code%TYPE;
358: l_line_num jmf_shikyu_cur_rpt_temp.line_num%TYPE;
359: l_item_id jmf_shikyu_cur_rpt_temp.item_id%TYPE;
360: l_item_name jmf_shikyu_cur_rpt_temp.item_name%TYPE;
361: l_item_desc jmf_shikyu_cur_rpt_temp.item_desc%TYPE;
362: l_unit_price jmf_shikyu_cur_rpt_temp.unit_price%TYPE;
363: l_currency jmf_shikyu_cur_rpt_temp.currency%TYPE;
364: l_quantity jmf_shikyu_cur_rpt_temp.quantity%TYPE;
365: l_uom_code jmf_shikyu_cur_rpt_temp.uom_code%TYPE;
366: l_unit_cost_frozen jmf_shikyu_cur_rpt_temp.unit_cost_frozen%TYPE;
359: l_item_id jmf_shikyu_cur_rpt_temp.item_id%TYPE;
360: l_item_name jmf_shikyu_cur_rpt_temp.item_name%TYPE;
361: l_item_desc jmf_shikyu_cur_rpt_temp.item_desc%TYPE;
362: l_unit_price jmf_shikyu_cur_rpt_temp.unit_price%TYPE;
363: l_currency jmf_shikyu_cur_rpt_temp.currency%TYPE;
364: l_quantity jmf_shikyu_cur_rpt_temp.quantity%TYPE;
365: l_uom_code jmf_shikyu_cur_rpt_temp.uom_code%TYPE;
366: l_unit_cost_frozen jmf_shikyu_cur_rpt_temp.unit_cost_frozen%TYPE;
367: l_unit_cost_plan jmf_shikyu_cur_rpt_temp.unit_cost_plan%TYPE;
360: l_item_name jmf_shikyu_cur_rpt_temp.item_name%TYPE;
361: l_item_desc jmf_shikyu_cur_rpt_temp.item_desc%TYPE;
362: l_unit_price jmf_shikyu_cur_rpt_temp.unit_price%TYPE;
363: l_currency jmf_shikyu_cur_rpt_temp.currency%TYPE;
364: l_quantity jmf_shikyu_cur_rpt_temp.quantity%TYPE;
365: l_uom_code jmf_shikyu_cur_rpt_temp.uom_code%TYPE;
366: l_unit_cost_frozen jmf_shikyu_cur_rpt_temp.unit_cost_frozen%TYPE;
367: l_unit_cost_plan jmf_shikyu_cur_rpt_temp.unit_cost_plan%TYPE;
368: l_func_unit_price jmf_shikyu_cur_rpt_temp.func_unit_price%TYPE;
361: l_item_desc jmf_shikyu_cur_rpt_temp.item_desc%TYPE;
362: l_unit_price jmf_shikyu_cur_rpt_temp.unit_price%TYPE;
363: l_currency jmf_shikyu_cur_rpt_temp.currency%TYPE;
364: l_quantity jmf_shikyu_cur_rpt_temp.quantity%TYPE;
365: l_uom_code jmf_shikyu_cur_rpt_temp.uom_code%TYPE;
366: l_unit_cost_frozen jmf_shikyu_cur_rpt_temp.unit_cost_frozen%TYPE;
367: l_unit_cost_plan jmf_shikyu_cur_rpt_temp.unit_cost_plan%TYPE;
368: l_func_unit_price jmf_shikyu_cur_rpt_temp.func_unit_price%TYPE;
369: l_qty_rate jmf_shikyu_cur_rpt_temp.primary_qty%TYPE;
362: l_unit_price jmf_shikyu_cur_rpt_temp.unit_price%TYPE;
363: l_currency jmf_shikyu_cur_rpt_temp.currency%TYPE;
364: l_quantity jmf_shikyu_cur_rpt_temp.quantity%TYPE;
365: l_uom_code jmf_shikyu_cur_rpt_temp.uom_code%TYPE;
366: l_unit_cost_frozen jmf_shikyu_cur_rpt_temp.unit_cost_frozen%TYPE;
367: l_unit_cost_plan jmf_shikyu_cur_rpt_temp.unit_cost_plan%TYPE;
368: l_func_unit_price jmf_shikyu_cur_rpt_temp.func_unit_price%TYPE;
369: l_qty_rate jmf_shikyu_cur_rpt_temp.primary_qty%TYPE;
370: l_func_currency_code jmf_shikyu_cur_rpt_temp.func_currency_code%TYPE;
363: l_currency jmf_shikyu_cur_rpt_temp.currency%TYPE;
364: l_quantity jmf_shikyu_cur_rpt_temp.quantity%TYPE;
365: l_uom_code jmf_shikyu_cur_rpt_temp.uom_code%TYPE;
366: l_unit_cost_frozen jmf_shikyu_cur_rpt_temp.unit_cost_frozen%TYPE;
367: l_unit_cost_plan jmf_shikyu_cur_rpt_temp.unit_cost_plan%TYPE;
368: l_func_unit_price jmf_shikyu_cur_rpt_temp.func_unit_price%TYPE;
369: l_qty_rate jmf_shikyu_cur_rpt_temp.primary_qty%TYPE;
370: l_func_currency_code jmf_shikyu_cur_rpt_temp.func_currency_code%TYPE;
371: l_message varchar2(200);
364: l_quantity jmf_shikyu_cur_rpt_temp.quantity%TYPE;
365: l_uom_code jmf_shikyu_cur_rpt_temp.uom_code%TYPE;
366: l_unit_cost_frozen jmf_shikyu_cur_rpt_temp.unit_cost_frozen%TYPE;
367: l_unit_cost_plan jmf_shikyu_cur_rpt_temp.unit_cost_plan%TYPE;
368: l_func_unit_price jmf_shikyu_cur_rpt_temp.func_unit_price%TYPE;
369: l_qty_rate jmf_shikyu_cur_rpt_temp.primary_qty%TYPE;
370: l_func_currency_code jmf_shikyu_cur_rpt_temp.func_currency_code%TYPE;
371: l_message varchar2(200);
372: l_order_line_id jmf_shikyu_cur_rpt_temp.order_line_id%TYPE;--Added to display release number(When unreceived then mean release_num)
365: l_uom_code jmf_shikyu_cur_rpt_temp.uom_code%TYPE;
366: l_unit_cost_frozen jmf_shikyu_cur_rpt_temp.unit_cost_frozen%TYPE;
367: l_unit_cost_plan jmf_shikyu_cur_rpt_temp.unit_cost_plan%TYPE;
368: l_func_unit_price jmf_shikyu_cur_rpt_temp.func_unit_price%TYPE;
369: l_qty_rate jmf_shikyu_cur_rpt_temp.primary_qty%TYPE;
370: l_func_currency_code jmf_shikyu_cur_rpt_temp.func_currency_code%TYPE;
371: l_message varchar2(200);
372: l_order_line_id jmf_shikyu_cur_rpt_temp.order_line_id%TYPE;--Added to display release number(When unreceived then mean release_num)
373:
366: l_unit_cost_frozen jmf_shikyu_cur_rpt_temp.unit_cost_frozen%TYPE;
367: l_unit_cost_plan jmf_shikyu_cur_rpt_temp.unit_cost_plan%TYPE;
368: l_func_unit_price jmf_shikyu_cur_rpt_temp.func_unit_price%TYPE;
369: l_qty_rate jmf_shikyu_cur_rpt_temp.primary_qty%TYPE;
370: l_func_currency_code jmf_shikyu_cur_rpt_temp.func_currency_code%TYPE;
371: l_message varchar2(200);
372: l_order_line_id jmf_shikyu_cur_rpt_temp.order_line_id%TYPE;--Added to display release number(When unreceived then mean release_num)
373:
374: BEGIN
368: l_func_unit_price jmf_shikyu_cur_rpt_temp.func_unit_price%TYPE;
369: l_qty_rate jmf_shikyu_cur_rpt_temp.primary_qty%TYPE;
370: l_func_currency_code jmf_shikyu_cur_rpt_temp.func_currency_code%TYPE;
371: l_message varchar2(200);
372: l_order_line_id jmf_shikyu_cur_rpt_temp.order_line_id%TYPE;--Added to display release number(When unreceived then mean release_num)
373:
374: BEGIN
375:
376: -- g_debug_level := fnd_log.g_current_runtime_level;
477:
478: ELSIF (l_quantity <> 0) AND (l_unit_cost_frozen <> l_unit_cost_plan ) THEN
479:
480:
481: INSERT INTO jmf_shikyu_cur_rpt_temp
482: (SOURCE
483: ,inventory_org_name
484: ,project_num
485: ,task_num
660: AND nvl(JMF_SHIKYU_GRP. GET_SUBCONTRACTING_TYPE(repo.oem_organization_id, repo.tp_organization_id),
661: NULL) = 'C' ;
662:
663:
664: l_source jmf_shikyu_cur_rpt_temp.SOURCE%TYPE;
665: l_inventory_org_name jmf_shikyu_cur_rpt_temp.inventory_org_name%TYPE;
666: l_project_num jmf_shikyu_cur_rpt_temp.project_num%TYPE;
667: l_task_num jmf_shikyu_cur_rpt_temp.task_num%TYPE;
668: l_vendor_name jmf_shikyu_cur_rpt_temp.vendor_name%TYPE;
661: NULL) = 'C' ;
662:
663:
664: l_source jmf_shikyu_cur_rpt_temp.SOURCE%TYPE;
665: l_inventory_org_name jmf_shikyu_cur_rpt_temp.inventory_org_name%TYPE;
666: l_project_num jmf_shikyu_cur_rpt_temp.project_num%TYPE;
667: l_task_num jmf_shikyu_cur_rpt_temp.task_num%TYPE;
668: l_vendor_name jmf_shikyu_cur_rpt_temp.vendor_name%TYPE;
669: l_vendor_site_code jmf_shikyu_cur_rpt_temp.vendor_site_code%TYPE;
662:
663:
664: l_source jmf_shikyu_cur_rpt_temp.SOURCE%TYPE;
665: l_inventory_org_name jmf_shikyu_cur_rpt_temp.inventory_org_name%TYPE;
666: l_project_num jmf_shikyu_cur_rpt_temp.project_num%TYPE;
667: l_task_num jmf_shikyu_cur_rpt_temp.task_num%TYPE;
668: l_vendor_name jmf_shikyu_cur_rpt_temp.vendor_name%TYPE;
669: l_vendor_site_code jmf_shikyu_cur_rpt_temp.vendor_site_code%TYPE;
670: l_order_num jmf_shikyu_cur_rpt_temp.order_num%TYPE;
663:
664: l_source jmf_shikyu_cur_rpt_temp.SOURCE%TYPE;
665: l_inventory_org_name jmf_shikyu_cur_rpt_temp.inventory_org_name%TYPE;
666: l_project_num jmf_shikyu_cur_rpt_temp.project_num%TYPE;
667: l_task_num jmf_shikyu_cur_rpt_temp.task_num%TYPE;
668: l_vendor_name jmf_shikyu_cur_rpt_temp.vendor_name%TYPE;
669: l_vendor_site_code jmf_shikyu_cur_rpt_temp.vendor_site_code%TYPE;
670: l_order_num jmf_shikyu_cur_rpt_temp.order_num%TYPE;
671: l_line_num jmf_shikyu_cur_rpt_temp.line_num%TYPE;
664: l_source jmf_shikyu_cur_rpt_temp.SOURCE%TYPE;
665: l_inventory_org_name jmf_shikyu_cur_rpt_temp.inventory_org_name%TYPE;
666: l_project_num jmf_shikyu_cur_rpt_temp.project_num%TYPE;
667: l_task_num jmf_shikyu_cur_rpt_temp.task_num%TYPE;
668: l_vendor_name jmf_shikyu_cur_rpt_temp.vendor_name%TYPE;
669: l_vendor_site_code jmf_shikyu_cur_rpt_temp.vendor_site_code%TYPE;
670: l_order_num jmf_shikyu_cur_rpt_temp.order_num%TYPE;
671: l_line_num jmf_shikyu_cur_rpt_temp.line_num%TYPE;
672: l_item_id jmf_shikyu_cur_rpt_temp.item_id%TYPE;
665: l_inventory_org_name jmf_shikyu_cur_rpt_temp.inventory_org_name%TYPE;
666: l_project_num jmf_shikyu_cur_rpt_temp.project_num%TYPE;
667: l_task_num jmf_shikyu_cur_rpt_temp.task_num%TYPE;
668: l_vendor_name jmf_shikyu_cur_rpt_temp.vendor_name%TYPE;
669: l_vendor_site_code jmf_shikyu_cur_rpt_temp.vendor_site_code%TYPE;
670: l_order_num jmf_shikyu_cur_rpt_temp.order_num%TYPE;
671: l_line_num jmf_shikyu_cur_rpt_temp.line_num%TYPE;
672: l_item_id jmf_shikyu_cur_rpt_temp.item_id%TYPE;
673: l_item_name jmf_shikyu_cur_rpt_temp.item_name%TYPE;
666: l_project_num jmf_shikyu_cur_rpt_temp.project_num%TYPE;
667: l_task_num jmf_shikyu_cur_rpt_temp.task_num%TYPE;
668: l_vendor_name jmf_shikyu_cur_rpt_temp.vendor_name%TYPE;
669: l_vendor_site_code jmf_shikyu_cur_rpt_temp.vendor_site_code%TYPE;
670: l_order_num jmf_shikyu_cur_rpt_temp.order_num%TYPE;
671: l_line_num jmf_shikyu_cur_rpt_temp.line_num%TYPE;
672: l_item_id jmf_shikyu_cur_rpt_temp.item_id%TYPE;
673: l_item_name jmf_shikyu_cur_rpt_temp.item_name%TYPE;
674: l_item_desc jmf_shikyu_cur_rpt_temp.item_desc%TYPE;
667: l_task_num jmf_shikyu_cur_rpt_temp.task_num%TYPE;
668: l_vendor_name jmf_shikyu_cur_rpt_temp.vendor_name%TYPE;
669: l_vendor_site_code jmf_shikyu_cur_rpt_temp.vendor_site_code%TYPE;
670: l_order_num jmf_shikyu_cur_rpt_temp.order_num%TYPE;
671: l_line_num jmf_shikyu_cur_rpt_temp.line_num%TYPE;
672: l_item_id jmf_shikyu_cur_rpt_temp.item_id%TYPE;
673: l_item_name jmf_shikyu_cur_rpt_temp.item_name%TYPE;
674: l_item_desc jmf_shikyu_cur_rpt_temp.item_desc%TYPE;
675: l_unit_price jmf_shikyu_cur_rpt_temp.unit_price%TYPE;
668: l_vendor_name jmf_shikyu_cur_rpt_temp.vendor_name%TYPE;
669: l_vendor_site_code jmf_shikyu_cur_rpt_temp.vendor_site_code%TYPE;
670: l_order_num jmf_shikyu_cur_rpt_temp.order_num%TYPE;
671: l_line_num jmf_shikyu_cur_rpt_temp.line_num%TYPE;
672: l_item_id jmf_shikyu_cur_rpt_temp.item_id%TYPE;
673: l_item_name jmf_shikyu_cur_rpt_temp.item_name%TYPE;
674: l_item_desc jmf_shikyu_cur_rpt_temp.item_desc%TYPE;
675: l_unit_price jmf_shikyu_cur_rpt_temp.unit_price%TYPE;
676: l_currency jmf_shikyu_cur_rpt_temp.currency%TYPE;
669: l_vendor_site_code jmf_shikyu_cur_rpt_temp.vendor_site_code%TYPE;
670: l_order_num jmf_shikyu_cur_rpt_temp.order_num%TYPE;
671: l_line_num jmf_shikyu_cur_rpt_temp.line_num%TYPE;
672: l_item_id jmf_shikyu_cur_rpt_temp.item_id%TYPE;
673: l_item_name jmf_shikyu_cur_rpt_temp.item_name%TYPE;
674: l_item_desc jmf_shikyu_cur_rpt_temp.item_desc%TYPE;
675: l_unit_price jmf_shikyu_cur_rpt_temp.unit_price%TYPE;
676: l_currency jmf_shikyu_cur_rpt_temp.currency%TYPE;
677: l_quantity jmf_shikyu_cur_rpt_temp.quantity%TYPE;
670: l_order_num jmf_shikyu_cur_rpt_temp.order_num%TYPE;
671: l_line_num jmf_shikyu_cur_rpt_temp.line_num%TYPE;
672: l_item_id jmf_shikyu_cur_rpt_temp.item_id%TYPE;
673: l_item_name jmf_shikyu_cur_rpt_temp.item_name%TYPE;
674: l_item_desc jmf_shikyu_cur_rpt_temp.item_desc%TYPE;
675: l_unit_price jmf_shikyu_cur_rpt_temp.unit_price%TYPE;
676: l_currency jmf_shikyu_cur_rpt_temp.currency%TYPE;
677: l_quantity jmf_shikyu_cur_rpt_temp.quantity%TYPE;
678: l_uom_code jmf_shikyu_cur_rpt_temp.uom_code%TYPE;
671: l_line_num jmf_shikyu_cur_rpt_temp.line_num%TYPE;
672: l_item_id jmf_shikyu_cur_rpt_temp.item_id%TYPE;
673: l_item_name jmf_shikyu_cur_rpt_temp.item_name%TYPE;
674: l_item_desc jmf_shikyu_cur_rpt_temp.item_desc%TYPE;
675: l_unit_price jmf_shikyu_cur_rpt_temp.unit_price%TYPE;
676: l_currency jmf_shikyu_cur_rpt_temp.currency%TYPE;
677: l_quantity jmf_shikyu_cur_rpt_temp.quantity%TYPE;
678: l_uom_code jmf_shikyu_cur_rpt_temp.uom_code%TYPE;
679: l_unit_cost_frozen jmf_shikyu_cur_rpt_temp.unit_cost_frozen%TYPE;
672: l_item_id jmf_shikyu_cur_rpt_temp.item_id%TYPE;
673: l_item_name jmf_shikyu_cur_rpt_temp.item_name%TYPE;
674: l_item_desc jmf_shikyu_cur_rpt_temp.item_desc%TYPE;
675: l_unit_price jmf_shikyu_cur_rpt_temp.unit_price%TYPE;
676: l_currency jmf_shikyu_cur_rpt_temp.currency%TYPE;
677: l_quantity jmf_shikyu_cur_rpt_temp.quantity%TYPE;
678: l_uom_code jmf_shikyu_cur_rpt_temp.uom_code%TYPE;
679: l_unit_cost_frozen jmf_shikyu_cur_rpt_temp.unit_cost_frozen%TYPE;
680: l_unit_cost_plan jmf_shikyu_cur_rpt_temp.unit_cost_plan%TYPE;
673: l_item_name jmf_shikyu_cur_rpt_temp.item_name%TYPE;
674: l_item_desc jmf_shikyu_cur_rpt_temp.item_desc%TYPE;
675: l_unit_price jmf_shikyu_cur_rpt_temp.unit_price%TYPE;
676: l_currency jmf_shikyu_cur_rpt_temp.currency%TYPE;
677: l_quantity jmf_shikyu_cur_rpt_temp.quantity%TYPE;
678: l_uom_code jmf_shikyu_cur_rpt_temp.uom_code%TYPE;
679: l_unit_cost_frozen jmf_shikyu_cur_rpt_temp.unit_cost_frozen%TYPE;
680: l_unit_cost_plan jmf_shikyu_cur_rpt_temp.unit_cost_plan%TYPE;
681: l_func_unit_price jmf_shikyu_cur_rpt_temp.func_unit_price%TYPE;
674: l_item_desc jmf_shikyu_cur_rpt_temp.item_desc%TYPE;
675: l_unit_price jmf_shikyu_cur_rpt_temp.unit_price%TYPE;
676: l_currency jmf_shikyu_cur_rpt_temp.currency%TYPE;
677: l_quantity jmf_shikyu_cur_rpt_temp.quantity%TYPE;
678: l_uom_code jmf_shikyu_cur_rpt_temp.uom_code%TYPE;
679: l_unit_cost_frozen jmf_shikyu_cur_rpt_temp.unit_cost_frozen%TYPE;
680: l_unit_cost_plan jmf_shikyu_cur_rpt_temp.unit_cost_plan%TYPE;
681: l_func_unit_price jmf_shikyu_cur_rpt_temp.func_unit_price%TYPE;
682: l_qty_rate jmf_shikyu_cur_rpt_temp.primary_qty%TYPE;
675: l_unit_price jmf_shikyu_cur_rpt_temp.unit_price%TYPE;
676: l_currency jmf_shikyu_cur_rpt_temp.currency%TYPE;
677: l_quantity jmf_shikyu_cur_rpt_temp.quantity%TYPE;
678: l_uom_code jmf_shikyu_cur_rpt_temp.uom_code%TYPE;
679: l_unit_cost_frozen jmf_shikyu_cur_rpt_temp.unit_cost_frozen%TYPE;
680: l_unit_cost_plan jmf_shikyu_cur_rpt_temp.unit_cost_plan%TYPE;
681: l_func_unit_price jmf_shikyu_cur_rpt_temp.func_unit_price%TYPE;
682: l_qty_rate jmf_shikyu_cur_rpt_temp.primary_qty%TYPE;
683: l_func_currency_code jmf_shikyu_cur_rpt_temp.func_currency_code%TYPE;
676: l_currency jmf_shikyu_cur_rpt_temp.currency%TYPE;
677: l_quantity jmf_shikyu_cur_rpt_temp.quantity%TYPE;
678: l_uom_code jmf_shikyu_cur_rpt_temp.uom_code%TYPE;
679: l_unit_cost_frozen jmf_shikyu_cur_rpt_temp.unit_cost_frozen%TYPE;
680: l_unit_cost_plan jmf_shikyu_cur_rpt_temp.unit_cost_plan%TYPE;
681: l_func_unit_price jmf_shikyu_cur_rpt_temp.func_unit_price%TYPE;
682: l_qty_rate jmf_shikyu_cur_rpt_temp.primary_qty%TYPE;
683: l_func_currency_code jmf_shikyu_cur_rpt_temp.func_currency_code%TYPE;
684: l_order_line_id jmf_shikyu_cur_rpt_temp.order_line_id%TYPE;
677: l_quantity jmf_shikyu_cur_rpt_temp.quantity%TYPE;
678: l_uom_code jmf_shikyu_cur_rpt_temp.uom_code%TYPE;
679: l_unit_cost_frozen jmf_shikyu_cur_rpt_temp.unit_cost_frozen%TYPE;
680: l_unit_cost_plan jmf_shikyu_cur_rpt_temp.unit_cost_plan%TYPE;
681: l_func_unit_price jmf_shikyu_cur_rpt_temp.func_unit_price%TYPE;
682: l_qty_rate jmf_shikyu_cur_rpt_temp.primary_qty%TYPE;
683: l_func_currency_code jmf_shikyu_cur_rpt_temp.func_currency_code%TYPE;
684: l_order_line_id jmf_shikyu_cur_rpt_temp.order_line_id%TYPE;
685: l_message varchar2(200);
678: l_uom_code jmf_shikyu_cur_rpt_temp.uom_code%TYPE;
679: l_unit_cost_frozen jmf_shikyu_cur_rpt_temp.unit_cost_frozen%TYPE;
680: l_unit_cost_plan jmf_shikyu_cur_rpt_temp.unit_cost_plan%TYPE;
681: l_func_unit_price jmf_shikyu_cur_rpt_temp.func_unit_price%TYPE;
682: l_qty_rate jmf_shikyu_cur_rpt_temp.primary_qty%TYPE;
683: l_func_currency_code jmf_shikyu_cur_rpt_temp.func_currency_code%TYPE;
684: l_order_line_id jmf_shikyu_cur_rpt_temp.order_line_id%TYPE;
685: l_message varchar2(200);
686:
679: l_unit_cost_frozen jmf_shikyu_cur_rpt_temp.unit_cost_frozen%TYPE;
680: l_unit_cost_plan jmf_shikyu_cur_rpt_temp.unit_cost_plan%TYPE;
681: l_func_unit_price jmf_shikyu_cur_rpt_temp.func_unit_price%TYPE;
682: l_qty_rate jmf_shikyu_cur_rpt_temp.primary_qty%TYPE;
683: l_func_currency_code jmf_shikyu_cur_rpt_temp.func_currency_code%TYPE;
684: l_order_line_id jmf_shikyu_cur_rpt_temp.order_line_id%TYPE;
685: l_message varchar2(200);
686:
687: BEGIN
680: l_unit_cost_plan jmf_shikyu_cur_rpt_temp.unit_cost_plan%TYPE;
681: l_func_unit_price jmf_shikyu_cur_rpt_temp.func_unit_price%TYPE;
682: l_qty_rate jmf_shikyu_cur_rpt_temp.primary_qty%TYPE;
683: l_func_currency_code jmf_shikyu_cur_rpt_temp.func_currency_code%TYPE;
684: l_order_line_id jmf_shikyu_cur_rpt_temp.order_line_id%TYPE;
685: l_message varchar2(200);
686:
687: BEGIN
688: --g_debug_level := fnd_log.g_current_runtime_level;
791:
792:
793: ELSIF (l_quantity <> 0) AND (l_unit_cost_frozen <> l_unit_cost_plan ) THEN
794:
795: INSERT INTO jmf_shikyu_cur_rpt_temp
796: (SOURCE
797: ,inventory_org_name
798: ,project_num
799: ,task_num
934: AND nvl(JMF_SHIKYU_GRP. GET_SUBCONTRACTING_TYPE(oel.ship_from_org_id, oel.ship_to_org_id),
935: NULL) = 'C' ;
936:
937:
938: l_source jmf_shikyu_cur_rpt_temp.SOURCE%TYPE;
939: l_inventory_org_name jmf_shikyu_cur_rpt_temp.inventory_org_name%TYPE;
940: l_project_num jmf_shikyu_cur_rpt_temp.project_num%TYPE;
941: l_task_num jmf_shikyu_cur_rpt_temp.task_num%TYPE;
942: l_order_num jmf_shikyu_cur_rpt_temp.order_num%TYPE;
935: NULL) = 'C' ;
936:
937:
938: l_source jmf_shikyu_cur_rpt_temp.SOURCE%TYPE;
939: l_inventory_org_name jmf_shikyu_cur_rpt_temp.inventory_org_name%TYPE;
940: l_project_num jmf_shikyu_cur_rpt_temp.project_num%TYPE;
941: l_task_num jmf_shikyu_cur_rpt_temp.task_num%TYPE;
942: l_order_num jmf_shikyu_cur_rpt_temp.order_num%TYPE;
943: l_line_num jmf_shikyu_cur_rpt_temp.line_num%TYPE;
936:
937:
938: l_source jmf_shikyu_cur_rpt_temp.SOURCE%TYPE;
939: l_inventory_org_name jmf_shikyu_cur_rpt_temp.inventory_org_name%TYPE;
940: l_project_num jmf_shikyu_cur_rpt_temp.project_num%TYPE;
941: l_task_num jmf_shikyu_cur_rpt_temp.task_num%TYPE;
942: l_order_num jmf_shikyu_cur_rpt_temp.order_num%TYPE;
943: l_line_num jmf_shikyu_cur_rpt_temp.line_num%TYPE;
944: l_item_id jmf_shikyu_cur_rpt_temp.item_id%TYPE;
937:
938: l_source jmf_shikyu_cur_rpt_temp.SOURCE%TYPE;
939: l_inventory_org_name jmf_shikyu_cur_rpt_temp.inventory_org_name%TYPE;
940: l_project_num jmf_shikyu_cur_rpt_temp.project_num%TYPE;
941: l_task_num jmf_shikyu_cur_rpt_temp.task_num%TYPE;
942: l_order_num jmf_shikyu_cur_rpt_temp.order_num%TYPE;
943: l_line_num jmf_shikyu_cur_rpt_temp.line_num%TYPE;
944: l_item_id jmf_shikyu_cur_rpt_temp.item_id%TYPE;
945: l_item_name jmf_shikyu_cur_rpt_temp.item_name%TYPE;
938: l_source jmf_shikyu_cur_rpt_temp.SOURCE%TYPE;
939: l_inventory_org_name jmf_shikyu_cur_rpt_temp.inventory_org_name%TYPE;
940: l_project_num jmf_shikyu_cur_rpt_temp.project_num%TYPE;
941: l_task_num jmf_shikyu_cur_rpt_temp.task_num%TYPE;
942: l_order_num jmf_shikyu_cur_rpt_temp.order_num%TYPE;
943: l_line_num jmf_shikyu_cur_rpt_temp.line_num%TYPE;
944: l_item_id jmf_shikyu_cur_rpt_temp.item_id%TYPE;
945: l_item_name jmf_shikyu_cur_rpt_temp.item_name%TYPE;
946: l_item_desc jmf_shikyu_cur_rpt_temp.item_desc%TYPE;
939: l_inventory_org_name jmf_shikyu_cur_rpt_temp.inventory_org_name%TYPE;
940: l_project_num jmf_shikyu_cur_rpt_temp.project_num%TYPE;
941: l_task_num jmf_shikyu_cur_rpt_temp.task_num%TYPE;
942: l_order_num jmf_shikyu_cur_rpt_temp.order_num%TYPE;
943: l_line_num jmf_shikyu_cur_rpt_temp.line_num%TYPE;
944: l_item_id jmf_shikyu_cur_rpt_temp.item_id%TYPE;
945: l_item_name jmf_shikyu_cur_rpt_temp.item_name%TYPE;
946: l_item_desc jmf_shikyu_cur_rpt_temp.item_desc%TYPE;
947: l_quantity jmf_shikyu_cur_rpt_temp.quantity%TYPE;
940: l_project_num jmf_shikyu_cur_rpt_temp.project_num%TYPE;
941: l_task_num jmf_shikyu_cur_rpt_temp.task_num%TYPE;
942: l_order_num jmf_shikyu_cur_rpt_temp.order_num%TYPE;
943: l_line_num jmf_shikyu_cur_rpt_temp.line_num%TYPE;
944: l_item_id jmf_shikyu_cur_rpt_temp.item_id%TYPE;
945: l_item_name jmf_shikyu_cur_rpt_temp.item_name%TYPE;
946: l_item_desc jmf_shikyu_cur_rpt_temp.item_desc%TYPE;
947: l_quantity jmf_shikyu_cur_rpt_temp.quantity%TYPE;
948: l_flow_status_code oe_order_lines_all.flow_status_code%TYPE;
941: l_task_num jmf_shikyu_cur_rpt_temp.task_num%TYPE;
942: l_order_num jmf_shikyu_cur_rpt_temp.order_num%TYPE;
943: l_line_num jmf_shikyu_cur_rpt_temp.line_num%TYPE;
944: l_item_id jmf_shikyu_cur_rpt_temp.item_id%TYPE;
945: l_item_name jmf_shikyu_cur_rpt_temp.item_name%TYPE;
946: l_item_desc jmf_shikyu_cur_rpt_temp.item_desc%TYPE;
947: l_quantity jmf_shikyu_cur_rpt_temp.quantity%TYPE;
948: l_flow_status_code oe_order_lines_all.flow_status_code%TYPE;
949: l_unit_cost_frozen jmf_shikyu_cur_rpt_temp.unit_cost_frozen%TYPE;
942: l_order_num jmf_shikyu_cur_rpt_temp.order_num%TYPE;
943: l_line_num jmf_shikyu_cur_rpt_temp.line_num%TYPE;
944: l_item_id jmf_shikyu_cur_rpt_temp.item_id%TYPE;
945: l_item_name jmf_shikyu_cur_rpt_temp.item_name%TYPE;
946: l_item_desc jmf_shikyu_cur_rpt_temp.item_desc%TYPE;
947: l_quantity jmf_shikyu_cur_rpt_temp.quantity%TYPE;
948: l_flow_status_code oe_order_lines_all.flow_status_code%TYPE;
949: l_unit_cost_frozen jmf_shikyu_cur_rpt_temp.unit_cost_frozen%TYPE;
950: l_unit_cost_plan jmf_shikyu_cur_rpt_temp.unit_cost_plan%TYPE;
943: l_line_num jmf_shikyu_cur_rpt_temp.line_num%TYPE;
944: l_item_id jmf_shikyu_cur_rpt_temp.item_id%TYPE;
945: l_item_name jmf_shikyu_cur_rpt_temp.item_name%TYPE;
946: l_item_desc jmf_shikyu_cur_rpt_temp.item_desc%TYPE;
947: l_quantity jmf_shikyu_cur_rpt_temp.quantity%TYPE;
948: l_flow_status_code oe_order_lines_all.flow_status_code%TYPE;
949: l_unit_cost_frozen jmf_shikyu_cur_rpt_temp.unit_cost_frozen%TYPE;
950: l_unit_cost_plan jmf_shikyu_cur_rpt_temp.unit_cost_plan%TYPE;
951: l_primary_qty jmf_shikyu_cur_rpt_temp.primary_qty%TYPE;
945: l_item_name jmf_shikyu_cur_rpt_temp.item_name%TYPE;
946: l_item_desc jmf_shikyu_cur_rpt_temp.item_desc%TYPE;
947: l_quantity jmf_shikyu_cur_rpt_temp.quantity%TYPE;
948: l_flow_status_code oe_order_lines_all.flow_status_code%TYPE;
949: l_unit_cost_frozen jmf_shikyu_cur_rpt_temp.unit_cost_frozen%TYPE;
950: l_unit_cost_plan jmf_shikyu_cur_rpt_temp.unit_cost_plan%TYPE;
951: l_primary_qty jmf_shikyu_cur_rpt_temp.primary_qty%TYPE;
952: l_func_currency_code jmf_shikyu_cur_rpt_temp.func_currency_code%TYPE;
953: l_order_line_id jmf_shikyu_cur_rpt_temp.order_line_id%TYPE;
946: l_item_desc jmf_shikyu_cur_rpt_temp.item_desc%TYPE;
947: l_quantity jmf_shikyu_cur_rpt_temp.quantity%TYPE;
948: l_flow_status_code oe_order_lines_all.flow_status_code%TYPE;
949: l_unit_cost_frozen jmf_shikyu_cur_rpt_temp.unit_cost_frozen%TYPE;
950: l_unit_cost_plan jmf_shikyu_cur_rpt_temp.unit_cost_plan%TYPE;
951: l_primary_qty jmf_shikyu_cur_rpt_temp.primary_qty%TYPE;
952: l_func_currency_code jmf_shikyu_cur_rpt_temp.func_currency_code%TYPE;
953: l_order_line_id jmf_shikyu_cur_rpt_temp.order_line_id%TYPE;
954: l_no_ori_so_flag VARCHAR2(5);
947: l_quantity jmf_shikyu_cur_rpt_temp.quantity%TYPE;
948: l_flow_status_code oe_order_lines_all.flow_status_code%TYPE;
949: l_unit_cost_frozen jmf_shikyu_cur_rpt_temp.unit_cost_frozen%TYPE;
950: l_unit_cost_plan jmf_shikyu_cur_rpt_temp.unit_cost_plan%TYPE;
951: l_primary_qty jmf_shikyu_cur_rpt_temp.primary_qty%TYPE;
952: l_func_currency_code jmf_shikyu_cur_rpt_temp.func_currency_code%TYPE;
953: l_order_line_id jmf_shikyu_cur_rpt_temp.order_line_id%TYPE;
954: l_no_ori_so_flag VARCHAR2(5);
955: l_no_appropriate_so_flag VARCHAR2(5);
948: l_flow_status_code oe_order_lines_all.flow_status_code%TYPE;
949: l_unit_cost_frozen jmf_shikyu_cur_rpt_temp.unit_cost_frozen%TYPE;
950: l_unit_cost_plan jmf_shikyu_cur_rpt_temp.unit_cost_plan%TYPE;
951: l_primary_qty jmf_shikyu_cur_rpt_temp.primary_qty%TYPE;
952: l_func_currency_code jmf_shikyu_cur_rpt_temp.func_currency_code%TYPE;
953: l_order_line_id jmf_shikyu_cur_rpt_temp.order_line_id%TYPE;
954: l_no_ori_so_flag VARCHAR2(5);
955: l_no_appropriate_so_flag VARCHAR2(5);
956: l_rma_over_shipped_flag VARCHAR2(5);
949: l_unit_cost_frozen jmf_shikyu_cur_rpt_temp.unit_cost_frozen%TYPE;
950: l_unit_cost_plan jmf_shikyu_cur_rpt_temp.unit_cost_plan%TYPE;
951: l_primary_qty jmf_shikyu_cur_rpt_temp.primary_qty%TYPE;
952: l_func_currency_code jmf_shikyu_cur_rpt_temp.func_currency_code%TYPE;
953: l_order_line_id jmf_shikyu_cur_rpt_temp.order_line_id%TYPE;
954: l_no_ori_so_flag VARCHAR2(5);
955: l_no_appropriate_so_flag VARCHAR2(5);
956: l_rma_over_shipped_flag VARCHAR2(5);
957: l_rma_qty NUMBER;
1196: l_order_line_id := l_reference_line_id;
1197:
1198: IF (l_cur_rcv_shipped_quantity <> 0) AND (l_unit_cost_frozen <> l_unit_cost_plan ) THEN
1199:
1200: INSERT INTO jmf_shikyu_cur_rpt_temp
1201: (SOURCE
1202: ,inventory_org_name
1203: ,project_num
1204: ,task_num