193: l_wsm_sj_sec_qty_tbl(l_sj_tbl_counter).quantity := l_job_qty_tbl(l_index).current_quantity;
194: l_wsm_sj_sec_qty_tbl(l_sj_tbl_counter).organization_id := l_job_qty_tbl(l_index).organization_id;
195: l_wsm_sj_sec_qty_tbl(l_sj_tbl_counter).transaction_id := p_wltx_header.transaction_id;
196: l_wsm_sj_sec_qty_tbl(l_sj_tbl_counter).last_update_date := sysdate;
197: l_wsm_sj_sec_qty_tbl(l_sj_tbl_counter).last_update_login := fnd_global.login_id;
198: l_wsm_sj_sec_qty_tbl(l_sj_tbl_counter).last_updated_by := fnd_global.user_id;
199: l_wsm_sj_sec_qty_tbl(l_sj_tbl_counter).creation_date := sysdate;
200: l_wsm_sj_sec_qty_tbl(l_sj_tbl_counter).created_by := fnd_global.user_id;
201:
194: l_wsm_sj_sec_qty_tbl(l_sj_tbl_counter).organization_id := l_job_qty_tbl(l_index).organization_id;
195: l_wsm_sj_sec_qty_tbl(l_sj_tbl_counter).transaction_id := p_wltx_header.transaction_id;
196: l_wsm_sj_sec_qty_tbl(l_sj_tbl_counter).last_update_date := sysdate;
197: l_wsm_sj_sec_qty_tbl(l_sj_tbl_counter).last_update_login := fnd_global.login_id;
198: l_wsm_sj_sec_qty_tbl(l_sj_tbl_counter).last_updated_by := fnd_global.user_id;
199: l_wsm_sj_sec_qty_tbl(l_sj_tbl_counter).creation_date := sysdate;
200: l_wsm_sj_sec_qty_tbl(l_sj_tbl_counter).created_by := fnd_global.user_id;
201:
202: l_sj_tbl_counter := l_sj_tbl_counter+1;
196: l_wsm_sj_sec_qty_tbl(l_sj_tbl_counter).last_update_date := sysdate;
197: l_wsm_sj_sec_qty_tbl(l_sj_tbl_counter).last_update_login := fnd_global.login_id;
198: l_wsm_sj_sec_qty_tbl(l_sj_tbl_counter).last_updated_by := fnd_global.user_id;
199: l_wsm_sj_sec_qty_tbl(l_sj_tbl_counter).creation_date := sysdate;
200: l_wsm_sj_sec_qty_tbl(l_sj_tbl_counter).created_by := fnd_global.user_id;
201:
202: l_sj_tbl_counter := l_sj_tbl_counter+1;
203: l_index := l_job_qty_tbl.next(l_index);
204: end loop;
270: l_wsm_op_sec_qty_tbl(l_op_tbl_counter).move_in_quantity := null;
271: l_wsm_op_sec_qty_tbl(l_op_tbl_counter).move_out_quantity:= null;
272: l_wsm_op_sec_qty_tbl(l_op_tbl_counter).organization_id := l_job_qty_tbl(l_index).organization_id;
273: l_wsm_op_sec_qty_tbl(l_op_tbl_counter).last_update_date := sysdate;
274: l_wsm_op_sec_qty_tbl(l_op_tbl_counter).last_update_login:= fnd_global.login_id;
275: l_wsm_op_sec_qty_tbl(l_op_tbl_counter).last_updated_by := fnd_global.user_id;
276: l_wsm_op_sec_qty_tbl(l_op_tbl_counter).creation_date := sysdate;
277: l_wsm_op_sec_qty_tbl(l_op_tbl_counter).created_by := fnd_global.user_id;
278:
271: l_wsm_op_sec_qty_tbl(l_op_tbl_counter).move_out_quantity:= null;
272: l_wsm_op_sec_qty_tbl(l_op_tbl_counter).organization_id := l_job_qty_tbl(l_index).organization_id;
273: l_wsm_op_sec_qty_tbl(l_op_tbl_counter).last_update_date := sysdate;
274: l_wsm_op_sec_qty_tbl(l_op_tbl_counter).last_update_login:= fnd_global.login_id;
275: l_wsm_op_sec_qty_tbl(l_op_tbl_counter).last_updated_by := fnd_global.user_id;
276: l_wsm_op_sec_qty_tbl(l_op_tbl_counter).creation_date := sysdate;
277: l_wsm_op_sec_qty_tbl(l_op_tbl_counter).created_by := fnd_global.user_id;
278:
279: l_op_tbl_counter := l_op_tbl_counter+1;
273: l_wsm_op_sec_qty_tbl(l_op_tbl_counter).last_update_date := sysdate;
274: l_wsm_op_sec_qty_tbl(l_op_tbl_counter).last_update_login:= fnd_global.login_id;
275: l_wsm_op_sec_qty_tbl(l_op_tbl_counter).last_updated_by := fnd_global.user_id;
276: l_wsm_op_sec_qty_tbl(l_op_tbl_counter).creation_date := sysdate;
277: l_wsm_op_sec_qty_tbl(l_op_tbl_counter).created_by := fnd_global.user_id;
278:
279: l_op_tbl_counter := l_op_tbl_counter+1;
280: l_index := l_job_qty_tbl.next(l_index);
281: end loop;
396: null,
397: null,
398: 1,
399: sysdate,
400: fnd_global.user_id,
401: fnd_global.login_id,
402: sysdate,
403: fnd_global.user_id
404: from wsm_secondary_uoms
397: null,
398: 1,
399: sysdate,
400: fnd_global.user_id,
401: fnd_global.login_id,
402: sysdate,
403: fnd_global.user_id
404: from wsm_secondary_uoms
405: where inventory_item_id = l_sj_rj_inventory_item_id -- (resulting job's item id..)
399: sysdate,
400: fnd_global.user_id,
401: fnd_global.login_id,
402: sysdate,
403: fnd_global.user_id
404: from wsm_secondary_uoms
405: where inventory_item_id = l_sj_rj_inventory_item_id -- (resulting job's item id..)
406: -- ST : Bug Fix 5046332 : Commenting out the below condition ---
407: -- and uom_code not in (select uom_code
522: -- Bug 5458450 Reason Code quantity should not be propagated to child jobs.Commented out next line
523:
524: -- l_rj_op_reason_codes_tbl(l_rj_tbl_counter).quantity := p_wltx_resulting_jobs_tbl(l_counter).start_quantity;
525:
526: l_rj_op_reason_codes_tbl(l_rj_tbl_counter).Created_by := fnd_global.user_id;
527: l_rj_op_reason_codes_tbl(l_rj_tbl_counter).Last_update_date := sysdate;
528: l_rj_op_reason_codes_tbl(l_rj_tbl_counter).Last_updated_by := fnd_global.user_id;
529: l_rj_op_reason_codes_tbl(l_rj_tbl_counter).Creation_date := sysdate;
530: l_rj_op_reason_codes_tbl(l_rj_tbl_counter).Last_updated_login := fnd_global.login_id;
524: -- l_rj_op_reason_codes_tbl(l_rj_tbl_counter).quantity := p_wltx_resulting_jobs_tbl(l_counter).start_quantity;
525:
526: l_rj_op_reason_codes_tbl(l_rj_tbl_counter).Created_by := fnd_global.user_id;
527: l_rj_op_reason_codes_tbl(l_rj_tbl_counter).Last_update_date := sysdate;
528: l_rj_op_reason_codes_tbl(l_rj_tbl_counter).Last_updated_by := fnd_global.user_id;
529: l_rj_op_reason_codes_tbl(l_rj_tbl_counter).Creation_date := sysdate;
530: l_rj_op_reason_codes_tbl(l_rj_tbl_counter).Last_updated_login := fnd_global.login_id;
531:
532: l_rj_tbl_counter := l_rj_tbl_counter + 1;
526: l_rj_op_reason_codes_tbl(l_rj_tbl_counter).Created_by := fnd_global.user_id;
527: l_rj_op_reason_codes_tbl(l_rj_tbl_counter).Last_update_date := sysdate;
528: l_rj_op_reason_codes_tbl(l_rj_tbl_counter).Last_updated_by := fnd_global.user_id;
529: l_rj_op_reason_codes_tbl(l_rj_tbl_counter).Creation_date := sysdate;
530: l_rj_op_reason_codes_tbl(l_rj_tbl_counter).Last_updated_login := fnd_global.login_id;
531:
532: l_rj_tbl_counter := l_rj_tbl_counter + 1;
533: l_index := l_sj_op_reason_codes_tbl.next(l_index);
534: END LOOP;
601: null,
602: null,
603: 1,
604: sysdate,
605: fnd_global.user_id,
606: fnd_global.login_id,
607: sysdate,
608: fnd_global.user_id
609: from wsm_secondary_uoms
602: null,
603: 1,
604: sysdate,
605: fnd_global.user_id,
606: fnd_global.login_id,
607: sysdate,
608: fnd_global.user_id
609: from wsm_secondary_uoms
610: where inventory_item_id = p_wltx_resulting_jobs_tbl(l_counter).primary_item_id
604: sysdate,
605: fnd_global.user_id,
606: fnd_global.login_id,
607: sysdate,
608: fnd_global.user_id
609: from wsm_secondary_uoms
610: where inventory_item_id = p_wltx_resulting_jobs_tbl(l_counter).primary_item_id
611: );
612:
628: WSMPOPRN.copy_to_op_mes_info ( p_wip_entity_id => p_wltx_resulting_jobs_tbl(l_counter).wip_entity_id ,
629: p_to_job_op_seq_num => p_wltx_resulting_jobs_tbl(l_counter).job_operation_seq_num ,
630: p_to_rtg_op_seq_num => p_wltx_resulting_jobs_tbl(l_counter).starting_operation_seq_num ,
631: p_txn_quantity => p_wltx_resulting_jobs_tbl(l_counter).start_quantity ,
632: p_user => fnd_global.user_id ,
633: p_login => fnd_global.login_id ,
634: x_return_status => x_return_status ,
635: x_msg_count => x_msg_count ,
636: x_msg_data => x_error_msg
629: p_to_job_op_seq_num => p_wltx_resulting_jobs_tbl(l_counter).job_operation_seq_num ,
630: p_to_rtg_op_seq_num => p_wltx_resulting_jobs_tbl(l_counter).starting_operation_seq_num ,
631: p_txn_quantity => p_wltx_resulting_jobs_tbl(l_counter).start_quantity ,
632: p_user => fnd_global.user_id ,
633: p_login => fnd_global.login_id ,
634: x_return_status => x_return_status ,
635: x_msg_count => x_msg_count ,
636: x_msg_data => x_error_msg
637: );
685: l_wsm_rj_sec_qty_tbl(l_rj_tbl_counter).quantity := l_job_qty_tbl(l_index).current_quantity;
686: l_wsm_rj_sec_qty_tbl(l_rj_tbl_counter).organization_id := l_job_qty_tbl(l_index).organization_id;
687: l_wsm_rj_sec_qty_tbl(l_rj_tbl_counter).transaction_id := p_wltx_header.transaction_id;
688: l_wsm_rj_sec_qty_tbl(l_rj_tbl_counter).last_update_date := sysdate;
689: l_wsm_rj_sec_qty_tbl(l_rj_tbl_counter).last_update_login := fnd_global.login_id;
690: l_wsm_rj_sec_qty_tbl(l_rj_tbl_counter).last_updated_by := fnd_global.user_id;
691: l_wsm_rj_sec_qty_tbl(l_rj_tbl_counter).creation_date := sysdate;
692: l_wsm_rj_sec_qty_tbl(l_rj_tbl_counter).created_by := fnd_global.user_id;
693:
686: l_wsm_rj_sec_qty_tbl(l_rj_tbl_counter).organization_id := l_job_qty_tbl(l_index).organization_id;
687: l_wsm_rj_sec_qty_tbl(l_rj_tbl_counter).transaction_id := p_wltx_header.transaction_id;
688: l_wsm_rj_sec_qty_tbl(l_rj_tbl_counter).last_update_date := sysdate;
689: l_wsm_rj_sec_qty_tbl(l_rj_tbl_counter).last_update_login := fnd_global.login_id;
690: l_wsm_rj_sec_qty_tbl(l_rj_tbl_counter).last_updated_by := fnd_global.user_id;
691: l_wsm_rj_sec_qty_tbl(l_rj_tbl_counter).creation_date := sysdate;
692: l_wsm_rj_sec_qty_tbl(l_rj_tbl_counter).created_by := fnd_global.user_id;
693:
694: l_rj_tbl_counter := l_rj_tbl_counter+1;
688: l_wsm_rj_sec_qty_tbl(l_rj_tbl_counter).last_update_date := sysdate;
689: l_wsm_rj_sec_qty_tbl(l_rj_tbl_counter).last_update_login := fnd_global.login_id;
690: l_wsm_rj_sec_qty_tbl(l_rj_tbl_counter).last_updated_by := fnd_global.user_id;
691: l_wsm_rj_sec_qty_tbl(l_rj_tbl_counter).creation_date := sysdate;
692: l_wsm_rj_sec_qty_tbl(l_rj_tbl_counter).created_by := fnd_global.user_id;
693:
694: l_rj_tbl_counter := l_rj_tbl_counter+1;
695: l_index := l_job_qty_tbl.next(l_index);
696: end loop;
811: END;
812: if l_wsm_op_reason_codes_tbl.count > 0 then
813: for j in l_wsm_op_reason_codes_tbl.first .. l_wsm_op_reason_codes_tbl.last loop
814: l_wsm_op_reason_codes_tbl(j).wip_entity_id := p_wltx_resulting_jobs_tbl(i).wip_entity_id;
815: l_wsm_op_reason_codes_tbl(j).Created_by := fnd_global.user_id;
816: l_wsm_op_reason_codes_tbl(j).Last_update_date := sysdate;
817: l_wsm_op_reason_codes_tbl(j).Last_updated_by := fnd_global.user_id;
818: l_wsm_op_reason_codes_tbl(j).Creation_date := sysdate;
819: l_wsm_op_reason_codes_tbl(j).Last_updated_login := fnd_global.login_id;
813: for j in l_wsm_op_reason_codes_tbl.first .. l_wsm_op_reason_codes_tbl.last loop
814: l_wsm_op_reason_codes_tbl(j).wip_entity_id := p_wltx_resulting_jobs_tbl(i).wip_entity_id;
815: l_wsm_op_reason_codes_tbl(j).Created_by := fnd_global.user_id;
816: l_wsm_op_reason_codes_tbl(j).Last_update_date := sysdate;
817: l_wsm_op_reason_codes_tbl(j).Last_updated_by := fnd_global.user_id;
818: l_wsm_op_reason_codes_tbl(j).Creation_date := sysdate;
819: l_wsm_op_reason_codes_tbl(j).Last_updated_login := fnd_global.login_id;
820: end loop;
821: end if;
815: l_wsm_op_reason_codes_tbl(j).Created_by := fnd_global.user_id;
816: l_wsm_op_reason_codes_tbl(j).Last_update_date := sysdate;
817: l_wsm_op_reason_codes_tbl(j).Last_updated_by := fnd_global.user_id;
818: l_wsm_op_reason_codes_tbl(j).Creation_date := sysdate;
819: l_wsm_op_reason_codes_tbl(j).Last_updated_login := fnd_global.login_id;
820: end loop;
821: end if;
822: if l_wsm_op_reason_codes_tbl.count > 0 then
823: forall k in l_wsm_op_reason_codes_tbl.first .. l_wsm_op_reason_codes_tbl.last
852: bsobc.sequence_number,
853: 1,
854: bsobc.bonus_code,
855: null,
856: fnd_global.user_id,
857: sysdate,
858: fnd_global.user_id,
859: sysdate,
860: fnd_global.login_id
854: bsobc.bonus_code,
855: null,
856: fnd_global.user_id,
857: sysdate,
858: fnd_global.user_id,
859: sysdate,
860: fnd_global.login_id
861: from bom_std_op_bonus_codes bsobc
862: where sequence_number = p_wltx_resulting_jobs_tbl(l_counter).starting_operation_seq_num
856: fnd_global.user_id,
857: sysdate,
858: fnd_global.user_id,
859: sysdate,
860: fnd_global.login_id
861: from bom_std_op_bonus_codes bsobc
862: where sequence_number = p_wltx_resulting_jobs_tbl(l_counter).starting_operation_seq_num
863: and STANDARD_OPERATION_ID = p_wltx_resulting_jobs_tbl(l_counter).starting_std_op_id
864: );
882: bsosc.sequence_num,
883: 2,
884: bsosc.scrap_code,
885: null,
886: fnd_global.user_id,
887: sysdate,
888: fnd_global.user_id,
889: sysdate,
890: fnd_global.login_id
884: bsosc.scrap_code,
885: null,
886: fnd_global.user_id,
887: sysdate,
888: fnd_global.user_id,
889: sysdate,
890: fnd_global.login_id
891: from bom_std_op_scrap_codes bsosc
892: where sequence_num = p_wltx_resulting_jobs_tbl(l_counter).starting_operation_seq_num
886: fnd_global.user_id,
887: sysdate,
888: fnd_global.user_id,
889: sysdate,
890: fnd_global.login_id
891: from bom_std_op_scrap_codes bsosc
892: where sequence_num = p_wltx_resulting_jobs_tbl(l_counter).starting_operation_seq_num
893: and STANDARD_OPERATION_ID = p_wltx_resulting_jobs_tbl(l_counter).starting_std_op_id
894: );
4867:
4868: BEGIN
4869:
4870: l_stmt_num := 10;
4871: g_user_id := FND_GLOBAL.USER_ID;
4872: g_user_login_id := FND_GLOBAL.LOGIN_ID;
4873: g_program_appl_id := FND_GLOBAL.PROG_APPL_ID;
4874: g_request_id := FND_GLOBAL.CONC_REQUEST_ID;
4875: g_program_id := FND_GLOBAL.CONC_PROGRAM_ID;
4868: BEGIN
4869:
4870: l_stmt_num := 10;
4871: g_user_id := FND_GLOBAL.USER_ID;
4872: g_user_login_id := FND_GLOBAL.LOGIN_ID;
4873: g_program_appl_id := FND_GLOBAL.PROG_APPL_ID;
4874: g_request_id := FND_GLOBAL.CONC_REQUEST_ID;
4875: g_program_id := FND_GLOBAL.CONC_PROGRAM_ID;
4876:
4869:
4870: l_stmt_num := 10;
4871: g_user_id := FND_GLOBAL.USER_ID;
4872: g_user_login_id := FND_GLOBAL.LOGIN_ID;
4873: g_program_appl_id := FND_GLOBAL.PROG_APPL_ID;
4874: g_request_id := FND_GLOBAL.CONC_REQUEST_ID;
4875: g_program_id := FND_GLOBAL.CONC_PROGRAM_ID;
4876:
4877: x_return_status := g_ret_success;
4870: l_stmt_num := 10;
4871: g_user_id := FND_GLOBAL.USER_ID;
4872: g_user_login_id := FND_GLOBAL.LOGIN_ID;
4873: g_program_appl_id := FND_GLOBAL.PROG_APPL_ID;
4874: g_request_id := FND_GLOBAL.CONC_REQUEST_ID;
4875: g_program_id := FND_GLOBAL.CONC_PROGRAM_ID;
4876:
4877: x_return_status := g_ret_success;
4878:
4871: g_user_id := FND_GLOBAL.USER_ID;
4872: g_user_login_id := FND_GLOBAL.LOGIN_ID;
4873: g_program_appl_id := FND_GLOBAL.PROG_APPL_ID;
4874: g_request_id := FND_GLOBAL.CONC_REQUEST_ID;
4875: g_program_id := FND_GLOBAL.CONC_PROGRAM_ID;
4876:
4877: x_return_status := g_ret_success;
4878:
4879: if( g_log_level_statement >= l_log_level ) then