DBA Data[Home] [Help]

APPS.GML_PO_SYNCH dependencies on IC_SUMM_INV

Line 1300: | ic_summ_inv conditional, only if |

1296: | Exclude PPO template record from |
1297: | being picked up in int_cur cursor|
1298: | 06/27/2003 Mohit Kapoor Bug 3019986 |
1299: | Made the insertion/updation of |
1300: | ic_summ_inv conditional, only if |
1301: | the table exists |
1302: +============================================================================*/
1303:
1304: PROCEDURE cpg_int2gms( retcode out Nocopy number) -- yannamal GSCC b4403407

Line 1680: ic_summ_inv_view_exists number:=0; /* Bug 3019986 Mohit Kapoor */

1676: v_check NUMBER := 0;
1677: error_ind NUMBER := 0;
1678: /* End B2594000 */
1679:
1680: ic_summ_inv_view_exists number:=0; /* Bug 3019986 Mohit Kapoor */
1681: p_view_owner VARCHAR2(30) ;
1682:
1683: BEGIN
1684:

Line 1692: SELECT COUNT(*) INTO ic_summ_inv_view_exists

1688: from fnd_oracle_userid
1689: where read_only_flag = 'U';
1690:
1691: /* Begin B3019986 Mohit Kapoor */
1692: SELECT COUNT(*) INTO ic_summ_inv_view_exists
1693: FROM ALL_VIEWS
1694: WHERE VIEW_NAME = 'IC_SUMM_INV_V' and
1695: owner = p_view_owner ;
1696:

Line 1694: WHERE VIEW_NAME = 'IC_SUMM_INV_V' and

1690:
1691: /* Begin B3019986 Mohit Kapoor */
1692: SELECT COUNT(*) INTO ic_summ_inv_view_exists
1693: FROM ALL_VIEWS
1694: WHERE VIEW_NAME = 'IC_SUMM_INV_V' and
1695: owner = p_view_owner ;
1696:
1697: /* End B3019986 */
1698:

Line 2581: /* update the ic_summ_inv table*/

2577: raise_application_error(-20001, err_msg);
2578: END; /* insert into ic_tran_pnd;*/
2579:
2580:
2581: /* update the ic_summ_inv table*/
2582:
2583: IF ic_summ_inv_view_exists = 0 THEN /* Bug 3019986 Mohit Kapoor */
2584: /*Bug 1365777 - If item is a non-inventory item then do not update or insert
2585: into ic_summ_inv table - PPB */

Line 2583: IF ic_summ_inv_view_exists = 0 THEN /* Bug 3019986 Mohit Kapoor */

2579:
2580:
2581: /* update the ic_summ_inv table*/
2582:
2583: IF ic_summ_inv_view_exists = 0 THEN /* Bug 3019986 Mohit Kapoor */
2584: /*Bug 1365777 - If item is a non-inventory item then do not update or insert
2585: into ic_summ_inv table - PPB */
2586:
2587: If v_noninv_ind = 0

Line 2585: into ic_summ_inv table - PPB */

2581: /* update the ic_summ_inv table*/
2582:
2583: IF ic_summ_inv_view_exists = 0 THEN /* Bug 3019986 Mohit Kapoor */
2584: /*Bug 1365777 - If item is a non-inventory item then do not update or insert
2585: into ic_summ_inv table - PPB */
2586:
2587: If v_noninv_ind = 0
2588: then
2589: BEGIN

Line 2594: UPDATE ic_summ_inv

2590:
2591:
2592: if int_rec.qc_grade_wanted is NULL
2593: then
2594: UPDATE ic_summ_inv
2595: SET onpurch_qty = onpurch_qty + nvl(v_order1,0),
2596: onpurch_qty2 = onpurch_qty2 + nvl(v_order2,0)
2597: WHERE item_id=v_item_id
2598: AND whse_code=int_rec.to_whse;

Line 2600: UPDATE ic_summ_inv

2596: onpurch_qty2 = onpurch_qty2 + nvl(v_order2,0)
2597: WHERE item_id=v_item_id
2598: AND whse_code=int_rec.to_whse;
2599: else
2600: UPDATE ic_summ_inv
2601: SET onpurch_qty = onpurch_qty + nvl(v_order1,0),
2602: onpurch_qty2 = onpurch_qty2 + nvl(v_order2,0)
2603: WHERE item_id=v_item_id
2604: AND whse_code=int_rec.to_whse

Line 2611: in ic_summ_inv table then insert a row in it.*/

