DBA Data[Home] [Help]

APPS.CSD_MIGRATE_FROM_115X_PKG3 dependencies on CSD_REPAIR_HISTORY

Line 2935: /* procedure name: CSD_REPAIR_HISTORY_MIG3 */

2931: END;-- log_error;
2932:
2933:
2934: /*------------------------------------------------------------------------*/
2935: /* procedure name: CSD_REPAIR_HISTORY_MIG3 */
2936: /* description : procedure for migrating CSD_REPAIR_HISTORY table data */
2937: /* from 11.5.9 to 11.5.10 */
2938: /* Created : vkjain on SEPT-30-2003 */
2939: /* */

Line 2936: /* description : procedure for migrating CSD_REPAIR_HISTORY table data */

2932:
2933:
2934: /*------------------------------------------------------------------------*/
2935: /* procedure name: CSD_REPAIR_HISTORY_MIG3 */
2936: /* description : procedure for migrating CSD_REPAIR_HISTORY table data */
2937: /* from 11.5.9 to 11.5.10 */
2938: /* Created : vkjain on SEPT-30-2003 */
2939: /* */
2940: /* Here are the details for the migration - */

Line 2990: PROCEDURE csd_repair_history_mig3(p_slab_number IN NUMBER)

2986: /* */
2987: /* */
2988: /*------------------------------------------------------------------------*/
2989:
2990: PROCEDURE csd_repair_history_mig3(p_slab_number IN NUMBER)
2991: IS
2992:
2993: -- Table type definitions
2994:

Line 3039: FROM CSD_REPAIR_HISTORY HIST,

3035: CURSOR c_get_PS_event_details IS
3036: SELECT HIST.rowid,
3037: HROU.name,
3038: WSH.subinventory
3039: FROM CSD_REPAIR_HISTORY HIST,
3040: WSH_DELIVERY_DETAILS WSH,
3041: HR_ALL_ORGANIZATION_UNITS_VL HROU
3042: WHERE HIST.EVENT_CODE = 'PS'
3043: AND HIST.REPAIR_HISTORY_ID >= v_min

Line 3052: SAVEPOINT CSD_REPAIR_HISTORY_SP;

