DBA Data[Home] [Help]

APPS.WSMPJUPD dependencies on WSMPCNST

Line 231: IF p_wltx_header.transaction_type_id in (WSMPCNST.SPLIT,WSMPCNST.MERGE,WSMPCNST.UPDATE_ASSEMBLY,WSMPCNST.UPDATE_QUANTITY) then

227:
228: l_stmt_num := 40;
229:
230: ----- Handle Secondary qty information passed for Split,Merge,Upd Assy and Update Qty transaction-------------------------------------
231: IF p_wltx_header.transaction_type_id in (WSMPCNST.SPLIT,WSMPCNST.MERGE,WSMPCNST.UPDATE_ASSEMBLY,WSMPCNST.UPDATE_QUANTITY) then
232:
233: -- For all the new resulting jobs (non-SpUA jobs)
234: -- bulk insert data into wsm_op_secondary_quantities by reading from wsm_job_secondary_quantities
235: --Assumes that the wsm_job_secondary_quantities is already populated in lbj build_header_info proc

Line 236: IF p_wltx_header.transaction_type_id in (WSMPCNST.SPLIT,WSMPCNST.MERGE) then

232:
233: -- For all the new resulting jobs (non-SpUA jobs)
234: -- bulk insert data into wsm_op_secondary_quantities by reading from wsm_job_secondary_quantities
235: --Assumes that the wsm_job_secondary_quantities is already populated in lbj build_header_info proc
236: IF p_wltx_header.transaction_type_id in (WSMPCNST.SPLIT,WSMPCNST.MERGE) then
237: l_op_tbl_counter := 1;
238:
239: l_stmt_num := 50;
240: l_counter := p_wltx_resulting_jobs_tbl.first;

