DBA Data[Home] [Help]

APPS.WSMPJUPD dependencies on WIP_OPERATIONS

Line 1165: FROM wip_operations

1161: l_stmt_num := 10;
1162:
1163: SELECT max(operation_seq_num)
1164: INTO p_op_seq_num
1165: FROM wip_operations
1166: WHERE wip_entity_id = p_wip_entity_id
1167: AND ((quantity_in_queue <> 0
1168: OR quantity_running <> 0
1169: OR quantity_waiting_to_move <> 0)

Line 1194: FROM wip_operations

1190: l_qty_RUN,
1191: l_qty_TM,
1192: p_op_start_date,
1193: p_op_completion_date
1194: FROM wip_operations
1195: WHERE wip_entity_id = p_wip_entity_id
1196: AND operation_seq_num = p_op_seq_num;
1197:
1198:

Line 1318: INSERT INTO WIP_OPERATIONS

1314: );
1315: END IF;
1316:
1317: forall l_job_counter in indices of p_new_rj_we_id_tbl
1318: INSERT INTO WIP_OPERATIONS
1319: (wip_entity_id,
1320: operation_seq_num,
1321: organization_id,
1322: repetitive_schedule_id,

Line 1447: from wip_operations wo

1443: wo.previous_operation_seq_id,
1444: wo.skip_flag, -- Added for I_PROJECT: JUMP_ENH
1445: wo.disable_date, -- bug 2931071
1446: wo.wsm_op_seq_num -- Added to fix bug 3452913.
1447: from wip_operations wo
1448: where wo.wip_entity_id = p_rep_we_id
1449: AND wo.operation_seq_num <= p_curr_op_seq_num
1450: );
1451:

Line 1458: UPDATE wip_operations wo

