DBA Data[Home] [Help]

APPS.WIP_VALIDATEMLHEADER_PVT dependencies on FND_API

Line 131: x_returnStatus := fnd_api.g_ret_sts_success;

127: l_logLevel number := to_number(fnd_log.g_current_runtime_level);
128: l_retStatus varchar2(1);
129:
130: begin
131: x_returnStatus := fnd_api.g_ret_sts_success;
132: if (l_logLevel <= wip_constants.trace_logging) then
133: l_params(1).paramName := 'p_groupID';
134: l_params(1).paramValue := p_groupID;
135: l_params(2).paramName := 'p_validationLevel';

Line 140: if(x_returnStatus <> fnd_api.g_ret_sts_success) then

136: l_params(2).paramValue := p_validationLevel;
137: wip_logger.entryPoint(p_procName => g_pkgName || '.' || l_procName,
138: p_params => l_params,
139: x_returnStatus => x_returnStatus);
140: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
141: raise fnd_api.g_exc_unexpected_error;
142: end if;
143: end if;
144:

Line 141: raise fnd_api.g_exc_unexpected_error;

137: wip_logger.entryPoint(p_procName => g_pkgName || '.' || l_procName,
138: p_params => l_params,
139: x_returnStatus => x_returnStatus);
140: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
141: raise fnd_api.g_exc_unexpected_error;
142: end if;
143: end if;
144:
145: -- do the group validation

Line 150: if ( x_returnStatus <> fnd_api.g_ret_sts_success ) then

146: groupValidateMLHeader(p_groupID,
147: p_validationLevel,
148: x_returnStatus,
149: x_errorMsg);
150: if ( x_returnStatus <> fnd_api.g_ret_sts_success ) then
151: raise fnd_api.g_exc_unexpected_error;
152: end if;
153:
154: -- do the line validation

Line 151: raise fnd_api.g_exc_unexpected_error;

