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 3494: IF l_txn_type_id = WSMPCNST.UPDATE_ROUTING THEN

3490: -- SpUA : l_wip_entity_id is resulting job wip_id for Split and Update Assy
3491: -- and for other transactions, it is starting job wip_id -- this is obvious.. comeon...
3492: --
3493:
3494: IF l_txn_type_id = WSMPCNST.UPDATE_ROUTING THEN
3495: l_stmt_num := 190;
3496:
3497: if l_job_kanban_card_id is not null then
3498:

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

3550: last_updated_by = g_user_id
3551: WHERE wdj.wip_entity_id = l_wip_entity_id;
3552:
3553: --SpUA: add Split
3554: ELSIF l_txn_type_id IN (WSMPCNST.UPDATE_ASSEMBLY, WSMPCNST.SPLIT) THEN
3555:
3556: l_stmt_num := 200;
3557:
3558: -- abbKanban begin

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

3877: MTT.transaction_type_id,
3878: -- Start : Changes as required by CST for SpUA --
3879: p_sj_item_id,
3880: -- End : Changes as required by CST for SpUA --
3881: decode(p_txn_type_id, WSMPCNST.SPLIT, 40,
3882: WSMPCNST.MERGE, 41,
3883: WSMPCNST.BONUS, 42,
3884: WSMPCNST.UPDATE_QUANTITY, 43,
3885: 0),

Line 3882: WSMPCNST.MERGE, 41,

3878: -- Start : Changes as required by CST for SpUA --
3879: p_sj_item_id,
3880: -- End : Changes as required by CST for SpUA --
3881: decode(p_txn_type_id, WSMPCNST.SPLIT, 40,
3882: WSMPCNST.MERGE, 41,
3883: WSMPCNST.BONUS, 42,
3884: WSMPCNST.UPDATE_QUANTITY, 43,
3885: 0),
3886: MTT.transaction_source_type_id,

Line 3883: WSMPCNST.BONUS, 42,

3879: p_sj_item_id,
3880: -- End : Changes as required by CST for SpUA --
3881: decode(p_txn_type_id, WSMPCNST.SPLIT, 40,
3882: WSMPCNST.MERGE, 41,
3883: WSMPCNST.BONUS, 42,
3884: WSMPCNST.UPDATE_QUANTITY, 43,
3885: 0),
3886: MTT.transaction_source_type_id,
3887: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_wip_entity_id, p_rj_wip_entity_id),

Line 3884: WSMPCNST.UPDATE_QUANTITY, 43,

3880: -- End : Changes as required by CST for SpUA --
3881: decode(p_txn_type_id, WSMPCNST.SPLIT, 40,
3882: WSMPCNST.MERGE, 41,
3883: WSMPCNST.BONUS, 42,
3884: WSMPCNST.UPDATE_QUANTITY, 43,
3885: 0),
3886: MTT.transaction_source_type_id,
3887: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_wip_entity_id, p_rj_wip_entity_id),
3888: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_wip_entity_name, p_rj_wip_entity_name),

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

3883: WSMPCNST.BONUS, 42,
3884: WSMPCNST.UPDATE_QUANTITY, 43,
3885: 0),
3886: MTT.transaction_source_type_id,
3887: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_wip_entity_id, p_rj_wip_entity_id),
3888: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_wip_entity_name, p_rj_wip_entity_name),
3889: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_avail_quantity, p_rj_start_quantity),
3890: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_avail_quantity, p_rj_start_quantity),
3891: MSI.primary_uom_code,

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

3884: WSMPCNST.UPDATE_QUANTITY, 43,
3885: 0),
3886: MTT.transaction_source_type_id,
3887: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_wip_entity_id, p_rj_wip_entity_id),
3888: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_wip_entity_name, p_rj_wip_entity_name),
3889: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_avail_quantity, p_rj_start_quantity),
3890: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_avail_quantity, p_rj_start_quantity),
3891: MSI.primary_uom_code,
3892: p_txn_date,

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

3885: 0),
3886: MTT.transaction_source_type_id,
3887: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_wip_entity_id, p_rj_wip_entity_id),
3888: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_wip_entity_name, p_rj_wip_entity_name),
3889: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_avail_quantity, p_rj_start_quantity),
3890: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_avail_quantity, p_rj_start_quantity),
3891: MSI.primary_uom_code,
3892: p_txn_date,
3893: p_txn_id,

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