Line 249: not (p_wltx_header.transaction_type_id = WSMPCNST.SPLIT and

245:
246: l_job_qty_tbl.delete;
247: -- ST : Sec. UOM Fix : Added the nvl clause
248: IF (l_counter <> nvl(p_sj_also_rj_index,-1)) and
249: not (p_wltx_header.transaction_type_id = WSMPCNST.SPLIT and
250: p_wltx_resulting_jobs_tbl(l_counter).split_has_update_assy = 1
251: )
252: THEN
253: select *

Line 326: IF ( p_wltx_header.transaction_type_id = WSMPCNST.SPLIT and p_sj_also_rj_index is not NULL and

322: -- For a resulting job with change of assembly and for a job after update assembly transaction
323: -- The secondary qty UOMs not present for the new assembly have to be obsoleted
324: -- Insert new UOMs for the new assembly...which are not present in the old assembly
325: -- this part handles SpUA for SJ as RJ and UA
326: IF ( p_wltx_header.transaction_type_id = WSMPCNST.SPLIT and p_sj_also_rj_index is not NULL and
327: p_wltx_resulting_jobs_tbl(p_sj_also_rj_index).split_has_update_assy = 1
328: )
329: OR
330: (p_wltx_header.transaction_type_id = WSMPCNST.UPDATE_ASSEMBLY)

Line 330: (p_wltx_header.transaction_type_id = WSMPCNST.UPDATE_ASSEMBLY)

326: IF ( p_wltx_header.transaction_type_id = WSMPCNST.SPLIT and p_sj_also_rj_index is not NULL and
327: p_wltx_resulting_jobs_tbl(p_sj_also_rj_index).split_has_update_assy = 1
328: )
329: OR
330: (p_wltx_header.transaction_type_id = WSMPCNST.UPDATE_ASSEMBLY)
331: THEN
332: l_stmt_num := 80.1;
333: -- obsolete Old UOMs no longer valid in new assy
334: update wsm_job_secondary_quantities

Line 432: -- IF (p_wltx_header.transaction_type_id IN (WSMPCNST.SPLIT,WSMPCNST.MERGE)) and

428: END IF;
429:
430: -- For a starting job also present as a resulting job, NULL out the current qty information if nothing is passed..
431: -- Demo Issue Fix : Retain the old information for the starting job
432: -- IF (p_wltx_header.transaction_type_id IN (WSMPCNST.SPLIT,WSMPCNST.MERGE)) and
433: -- (p_sj_also_rj_index is not NULL) and
434: -- (l_sj_rj_sec_qty_exists = 0)
435: -- THEN
436: -- -- User hasnt provided secondary qty information...

Line 469: IF p_wltx_header.transaction_type_id IN (WSMPCNST.SPLIT,WSMPCNST.MERGE) THEN

465:
466: l_stmt_num := 120;
467: -- In case of Merge and Split,
468: -- then need to set the cur_qty = null and cur_active = N for Starting Jobs not present as a Resulting job
469: IF p_wltx_header.transaction_type_id IN (WSMPCNST.SPLIT,WSMPCNST.MERGE) THEN
470: forall i in indices of l_sj_we_id_tbl
471: update wsm_job_secondary_quantities
472: set currently_active = 2,
473: current_quantity=null

Line 481: If p_wltx_header.transaction_type_id in (WSMPCNST.SPLIT,WSMPCNST.MERGE) then

477: --it shouldnt be updated.
478: END IF;
479:
480: -- Here handle the Reason code for SPLIT and MERGE transaction..
481: If p_wltx_header.transaction_type_id in (WSMPCNST.SPLIT,WSMPCNST.MERGE) then
482:
483: select *
484: bulk collect
485: into l_sj_op_reason_codes_tbl

Line 509: IF ( p_wltx_header.transaction_type_id = WSMPCNST.MERGE OR

505: -- forall the no-SpUA resulting jobs (not present also as a starting job, create the reason code information in PL/SQL tables)
506: -- and do a bulk insert at the end
507: while l_counter IS NOT NULL and l_sj_op_reason_codes_tbl.count > 0 LOOP
508:
509: IF ( p_wltx_header.transaction_type_id = WSMPCNST.MERGE OR
510: ( p_wltx_header.transaction_type_id = WSMPCNST.SPLIT AND p_wltx_resulting_jobs_tbl(l_counter).split_has_update_assy <> 1)
511: ) AND
512: ( l_counter <> nvl(p_sj_also_rj_index,-1) )
513: -- Resulting Job shouldnt be a starting job

Line 510: ( p_wltx_header.transaction_type_id = WSMPCNST.SPLIT AND p_wltx_resulting_jobs_tbl(l_counter).split_has_update_assy <> 1)

506: -- and do a bulk insert at the end
507: while l_counter IS NOT NULL and l_sj_op_reason_codes_tbl.count > 0 LOOP
508:
509: IF ( p_wltx_header.transaction_type_id = WSMPCNST.MERGE OR
510: ( p_wltx_header.transaction_type_id = WSMPCNST.SPLIT AND p_wltx_resulting_jobs_tbl(l_counter).split_has_update_assy <> 1)
511: ) AND
512: ( l_counter <> nvl(p_sj_also_rj_index,-1) )
513: -- Resulting Job shouldnt be a starting job
514: THEN

Line 575: IF p_wltx_header.transaction_type_id IN (WSMPCNST.BONUS,WSMPCNST.UPDATE_ASSEMBLY,WSMPCNST.UPDATE_ROUTING,WSMPCNST.SPLIT) THEN

571: -- we are calling option 1 code so LBJ proc wont insert elementary sec qty data
572:
573: -- Call the WSMOPRNB procedure for BONUS,UPDATE_ASSEMBLY, SpUA and UPDATE_ROUTING transactions
574: -- to fill in data from the WSM_JOB_SECONDARY_QUANTITIES into ... WSM_OP_SECONDARY_QUANTITIES
575: IF p_wltx_header.transaction_type_id IN (WSMPCNST.BONUS,WSMPCNST.UPDATE_ASSEMBLY,WSMPCNST.UPDATE_ROUTING,WSMPCNST.SPLIT) THEN
576: l_counter := p_wltx_resulting_jobs_tbl.first;
577: while l_counter IS NOT NULL LOOP
578: IF (p_wltx_header.transaction_type_id <> WSMPCNST.SPLIT) OR
579: (p_wltx_header.transaction_type_id = WSMPCNST.SPLIT and p_wltx_resulting_jobs_tbl(l_counter).split_has_update_assy = 1)

Line 578: IF (p_wltx_header.transaction_type_id <> WSMPCNST.SPLIT) OR

574: -- to fill in data from the WSM_JOB_SECONDARY_QUANTITIES into ... WSM_OP_SECONDARY_QUANTITIES
575: IF p_wltx_header.transaction_type_id IN (WSMPCNST.BONUS,WSMPCNST.UPDATE_ASSEMBLY,WSMPCNST.UPDATE_ROUTING,WSMPCNST.SPLIT) THEN
576: l_counter := p_wltx_resulting_jobs_tbl.first;
577: while l_counter IS NOT NULL LOOP
578: IF (p_wltx_header.transaction_type_id <> WSMPCNST.SPLIT) OR
579: (p_wltx_header.transaction_type_id = WSMPCNST.SPLIT and p_wltx_resulting_jobs_tbl(l_counter).split_has_update_assy = 1)
580: THEN
581: l_stmt_num := 130;
582: -- In case of bonus we'll have to create the skeletal data and then invoke the OPRNB code

Line 579: (p_wltx_header.transaction_type_id = WSMPCNST.SPLIT and p_wltx_resulting_jobs_tbl(l_counter).split_has_update_assy = 1)

575: IF p_wltx_header.transaction_type_id IN (WSMPCNST.BONUS,WSMPCNST.UPDATE_ASSEMBLY,WSMPCNST.UPDATE_ROUTING,WSMPCNST.SPLIT) THEN
576: l_counter := p_wltx_resulting_jobs_tbl.first;
577: while l_counter IS NOT NULL LOOP
578: IF (p_wltx_header.transaction_type_id <> WSMPCNST.SPLIT) OR
579: (p_wltx_header.transaction_type_id = WSMPCNST.SPLIT and p_wltx_resulting_jobs_tbl(l_counter).split_has_update_assy = 1)
580: THEN
581: l_stmt_num := 130;
582: -- In case of bonus we'll have to create the skeletal data and then invoke the OPRNB code
583: IF p_wltx_header.transaction_type_id = WSMPCNST.BONUS THEN

Line 583: IF p_wltx_header.transaction_type_id = WSMPCNST.BONUS THEN

579: (p_wltx_header.transaction_type_id = WSMPCNST.SPLIT and p_wltx_resulting_jobs_tbl(l_counter).split_has_update_assy = 1)
580: THEN
581: l_stmt_num := 130;
582: -- In case of bonus we'll have to create the skeletal data and then invoke the OPRNB code
583: IF p_wltx_header.transaction_type_id = WSMPCNST.BONUS THEN
584: insert into wsm_job_secondary_quantities
585: ( wip_entity_id
586: ,organization_id
587: ,uom_code

Line 797: If p_wltx_header.transaction_type_id in (WSMPCNST.SPLIT,WSMPCNST.MERGE) then

793: l_sj_we_id := p_wltx_resulting_jobs_tbl(p_sj_also_rj_index).wip_entity_id;
794: end if;
795:
796: l_stmt_num := 20;
797: If p_wltx_header.transaction_type_id in (WSMPCNST.SPLIT,WSMPCNST.MERGE) then
798: for i in p_wltx_resulting_jobs_tbl.first .. p_wltx_resulting_jobs_tbl.last loop
799: if p_wltx_resulting_jobs_tbl(i).split_has_update_assy <>1 then
800: l_wsm_op_reason_codes_tbl.delete;
801: BEGIN

Line 833: if p_wltx_header.transaction_type_id = WSMPCNST.BONUS then

829: end if;
830:
831: l_stmt_num := 30;
832: -- This will be handled by the call to OPRNB.copy_mes procedure in the secondary_quantities procedure..
833: if p_wltx_header.transaction_type_id = WSMPCNST.BONUS then
834: --query bom_standard_operations child table and populate reason codes for the new op.;
835: l_counter := p_wltx_resulting_jobs_tbl.first;
836: insert into wsm_op_reason_codes
837: (Organization_id,

Line 972: If p_wltx_header.transaction_type_id in (WSMPCNST.SPLIT,WSMPCNST.MERGE,WSMPCNST.BONUS) then

968:
969: l_stmt_num := 10;
970:
971: If p_wltx_starting_jobs_tbl(p_rep_job_index).intraoperation_step = 1 then
972: If p_wltx_header.transaction_type_id in (WSMPCNST.SPLIT,WSMPCNST.MERGE,WSMPCNST.BONUS) then
973: --Copy parents substitute components info to new child jobs.For parent jobs,it shld be already populated.
974: for i in p_wltx_resulting_jobs_tbl.first .. p_wltx_resulting_jobs_tbl.last loop
975: if p_wltx_resulting_jobs_tbl (i).split_has_update_assy <>1 then
976: BEGIN

Line 2584: IF p_txn_type IN (WSMPCNST.SPLIT, WSMPCNST.MERGE) THEN

2580:
2581: l_stmt_num := 10;
2582: x_err_code := 0;
2583:
2584: IF p_txn_type IN (WSMPCNST.SPLIT, WSMPCNST.MERGE) THEN
2585: --This has been added to improve performance
2586: -- as such the following stmts wont update anything for Upd Qty
2587: l_stmt_num := 20;
2588:

Line 2596: if p_txn_type = WSMPCNST.MERGE and

2592: --it is at ToMove as per the new behavior and also as costing has fixed the bug 2120717.
2593: -- The calculation of qty_issued will change as below at Queue due to MES
2594: /*** End MES Actual Qty changes(Change description) ****/
2595:
2596: if p_txn_type = WSMPCNST.MERGE and
2597: p_txn_job_intraop = 1 -- ST : Added for bug fix : 4619823 --
2598: then
2599:
2600: forall l_job_counter in indices of p_non_rep_sj_we_id_tbl

Line 3488: IF l_txn_type_id = WSMPCNST.UPDATE_ROUTING THEN

3484: -- SpUA : l_wip_entity_id is resulting job wip_id for Split and Update Assy
3485: -- and for other transactions, it is starting job wip_id -- this is obvious.. comeon...
3486: --
3487:
3488: IF l_txn_type_id = WSMPCNST.UPDATE_ROUTING THEN
3489: l_stmt_num := 190;
3490:
3491: if l_job_kanban_card_id is not null then
3492:

Line 3548: ELSIF l_txn_type_id IN (WSMPCNST.UPDATE_ASSEMBLY, WSMPCNST.SPLIT) THEN

3544: last_updated_by = g_user_id
3545: WHERE wdj.wip_entity_id = l_wip_entity_id;
3546:
3547: --SpUA: add Split
3548: ELSIF l_txn_type_id IN (WSMPCNST.UPDATE_ASSEMBLY, WSMPCNST.SPLIT) THEN
3549:
3550: l_stmt_num := 200;
3551:
3552: -- abbKanban begin

Line 3875: decode(p_txn_type_id, WSMPCNST.SPLIT, 40,

3871: MTT.transaction_type_id,
3872: -- Start : Changes as required by CST for SpUA --
3873: p_sj_item_id,
3874: -- End : Changes as required by CST for SpUA --
3875: decode(p_txn_type_id, WSMPCNST.SPLIT, 40,
3876: WSMPCNST.MERGE, 41,
3877: WSMPCNST.BONUS, 42,
3878: WSMPCNST.UPDATE_QUANTITY, 43,
3879: 0),

Line 3876: WSMPCNST.MERGE, 41,

3872: -- Start : Changes as required by CST for SpUA --
3873: p_sj_item_id,
3874: -- End : Changes as required by CST for SpUA --
3875: decode(p_txn_type_id, WSMPCNST.SPLIT, 40,
3876: WSMPCNST.MERGE, 41,
3877: WSMPCNST.BONUS, 42,
3878: WSMPCNST.UPDATE_QUANTITY, 43,
3879: 0),
3880: MTT.transaction_source_type_id,

Line 3877: WSMPCNST.BONUS, 42,

3873: p_sj_item_id,
3874: -- End : Changes as required by CST for SpUA --
3875: decode(p_txn_type_id, WSMPCNST.SPLIT, 40,
3876: WSMPCNST.MERGE, 41,
3877: WSMPCNST.BONUS, 42,
3878: WSMPCNST.UPDATE_QUANTITY, 43,
3879: 0),
3880: MTT.transaction_source_type_id,
3881: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_wip_entity_id, p_rj_wip_entity_id),

Line 3878: WSMPCNST.UPDATE_QUANTITY, 43,

3874: -- End : Changes as required by CST for SpUA --
3875: decode(p_txn_type_id, WSMPCNST.SPLIT, 40,
3876: WSMPCNST.MERGE, 41,
3877: WSMPCNST.BONUS, 42,
3878: WSMPCNST.UPDATE_QUANTITY, 43,
3879: 0),
3880: MTT.transaction_source_type_id,
3881: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_wip_entity_id, p_rj_wip_entity_id),
3882: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_wip_entity_name, p_rj_wip_entity_name),

Line 3881: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_wip_entity_id, p_rj_wip_entity_id),

3877: WSMPCNST.BONUS, 42,
3878: WSMPCNST.UPDATE_QUANTITY, 43,
3879: 0),
3880: MTT.transaction_source_type_id,
3881: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_wip_entity_id, p_rj_wip_entity_id),
3882: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_wip_entity_name, p_rj_wip_entity_name),
3883: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_avail_quantity, p_rj_start_quantity),
3884: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_avail_quantity, p_rj_start_quantity),
3885: MSI.primary_uom_code,