147: p_validationLevel,
148: x_returnStatus,
149: x_errorMsg);
150: if ( x_returnStatus <> fnd_api.g_ret_sts_success ) then
151: raise fnd_api.g_exc_unexpected_error;
152: end if;
153:
154: -- do the line validation
155: lineValidateMLHeader(p_groupID,

Line 159: if ( x_returnStatus <> fnd_api.g_ret_sts_success ) then

155: lineValidateMLHeader(p_groupID,
156: p_validationLevel,
157: x_returnStatus,
158: x_errorMsg);
159: if ( x_returnStatus <> fnd_api.g_ret_sts_success ) then
160: raise fnd_api.g_exc_unexpected_error;
161: end if;
162:
163: if (l_logLevel <= wip_constants.trace_logging) then

Line 160: raise fnd_api.g_exc_unexpected_error;

156: p_validationLevel,
157: x_returnStatus,
158: x_errorMsg);
159: if ( x_returnStatus <> fnd_api.g_ret_sts_success ) then
160: raise fnd_api.g_exc_unexpected_error;
161: end if;
162:
163: if (l_logLevel <= wip_constants.trace_logging) then
164: wip_logger.exitPoint(p_procName => g_pkgName || '.' || l_procName,

Line 171: when fnd_api.g_exc_unexpected_error then

167: x_returnStatus => l_retStatus);
168: end if;
169:
170: exception
171: when fnd_api.g_exc_unexpected_error then
172: if(l_logLevel <= wip_constants.trace_logging) then
173: wip_logger.exitPoint(p_procName => g_pkgName || '.' || l_procName,
174: p_procReturnStatus => x_returnStatus,
175: p_msg => 'unexp error:' || x_errorMsg,

Line 178: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

174: p_procReturnStatus => x_returnStatus,
175: p_msg => 'unexp error:' || x_errorMsg,
176: x_returnStatus => l_retStatus);
177: end if;
178: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
179: end validateMLHeader;
180:
181:
182: procedure groupValidateMLHeader(p_groupID in number,

Line 203: x_returnStatus := fnd_api.g_ret_sts_success;

199: x_program_id number ;
200: x_application_id number ;
201:
202: begin
203: x_returnStatus := fnd_api.g_ret_sts_success;
204:
205: --Fix for bug#4186944. Update REQUEST_ID
206: x_request_id := fnd_global.conc_request_id ;
207: x_program_id := fnd_global.conc_program_id ;

Line 218: if(x_returnStatus <> fnd_api.g_ret_sts_success) then

214: l_params(2).paramValue := p_validationLevel;
215: wip_logger.entryPoint(p_procName => g_pkgName || '.' || l_procName,
216: p_params => l_params,
217: x_returnStatus => x_returnStatus);
218: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
219: raise fnd_api.g_exc_unexpected_error;
220: end if;
221: end if;
222:

Line 219: raise fnd_api.g_exc_unexpected_error;

215: wip_logger.entryPoint(p_procName => g_pkgName || '.' || l_procName,
216: p_params => l_params,
217: x_returnStatus => x_returnStatus);
218: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
219: raise fnd_api.g_exc_unexpected_error;
220: end if;
221: end if;
222:
223: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then

Line 1541: and wjsi.alternate_routing_designator <> fnd_api.g_miss_char

1537: wjsi.last_update_date = sysdate
1538: where wjsi.group_id = p_groupID
1539: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1540: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1541: and wjsi.alternate_routing_designator <> fnd_api.g_miss_char
1542: and ( (wjsi.alternate_routing_designator is not null
1543: and not exists (select 1
1544: from bom_operational_routings bor
1545: where bor.alternate_routing_designator = wjsi.alternate_routing_designator

Line 1558: or (wjsi.alternate_routing_designator = fnd_api.g_miss_char

1554: wjsi.primary_item_id)
1555: and nvl(bor.cfm_routing_flag, 2) = 2
1556: and (bor.routing_type = 1 or (bor.routing_type = 2 and 1 = to_number(l_see_eng_items_flag))) ))
1557: /* bug 4227345 */
1558: or (wjsi.alternate_routing_designator = fnd_api.g_miss_char
1559: and wjsi.load_type in (wip_constants.create_job,
1560: wip_constants.create_ns_job,
1561: wip_constants.create_sched)))
1562: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 1572: set wjsi.alternate_routing_designator = decode(wjsi.alternate_routing_designator,fnd_api.g_miss_char,null,null,(select wdj.alternate_routing_designator

1568:
1569: /*Modified for bug 5479283. When Null is passed for alt routing designator, old value is maintained.
1570: When g_miss_char is passed for alt routing designator, updated to primary routing/bom.*/
1571: update wip_job_schedule_interface wjsi
1572: set wjsi.alternate_routing_designator = decode(wjsi.alternate_routing_designator,fnd_api.g_miss_char,null,null,(select wdj.alternate_routing_designator
1573: from wip_discrete_jobs wdj
1574: where wdj.organization_id = wjsi.organization_id
1575: and wdj.wip_entity_id = wjsi.wip_entity_id),wjsi.alternate_routing_designator),
1576: wjsi.last_update_date = sysdate

Line 1582: or wjsi.alternate_routing_designator = fnd_api.g_miss_char);

1578: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1579: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1580: and wjsi.load_type = wip_constants.resched_job
1581: and (wjsi.alternate_routing_designator is null
1582: or wjsi.alternate_routing_designator = fnd_api.g_miss_char);
1583:
1584:
1585: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
1586:

Line 1643: and (wjsi.bom_revision = fnd_api.g_miss_char

1639: where wjsi.group_id = p_groupID
1640: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1641: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1642: and wjsi.load_type = wip_constants.resched_job
1643: and (wjsi.bom_revision = fnd_api.g_miss_char
1644: or wjsi.bom_revision is null);
1645:
1646: update wip_job_schedule_interface wjsi
1647: set wjsi.process_status = WIP_CONSTANTS.ERROR,

Line 1680: or wjsi.routing_revision_date = fnd_api.g_miss_date);

1676: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1677: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1678: and wjsi.load_type = wip_constants.resched_job
1679: and ( wjsi.routing_revision_date is null
1680: or wjsi.routing_revision_date = fnd_api.g_miss_date);
1681:
1682: update wip_job_schedule_interface wjsi
1683: set wjsi.process_status = WIP_CONSTANTS.ERROR,
1684: wjsi.last_update_date = sysdate

Line 1689: and nvl(wjsi.routing_revision_date, fnd_api.g_miss_date) <>

1685: where wjsi.group_id = p_groupID
1686: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1687: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1688: and wjsi.load_type = wip_constants.resched_job
1689: and nvl(wjsi.routing_revision_date, fnd_api.g_miss_date) <>
1690: nvl((select wdj.routing_revision_date
1691: from wip_discrete_jobs wdj
1692: where wdj.organization_id = wjsi.organization_id
1693: and wdj.wip_entity_id = wjsi.wip_entity_id), fnd_api.g_miss_date)

Line 1693: and wdj.wip_entity_id = wjsi.wip_entity_id), fnd_api.g_miss_date)

1689: and nvl(wjsi.routing_revision_date, fnd_api.g_miss_date) <>
1690: nvl((select wdj.routing_revision_date
1691: from wip_discrete_jobs wdj
1692: where wdj.organization_id = wjsi.organization_id
1693: and wdj.wip_entity_id = wjsi.wip_entity_id), fnd_api.g_miss_date)
1694: and (select wdj.status_type
1695: from wip_discrete_jobs wdj
1696: where wdj.organization_id = wjsi.organization_id
1697: and wdj.wip_entity_id = wjsi.wip_entity_id) <> 1