3886: MTT.transaction_source_type_id,
3887: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_wip_entity_id, p_rj_wip_entity_id),
3888: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_wip_entity_name, p_rj_wip_entity_name),
3889: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_avail_quantity, p_rj_start_quantity),
3890: decode(p_txn_type_id, WSMPCNST.SPLIT, p_sj_avail_quantity, p_rj_start_quantity),
3891: MSI.primary_uom_code,
3892: p_txn_date,
3893: p_txn_id,
3894: p_sj_op_seq_num,

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

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

Line 3910: WSMPCNST.MERGE, 41,

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

Line 3911: WSMPCNST.BONUS, 42,

3907: -- Fixed bug #2828278
3908: -- Added trunc above: sch_close_date doesnt have timestamp so a problem for end of month
3909: AND MTT.transaction_action_id IN(decode(p_txn_type_id, WSMPCNST.SPLIT, 40,
3910: WSMPCNST.MERGE, 41,
3911: WSMPCNST.BONUS, 42,
3912: WSMPCNST.UPDATE_QUANTITY, 43,
3913: 0)
3914: )
3915: AND MTT.transaction_source_type_id = 5;

Line 3912: WSMPCNST.UPDATE_QUANTITY, 43,

3908: -- Added trunc above: sch_close_date doesnt have timestamp so a problem for end of month
3909: AND MTT.transaction_action_id IN(decode(p_txn_type_id, WSMPCNST.SPLIT, 40,
3910: WSMPCNST.MERGE, 41,
3911: WSMPCNST.BONUS, 42,
3912: WSMPCNST.UPDATE_QUANTITY, 43,
3913: 0)
3914: )
3915: AND MTT.transaction_source_type_id = 5;
3916:

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

4032: -- ' p_copy_mode='||p_copy_mode);
4033: -- END IF;
4034:
4035:
4036: IF (p_txn_type_id IN (WSMPCNST.BONUS,
4037: WSMPCNST.UPDATE_ASSEMBLY, WSMPCNST.UPDATE_ROUTING)) THEN
4038:
4039: l_stmt_num := 11;
4040:

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

4033: -- END IF;
4034:
4035:
4036: IF (p_txn_type_id IN (WSMPCNST.BONUS,
4037: WSMPCNST.UPDATE_ASSEMBLY, WSMPCNST.UPDATE_ROUTING)) THEN
4038:
4039: l_stmt_num := 11;
4040:
4041: IF (p_copy_mode = 1) THEN -- Make copies after each transaction

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

4160: End if;
4161:
4162: END IF; --(p_copy_mode)
4163:
4164: ELSIF (p_txn_type_id IN (WSMPCNST.SPLIT, WSMPCNST.MERGE)) THEN
4165:
4166: l_stmt_num := 40;
4167:
4168: l_rep_wip_entity_id := p_wltx_starting_jobs_tbl(p_rep_sj_index).wip_entity_id;

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

4427: end if; -- check if not a starting job...
4428:
4429: END LOOP;
4430:
4431: IF (p_txn_type_id = WSMPCNST.SPLIT) THEN
4432:
4433: l_stmt_num := 130;
4434:
4435: if p_sj_as_rj_index is not null then

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

4932: end if;
4933:
4934: l_stmt_num := 50;
4935: -- for based on each transaction type...
4936: if p_wltx_header.transaction_type_id in (WSMPCNST.SPLIT,WSMPCNST.MERGE) then
4937:
4938: l_stmt_num := 55;
4939: -- do the split processing....
4940: l_non_rep_sj_tbl.delete;

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

4939: -- do the split processing....
4940: l_non_rep_sj_tbl.delete;
4941:
4942: -- loop on the jobs....
4943: if p_wltx_header.transaction_type_id = WSMPCNST.SPLIT then
4944: l_rep_sj_index := p_wltx_starting_jobs_tbl.first;
4945: elsif p_rep_job_index is not null then
4946: l_rep_sj_index := p_rep_job_index;
4947: else

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

5289: l_new_rj_we_id_tbl(l_job_counter) := p_wltx_resulting_jobs_tbl(l_job_counter).wip_entity_id;
5290: l_new_rj_qty_tbl(l_job_counter) := p_wltx_resulting_jobs_tbl(l_job_counter).start_quantity;
5291:
5292: -- Kanban stuff for Merge Txn....
5293: if p_wltx_header.transaction_type_id = WSMPCNST.merge then
5294: -- here take care of the following case
5295: -- A*
5296: -- \
5297: -- |-- C

Line 5688: 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