1454: -- may not set these fields correctly for this new job
1455: -- forall l_job_counter in p_new_rj_we_id_tbl.first..p_new_rj_we_id_tbl.last
1456: forall l_job_counter in indices of p_new_rj_we_id_tbl
1457:
1458: UPDATE wip_operations wo
1459: SET wo.previous_operation_seq_num =(SELECT max(operation_seq_num)
1460: FROM wip_operations
1461: WHERE wip_entity_id = p_new_rj_we_id_tbl(l_job_counter)
1462: AND operation_seq_num < wo.operation_seq_num

Line 1460: FROM wip_operations

1456: forall l_job_counter in indices of p_new_rj_we_id_tbl
1457:
1458: UPDATE wip_operations wo
1459: SET wo.previous_operation_seq_num =(SELECT max(operation_seq_num)
1460: FROM wip_operations
1461: WHERE wip_entity_id = p_new_rj_we_id_tbl(l_job_counter)
1462: AND operation_seq_num < wo.operation_seq_num
1463: ),
1464: wo.next_operation_seq_num = (SELECT min(operation_seq_num)

Line 1465: FROM wip_operations

1461: WHERE wip_entity_id = p_new_rj_we_id_tbl(l_job_counter)
1462: AND operation_seq_num < wo.operation_seq_num
1463: ),
1464: wo.next_operation_seq_num = (SELECT min(operation_seq_num)
1465: FROM wip_operations
1466: WHERE wip_entity_id = p_new_rj_we_id_tbl(l_job_counter)
1467: AND operation_seq_num > wo.operation_seq_num
1468: )
1469: WHERE wo.wip_entity_id = p_new_rj_we_id_tbl(l_job_counter);

Line 1476: from wip_operations wo

1472:
1473: select operation_sequence_id,
1474: operation_seq_num
1475: bulk collect into l_op_seq_id_tbl,l_op_seq_num_tbl
1476: from wip_operations wo
1477: where wip_entity_id = p_rep_we_id
1478: AND wo.operation_seq_num <= p_curr_op_seq_num;
1479:
1480: l_stmt_num := 30;

Line 2161: , wip_operations wo

2157: wro.segment20,
2158: wro.department_id
2159:
2160: from wip_requirement_operations wro
2161: , wip_operations wo
2162: WHERE wro.wip_entity_id = p_rep_we_id
2163: AND wro.operation_seq_num <= p_curr_op_seq_num
2164: AND wro.operation_seq_num >= 0-p_curr_op_seq_num --To take care of phantoms bug #2681370
2165: and wo.wip_entity_id = p_rep_we_id

Line 2328: from wip_operations wo

2324: l_module VARCHAR2(100) := 'wsm.plsql.WSMJUPDB.CHANGE_QUANTITY';
2325: --Bug 5254440: Added the parameter p_op_seq_num.
2326: cursor c_job_wo(p_wip_entity_id number,p_op_seq_num NUMBER) is select quantity_in_queue + quantity_running + quantity_completed total_quantity,
2327: operation_seq_num
2328: from wip_operations wo
2329: where wo.wip_entity_id = p_wip_entity_id
2330: and wo.operation_seq_num = p_op_seq_num;
2331: BEGIN
2332:

Line 2349: UPDATE wip_operations

2345: l_stmt_num := 40;
2346:
2347: -- Update WO using the new qty
2348: forall l_job_counter in indices of p_wip_entity_id_tbl
2349: UPDATE wip_operations
2350: SET quantity_in_queue = decode(quantity_in_queue, 0, 0, p_new_job_qty_tbl(l_job_counter)),
2351: quantity_waiting_to_move = decode(quantity_waiting_to_move, 0, 0, p_new_job_qty_tbl(l_job_counter))
2352: WHERE wip_entity_id = p_wip_entity_id_tbl(l_job_counter)
2353: AND operation_seq_num = p_txn_job_op_seq_tbl(l_job_counter);

Line 2358: UPDATE wip_operations wo

2354:
2355: l_stmt_num := 50;
2356: if p_txn_job_intraop = 1 then --check added as part of MES actual qty changes(AH)
2357: forall l_job_counter in indices of p_wip_entity_id_tbl
2358: UPDATE wip_operations wo
2359: -- ST : Added for bug fix 4619823 (Found in UT)
2360: -- SET scheduled_quantity = (scheduled_quantity - p_sj_avail_qty_tbl(l_job_counter) + p_new_job_qty_tbl(l_job_counter))
2361: SET scheduled_quantity = (nvl(quantity_scrapped,0) + quantity_in_queue)
2362: WHERE wip_entity_id = p_wip_entity_id_tbl(l_job_counter)

Line 2371: UPDATE wip_operations wo

2367:
2368: l_stmt_num := 60;
2369:
2370: forall l_job_counter in indices of p_wip_entity_id_tbl
2371: UPDATE wip_operations wo
2372: SET wsm_costed_quantity_completed = decode(wo.count_point_type,3,0, --changed to costed qty completed as part of MES actual qty changes(AH)
2373: wsm_costed_quantity_completed - p_sj_avail_qty_tbl(l_job_counter) + p_new_job_qty_tbl(l_job_counter))
2374: WHERE wip_entity_id = p_wip_entity_id_tbl(l_job_counter)
2375: AND ( (p_txn_job_intraop = WIP_CONSTANTS.QUEUE

Line 2618: from wip_operations wo

2614: -- ST : Added the below for bug fix : 4619823 --
2615: -- Should be updating only the op at which the TXN took place...
2616: -- That Op will be the MAX Non-Obsoleted Operation
2617: AND wro.operation_seq_num = (select max(operation_seq_num)
2618: from wip_operations wo
2619: where wo.wip_entity_id = p_non_rep_sj_we_id_tbl(l_job_counter)
2620: and wo.count_point_type <> 3);
2621: -- If there is a PUSH comp and the whole qty is scrapped, qty_rel > qty_iss
2622: -- ST : Commenting out the below for bug fix : 4619823 --

Line 2624: -- from wip_operations wo

2620: and wo.count_point_type <> 3);
2621: -- If there is a PUSH comp and the whole qty is scrapped, qty_rel > qty_iss
2622: -- ST : Commenting out the below for bug fix : 4619823 --
2623: -- AND not exists (select 'obsolete operation'
2624: -- from wip_operations wo
2625: -- where wo.wip_entity_id = wro.wip_entity_id
2626: -- and wo.organization_id = wro.organization_id
2627: -- and wo.operation_seq_num = wro.operation_seq_num
2628: -- and wo.count_point_type = 3);

Line 2681: from wip_operations wo

2677: AND p_new_rj_we_id_tbl(l_job_counter) = wro.wip_entity_id)
2678: WHERE wro.wip_entity_id = p_new_rj_we_id_tbl(l_job_counter)
2679: and wro.operation_seq_num = p_rep_op_seq_num
2680: AND not exists (select 'obsolete operation'
2681: from wip_operations wo
2682: where wo.wip_entity_id = wro.wip_entity_id
2683: and wo.organization_id = wro.organization_id
2684: and wo.operation_seq_num = wro.operation_seq_num
2685: and wo.count_point_type = 3);

Line 2726: from wip_operations wo

2722: ), 6)
2723: WHERE wro.wip_entity_id = p_rep_we_id
2724: AND nvl(abs(wro.quantity_issued),0) >= NVL(abs(wro.quantity_relieved), 0) -- Added to fix bug #2797647
2725: AND not exists (select 'obsolete operation'
2726: from wip_operations wo
2727: where wo.wip_entity_id = wro.wip_entity_id
2728: and wo.organization_id = wro.organization_id
2729: and wo.operation_seq_num = wro.operation_seq_num
2730: and wo.count_point_type = 3)