Line 1805: and (wjsi.bom_reference_id is null or wjsi.bom_reference_id=fnd_api.g_miss_num);

1801: from wip_discrete_jobs wdj
1802: where wdj.wip_entity_id = wjsi.wip_entity_id
1803: and wdj.organization_id = wjsi.organization_id)))
1804: --and wjsi.bom_reference_segments is not null
1805: and (wjsi.bom_reference_id is null or wjsi.bom_reference_id=fnd_api.g_miss_num);
1806:
1807: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
1808: /*Modified for bug 5479283. Validation should happen while re-scheduling non-std job */
1809: update wip_job_schedule_interface wjsi

Line 1881: and wjsi.alternate_bom_designator <> fnd_api.g_miss_char

1877: wjsi.last_update_date = sysdate
1878: where wjsi.group_id = p_groupID
1879: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1880: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1881: and wjsi.alternate_bom_designator <> fnd_api.g_miss_char
1882: and ( (wjsi.alternate_bom_designator is not null
1883: and not exists (select 1
1884: from bom_bill_alternates_v bba
1885: where bba.alternate_bom_designator = wjsi.alternate_bom_designator

Line 1897: or (wjsi.alternate_bom_designator = fnd_api.g_miss_char

1893: 1, wjsi.primary_item_id, wjsi.bom_reference_id),
1894: wjsi.primary_item_id)
1895: and (bba.assembly_type = 1 or (bba.assembly_type = 2 and 1 = to_number(l_see_eng_items_flag))) ))
1896: /* bug 4227345 */
1897: or (wjsi.alternate_bom_designator = fnd_api.g_miss_char
1898: and wjsi.load_type in (wip_constants.create_job,
1899: wip_constants.create_ns_job,
1900: wip_constants.create_sched)))
1901: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 1913: set wjsi.alternate_bom_designator = decode(wjsi.alternate_bom_designator,fnd_api.g_miss_char,null,null,

1909: /*Modified for bug 5479283. When Null is passed for alt bom designator, old value is maintained.
1910: When g_miss_char is passed for alt bom designator, updated to primary routing/bom. */
1911:
1912: update wip_job_schedule_interface wjsi
1913: set wjsi.alternate_bom_designator = decode(wjsi.alternate_bom_designator,fnd_api.g_miss_char,null,null,
1914: (select wdj.alternate_bom_designator
1915: from wip_discrete_jobs wdj
1916: where wdj.organization_id = wjsi.organization_id
1917: and wdj.wip_entity_id = wjsi.wip_entity_id),wjsi.alternate_bom_designator),

Line 1924: or wjsi.alternate_bom_designator =fnd_api.g_miss_char);

1920: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1921: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1922: and wjsi.load_type = wip_constants.resched_job
1923: and (wjsi.alternate_bom_designator is null
1924: or wjsi.alternate_bom_designator =fnd_api.g_miss_char);
1925:
1926: -- you can not change the bom designator for jobs not in unreleased status
1927: if(p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)) then
1928: update wip_job_schedule_interface wjsi

Line 1983: and (wjsi.bom_revision = fnd_api.g_miss_char

1979: where wjsi.group_id = p_groupID
1980: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
1981: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1982: and wjsi.load_type = wip_constants.resched_job
1983: and (wjsi.bom_revision = fnd_api.g_miss_char
1984: or wjsi.bom_revision is null);
1985:
1986: update wip_job_schedule_interface wjsi
1987: set wjsi.process_status = WIP_CONSTANTS.ERROR,

Line 2019: and ( wjsi.bom_revision_date = fnd_api.g_miss_date

2015: where wjsi.group_id = p_groupID
2016: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2017: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2018: and wjsi.load_type = wip_constants.resched_job
2019: and ( wjsi.bom_revision_date = fnd_api.g_miss_date
2020: or wjsi.bom_revision_date is null);
2021:
2022: update wip_job_schedule_interface wjsi
2023: set wjsi.process_status = WIP_CONSTANTS.ERROR,

Line 2029: and nvl(wjsi.bom_revision_date, fnd_api.g_miss_date) <>

2025: where wjsi.group_id = p_groupID
2026: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2027: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2028: and wjsi.load_type = wip_constants.resched_job
2029: and nvl(wjsi.bom_revision_date, fnd_api.g_miss_date) <>
2030: nvl( (select wdj.bom_revision_date
2031: from wip_discrete_jobs wdj
2032: where wdj.organization_id = wjsi.organization_id
2033: and wdj.wip_entity_id = wjsi.wip_entity_id), fnd_api.g_miss_date)

Line 2033: and wdj.wip_entity_id = wjsi.wip_entity_id), fnd_api.g_miss_date)