5684: if l_kanban_card_id is not null then
5685:
5686: l_stmt_num := 115;
5687:
5688: 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
5689:
5690: l_stmt_num := 120;
5691: if( g_log_level_statement >= l_log_level ) then
5692: l_msg_tokens.delete;

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

5891:
5892: -- In case of split straight forward....
5893: -- In case of Merge check if the resulting job has kanban or not..
5894:
5895: if (p_wltx_header.transaction_type_id = WSMPCNST.SPLIT) or
5896: --Bug 5344612:Case of p_wltx_resulting_jobs_tbl.kanban_card_id being null is handled.
5897: p_wltx_resulting_jobs_tbl(p_wltx_resulting_jobs_tbl.first).kanban_card_id IS NULL or
5898: (p_wltx_resulting_jobs_tbl(p_wltx_resulting_jobs_tbl.first).kanban_card_id IS NOT NULL AND
5899: p_wltx_resulting_jobs_tbl(p_wltx_resulting_jobs_tbl.first).kanban_card_id <> l_kanban_card_id)

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

6094:
6095: l_stmt_num := 280;
6096:
6097: -- loop on the resulting jobs for split has update assembly...
6098: if p_wltx_header.transaction_type_id = WSMPCNST.SPLIT then
6099:
6100: l_job_counter := p_wltx_resulting_jobs_tbl.first;
6101: while l_job_counter is not null loop
6102: -- for l_job_counter in p_wltx_resulting_jobs_tbl.first..p_wltx_resulting_jobs_tbl.last loop

Line 6123: p_txn_type_id => WSMPCNST.SPLIT,