Line 2915: WIP_OPERATIONS wo

2911: bsor.ATTRIBUTE15
2912: FROM BOM_RESOURCES br,
2913: BOM_OPERATION_RESOURCES bor,
2914: BOM_SUB_OPERATION_RESOURCES bsor,
2915: WIP_OPERATIONS wo
2916: WHERE wo.WIP_ENTITY_ID = p_wip_entity_id
2917: AND wo.OPERATION_SEQUENCE_ID = bor.OPERATION_SEQUENCE_ID
2918: AND nvl(p_only_wo_op_seq, WO.operation_seq_num) = WO.operation_seq_num
2919: AND bor.OPERATION_SEQUENCE_ID = bsor.OPERATION_SEQUENCE_ID

Line 3156: UPDATE WIP_OPERATIONS

3152:
3153: l_stmt_num := 50;
3154:
3155: --=== START: OBSOLETE THE OPERATIONS ===--
3156: UPDATE WIP_OPERATIONS
3157: SET COUNT_POINT_TYPE = 3,
3158: SCHEDULED_QUANTITY = 0,
3159: QUANTITY_IN_QUEUE = 0,
3160: LAST_UPDATE_DATE = SYSDATE,

Line 3209: UPDATE WIP_OPERATIONS

3205: return;
3206: ELSE -- If starting operation is provided
3207: l_stmt_num := 62;
3208:
3209: UPDATE WIP_OPERATIONS
3210: SET QUANTITY_WAITING_TO_MOVE = 0,
3211: LAST_UPDATE_DATE = SYSDATE,
3212: LAST_UPDATED_BY = g_user_id,
3213: LAST_UPDATE_LOGIN = g_user_login_id,

Line 3233: FROM wip_operations

3229: l_stmt_num := 80;
3230:
3231: SELECT max(operation_seq_num)
3232: INTO l_job_max_op_seq_num
3233: FROM wip_operations
3234: WHERE wip_entity_id = p_wip_entity_id;
3235:
3236: p_new_op_added := l_job_max_op_seq_num + l_wsm_param_seq_incr;
3237:

Line 3307: UPDATE wip_operations