Line 3882: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_wip_entity_name, p_rj_wip_entity_name),

3878: WSMPCNST.UPDATE_QUANTITY, 43,
3879: 0),
3880: MTT.transaction_source_type_id,
3881: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_wip_entity_id, p_rj_wip_entity_id),
3882: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_wip_entity_name, p_rj_wip_entity_name),
3883: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_avail_quantity, p_rj_start_quantity),
3884: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_avail_quantity, p_rj_start_quantity),
3885: MSI.primary_uom_code,
3886: p_txn_date,

Line 3883: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_avail_quantity, p_rj_start_quantity),

3879: 0),
3880: MTT.transaction_source_type_id,
3881: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_wip_entity_id, p_rj_wip_entity_id),
3882: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_wip_entity_name, p_rj_wip_entity_name),
3883: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_avail_quantity, p_rj_start_quantity),
3884: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_avail_quantity, p_rj_start_quantity),
3885: MSI.primary_uom_code,
3886: p_txn_date,
3887: p_txn_id,

Line 3884: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_avail_quantity, p_rj_start_quantity),

3880: MTT.transaction_source_type_id,
3881: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_wip_entity_id, p_rj_wip_entity_id),
3882: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_wip_entity_name, p_rj_wip_entity_name),
3883: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_avail_quantity, p_rj_start_quantity),
3884: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_avail_quantity, p_rj_start_quantity),
3885: MSI.primary_uom_code,
3886: p_txn_date,
3887: p_txn_id,
3888: p_sj_op_seq_num,