2029: and nvl(wjsi.bom_revision_date, fnd_api.g_miss_date) <>
2030: nvl( (select wdj.bom_revision_date
2031: from wip_discrete_jobs wdj
2032: where wdj.organization_id = wjsi.organization_id
2033: and wdj.wip_entity_id = wjsi.wip_entity_id), fnd_api.g_miss_date)
2034: and (select status_type
2035: from wip_discrete_jobs wdj
2036: where wdj.organization_id = wjsi.organization_id
2037: and wdj.wip_entity_id = wjsi.wip_entity_id) <> 1

Line 3050: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

3046: p_procReturnStatus => x_returnStatus,
3047: p_msg => 'unexp error:' || SQLERRM,
3048: x_returnStatus => l_retStatus);
3049: end if;
3050: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
3051: fnd_msg_pub.add_exc_msg(p_pkg_name => g_pkgName,
3052: p_procedure_name => l_procName,
3053: p_error_text => SQLERRM);
3054: wip_utilities.get_message_stack(p_msg => l_msg);

Line 3079: x_returnStatus := fnd_api.g_ret_sts_success;

3075: where group_id = p_groupID
3076: and process_phase = WIP_CONSTANTS.ML_VALIDATION
3077: and process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING);
3078: begin
3079: x_returnStatus := fnd_api.g_ret_sts_success;
3080: if (l_logLevel <= wip_constants.trace_logging) then
3081: l_params(2).paramName := 'p_validationLevel';
3082: l_params(2).paramValue := p_validationLevel;
3083: wip_logger.entryPoint(p_procName => g_pkgName || '.' || l_procName,

Line 3086: if(x_returnStatus <> fnd_api.g_ret_sts_success) then

3082: l_params(2).paramValue := p_validationLevel;
3083: wip_logger.entryPoint(p_procName => g_pkgName || '.' || l_procName,
3084: p_params => l_params,
3085: x_returnStatus => x_returnStatus);
3086: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
3087: raise fnd_api.g_exc_unexpected_error;
3088: end if;
3089: end if;
3090:

Line 3087: raise fnd_api.g_exc_unexpected_error;

3083: wip_logger.entryPoint(p_procName => g_pkgName || '.' || l_procName,
3084: p_params => l_params,
3085: x_returnStatus => x_returnStatus);
3086: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
3087: raise fnd_api.g_exc_unexpected_error;
3088: end if;
3089: end if;
3090:
3091: for line in c_line loop

Line 3222: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

3218: p_procReturnStatus => x_returnStatus,
3219: p_msg => 'unexp error:' || SQLERRM,
3220: x_returnStatus => l_retStatus);
3221: end if;
3222: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
3223: fnd_msg_pub.add_exc_msg(p_pkg_name => g_pkgName,
3224: p_procedure_name => l_procName,
3225: p_error_text => SQLERRM);
3226: wip_utilities.get_message_stack(p_msg => l_msg);

Line 3349: raise fnd_api.g_exc_unexpected_error;

3345: x_sched_dir => l_schedDir,
3346: x_est_date => wjsi_row.first_unit_start_date);
3347: if(wjsi_row.first_unit_start_date is null) then
3348: l_msg := 'WIP_ML_EST_LEADTIME';
3349: raise fnd_api.g_exc_unexpected_error;
3350: end if;
3351: end if;
3352: else
3353: if(wjsi_row.load_type = wip_constants.create_ns_job and wjsi_row.routing_reference_id is not null) then

Line 3409: raise fnd_api.g_exc_unexpected_error;

3405: x_sched_dir => wip_constants.lucd,
3406: x_est_date => wjsi_row.first_unit_start_date);
3407: if(wjsi_row.first_unit_start_date is null) then
3408: l_msg := 'WIP_ML_EST_LEADTIME';
3409: raise fnd_api.g_exc_unexpected_error;
3410: end if;
3411: elsif(wjsi_row.last_unit_completion_date is null and
3412: wjsi_row.first_unit_start_date is not null and
3413: wjsi_row.scheduling_method = wip_constants.leadtime) then

Line 3429: raise fnd_api.g_exc_unexpected_error;

3425: x_sched_dir => wip_constants.fusd,
3426: x_est_date => wjsi_row.last_unit_completion_date);
3427: if(wjsi_row.last_unit_completion_date is null) then
3428: l_msg := 'WIP_NO_CALENDAR';
3429: raise fnd_api.g_exc_unexpected_error;
3430: end if;
3431: end if;
3432: end if;
3433: exception

Line 3536: raise fnd_api.g_exc_unexpected_error;

3532: begin
3533:
3534: if (PJM_PROJECT.val_task_idtonum(l_projectID, wjsi_row.task_id)
3535: is null) then
3536: raise fnd_api.g_exc_unexpected_error;
3537: end if;
3538:
3539: exception
3540: when others then

Line 3792: raise fnd_api.g_exc_unexpected_error;