3303: RAISE FND_API.G_EXC_ERROR;
3304: END IF;
3305:
3306: -- Start : Additions to fix bug 3452913 --
3307: UPDATE wip_operations
3308: SET wsm_op_seq_num = l_op_seq_num
3309: WHERE wip_entity_id = p_wip_entity_id
3310: AND operation_seq_num = p_new_op_added;
3311: -- End : Additions to fix bug 3452913 --

Line 3376: UPDATE WIP_OPERATIONS WO

3372:
3373: l_stmt_num := 95;
3374:
3375: --Update the previous and next op seq nums
3376: UPDATE WIP_OPERATIONS WO
3377: SET WO.PREVIOUS_OPERATION_SEQ_NUM = (SELECT MAX(OPERATION_SEQ_NUM)
3378: FROM WIP_OPERATIONS
3379: WHERE WIP_ENTITY_ID = p_wip_entity_id
3380: AND OPERATION_SEQ_NUM < WO.OPERATION_SEQ_NUM),

Line 3378: FROM WIP_OPERATIONS

3374:
3375: --Update the previous and next op seq nums
3376: UPDATE WIP_OPERATIONS WO
3377: SET WO.PREVIOUS_OPERATION_SEQ_NUM = (SELECT MAX(OPERATION_SEQ_NUM)
3378: FROM WIP_OPERATIONS
3379: WHERE WIP_ENTITY_ID = p_wip_entity_id
3380: AND OPERATION_SEQ_NUM < WO.OPERATION_SEQ_NUM),
3381: WO.NEXT_OPERATION_SEQ_NUM = (SELECT MIN(OPERATION_SEQ_NUM)
3382: FROM WIP_OPERATIONS

Line 3382: FROM WIP_OPERATIONS

3378: FROM WIP_OPERATIONS
3379: WHERE WIP_ENTITY_ID = p_wip_entity_id
3380: AND OPERATION_SEQ_NUM < WO.OPERATION_SEQ_NUM),
3381: WO.NEXT_OPERATION_SEQ_NUM = (SELECT MIN(OPERATION_SEQ_NUM)
3382: FROM WIP_OPERATIONS
3383: WHERE WIP_ENTITY_ID = p_wip_entity_id
3384: AND OPERATION_SEQ_NUM > WO.OPERATION_SEQ_NUM)
3385: WHERE WO.WIP_ENTITY_ID = p_wip_entity_id;
3386:

Line 3390: UPDATE WIP_OPERATIONS

3386:
3387: l_stmt_num := 100;
3388:
3389: --Set qty in Queue of the target operation
3390: UPDATE WIP_OPERATIONS
3391: SET quantity_in_queue = l_job_qty
3392: WHERE wip_entity_id = p_wip_entity_id
3393: AND operation_seq_num = p_new_op_added;
3394:

Line 7156: FROM wip_operations

7152:
7153: /* assign the job seq num*/
7154: SELECT max(operation_seq_num)
7155: INTO l_bonus_job_st_op_seq
7156: FROM wip_operations
7157: WHERE wip_entity_id = l_new_we_id;
7158:
7159: p_wltx_resulting_jobs_tbl(l_rj_index).job_operation_seq_num := l_bonus_job_st_op_seq;
7160:

Line 7173: UPDATE wip_operations

7169: );
7170: End if;
7171:
7172: l_stmt_num := 100;
7173: UPDATE wip_operations
7174: SET wsm_op_seq_num = l_bonus_rtg_st_op_seq
7175: WHERE wip_entity_id = l_new_we_id
7176: AND operation_seq_num = l_bonus_job_st_op_seq;
7177:

Line 7181: p_msg_text => 'Updated the op seq num in wip_operations',

7177:
7178: if( g_log_level_statement >= l_log_level ) then
7179: l_msg_tokens.delete;
7180: WSM_log_PVT.logMessage(p_module_name => l_module ,
7181: p_msg_text => 'Updated the op seq num in wip_operations',
7182: p_stmt_num => l_stmt_num,
7183: p_msg_tokens => l_msg_tokens,
7184: p_fnd_log_level => g_log_level_statement,
7185: p_run_log_level => l_log_level