2607:
2608:
2609: /*Preetam Bamb Bug# 1288128 03/May/00
2610: If there is no entry for the item/warehouse/qc grade combn
2611: in ic_summ_inv table then insert a row in it.*/
2612: IF (SQL%ROWCOUNT = 0) THEN
2613: /* Get the next sequence number */
2614: select gem5_summ_inv_id_s.nextval into l_iret from dual;
2615:

Line 2617: INSERT INTO ic_summ_inv

2613: /* Get the next sequence number */
2614: select gem5_summ_inv_id_s.nextval into l_iret from dual;
2615:
2616: /* Since a row for this item does not already exists enter a row */
2617: INSERT INTO ic_summ_inv
2618: (summ_inv_id, item_id, whse_code, qc_grade,
2619: onhand_qty, onhand_qty2, onhand_prod_qty,
2620: onhand_prod_qty2, onhand_order_qty, onhand_order_qty2,
2621: onhand_ship_qty, onhand_ship_qty2, onpurch_qty,

Line 2643: FND_FILE.PUT_LINE(FND_FILE.LOG,'Error updating ic_summ_inv');

2639:
2640: EXCEPTION
2641: WHEN OTHERS THEN
2642: FND_FILE.NEW_LINE(FND_FILE.LOG, 1 );
2643: FND_FILE.PUT_LINE(FND_FILE.LOG,'Error updating ic_summ_inv');
2644: FND_FILE.NEW_LINE(FND_FILE.LOG, 1 );
2645: err_num := SQLCODE;
2646: err_msg := SUBSTRB (SQLERRM, 1, 100);
2647: FND_FILE.PUT_LINE(FND_FILE.LOG, err_msg);

Line 2650: END; /* update ic_summ_inv*/

2646: err_msg := SUBSTRB (SQLERRM, 1, 100);
2647: FND_FILE.PUT_LINE(FND_FILE.LOG, err_msg);
2648: retcode :=1;
2649: raise_application_error(-20001, err_msg);
2650: END; /* update ic_summ_inv*/
2651:
2652: end if; /* if v_noninv_ind = 0 */
2653: END IF; /* Bug 3019986 ic_summ_inv_view_exists */
2654:

Line 2653: END IF; /* Bug 3019986 ic_summ_inv_view_exists */

2649: raise_application_error(-20001, err_msg);
2650: END; /* update ic_summ_inv*/
2651:
2652: end if; /* if v_noninv_ind = 0 */
2653: END IF; /* Bug 3019986 ic_summ_inv_view_exists */
2654:
2655: /* Synchronize Acquisition Costs from Oracle */
2656:
2657: GML_PO_SYNCH.cpg_aqcst_mv

Line 2897: IF ic_summ_inv_view_exists = 0 THEN /* Bug 3019986 Mohit Kapoor */

2893: ELSE
2894: v_total_received_qty2 := 0;
2895: END IF;
2896:
2897: IF ic_summ_inv_view_exists = 0 THEN /* Bug 3019986 Mohit Kapoor */
2898: /*Bug 1365777 - If item is a non-inventory item then do not update or insert
2899: into ic_summ_inv table - PPB */
2900:
2901: IF v_noninv_ind = 0

Line 2899: into ic_summ_inv table - PPB */

2895: END IF;
2896:
2897: IF ic_summ_inv_view_exists = 0 THEN /* Bug 3019986 Mohit Kapoor */
2898: /*Bug 1365777 - If item is a non-inventory item then do not update or insert
2899: into ic_summ_inv table - PPB */
2900:
2901: IF v_noninv_ind = 0
2902: THEN
2903: /* RVK */

Line 2905: UPDATE ic_summ_inv

2901: IF v_noninv_ind = 0
2902: THEN
2903: /* RVK */
2904: IF (int_rec.qc_grade_wanted is not null) THEN
2905: UPDATE ic_summ_inv
2906: SET onpurch_qty = onpurch_qty - (nvl(v_order1,0) - nvl(v_total_received_qty,0)),
2907: onpurch_qty2 = onpurch_qty2- (nvl(v_order2,0) - nvl(v_total_received_qty2,0))
2908: WHERE item_id = v_item_id
2909: AND whse_code = int_rec.to_whse

Line 2914: UPDATE ic_summ_inv

2910: AND qc_grade = int_rec.qc_grade_wanted;
2911:
2912:
2913: ELSE
2914: UPDATE ic_summ_inv
2915: SET onpurch_qty = onpurch_qty - (nvl(v_order1,0) - nvl(v_total_received_qty,0)),
2916: onpurch_qty2 = onpurch_qty2- (nvl(v_order2,0) - nvl(v_total_received_qty2,0))
2917: WHERE item_id = v_item_id
2918: AND whse_code = int_rec.to_whse

Line 2924: END IF; /* Bug 3019986 ic_summ_inv_view_exists */

2920:
2921:
2922: END IF; /*(int_rec.qc_grade_wanted is not null) */
2923: END IF; /* If noninv_ind = 0 */
2924: END IF; /* Bug 3019986 ic_summ_inv_view_exists */
2925: /* BEGIN - Bug 1854280 Pushkar Upakare */
2926: IF int_rec.transaction_type = 'PLANNED' THEN
2927: IF int_rec.cancellation_code IS NOT NULL THEN /* Cancel*/
2928:

Line 3289: IF ic_summ_inv_view_exists = 0 THEN /* Bug 3019986 Mohit Kapoor */

3285: END; /*update ic_tran_pnd*/
3286:
3287: /* For Standard/PPO release/Blanket release*/
3288:
3289: IF ic_summ_inv_view_exists = 0 THEN /* Bug 3019986 Mohit Kapoor */
3290: /*Bug 1365777 - If item is a non-inventory item then do not update or insert
3291: into ic_summ_inv table - PPB */
3292:
3293: If v_noninv_ind = 0

Line 3291: into ic_summ_inv table - PPB */

3287: /* For Standard/PPO release/Blanket release*/
3288:
3289: IF ic_summ_inv_view_exists = 0 THEN /* Bug 3019986 Mohit Kapoor */
3290: /*Bug 1365777 - If item is a non-inventory item then do not update or insert
3291: into ic_summ_inv table - PPB */
3292:
3293: If v_noninv_ind = 0
3294: then
3295: BEGIN

Line 3303: UPDATE ic_summ_inv

3299: THEN
3300:
3301: /* PPB */
3302: IF (int_rec.qc_grade_wanted is not null) THEN
3303: UPDATE ic_summ_inv
3304: SET onpurch_qty = onpurch_qty + (nvl(v_order1,0) - nvl(v_total_received_qty,0)),
3305: onpurch_qty2 = onpurch_qty2+ (nvl(v_order2,0) - nvl(v_total_received_qty2,0))
3306: WHERE item_id = v_item_id
3307: AND whse_code = int_rec.to_whse

Line 3312: UPDATE ic_summ_inv

3308: AND qc_grade = int_rec.qc_grade_wanted;
3309:
3310:
3311: ELSE
3312: UPDATE ic_summ_inv
3313: SET onpurch_qty = onpurch_qty + (nvl(v_order1,0) - nvl(v_total_received_qty,0)),
3314: onpurch_qty2 = onpurch_qty2+ (nvl(v_order2,0) - nvl(v_total_received_qty2,0))
3315: WHERE item_id = v_item_id
3316: AND whse_code = int_rec.to_whse

Line 3325: UPDATE ic_summ_inv

3321:
3322: ELSE
3323: IF int_rec.qc_grade_wanted IS NULL
3324: THEN
3325: UPDATE ic_summ_inv
3326: SET onpurch_qty = onpurch_qty
3327: - nvl(v_old_order_base_qty,0) /*RVK nvl(v_old_order_qty1,0) */
3328: + v_order1 /* RVK int_rec.order_qty1 */,
3329: onpurch_qty2 = onpurch_qty2

Line 3336: UPDATE ic_summ_inv

3332: WHERE item_id = v_item_id
3333: AND whse_code = int_rec.to_whse
3334: AND qc_grade IS NULL;
3335: ELSE
3336: UPDATE ic_summ_inv
3337: SET onpurch_qty = onpurch_qty
3338: - nvl(v_old_order_base_qty,0) /*RVK nvl(v_old_order_qty1,0) */
3339: + v_order1 /* RVK int_rec.order_qty1 */,
3340: onpurch_qty2 = onpurch_qty2

Line 3355: FND_FILE.PUT_LINE(FND_FILE.LOG,'Error updating ic_summ_inv');

3351:
3352: EXCEPTION
3353: WHEN OTHERS THEN
3354: FND_FILE.NEW_LINE(FND_FILE.LOG, 1 );
3355: FND_FILE.PUT_LINE(FND_FILE.LOG,'Error updating ic_summ_inv');
3356: FND_FILE.NEW_LINE(FND_FILE.LOG, 1 );
3357: err_num := SQLCODE;
3358: err_msg := SUBSTRB (SQLERRM, 1, 100);
3359: FND_FILE.PUT_LINE(FND_FILE.LOG, err_msg);

Line 3362: END; /*update ic_summ_inv*/

3358: err_msg := SUBSTRB (SQLERRM, 1, 100);
3359: FND_FILE.PUT_LINE(FND_FILE.LOG, err_msg);
3360: retcode :=1;
3361: raise_application_error(-20001, err_msg);
3362: END; /*update ic_summ_inv*/
3363:
3364: End If; /* If noninv_ind = 0 */
3365: END IF; /* Bug 3019986 ic_summ_inv_view_exists */
3366:

Line 3365: END IF; /* Bug 3019986 ic_summ_inv_view_exists */

3361: raise_application_error(-20001, err_msg);
3362: END; /*update ic_summ_inv*/
3363:
3364: End If; /* If noninv_ind = 0 */
3365: END IF; /* Bug 3019986 ic_summ_inv_view_exists */
3366:
3367: IF int_rec.transaction_type = 'PLANNED' THEN
3368:
3369: BEGIN

Line 3510: IF ic_summ_inv_view_exists = 0 THEN /* Bug 3019986 Mohit Kapoor */

3506: ELSE
3507: v_total_received_qty2 := 0 ;
3508: END IF; /*IF v_item_um2 IS NOT NULL */
3509:
3510: IF ic_summ_inv_view_exists = 0 THEN /* Bug 3019986 Mohit Kapoor */
3511: /*Bug 1365777 - If item is a non-inventory item then do not update or insert
3512: into ic_summ_inv table - PPB */
3513:
3514: If v_noninv_ind = 0

Line 3512: into ic_summ_inv table - PPB */

3508: END IF; /*IF v_item_um2 IS NOT NULL */
3509:
3510: IF ic_summ_inv_view_exists = 0 THEN /* Bug 3019986 Mohit Kapoor */
3511: /*Bug 1365777 - If item is a non-inventory item then do not update or insert
3512: into ic_summ_inv table - PPB */
3513:
3514: If v_noninv_ind = 0
3515: then
3516: IF int_rec.qc_grade_wanted IS NULL

Line 3518: UPDATE ic_summ_inv

3514: If v_noninv_ind = 0
3515: then
3516: IF int_rec.qc_grade_wanted IS NULL
3517: THEN
3518: UPDATE ic_summ_inv
3519: SET onpurch_qty = onpurch_qty - (nvl(v_order1,0) - nvl(v_total_received_qty,0)),
3520: onpurch_qty2 = onpurch_qty2 - (nvl(v_order2,0) - nvl(v_total_received_qty2,0))
3521: WHERE item_id = v_item_id
3522: AND whse_code = int_rec.to_whse

Line 3525: UPDATE ic_summ_inv

3521: WHERE item_id = v_item_id
3522: AND whse_code = int_rec.to_whse
3523: AND qc_grade IS NULL;
3524: ELSE
3525: UPDATE ic_summ_inv
3526: SET onpurch_qty = onpurch_qty - (nvl(v_order1,0) - nvl(v_total_received_qty,0)),
3527: onpurch_qty2 = onpurch_qty2 - (nvl(v_order2,0) - nvl(v_total_received_qty2,0))
3528: WHERE item_id = v_item_id
3529: AND whse_code = int_rec.to_whse

Line 3534: END IF; /* Bug 3019986 ic_summ_inv_view_exists */

3530: AND qc_grade = int_rec.qc_grade_wanted;
3531: END IF;/*If int_rec.qc_grade_wanted IS NULL*/
3532:
3533: End If; /* If noninv_ind = 0 */
3534: END IF; /* Bug 3019986 ic_summ_inv_view_exists */
3535: END IF; /*IF v_old_po_status <> 20 */
3536:
3537: EXCEPTION
3538: WHEN OTHERS THEN

Line 3540: FND_FILE.PUT_LINE(FND_FILE.LOG,'Error updating ic_summ_inv');

3536:
3537: EXCEPTION
3538: WHEN OTHERS THEN
3539: FND_FILE.NEW_LINE(FND_FILE.LOG, 1 );
3540: FND_FILE.PUT_LINE(FND_FILE.LOG,'Error updating ic_summ_inv');
3541: FND_FILE.NEW_LINE(FND_FILE.LOG, 1 );
3542: err_num := SQLCODE;
3543: err_msg := SUBSTRB (SQLERRM, 1, 100);
3544: FND_FILE.PUT_LINE(FND_FILE.LOG, err_msg);

Line 3547: END;/*update ic_summ_inv*/

3543: err_msg := SUBSTRB (SQLERRM, 1, 100);
3544: FND_FILE.PUT_LINE(FND_FILE.LOG, err_msg);
3545: retcode :=1;
3546: raise_application_error(-20001, err_msg);
3547: END;/*update ic_summ_inv*/
3548:
3549: END; /*cancel/close*/
3550:
3551: END IF; /* int_rec.po_status NOT IN (...) */