3788: if ( wjsi_row.load_type = wip_constants.resched_job and
3789: wjsi_row.start_quantity <> wdj_row.start_quantity ) then
3790:
3791: if ( wjsi_row.start_quantity < wdj_row.quantity_completed ) then
3792: raise fnd_api.g_exc_unexpected_error;
3793: end if;
3794: -- Fix for 5999220 Added if condition by mraman
3795: if ( wdj_row.status_type <> wip_constants.unreleased ) then
3796: select nvl(min(operation_seq_num), fnd_api.g_miss_num)

Line 3796: select nvl(min(operation_seq_num), fnd_api.g_miss_num)

3792: raise fnd_api.g_exc_unexpected_error;
3793: end if;
3794: -- Fix for 5999220 Added if condition by mraman
3795: if ( wdj_row.status_type <> wip_constants.unreleased ) then
3796: select nvl(min(operation_seq_num), fnd_api.g_miss_num)
3797: into l_minOp
3798: from wip_operations
3799: where organization_id = wjsi_row.organization_id
3800: and wip_entity_id = wjsi_row.wip_entity_id

Line 3803: if ( l_minOp <> fnd_api.g_miss_num ) then

3799: where organization_id = wjsi_row.organization_id
3800: and wip_entity_id = wjsi_row.wip_entity_id
3801: and nvl(repetitive_schedule_id, -1) = nvl(wjsi_row.repetitive_schedule_id, -1);
3802:
3803: if ( l_minOp <> fnd_api.g_miss_num ) then
3804: select quantity_in_queue,
3805: scheduled_quantity
3806: into l_queueQty,
3807: l_scheduledQty

Line 3815: raise fnd_api.g_exc_unexpected_error;

3811: and nvl(repetitive_schedule_id, -1) = nvl(wjsi_row.repetitive_schedule_id, -1)
3812: and operation_seq_num = l_minOp;
3813:
3814: if ( l_queueQty < l_scheduledQty - wjsi_row.start_quantity ) then
3815: raise fnd_api.g_exc_unexpected_error;
3816: end if; -- end if (l_queueQty < l_scheduledQty - wjsi_row.start_quantity )
3817: end if ; -- end if (l_minOp <> fnd_api.g_miss_num )
3818: end if; -- end if ( wdj_row.status_type <> wip_constants.unreleased )
3819:

Line 3817: end if ; -- end if (l_minOp <> fnd_api.g_miss_num )