3048:
3049: BEGIN
3050:
3051: -- Establish a save point for the procedure.
3052: SAVEPOINT CSD_REPAIR_HISTORY_SP;
3053:
3054: -- Get the Slab Number for the table
3055: BEGIN
3056: CSD_MIG_SLABS_PKG.GET_TABLE_SLABS('CSD_REPAIR_HISTORY',

Line 3056: CSD_MIG_SLABS_PKG.GET_TABLE_SLABS('CSD_REPAIR_HISTORY',

3052: SAVEPOINT CSD_REPAIR_HISTORY_SP;
3053:
3054: -- Get the Slab Number for the table
3055: BEGIN
3056: CSD_MIG_SLABS_PKG.GET_TABLE_SLABS('CSD_REPAIR_HISTORY',
3057: 'CSD',
3058: p_slab_number,
3059: v_min,
3060: v_max);

Line 3073: UPDATE CSD_REPAIR_HISTORY HIST

3069:
3070: -- Processing event 'RR'. We simply use an update
3071: -- statement to update all lines.
3072: -- We update the field with organization_name.
3073: UPDATE CSD_REPAIR_HISTORY HIST
3074: SET HIST.PARAMC3 = ( SELECT hrou.name
3075: FROM hr_all_organization_units_vl HROU,
3076: RCV_TRANSACTIONS RCV
3077: WHERE RCV.transaction_id = HIST.paramn1

Line 3091: UPDATE CSD_REPAIR_HISTORY HIST

3087:
3088: -- Processing event 'RSC'. We simply use an update
3089: -- statement to update all lines.
3090: -- We update the field with subinventory.
3091: UPDATE CSD_REPAIR_HISTORY HIST
3092: SET HIST.PARAMC1 = ( SELECT rcv.subinventory
3093: FROM RCV_TRANSACTIONS RCV
3094: WHERE RCV.transaction_id = HIST.paramn1
3095: )

Line 3108: UPDATE CSD_REPAIR_HISTORY HIST

3104: -- Need to move group_id from paramc5 to paramn6
3105: -- We use an update statement to update all lines
3106: -- Pre 11.5 we used to append group_id with 'CSD'. Now, we remove 'CSD' prefix before
3107: --updating the table. Or else the update will fail.
3108: UPDATE CSD_REPAIR_HISTORY HIST
3109: SET HIST.paramn6 =
3110: nvl( to_number(decode(instr(hist.paramc5,'CSD',1),0,hist.paramc5, substr(hist.paramc5,4,length(hist.paramc5)) ) ),''),
3111:
3112: --nvl(to_number(hist.paramc5),''),

Line 3121: UPDATE CSD_REPAIR_HISTORY HIST

3117: --sangigup
3118: -- Processing event 'JS'. We simply use an update
3119: -- statement to update all lines.
3120: -- We update the event code to 'JSU'.
3121: UPDATE CSD_REPAIR_HISTORY HIST
3122: SET HIST.EVENT_CODE = 'JSU'
3123: WHERE HIST.EVENT_CODE = 'JS'
3124: AND HIST.REPAIR_HISTORY_ID >= v_min
3125: AND HIST.REPAIR_HISTORY_ID <= v_max;

Line 3133: UPDATE CSD_REPAIR_HISTORY HIST

3129:
3130: -- Processing event "TC, TOC and TSC". We simply use an update
3131: -- statement to update all lines.
3132: -- We update the field task name.
3133: UPDATE CSD_REPAIR_HISTORY HIST
3134: SET HIST.PARAMC7 = ( SELECT task_name
3135: FROM JTF_TASKS_VL
3136: WHERE task_id = HIST.paramn1
3137: )

Line 3149: UPDATE CSD_REPAIR_HISTORY HIST

3145:
3146: -- Processing event "A and R". We simply use an update
3147: -- statement to update all lines.
3148: -- We update the event code to 'ESU'.
3149: UPDATE CSD_REPAIR_HISTORY HIST
3150: SET HIST.EVENT_CODE = 'ESU'
3151: WHERE HIST.EVENT_CODE IN ('A', 'R')
3152: AND HIST.REPAIR_HISTORY_ID >= v_min
3153: AND HIST.REPAIR_HISTORY_ID <= v_max;

Line 3178: UPDATE CSD_REPAIR_HISTORY

3174: l_array_size := rowid_arr.COUNT; -- Number of VARRAY elements
3175:
3176: -- BULK update for all lines
3177: FORALL i IN 1..l_array_size
3178: UPDATE CSD_REPAIR_HISTORY
3179: SET paramc3 = shipping_org_name_arr(i),
3180: paramc4 = shipping_subinv_name_arr(i)
3181: WHERE rowid = rowid_arr(i);
3182:

Line 3194: ROLLBACK TO CSD_REPAIR_HISTORY_SP;

3190: COMMIT;
3191:
3192: EXCEPTION
3193: WHEN OTHERS THEN
3194: ROLLBACK TO CSD_REPAIR_HISTORY_SP;
3195: IF c_get_PS_event_details%ISOPEN THEN
3196: CLOSE c_get_PS_event_details;
3197: END IF;
3198: v_error_text := 'Encountered fatal error ' ||

Line 3211: VALUES ('CSD_REPAIR_HISTORY',

3207: ORIG_SYSTEM_REFERENCE_ID,
3208: UPGRADE_DATETIME,
3209: ERROR_MESSAGE,
3210: MIGRATION_PHASE)
3211: VALUES ('CSD_REPAIR_HISTORY',
3212: 'CSD_REPAIR_HISTORY',
3213: NULL,
3214: sysdate,
3215: v_error_text,

Line 3212: 'CSD_REPAIR_HISTORY',

3208: UPGRADE_DATETIME,
3209: ERROR_MESSAGE,
3210: MIGRATION_PHASE)
3211: VALUES ('CSD_REPAIR_HISTORY',
3212: 'CSD_REPAIR_HISTORY',
3213: NULL,
3214: sysdate,
3215: v_error_text,
3216: '11.5.10');

Line 3228: raise_application_error( -20000, 'Error while migrating CSD_REPAIR_HISTORY table data. ' || v_error_text);

3224:
3225: -- RAISE STOP_PROCESS;
3226:
3227:
3228: raise_application_error( -20000, 'Error while migrating CSD_REPAIR_HISTORY table data. ' || v_error_text);
3229:
3230:
3231: END csd_repair_history_mig3;
3232:

Line 3231: END csd_repair_history_mig3;

3227:
3228: raise_application_error( -20000, 'Error while migrating CSD_REPAIR_HISTORY table data. ' || v_error_text);
3229:
3230:
3231: END csd_repair_history_mig3;
3232:
3233:
3234: /*------------------------------------------------------------------------*/
3235: /* procedure name: CSD_PRODUCT_TRANS_MIG3(p_slab_Number Number)

Line 3257: /* Only qty that is captured in csd_repair_history is */

3253: /* sub_inventory */
3254: /* lot_Number */
3255: /* locator_id */
3256: /* BOOKED action_type is 'RMA' and order line qty is > 1 */
3257: /* Only qty that is captured in csd_repair_history is */
3258: /* updated in csd_product_txns table */
3259: /*RELEASED action_type is 'SHIP' and order line qty is > 1 */
3260: /* Only qty that is captured in csd_repair_history is */
3261: /* updated in csd_product_txns table. */

Line 3260: /* Only qty that is captured in csd_repair_history is */

3256: /* BOOKED action_type is 'RMA' and order line qty is > 1 */
3257: /* Only qty that is captured in csd_repair_history is */
3258: /* updated in csd_product_txns table */
3259: /*RELEASED action_type is 'SHIP' and order line qty is > 1 */
3260: /* Only qty that is captured in csd_repair_history is */
3261: /* updated in csd_product_txns table. */
3262: /************************************************************************/
3263: procedure CSD_PRODUCT_TRANS_MIG3(p_slab_Number Number) IS
3264:

Line 3562: -- Else Quantity Received is what is recorded in csd_repair_history table

3558: l_locator_id := NUll ;
3559: l_Quantity := NUll ;
3560: -- Check Product Transaction Status , if it is 'RECEIVED' then
3561: -- Quantity Received is total quantity received against that RMA
3562: -- Else Quantity Received is what is recorded in csd_repair_history table
3563: If v_Prod_txn_Status(j) = 'RECEIVED' Then
3564: l_procedure_Event := 'Processing RMA non serial qty > 1 and received';
3565: For Rcv_txn_rec In Rcv_transactions_cur (v_order_header_id(j), v_order_line_id(j)) Loop
3566: -- Cumulate quantity value for all lines split from parent line id

Line 3574: -- in csd_repair_history table

3570: Else
3571: l_procedure_Event := 'Processing RMA non serial qty > 1 or not received';
3572: For Rcv_txn_rec In Rcv_transactions_cur (v_order_header_id(j), v_order_line_id(j)) Loop
3573: -- Check if current receving transaction id record information is updated
3574: -- in csd_repair_history table
3575: Begin
3576: Select Quantity
3577: Into l_Quantity
3578: From csd_repair_history

Line 3578: From csd_repair_history

3574: -- in csd_repair_history table
3575: Begin
3576: Select Quantity
3577: Into l_Quantity
3578: From csd_repair_history
3579: Where event_code = 'RR'
3580: and paramn1 = rcv_txn_rec.transaction_id
3581: and repair_line_id = V_Repair_Line_Id(j);
3582: Exception

Line 3697: -- Else Quantity shipped is what is recorded in csd_repair_history table

3693: l_Locator_Id := NUll ;
3694: l_Quantity := NUll ;
3695: -- Check Product Transaction Status , if it is 'SHIPPED' then
3696: -- Quantity shipped is total quantity shipped against that SO
3697: -- Else Quantity shipped is what is recorded in csd_repair_history table
3698: If v_Prod_txn_Status(j) = 'SHIPPED' Then
3699: For Delv_Detl_rec In Delivery_Details_cur (v_order_header_id(j), v_order_line_id(j)) Loop
3700: -- Cumulate quantity value for all lines split from parent line id
3701: v_Quantity_Shipped(j) := Nvl(v_Quantity_Shipped(j),0) + Delv_Detl_rec.Shipped_Quantity ;

Line 3709: -- in csd_repair_history table

3705: --
3706: Else
3707: For Delv_Detl_rec In Delivery_Details_cur (v_order_header_id(j), v_order_line_id(j)) Loop
3708: -- Check if current delivery_detail_id record information is updated
3709: -- in csd_repair_history table
3710: Begin
3711: l_procedure_Event := 'Getting Quantity from repair history table';
3712: Select Quantity
3713: Into l_Quantity

Line 3714: From csd_repair_history

3710: Begin
3711: l_procedure_Event := 'Getting Quantity from repair history table';
3712: Select Quantity
3713: Into l_Quantity
3714: From csd_repair_history
3715: Where event_code = 'PS'
3716: and paramn1 = Delv_Detl_rec.Delivery_Detail_id
3717: and repair_line_id = v_Repair_Line_Id(j);
3718: Exception