6119: l_err_buf := null;
6120:
6121: -- SpUA code....
6122: UPDATE_ASSEMBLY_OR_ROUTING( p_txn_id => null,
6123: p_txn_type_id => WSMPCNST.SPLIT,
6124: -- p_rep_wip_entity_id => p_wltx_resulting_jobs_tbl(l_job_counter).wip_entity_id,
6125: p_job_kanban_card_id => null, -- no need already handled within the code.. .....
6126: p_po_creation_time => l_po_creation_time,
6127: p_sj_compl_subinventory => p_wltx_starting_jobs_tbl(l_rep_sj_index).completion_subinventory,

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

6289: end if;
6290:
6291: l_stmt_num := 330;
6292: -- Geneology differs for split and merge...
6293: if p_wltx_header.transaction_type_id = WSMPCNST.SPLIT then
6294:
6295: l_stmt_num := 340;
6296:
6297: -- for geneology purpose.... get the gen obj id

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

6537:
6538: l_txn_status := WIP_CONSTANTS.COMPLETED;
6539: l_txn_costed := WIP_CONSTANTS.pending;
6540:
6541: elsif p_wltx_header.transaction_type_id in (WSMPCNST.UPDATE_ASSEMBLY,WSMPCNST.UPDATE_ROUTING) then
6542:
6543: l_stmt_num := 500;
6544: l_err_code := 0;
6545: l_err_buf := null;

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

6626: l_txn_status := WIP_CONSTANTS.COMPLETED;
6627: l_txn_costed := WIP_CONSTANTS.COMPLETED;
6628:
6629:
6630: elsif p_wltx_header.transaction_type_id = WSMPCNST.UPDATE_QUANTITY then
6631:
6632: l_stmt_num := 520;
6633: l_err_code := 0;
6634: l_err_buf := null;

Line 6650: p_txn_type => WSMPCNST.UPDATE_QUANTITY,

6646: 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;
6647:
6648: -- change the quantity
6649: CHANGE_QUANTITY( p_txn_id => null,
6650: p_txn_type => WSMPCNST.UPDATE_QUANTITY,
6651: p_wip_entity_id_tbl => l_sj_we_id_tbl,
6652: p_new_job_qty_tbl => l_sj_new_qty_tbl,
6653: p_new_net_qty_tbl => l_sj_new_net_qty_tbl,
6654:

Line 6693: p_txn_type => WSMPCNST.UPDATE_QUANTITY,

6689: l_new_rj_we_id_tbl.delete;
6690: l_new_rj_qty_tbl.delete;
6691:
6692: UPDATE_QTY_ISSUED(p_txn_id => null,
6693: p_txn_type => WSMPCNST.UPDATE_QUANTITY,
6694: p_rep_we_id => p_wltx_starting_jobs_tbl(l_rep_sj_index).wip_entity_id,
6695: p_rep_op_seq_num => p_wltx_starting_jobs_tbl(l_rep_sj_index).operation_seq_num,
6696: p_rep_avail_qty => p_wltx_starting_jobs_tbl(l_rep_sj_index).quantity_available,
6697: p_rep_new_job_qty => p_wltx_resulting_jobs_tbl(l_rj_index).start_quantity,

Line 6925: p_txn_type_id => WSMPCNST.update_quantity,

6921:
6922: Insert_MMT_record ( p_txn_id => p_wltx_header.transaction_id,
6923: p_txn_org_id => p_txn_org_id,
6924: p_txn_date => sysdate, --l_txn_date, /* has to be txn date... */
6925: p_txn_type_id => WSMPCNST.update_quantity,
6926: p_sj_wip_entity_id => p_wltx_starting_jobs_tbl(l_rep_sj_index).wip_entity_id,
6927: p_sj_wip_entity_name => p_wltx_starting_jobs_tbl(l_rep_sj_index).wip_entity_name,
6928: p_sj_avail_quantity => p_wltx_starting_jobs_tbl(l_rep_sj_index).quantity_available,
6929: p_rj_wip_entity_id => p_wltx_resulting_jobs_tbl(l_rj_index).wip_entity_id,

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

6961:
6962: l_txn_status := WIP_CONSTANTS.COMPLETED;
6963: l_txn_costed := WIP_CONSTANTS.pending;
6964:
6965: elsif p_wltx_header.transaction_type_id = WSMPCNST.UPDATE_LOT_NAME then
6966:
6967: l_stmt_num := 550;
6968:
6969: if( g_log_level_statement >= l_log_level ) then

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

7012:
7013: l_txn_status := WIP_CONSTANTS.COMPLETED;
7014: l_txn_costed := WIP_CONSTANTS.COMPLETED;
7015:
7016: elsif p_wltx_header.transaction_type_id = WSMPCNST.BONUS then
7017: if p_wltx_resulting_jobs_tbl.count > 0 then
7018: l_rj_index := p_wltx_resulting_jobs_tbl.first;
7019: else
7020: IF G_LOG_LEVEL_ERROR >= l_log_level OR FND_MSG_PUB.check_msg_level(g_msg_lvl_error) THEN

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

7460:
7461:
7462: l_stmt_num := 500;
7463: --Start Sales Order LBJ Reservation Changes -- (Commented out as waiting for INV Changes
7464: If p_wltx_header.transaction_type_id in (WSMPCNST.SPLIT,WSMPCNST.UPDATE_ASSEMBLY,
7465: WSMPCNST.UPDATE_QUANTITY,WSMPCNST.UPDATE_ROUTING,WSMPCNST.UPDATE_LOT_NAME) then
7466: l_rep_sj_index := p_wltx_starting_jobs_tbl.first;
7467: 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,
7468: P_org_id => p_wltx_header.organization_id,

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

7461:
7462: l_stmt_num := 500;
7463: --Start Sales Order LBJ Reservation Changes -- (Commented out as waiting for INV Changes
7464: If p_wltx_header.transaction_type_id in (WSMPCNST.SPLIT,WSMPCNST.UPDATE_ASSEMBLY,
7465: WSMPCNST.UPDATE_QUANTITY,WSMPCNST.UPDATE_ROUTING,WSMPCNST.UPDATE_LOT_NAME) then
7466: l_rep_sj_index := p_wltx_starting_jobs_tbl.first;
7467: 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,
7468: P_org_id => p_wltx_header.organization_id,
7469: P_inventory_item_id => p_wltx_starting_jobs_tbl(l_rep_sj_index).primary_item_id

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

7469: P_inventory_item_id => p_wltx_starting_jobs_tbl(l_rep_sj_index).primary_item_id
7470: ) ;
7471: If l_rsv_exists then
7472: l_stmt_num := 510;
7473: If p_wltx_header.transaction_type_id in (WSMPCNST.UPDATE_QUANTITY,WSMPCNST.UPDATE_ROUTING,WSMPCNST.UPDATE_LOT_NAME) then
7474: l_rj_index := p_wltx_resulting_jobs_tbl.first;
7475: l_stmt_num := 520;
7476: l_ret_status := FND_API.G_RET_STS_SUCCESS;
7477: l_msg_count := 0;

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

7537: RAISE FND_API.G_EXC_ERROR;
7538: end if;
7539: End if;
7540: End if;
7541: elsif p_wltx_header.transaction_type_id in (WSMPCNST.MERGE) then
7542: l_stmt_num := 540;
7543: l_ret_status := FND_API.G_RET_STS_SUCCESS;
7544: l_msg_count := 0;
7545: l_msg_data := null;