3813:
3814: if ( l_queueQty < l_scheduledQty - wjsi_row.start_quantity ) then
3815: raise fnd_api.g_exc_unexpected_error;
3816: end if; -- end if (l_queueQty < l_scheduledQty - wjsi_row.start_quantity )
3817: end if ; -- end if (l_minOp <> fnd_api.g_miss_num )
3818: end if; -- end if ( wdj_row.status_type <> wip_constants.unreleased )
3819:
3820: /* bug 5350660. Show warning if job is already pick released */
3821: if ( wip_picking_pub.is_job_pick_released(wjsi_row.wip_entity_id,

Line 3877: raise fnd_api.g_exc_unexpected_error;

3873: close check_so_link;
3874:
3875: if ( l_qtyReserved > 0 ) then
3876: l_msg := 'WIP_CANT_CANCEL_SO';
3877: raise fnd_api.g_exc_unexpected_error;
3878: end if;
3879: end if;
3880:
3881:

Line 3908: if ( l_retStatus <> fnd_api.g_ret_sts_success ) then

3904: -- complete-no-charge
3905: wip_osp.cancelPOReq(p_job_id => wjsi_row.wip_entity_id,
3906: p_org_id => wjsi_row.organization_id,
3907: x_return_status => l_retStatus);
3908: if ( l_retStatus <> fnd_api.g_ret_sts_success ) then
3909: po_warning_flag := WIP_CONSTANTS.YES;
3910: setInterfaceError(p_rowid, wjsi_row.interface_id, fnd_message.get, validationWarning);
3911: end if;
3912: else

Line 3934: raise fnd_api.g_exc_unexpected_error;

3930: if ( wjsi_row.source_code = 'MSC' and
3931: wdj_row.status_type in (wip_constants.comp_chrg, wip_constants.comp_nochrg,
3932: wip_constants.cancelled, wip_constants.closed) ) then
3933: l_msg := 'WIP_CANT_UPDATE_JOB';
3934: raise fnd_api.g_exc_unexpected_error;
3935: end if;
3936:
3937: -- bug# 3436646: job cannot be changed to unreleased if it's been pick released
3938: if ( wjsi_row.status_type = WIP_CONSTANTS.UNRELEASED and

Line 3944: raise fnd_api.g_exc_unexpected_error;

3940: WIP_PICKING_PUB.Is_Job_Pick_Released(
3941: p_wip_entity_id => wjsi_row.wip_entity_id,
3942: p_org_id => wjsi_row.organization_id) ) then
3943: l_msg := 'WIP_UNRLS_JOB/SCHED';
3944: raise fnd_api.g_exc_unexpected_error;
3945: end if;
3946: exception
3947: when others then
3948: fnd_message.set_name('WIP', l_msg);

Line 4032: raise fnd_api.g_exc_unexpected_error;

4028:
4029: -- You cannot create a repetitive schedule for a unit effective assembly.
4030: if( l_isUnitEffective and wjsi_row.load_type = wip_constants.create_sched ) then
4031: l_msg := 'WIP_ML_NO_UNIT_EFF_SCHED';
4032: raise fnd_api.g_exc_unexpected_error;
4033: end if;
4034:
4035: -- It is an error to provide unit number for non-unit effective assemblies.
4036: if (not l_isUnitEffective and wjsi_row.end_item_unit_number is not null) then

Line 4038: raise fnd_api.g_exc_unexpected_error;

4034:
4035: -- It is an error to provide unit number for non-unit effective assemblies.
4036: if (not l_isUnitEffective and wjsi_row.end_item_unit_number is not null) then
4037: l_msg := 'WIP_ML_UNIT_NUM_MEANINGLESS';
4038: raise fnd_api.g_exc_unexpected_error;
4039: end if;
4040:
4041: if (wjsi_row.load_type in (wip_constants.create_job, wip_constants.create_ns_job)) then
4042: -- Unit number is required for unit effective assemblies.

Line 4098: raise fnd_api.g_exc_unexpected_error;

4094: exception
4095: when others then
4096: FND_Message.set_name('PJM', 'UEFF-UNIT NUMBER INVALID') ;
4097: WIP_JSI_Utils.record_current_error ;
4098: raise fnd_api.g_exc_unexpected_error;
4099: end ;
4100:
4101: -- End of bug fix 5332672
4102: end if;

Line 4105: when fnd_api.g_exc_unexpected_error then

4101: -- End of bug fix 5332672
4102: end if;
4103: end if;
4104: exception
4105: when fnd_api.g_exc_unexpected_error then
4106: fnd_message.set_name('WIP', l_msg);
4107: x_errorMsg := fnd_message.get;
4108: setInterfaceError(p_rowid, wjsi_row.interface_id, x_errorMsg, validationError);
4109: raise line_validation_error;

Line 4162: raise fnd_api.g_exc_unexpected_error;

4158: end if;
4159:
4160: if ( l_dateCount = 0 ) then
4161: --must provide at least one date for rep sched
4162: raise fnd_api.g_exc_unexpected_error;
4163: end if;
4164:
4165: if ( l_dateCount <> 1 ) then
4166: select count(*)

Line 4174: raise fnd_api.g_exc_unexpected_error;

4170: and line_id = wjsi_row.line_id
4171: and line_schedule_type = 1; --fixed
4172: if( l_lineCount > 0 ) then
4173: --the line can not have a fixed lead time
4174: raise fnd_api.g_exc_unexpected_error;
4175: end if;
4176:
4177: select count(*)
4178: into l_rtgCount

Line 4190: raise fnd_api.g_exc_unexpected_error;

4186: and bor.organization_id = wri.organization_id
4187: and bor.assembly_item_id = wri.primary_item_id;
4188: if ( l_rtgCount > 0 ) then
4189: --the line can not have a routing
4190: raise fnd_api.g_exc_unexpected_error;
4191: end if;
4192: end if;
4193:
4194: select count(*)

Line 4218: raise fnd_api.g_exc_unexpected_error;

4214: if( not (l_dateCount = 2 and
4215: ((wjsi_row.first_unit_start_date is not null and wjsi_row.first_unit_completion_date is not null) or
4216: (wjsi_row.last_unit_start_date is not null and wjsi_row.last_unit_completion_date is not null))) ) then
4217: if ( l_rtgCount = 0 and l_lineCount > 0 ) then
4218: raise fnd_api.g_exc_unexpected_error;
4219: end if;
4220: end if;
4221:
4222: if ( l_lineCount > 0 and l_rtgCount = 0 ) then

Line 4438: x_returnStatus := fnd_api.g_ret_sts_success;

4434: select operation_seq_num
4435: from wip_operations
4436: where wip_entity_id = p_wipEntityId;
4437: begin
4438: x_returnStatus := fnd_api.g_ret_sts_success;
4439:
4440: select wip_entity_id,
4441: serialization_start_op,
4442: load_type,

Line 4488: raise fnd_api.g_exc_unexpected_error;

4484: close c_ops;
4485:
4486: --The routing exists, but an invalid op seq was provided
4487: if( l_rtgExists and not l_opFound ) then
4488: raise fnd_api.g_exc_unexpected_error;
4489: end if;
4490:
4491: --If no routing exsts, the serialization op must be 1.
4492: if( not l_rtgExists and l_serialOp <> 1 ) then

Line 4493: raise fnd_api.g_exc_unexpected_error;

4489: end if;
4490:
4491: --If no routing exsts, the serialization op must be 1.
4492: if( not l_rtgExists and l_serialOp <> 1 ) then
4493: raise fnd_api.g_exc_unexpected_error;
4494: end if;
4495:
4496: -- job must be unreleased to change the serialization op on a
4497: -- reschedule request. This is to guarantee no txns have taken place.

Line 4507: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

4503: and status_type = wip_constants.unreleased;
4504: end if;
4505: exception
4506: when others then
4507: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
4508: fnd_message.set_name('WIP', 'WIP_ML_SERIAL_START_OP');
4509: x_errorMsg := fnd_message.get;
4510: setInterfaceError(p_rowid, l_interfaceID, x_errorMsg, validationError);
4511: end validateSerializationStartOp;

Line 4535: /*Bug 5446216 (FP Bug 5504790): Need not copy old value if value is fnd_api.g_miss_char*/

4531:
4532: if ( wjsi_row.load_type = wip_constants.resched_job ) then
4533: wjsi_row.project_id := nvl(wjsi_row.project_id, wdj_row.project_id);
4534: wjsi_row.task_id := nvl(wjsi_row.task_id, wdj_row.task_id);
4535: /*Bug 5446216 (FP Bug 5504790): Need not copy old value if value is fnd_api.g_miss_char*/
4536: if wjsi_row.completion_subinventory is null then
4537: if ( wjsi_row.completion_locator_id is null) then
4538: wjsi_row.completion_locator_id := wdj_row.completion_locator_id;
4539: end if;

Line 4540: elsif (wjsi_row.completion_subinventory = fnd_api.g_miss_char) then

4536: if wjsi_row.completion_subinventory is null then
4537: if ( wjsi_row.completion_locator_id is null) then
4538: wjsi_row.completion_locator_id := wdj_row.completion_locator_id;
4539: end if;
4540: elsif (wjsi_row.completion_subinventory = fnd_api.g_miss_char) then
4541: wjsi_row.completion_locator_id := null;
4542: end if;
4543: wjsi_row.completion_subinventory :=
4544: nvl(wjsi_row.completion_subinventory, wdj_row.completion_subinventory);

Line 4575: raise fnd_api.g_exc_unexpected_error;

4571: 'Y', -- required?
4572: wjsi_row.project_id,
4573: wjsi_row.task_id)) then
4574: l_msg := 'WIP_ML_LOCATOR_PROJ_TASK';
4575: raise fnd_api.g_exc_unexpected_error;
4576: end if;
4577: end if;
4578: end if;
4579: end if;