Line 3903: AND MTT.transaction_action_id IN(decode(p_txn_type_id, WSMPCNST.SPLIT, 40,

3899: AND p_txn_org_id = OAP.organization_id
3900: AND trunc(p_txn_date) between period_start_date and schedule_close_date
3901: -- Fixed bug #2828278
3902: -- Added trunc above: sch_close_date doesnt have timestamp so a problem for end of month
3903: AND MTT.transaction_action_id IN(decode(p_txn_type_id, WSMPCNST.SPLIT, 40,
3904: WSMPCNST.MERGE, 41,
3905: WSMPCNST.BONUS, 42,
3906: WSMPCNST.UPDATE_QUANTITY, 43,
3907: 0)

Line 3904: WSMPCNST.MERGE, 41,

3900: AND trunc(p_txn_date) between period_start_date and schedule_close_date
3901: -- Fixed bug #2828278
3902: -- Added trunc above: sch_close_date doesnt have timestamp so a problem for end of month
3903: AND MTT.transaction_action_id IN(decode(p_txn_type_id, WSMPCNST.SPLIT, 40,
3904: WSMPCNST.MERGE, 41,
3905: WSMPCNST.BONUS, 42,
3906: WSMPCNST.UPDATE_QUANTITY, 43,
3907: 0)
3908: )

Line 3905: WSMPCNST.BONUS, 42,

3901: -- Fixed bug #2828278
3902: -- Added trunc above: sch_close_date doesnt have timestamp so a problem for end of month
3903: AND MTT.transaction_action_id IN(decode(p_txn_type_id, WSMPCNST.SPLIT, 40,
3904: WSMPCNST.MERGE, 41,
3905: WSMPCNST.BONUS, 42,
3906: WSMPCNST.UPDATE_QUANTITY, 43,
3907: 0)
3908: )
3909: AND MTT.transaction_source_type_id = 5;

Line 3906: WSMPCNST.UPDATE_QUANTITY, 43,

3902: -- Added trunc above: sch_close_date doesnt have timestamp so a problem for end of month
3903: AND MTT.transaction_action_id IN(decode(p_txn_type_id, WSMPCNST.SPLIT, 40,
3904: WSMPCNST.MERGE, 41,
3905: WSMPCNST.BONUS, 42,
3906: WSMPCNST.UPDATE_QUANTITY, 43,
3907: 0)
3908: )
3909: AND MTT.transaction_source_type_id = 5;
3910:

Line 4030: IF (p_txn_type_id IN (WSMPCNST.BONUS,

4026: -- ' p_copy_mode='||p_copy_mode);
4027: -- END IF;
4028:
4029:
4030: IF (p_txn_type_id IN (WSMPCNST.BONUS,
4031: WSMPCNST.UPDATE_ASSEMBLY, WSMPCNST.UPDATE_ROUTING)) THEN
4032:
4033: l_stmt_num := 11;
4034:

Line 4031: WSMPCNST.UPDATE_ASSEMBLY, WSMPCNST.UPDATE_ROUTING)) THEN

4027: -- END IF;
4028:
4029:
4030: IF (p_txn_type_id IN (WSMPCNST.BONUS,
4031: WSMPCNST.UPDATE_ASSEMBLY, WSMPCNST.UPDATE_ROUTING)) THEN
4032:
4033: l_stmt_num := 11;
4034:
4035: IF (p_copy_mode = 1) THEN -- Make copies after each transaction

Line 4156: ELSIF (p_txn_type_id IN (WSMPCNST.SPLIT, WSMPCNST.MERGE)) THEN

4152: End if;
4153:
4154: END IF; --(p_copy_mode)
4155:
4156: ELSIF (p_txn_type_id IN (WSMPCNST.SPLIT, WSMPCNST.MERGE)) THEN
4157:
4158: l_stmt_num := 40;
4159:
4160: l_rep_wip_entity_id := p_wltx_starting_jobs_tbl(p_rep_sj_index).wip_entity_id;

Line 4423: IF (p_txn_type_id = WSMPCNST.SPLIT) THEN

4419: end if; -- check if not a starting job...
4420:
4421: END LOOP;
4422:
4423: IF (p_txn_type_id = WSMPCNST.SPLIT) THEN
4424:
4425: l_stmt_num := 130;
4426:
4427: if p_sj_as_rj_index is not null then

Line 4911: if p_wltx_header.transaction_type_id in (WSMPCNST.SPLIT,WSMPCNST.MERGE) then

4907: end if;
4908:
4909: l_stmt_num := 50;
4910: -- for based on each transaction type...
4911: if p_wltx_header.transaction_type_id in (WSMPCNST.SPLIT,WSMPCNST.MERGE) then
4912:
4913: l_stmt_num := 55;
4914: -- do the split processing....
4915: l_non_rep_sj_tbl.delete;

Line 4918: if p_wltx_header.transaction_type_id = WSMPCNST.SPLIT then

4914: -- do the split processing....
4915: l_non_rep_sj_tbl.delete;
4916:
4917: -- loop on the jobs....
4918: if p_wltx_header.transaction_type_id = WSMPCNST.SPLIT then
4919: l_rep_sj_index := p_wltx_starting_jobs_tbl.first;
4920: elsif p_rep_job_index is not null then
4921: l_rep_sj_index := p_rep_job_index;
4922: else

Line 5229: if p_wltx_header.transaction_type_id = WSMPCNST.merge then

5225: l_new_rj_we_id_tbl(l_job_counter) := p_wltx_resulting_jobs_tbl(l_job_counter).wip_entity_id;
5226: l_new_rj_qty_tbl(l_job_counter) := p_wltx_resulting_jobs_tbl(l_job_counter).start_quantity;
5227:
5228: -- Kanban stuff for Merge Txn....
5229: if p_wltx_header.transaction_type_id = WSMPCNST.merge then
5230: -- here take care of the following case
5231: -- A*
5232: -- \
5233: -- |-- C

Line 5624: if p_wltx_header.transaction_type_id = WSMPCNST.SPLIT and p_wltx_resulting_jobs_tbl(l_sj_also_rj_index).split_has_update_assy = 1 then

5620: if l_kanban_card_id is not null then
5621:
5622: l_stmt_num := 115;
5623:
5624: if p_wltx_header.transaction_type_id = WSMPCNST.SPLIT and p_wltx_resulting_jobs_tbl(l_sj_also_rj_index).split_has_update_assy = 1 then
5625:
5626: l_stmt_num := 120;
5627: if( g_log_level_statement >= l_log_level ) then
5628: l_msg_tokens.delete;

Line 5831: if (p_wltx_header.transaction_type_id = WSMPCNST.SPLIT) or

5827:
5828: -- In case of split straight forward....
5829: -- In case of Merge check if the resulting job has kanban or not..
5830:
5831: if (p_wltx_header.transaction_type_id = WSMPCNST.SPLIT) or
5832: --Bug 5344612:Case of p_wltx_resulting_jobs_tbl.kanban_card_id being null is handled.
5833: p_wltx_resulting_jobs_tbl(p_wltx_resulting_jobs_tbl.first).kanban_card_id IS NULL or
5834: (p_wltx_resulting_jobs_tbl(p_wltx_resulting_jobs_tbl.first).kanban_card_id IS NOT NULL AND
5835: p_wltx_resulting_jobs_tbl(p_wltx_resulting_jobs_tbl.first).kanban_card_id <> l_kanban_card_id)

Line 6034: if p_wltx_header.transaction_type_id = WSMPCNST.SPLIT then

6030:
6031: l_stmt_num := 280;
6032:
6033: -- loop on the resulting jobs for split has update assembly...
6034: if p_wltx_header.transaction_type_id = WSMPCNST.SPLIT then
6035:
6036: l_job_counter := p_wltx_resulting_jobs_tbl.first;
6037: while l_job_counter is not null loop
6038: -- for l_job_counter in p_wltx_resulting_jobs_tbl.first..p_wltx_resulting_jobs_tbl.last loop

Line 6059: p_txn_type_id => WSMPCNST.SPLIT,

6055: l_err_buf := null;
6056:
6057: -- SpUA code....
6058: UPDATE_ASSEMBLY_OR_ROUTING( p_txn_id => null,
6059: p_txn_type_id => WSMPCNST.SPLIT,
6060: -- p_rep_wip_entity_id => p_wltx_resulting_jobs_tbl(l_job_counter).wip_entity_id,
6061: p_job_kanban_card_id => null, -- no need already handled within the code.. .....
6062: p_po_creation_time => l_po_creation_time,
6063: p_sj_compl_subinventory => p_wltx_starting_jobs_tbl(l_rep_sj_index).completion_subinventory,

Line 6229: if p_wltx_header.transaction_type_id = WSMPCNST.SPLIT then

6225: end if;
6226:
6227: l_stmt_num := 330;
6228: -- Geneology differs for split and merge...
6229: if p_wltx_header.transaction_type_id = WSMPCNST.SPLIT then
6230:
6231: l_stmt_num := 340;
6232:
6233: -- for geneology purpose.... get the gen obj id

Line 6477: elsif p_wltx_header.transaction_type_id in (WSMPCNST.UPDATE_ASSEMBLY,WSMPCNST.UPDATE_ROUTING) then

6473:
6474: l_txn_status := WIP_CONSTANTS.COMPLETED;
6475: l_txn_costed := WIP_CONSTANTS.pending;
6476:
6477: elsif p_wltx_header.transaction_type_id in (WSMPCNST.UPDATE_ASSEMBLY,WSMPCNST.UPDATE_ROUTING) then
6478:
6479: l_stmt_num := 500;
6480: l_err_code := 0;
6481: l_err_buf := null;

Line 6566: elsif p_wltx_header.transaction_type_id = WSMPCNST.UPDATE_QUANTITY then

6562: l_txn_status := WIP_CONSTANTS.COMPLETED;
6563: l_txn_costed := WIP_CONSTANTS.COMPLETED;
6564:
6565:
6566: elsif p_wltx_header.transaction_type_id = WSMPCNST.UPDATE_QUANTITY then
6567:
6568: l_stmt_num := 520;
6569: l_err_code := 0;
6570: l_err_buf := null;

Line 6586: p_txn_type => WSMPCNST.UPDATE_QUANTITY,

6582: l_sj_scrap_qty_tbl(l_rep_sj_index) := p_wltx_starting_jobs_tbl(l_rep_sj_index).start_quantity - p_wltx_starting_jobs_tbl(l_rep_sj_index).quantity_available;
6583:
6584: -- change the quantity
6585: CHANGE_QUANTITY( p_txn_id => null,
6586: p_txn_type => WSMPCNST.UPDATE_QUANTITY,
6587: p_wip_entity_id_tbl => l_sj_we_id_tbl,
6588: p_new_job_qty_tbl => l_sj_new_qty_tbl,
6589: p_new_net_qty_tbl => l_sj_new_net_qty_tbl,
6590:

Line 6629: p_txn_type => WSMPCNST.UPDATE_QUANTITY,

6625: l_new_rj_we_id_tbl.delete;
6626: l_new_rj_qty_tbl.delete;
6627:
6628: UPDATE_QTY_ISSUED(p_txn_id => null,
6629: p_txn_type => WSMPCNST.UPDATE_QUANTITY,
6630: p_rep_we_id => p_wltx_starting_jobs_tbl(l_rep_sj_index).wip_entity_id,
6631: p_rep_op_seq_num => p_wltx_starting_jobs_tbl(l_rep_sj_index).operation_seq_num,
6632: p_rep_avail_qty => p_wltx_starting_jobs_tbl(l_rep_sj_index).quantity_available,
6633: p_rep_new_job_qty => p_wltx_resulting_jobs_tbl(l_rj_index).start_quantity,

Line 6861: p_txn_type_id => WSMPCNST.update_quantity,

6857:
6858: Insert_MMT_record ( p_txn_id => p_wltx_header.transaction_id,
6859: p_txn_org_id => p_txn_org_id,
6860: p_txn_date => sysdate, --l_txn_date, /* has to be txn date... */
6861: p_txn_type_id => WSMPCNST.update_quantity,
6862: p_sj_wip_entity_id => p_wltx_starting_jobs_tbl(l_rep_sj_index).wip_entity_id,
6863: p_sj_wip_entity_name => p_wltx_starting_jobs_tbl(l_rep_sj_index).wip_entity_name,
6864: p_sj_avail_quantity => p_wltx_starting_jobs_tbl(l_rep_sj_index).quantity_available,
6865: p_rj_wip_entity_id => p_wltx_resulting_jobs_tbl(l_rj_index).wip_entity_id,

Line 6901: elsif p_wltx_header.transaction_type_id = WSMPCNST.UPDATE_LOT_NAME then

6897:
6898: l_txn_status := WIP_CONSTANTS.COMPLETED;
6899: l_txn_costed := WIP_CONSTANTS.pending;
6900:
6901: elsif p_wltx_header.transaction_type_id = WSMPCNST.UPDATE_LOT_NAME then
6902:
6903: l_stmt_num := 550;
6904:
6905: if( g_log_level_statement >= l_log_level ) then

Line 6952: elsif p_wltx_header.transaction_type_id = WSMPCNST.BONUS then

6948:
6949: l_txn_status := WIP_CONSTANTS.COMPLETED;
6950: l_txn_costed := WIP_CONSTANTS.COMPLETED;
6951:
6952: elsif p_wltx_header.transaction_type_id = WSMPCNST.BONUS then
6953: if p_wltx_resulting_jobs_tbl.count > 0 then
6954: l_rj_index := p_wltx_resulting_jobs_tbl.first;
6955: else
6956: IF G_LOG_LEVEL_ERROR >= l_log_level OR FND_MSG_PUB.check_msg_level(g_msg_lvl_error) THEN

Line 7400: If p_wltx_header.transaction_type_id in (WSMPCNST.SPLIT,WSMPCNST.UPDATE_ASSEMBLY,

7396:
7397:
7398: l_stmt_num := 500;
7399: --Start Sales Order LBJ Reservation Changes -- (Commented out as waiting for INV Changes
7400: If p_wltx_header.transaction_type_id in (WSMPCNST.SPLIT,WSMPCNST.UPDATE_ASSEMBLY,
7401: WSMPCNST.UPDATE_QUANTITY,WSMPCNST.UPDATE_ROUTING,WSMPCNST.UPDATE_LOT_NAME) then
7402: l_rep_sj_index := p_wltx_starting_jobs_tbl.first;
7403: l_rsv_exists := WSM_RESERVATIONS_PVT.check_reservation_exists(p_wip_entity_id => p_wltx_starting_jobs_tbl(l_rep_sj_index).wip_entity_id,
7404: P_org_id => p_wltx_header.organization_id,

Line 7401: WSMPCNST.UPDATE_QUANTITY,WSMPCNST.UPDATE_ROUTING,WSMPCNST.UPDATE_LOT_NAME) then

7397:
7398: l_stmt_num := 500;
7399: --Start Sales Order LBJ Reservation Changes -- (Commented out as waiting for INV Changes
7400: If p_wltx_header.transaction_type_id in (WSMPCNST.SPLIT,WSMPCNST.UPDATE_ASSEMBLY,
7401: WSMPCNST.UPDATE_QUANTITY,WSMPCNST.UPDATE_ROUTING,WSMPCNST.UPDATE_LOT_NAME) then
7402: l_rep_sj_index := p_wltx_starting_jobs_tbl.first;
7403: l_rsv_exists := WSM_RESERVATIONS_PVT.check_reservation_exists(p_wip_entity_id => p_wltx_starting_jobs_tbl(l_rep_sj_index).wip_entity_id,
7404: P_org_id => p_wltx_header.organization_id,
7405: P_inventory_item_id => p_wltx_starting_jobs_tbl(l_rep_sj_index).primary_item_id

Line 7409: If p_wltx_header.transaction_type_id in (WSMPCNST.UPDATE_QUANTITY,WSMPCNST.UPDATE_ROUTING,WSMPCNST.UPDATE_LOT_NAME) then

7405: P_inventory_item_id => p_wltx_starting_jobs_tbl(l_rep_sj_index).primary_item_id
7406: ) ;
7407: If l_rsv_exists then
7408: l_stmt_num := 510;
7409: If p_wltx_header.transaction_type_id in (WSMPCNST.UPDATE_QUANTITY,WSMPCNST.UPDATE_ROUTING,WSMPCNST.UPDATE_LOT_NAME) then
7410: l_rj_index := p_wltx_resulting_jobs_tbl.first;
7411: l_stmt_num := 520;
7412: l_ret_status := FND_API.G_RET_STS_SUCCESS;
7413: l_msg_count := 0;

Line 7477: elsif p_wltx_header.transaction_type_id in (WSMPCNST.MERGE) then

7473: RAISE FND_API.G_EXC_ERROR;
7474: end if;
7475: End if;
7476: End if;
7477: elsif p_wltx_header.transaction_type_id in (WSMPCNST.MERGE) then
7478: l_stmt_num := 540;
7479: l_ret_status := FND_API.G_RET_STS_SUCCESS;
7480: l_msg_count := 0;
7481: l_msg_data := null;