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 3159: UPDATE WIP_OPERATIONS

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

Line 3212: UPDATE WIP_OPERATIONS

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

Line 3236: FROM wip_operations

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

Line 3310: UPDATE wip_operations

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

Line 3379: UPDATE WIP_OPERATIONS WO

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

Line 3381: FROM WIP_OPERATIONS

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

Line 3385: FROM WIP_OPERATIONS

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

Line 3393: UPDATE WIP_OPERATIONS

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

Line 7220: FROM wip_operations

7216:
7217: /* assign the job seq num*/
7218: SELECT max(operation_seq_num)
7219: INTO l_bonus_job_st_op_seq
7220: FROM wip_operations
7221: WHERE wip_entity_id = l_new_we_id;
7222:
7223: p_wltx_resulting_jobs_tbl(l_rj_index).job_operation_seq_num := l_bonus_job_st_op_seq;
7224:

Line 7237: UPDATE wip_operations

7233: );
7234: End if;
7235:
7236: l_stmt_num := 100;
7237: UPDATE wip_operations
7238: SET wsm_op_seq_num = l_bonus_rtg_st_op_seq
7239: WHERE wip_entity_id = l_new_we_id
7240: AND operation_seq_num = l_bonus_job_st_op_seq;
7241:

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

7241:
7242: if( g_log_level_statement >= l_log_level ) then
7243: l_msg_tokens.delete;
7244: WSM_log_PVT.logMessage(p_module_name => l_module ,
7245: p_msg_text => 'Updated the op seq num in wip_operations',
7246: p_stmt_num => l_stmt_num,
7247: p_msg_tokens => l_msg_tokens,
7248: p_fnd_log_level => g_log_level_statement,
7249: p_run_log_level => l_log_level