Line 4583: ((wjsi_row.completion_subinventory IS NOT NULL AND wjsi_row.completion_subinventory <> fnd_api.g_miss_char)

4579: end if;
4580:
4581: /* Bug 5446216 (FP Bug 5504790):Need not validate locator when subinventory is null */
4582: if(wjsi_row.load_type <> wip_constants.create_sched and
4583: ((wjsi_row.completion_subinventory IS NOT NULL AND wjsi_row.completion_subinventory <> fnd_api.g_miss_char)
4584: OR (wjsi_row.completion_locator_id IS NOT NULL AND wjsi_row.completion_locator_id <> fnd_api.g_miss_num))) then
4585:
4586: l_msg := 'WIP_ML_INVALID_LOCATOR';
4587:

Line 4584: OR (wjsi_row.completion_locator_id IS NOT NULL AND wjsi_row.completion_locator_id <> fnd_api.g_miss_num))) then

4580:
4581: /* Bug 5446216 (FP Bug 5504790):Need not validate locator when subinventory is null */
4582: if(wjsi_row.load_type <> wip_constants.create_sched and
4583: ((wjsi_row.completion_subinventory IS NOT NULL AND wjsi_row.completion_subinventory <> fnd_api.g_miss_char)
4584: OR (wjsi_row.completion_locator_id IS NOT NULL AND wjsi_row.completion_locator_id <> fnd_api.g_miss_num))) then
4585:
4586: l_msg := 'WIP_ML_INVALID_LOCATOR';
4587:
4588: select sub.locator_type, mp.stock_locator_control_code

Line 4613: raise fnd_api.g_exc_unexpected_error;

4609: p_locator_segments => wjsi_row.completion_locator_segments,
4610: p_success_flag => l_success);
4611:
4612: if ( not l_success ) then
4613: raise fnd_api.g_exc_unexpected_error;
4614: end if;
4615:
4616: end if;
4617:

Line 4643: if(l_ret_status <> fnd_api.g_ret_sts_success) then

4639: l_params(1).paramValue := p_rowid;
4640: wip_logger.entryPoint(p_procName => g_pkgName || '.' || l_procName,
4641: p_params => l_params,
4642: x_returnStatus => l_ret_status);
4643: if(l_ret_status <> fnd_api.g_ret_sts_success) then
4644: raise fnd_api.g_exc_unexpected_error;
4645: end if;
4646: end if;
4647:

Line 4644: raise fnd_api.g_exc_unexpected_error;

4640: wip_logger.entryPoint(p_procName => g_pkgName || '.' || l_procName,
4641: p_params => l_params,
4642: x_returnStatus => l_ret_status);
4643: if(l_ret_status <> fnd_api.g_ret_sts_success) then
4644: raise fnd_api.g_exc_unexpected_error;
4645: end if;
4646: end if;
4647:
4648:

Line 4732: raise fnd_api.g_exc_unexpected_error;

4728: end if;
4729:
4730: if ( p_validationLevel <> wip_constants.inv ) then
4731: l_msg := 'WIP_ML_KB_SRC_NOT_INV';
4732: raise fnd_api.g_exc_unexpected_error;
4733: else
4734: if ( wjsi_row.load_type = wip_constants.create_job ) then
4735: l_raw_job := WIP_Work_Order_Pub.G_MISS_DISCRETEJOB_REC;
4736:

Line 4776: raise fnd_api.g_exc_unexpected_error;

4772: wjsi_row.first_unit_completion_date := l_defaulted_sched.first_unit_cpl_date;
4773: wjsi_row.daily_production_rate := l_defaulted_sched.daily_production_rate;
4774: else
4775: l_msg := 'WIP_ML_BAD_KB_LOAD';
4776: raise fnd_api.g_exc_unexpected_error;
4777: end if;
4778: end if;
4779:
4780: l_msg := 'WIP_ML_KB_UPDATE_FAILED';

Line 4787: raise fnd_api.g_exc_unexpected_error;

4783: l_doc_type := INV_Kanban_PVT.G_doc_type_Discrete_Job ;
4784: elsif(wjsi_row.load_type = wip_constants.create_sched) then
4785: l_doc_type := INV_Kanban_PVT.G_doc_type_Rep_Schedule ;
4786: else
4787: raise fnd_api.g_exc_unexpected_error;
4788: end if;
4789:
4790: -- Tell Inventory to update the kanban card's supply status.
4791: -- Abort this request if unsuccessful.

Line 4804: if((l_status is null) or (l_status <> fnd_api.g_ret_sts_success)) then

4800: when others then
4801: l_status := null ;
4802: end ;
4803:
4804: if((l_status is null) or (l_status <> fnd_api.g_ret_sts_success)) then
4805: raise fnd_api.g_exc_unexpected_error;
4806: end if ;
4807: exception
4808: when others then

Line 4805: raise fnd_api.g_exc_unexpected_error;

4801: l_status := null ;
4802: end ;
4803:
4804: if((l_status is null) or (l_status <> fnd_api.g_ret_sts_success)) then
4805: raise fnd_api.g_exc_unexpected_error;
4806: end if ;
4807: exception
4808: when others then
4809: fnd_message.set_name('WIP', l_msg);

Line 4847: raise fnd_api.g_exc_unexpected_error;

4843: if ( wjsi_row.overcompletion_tolerance_type is not null and
4844: wjsi_row.overcompletion_tolerance_value is not null ) then
4845: if ( wjsi_row.overcompletion_tolerance_type not in (wip_constants.percent, wip_constants.amount) ) then
4846: l_msg:= 'WIP_ML_COMP_TOLERANCE_TYPE';
4847: raise fnd_api.g_exc_unexpected_error;
4848: end if;
4849: if( wjsi_row.overcompletion_tolerance_value < 0 ) then
4850: l_msg := 'WIP_ML_COMP_TOLERANCE_NEGATIVE';
4851: raise fnd_api.g_exc_unexpected_error;

Line 4851: raise fnd_api.g_exc_unexpected_error;

4847: raise fnd_api.g_exc_unexpected_error;
4848: end if;
4849: if( wjsi_row.overcompletion_tolerance_value < 0 ) then
4850: l_msg := 'WIP_ML_COMP_TOLERANCE_NEGATIVE';
4851: raise fnd_api.g_exc_unexpected_error;
4852: end if;
4853: elsif ( wjsi_row.overcompletion_tolerance_type is not null or
4854: wjsi_row.overcompletion_tolerance_value is not null ) then
4855: -- only one overcompletion column was provided

Line 4857: raise fnd_api.g_exc_unexpected_error;

4853: elsif ( wjsi_row.overcompletion_tolerance_type is not null or
4854: wjsi_row.overcompletion_tolerance_value is not null ) then
4855: -- only one overcompletion column was provided
4856: l_msg := 'WIP_ML_COMP_TOLERANCE_NULL';
4857: raise fnd_api.g_exc_unexpected_error;
4858: end if;
4859: end if;
4860: exception
4861: when others then