DBA Data[Home] [Help]

APPS.WIP_VALIDATEMLHEADER_PVT dependencies on FND_API

Line 132: x_returnStatus := fnd_api.g_ret_sts_success;

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

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

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

Line 142: raise fnd_api.g_exc_unexpected_error;

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

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

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

Line 152: raise fnd_api.g_exc_unexpected_error;

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

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

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

Line 161: raise fnd_api.g_exc_unexpected_error;

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

Line 172: when fnd_api.g_exc_unexpected_error then

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

Line 179: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

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

Line 204: x_returnStatus := fnd_api.g_ret_sts_success;

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

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

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

Line 220: raise fnd_api.g_exc_unexpected_error;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Line 3079: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

3075: p_procReturnStatus => x_returnStatus,
3076: p_msg => 'unexp error:' || SQLERRM,
3077: x_returnStatus => l_retStatus);
3078: end if;
3079: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
3080: fnd_msg_pub.add_exc_msg(p_pkg_name => g_pkgName,
3081: p_procedure_name => l_procName,
3082: p_error_text => SQLERRM);
3083: wip_utilities.get_message_stack(p_msg => l_msg);

Line 3108: x_returnStatus := fnd_api.g_ret_sts_success;

3104: where group_id = p_groupID
3105: and process_phase = WIP_CONSTANTS.ML_VALIDATION
3106: and process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING);
3107: begin
3108: x_returnStatus := fnd_api.g_ret_sts_success;
3109: if (l_logLevel <= wip_constants.trace_logging) then
3110: l_params(2).paramName := 'p_validationLevel';
3111: l_params(2).paramValue := p_validationLevel;
3112: wip_logger.entryPoint(p_procName => g_pkgName || '.' || l_procName,

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

3111: l_params(2).paramValue := p_validationLevel;
3112: wip_logger.entryPoint(p_procName => g_pkgName || '.' || l_procName,
3113: p_params => l_params,
3114: x_returnStatus => x_returnStatus);
3115: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
3116: raise fnd_api.g_exc_unexpected_error;
3117: end if;
3118: end if;
3119:

Line 3116: raise fnd_api.g_exc_unexpected_error;

3112: wip_logger.entryPoint(p_procName => g_pkgName || '.' || l_procName,
3113: p_params => l_params,
3114: x_returnStatus => x_returnStatus);
3115: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
3116: raise fnd_api.g_exc_unexpected_error;
3117: end if;
3118: end if;
3119:
3120: for line in c_line loop

Line 3250: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

3246: p_procReturnStatus => x_returnStatus,
3247: p_msg => 'unexp error:' || SQLERRM,
3248: x_returnStatus => l_retStatus);
3249: end if;
3250: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
3251: fnd_msg_pub.add_exc_msg(p_pkg_name => g_pkgName,
3252: p_procedure_name => l_procName,
3253: p_error_text => SQLERRM);
3254: wip_utilities.get_message_stack(p_msg => l_msg);

Line 3379: raise fnd_api.g_exc_unexpected_error;

3375: x_sched_dir => l_schedDir,
3376: x_est_date => wjsi_row.first_unit_start_date);
3377: if(wjsi_row.first_unit_start_date is null) then
3378: l_msg := 'WIP_ML_EST_LEADTIME';
3379: raise fnd_api.g_exc_unexpected_error;
3380: end if;
3381: end if;
3382: else
3383: if(wjsi_row.load_type = wip_constants.create_ns_job and wjsi_row.routing_reference_id is not null) then

Line 3449: raise fnd_api.g_exc_unexpected_error;

3445: x_sched_dir => wip_constants.lucd,
3446: x_est_date => wjsi_row.first_unit_start_date);
3447: if(wjsi_row.first_unit_start_date is null) then
3448: l_msg := 'WIP_ML_EST_LEADTIME';
3449: raise fnd_api.g_exc_unexpected_error;
3450: end if;
3451: elsif(wjsi_row.last_unit_completion_date is null and
3452: wjsi_row.first_unit_start_date is not null and
3453: wjsi_row.scheduling_method = wip_constants.leadtime) then

Line 3469: raise fnd_api.g_exc_unexpected_error;

3465: x_sched_dir => wip_constants.fusd,
3466: x_est_date => wjsi_row.last_unit_completion_date);
3467: if(wjsi_row.last_unit_completion_date is null) then
3468: l_msg := 'WIP_NO_CALENDAR';
3469: raise fnd_api.g_exc_unexpected_error;
3470: end if;
3471: -- Added for Bug 9385806.
3472: elsif (wjsi_row.last_unit_completion_date is null and
3473: wjsi_row.first_unit_start_date is null and

Line 3496: raise fnd_api.g_exc_unexpected_error;

3492: x_sched_dir => wip_constants.fusd,
3493: x_est_date => wjsi_row.last_unit_completion_date);
3494: if(wjsi_row.last_unit_completion_date is null) then
3495: l_msg := 'WIP_NO_CALENDAR';
3496: raise fnd_api.g_exc_unexpected_error;
3497: end if;
3498: else
3499: l_msg := 'WIP_ML_SCHEDULE_DATES';
3500: raise fnd_api.g_exc_unexpected_error;

Line 3500: raise fnd_api.g_exc_unexpected_error;

3496: raise fnd_api.g_exc_unexpected_error;
3497: end if;
3498: else
3499: l_msg := 'WIP_ML_SCHEDULE_DATES';
3500: raise fnd_api.g_exc_unexpected_error;
3501: end if;
3502: end if;
3503: end if;
3504: exception

Line 3617: raise fnd_api.g_exc_unexpected_error;

3613: begin
3614:
3615: if (PJM_PROJECT.val_task_idtonum(l_projectID, wjsi_row.task_id)
3616: is null) then
3617: raise fnd_api.g_exc_unexpected_error;
3618: end if;
3619:
3620: exception
3621: when others then

Line 3898: raise fnd_api.g_exc_unexpected_error;

3894: if ( wjsi_row.load_type = wip_constants.resched_job and
3895: wjsi_row.start_quantity <> wdj_row.start_quantity ) then
3896:
3897: if ( wjsi_row.start_quantity < wdj_row.quantity_completed ) then
3898: raise fnd_api.g_exc_unexpected_error;
3899: end if;
3900: -- Fix for 5999220 Added if condition by mraman
3901: if ( wdj_row.status_type <> wip_constants.unreleased ) then
3902: select nvl(min(operation_seq_num), fnd_api.g_miss_num)

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

3898: raise fnd_api.g_exc_unexpected_error;
3899: end if;
3900: -- Fix for 5999220 Added if condition by mraman
3901: if ( wdj_row.status_type <> wip_constants.unreleased ) then
3902: select nvl(min(operation_seq_num), fnd_api.g_miss_num)
3903: into l_minOp
3904: from wip_operations
3905: where organization_id = wjsi_row.organization_id
3906: and wip_entity_id = wjsi_row.wip_entity_id

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

3905: where organization_id = wjsi_row.organization_id
3906: and wip_entity_id = wjsi_row.wip_entity_id
3907: and nvl(repetitive_schedule_id, -1) = nvl(wjsi_row.repetitive_schedule_id, -1);
3908:
3909: if ( l_minOp <> fnd_api.g_miss_num ) then
3910: select quantity_in_queue,
3911: scheduled_quantity
3912: into l_queueQty,
3913: l_scheduledQty

Line 3921: raise fnd_api.g_exc_unexpected_error;

3917: and nvl(repetitive_schedule_id, -1) = nvl(wjsi_row.repetitive_schedule_id, -1)
3918: and operation_seq_num = l_minOp;
3919:
3920: if ( l_queueQty < l_scheduledQty - wjsi_row.start_quantity ) then
3921: raise fnd_api.g_exc_unexpected_error;
3922: end if; -- end if (l_queueQty < l_scheduledQty - wjsi_row.start_quantity )
3923: end if ; -- end if (l_minOp <> fnd_api.g_miss_num )
3924: end if; -- end if ( wdj_row.status_type <> wip_constants.unreleased )
3925:

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

3919:
3920: if ( l_queueQty < l_scheduledQty - wjsi_row.start_quantity ) then
3921: raise fnd_api.g_exc_unexpected_error;
3922: end if; -- end if (l_queueQty < l_scheduledQty - wjsi_row.start_quantity )
3923: end if ; -- end if (l_minOp <> fnd_api.g_miss_num )
3924: end if; -- end if ( wdj_row.status_type <> wip_constants.unreleased )
3925:
3926: /* bug 5350660. Show warning if job is already pick released */
3927: if ( wip_picking_pub.is_job_pick_released(wjsi_row.wip_entity_id,

Line 3986: raise fnd_api.g_exc_unexpected_error;

3982: close check_so_link;
3983:
3984: if ( l_qtyReserved > 0 ) then
3985: l_msg := 'WIP_CANT_CANCEL_SO';
3986: raise fnd_api.g_exc_unexpected_error;
3987: end if;
3988: end if; */
3989:
3990:

Line 4001: raise fnd_api.g_exc_unexpected_error;

3997: and (l_old_status not in (wip_constants.cancelled, wip_constants.comp_chrg,
3998: wip_constants.comp_nochrg))) then
3999:
4000: l_msg := 'WIP_CANT_CANCEL_SO';
4001: raise fnd_api.g_exc_unexpected_error;
4002: end if;
4003:
4004: if ( l_qtyReserved > 0 and
4005: wjsi_row.status_type = wip_constants.comp_chrg) then

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

4032: -- complete-no-charge
4033: wip_osp.cancelPOReq(p_job_id => wjsi_row.wip_entity_id,
4034: p_org_id => wjsi_row.organization_id,
4035: x_return_status => l_retStatus);
4036: if ( l_retStatus <> fnd_api.g_ret_sts_success ) then
4037: po_warning_flag := WIP_CONSTANTS.YES;
4038: setInterfaceError(p_rowid, wjsi_row.interface_id, fnd_message.get, validationWarning);
4039: end if;
4040: else

Line 4062: raise fnd_api.g_exc_unexpected_error;

4058: if ( wjsi_row.source_code = 'MSC' and
4059: wdj_row.status_type in (wip_constants.comp_chrg, wip_constants.comp_nochrg,
4060: wip_constants.cancelled, wip_constants.closed) ) then
4061: l_msg := 'WIP_CANT_UPDATE_JOB';
4062: raise fnd_api.g_exc_unexpected_error;
4063: end if;
4064:
4065: -- bug# 3436646: job cannot be changed to unreleased if it's been pick released
4066: if ( wjsi_row.status_type = WIP_CONSTANTS.UNRELEASED and

Line 4072: raise fnd_api.g_exc_unexpected_error;

4068: WIP_PICKING_PUB.Is_Job_Pick_Released(
4069: p_wip_entity_id => wjsi_row.wip_entity_id,
4070: p_org_id => wjsi_row.organization_id) ) then
4071: l_msg := 'WIP_UNRLS_JOB/SCHED';
4072: raise fnd_api.g_exc_unexpected_error;
4073: end if;
4074: exception
4075: when others then
4076: fnd_message.set_name('WIP', l_msg);

Line 4161: raise fnd_api.g_exc_unexpected_error;

4157:
4158: -- You cannot create a repetitive schedule for a unit effective assembly.
4159: if( l_isUnitEffective and wjsi_row.load_type = wip_constants.create_sched ) then
4160: l_msg := 'WIP_ML_NO_UNIT_EFF_SCHED';
4161: raise fnd_api.g_exc_unexpected_error;
4162: end if;
4163:
4164: -- It is an error to provide unit number for non-unit effective assemblies.
4165: if (not l_isUnitEffective and wjsi_row.end_item_unit_number is not null) then

Line 4167: raise fnd_api.g_exc_unexpected_error;

4163:
4164: -- It is an error to provide unit number for non-unit effective assemblies.
4165: if (not l_isUnitEffective and wjsi_row.end_item_unit_number is not null) then
4166: l_msg := 'WIP_ML_UNIT_NUM_MEANINGLESS';
4167: raise fnd_api.g_exc_unexpected_error;
4168: end if;
4169:
4170: if (wjsi_row.load_type in (wip_constants.create_job, wip_constants.create_ns_job)) then
4171: -- Unit number is required for unit effective assemblies.

Line 4227: raise fnd_api.g_exc_unexpected_error;

4223: exception
4224: when others then
4225: FND_Message.set_name('PJM', 'UEFF-UNIT NUMBER INVALID') ;
4226: WIP_JSI_Utils.record_current_error ;
4227: raise fnd_api.g_exc_unexpected_error;
4228: end ;
4229:
4230: -- End of bug fix 5332672
4231: end if;

Line 4234: when fnd_api.g_exc_unexpected_error then

4230: -- End of bug fix 5332672
4231: end if;
4232: end if;
4233: exception
4234: when fnd_api.g_exc_unexpected_error then
4235: fnd_message.set_name('WIP', l_msg);
4236: x_errorMsg := fnd_message.get;
4237: setInterfaceError(p_rowid, wjsi_row.interface_id, x_errorMsg, validationError);
4238: raise line_validation_error;

Line 4291: raise fnd_api.g_exc_unexpected_error;

4287: end if;
4288:
4289: if ( l_dateCount = 0 ) then
4290: --must provide at least one date for rep sched
4291: raise fnd_api.g_exc_unexpected_error;
4292: end if;
4293:
4294: if ( l_dateCount <> 1 ) then
4295: select count(*)

Line 4303: raise fnd_api.g_exc_unexpected_error;

4299: and line_id = wjsi_row.line_id
4300: and line_schedule_type = 1; --fixed
4301: if( l_lineCount > 0 ) then
4302: --the line can not have a fixed lead time
4303: raise fnd_api.g_exc_unexpected_error;
4304: end if;
4305:
4306: select count(*)
4307: into l_rtgCount

Line 4319: raise fnd_api.g_exc_unexpected_error;

4315: and bor.organization_id = wri.organization_id
4316: and bor.assembly_item_id = wri.primary_item_id;
4317: if ( l_rtgCount > 0 ) then
4318: --the line can not have a routing
4319: raise fnd_api.g_exc_unexpected_error;
4320: end if;
4321: end if;
4322:
4323: select count(*)

Line 4347: raise fnd_api.g_exc_unexpected_error;

4343: if( not (l_dateCount = 2 and
4344: ((wjsi_row.first_unit_start_date is not null and wjsi_row.first_unit_completion_date is not null) or
4345: (wjsi_row.last_unit_start_date is not null and wjsi_row.last_unit_completion_date is not null))) ) then
4346: if ( l_rtgCount = 0 and l_lineCount > 0 ) then
4347: raise fnd_api.g_exc_unexpected_error;
4348: end if;
4349: end if;
4350:
4351: if ( l_lineCount > 0 and l_rtgCount = 0 ) then

Line 4567: x_returnStatus := fnd_api.g_ret_sts_success;

4563: select operation_seq_num
4564: from wip_operations
4565: where wip_entity_id = p_wipEntityId;
4566: begin
4567: x_returnStatus := fnd_api.g_ret_sts_success;
4568:
4569: select wip_entity_id,
4570: serialization_start_op,
4571: load_type,

Line 4617: raise fnd_api.g_exc_unexpected_error;

4613: close c_ops;
4614:
4615: --The routing exists, but an invalid op seq was provided
4616: if( l_rtgExists and not l_opFound ) then
4617: raise fnd_api.g_exc_unexpected_error;
4618: end if;
4619:
4620: --If no routing exsts, the serialization op must be 1.
4621: if( not l_rtgExists and l_serialOp <> 1 ) then

Line 4622: raise fnd_api.g_exc_unexpected_error;

4618: end if;
4619:
4620: --If no routing exsts, the serialization op must be 1.
4621: if( not l_rtgExists and l_serialOp <> 1 ) then
4622: raise fnd_api.g_exc_unexpected_error;
4623: end if;
4624:
4625: -- job must be unreleased to change the serialization op on a
4626: -- reschedule request. This is to guarantee no txns have taken place.

Line 4636: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

4632: and status_type = wip_constants.unreleased;
4633: end if;
4634: exception
4635: when others then
4636: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
4637: fnd_message.set_name('WIP', 'WIP_ML_SERIAL_START_OP');
4638: x_errorMsg := fnd_message.get;
4639: setInterfaceError(p_rowid, l_interfaceID, x_errorMsg, validationError);
4640: end validateSerializationStartOp;

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

4660:
4661: if ( wjsi_row.load_type = wip_constants.resched_job ) then
4662: wjsi_row.project_id := nvl(wjsi_row.project_id, wdj_row.project_id);
4663: wjsi_row.task_id := nvl(wjsi_row.task_id, wdj_row.task_id);
4664: /*Bug 5446216 (FP Bug 5504790): Need not copy old value if value is fnd_api.g_miss_char*/
4665: if wjsi_row.completion_subinventory is null then
4666: if ( wjsi_row.completion_locator_id is null) then
4667: wjsi_row.completion_locator_id := wdj_row.completion_locator_id;
4668: end if;

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

4665: if wjsi_row.completion_subinventory is null then
4666: if ( wjsi_row.completion_locator_id is null) then
4667: wjsi_row.completion_locator_id := wdj_row.completion_locator_id;
4668: end if;
4669: elsif (wjsi_row.completion_subinventory = fnd_api.g_miss_char) then
4670: wjsi_row.completion_locator_id := null;
4671: end if;
4672: wjsi_row.completion_subinventory :=
4673: nvl(wjsi_row.completion_subinventory, wdj_row.completion_subinventory);

Line 4704: raise fnd_api.g_exc_unexpected_error;

4700: 'Y', -- required?
4701: wjsi_row.project_id,
4702: wjsi_row.task_id)) then
4703: l_msg := 'WIP_ML_LOCATOR_PROJ_TASK';
4704: raise fnd_api.g_exc_unexpected_error;
4705: end if;
4706: end if;
4707: end if;
4708: end if;

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

4708: end if;
4709:
4710: /* Bug 5446216 (FP Bug 5504790):Need not validate locator when subinventory is null */
4711: if(wjsi_row.load_type <> wip_constants.create_sched and
4712: ((wjsi_row.completion_subinventory IS NOT NULL AND wjsi_row.completion_subinventory <> fnd_api.g_miss_char)
4713: OR (wjsi_row.completion_locator_id IS NOT NULL AND wjsi_row.completion_locator_id <> fnd_api.g_miss_num))) then
4714:
4715: l_msg := 'WIP_ML_INVALID_LOCATOR';
4716:

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

4709:
4710: /* Bug 5446216 (FP Bug 5504790):Need not validate locator when subinventory is null */
4711: if(wjsi_row.load_type <> wip_constants.create_sched and
4712: ((wjsi_row.completion_subinventory IS NOT NULL AND wjsi_row.completion_subinventory <> fnd_api.g_miss_char)
4713: OR (wjsi_row.completion_locator_id IS NOT NULL AND wjsi_row.completion_locator_id <> fnd_api.g_miss_num))) then
4714:
4715: l_msg := 'WIP_ML_INVALID_LOCATOR';
4716:
4717: select sub.locator_type, mp.stock_locator_control_code

Line 4742: raise fnd_api.g_exc_unexpected_error;

4738: p_locator_segments => wjsi_row.completion_locator_segments,
4739: p_success_flag => l_success);
4740:
4741: if ( not l_success ) then
4742: raise fnd_api.g_exc_unexpected_error;
4743: end if;
4744:
4745: end if;
4746:

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

4768: l_params(1).paramValue := p_rowid;
4769: wip_logger.entryPoint(p_procName => g_pkgName || '.' || l_procName,
4770: p_params => l_params,
4771: x_returnStatus => l_ret_status);
4772: if(l_ret_status <> fnd_api.g_ret_sts_success) then
4773: raise fnd_api.g_exc_unexpected_error;
4774: end if;
4775: end if;
4776:

Line 4773: raise fnd_api.g_exc_unexpected_error;

4769: wip_logger.entryPoint(p_procName => g_pkgName || '.' || l_procName,
4770: p_params => l_params,
4771: x_returnStatus => l_ret_status);
4772: if(l_ret_status <> fnd_api.g_ret_sts_success) then
4773: raise fnd_api.g_exc_unexpected_error;
4774: end if;
4775: end if;
4776:
4777:

Line 4874: raise fnd_api.g_exc_unexpected_error;

4870: end;
4871:
4872: if ( p_validationLevel <> wip_constants.inv and l_valid_card = 0 ) then
4873: l_msg := 'WIP_ML_KB_SRC_NOT_INV';
4874: raise fnd_api.g_exc_unexpected_error;
4875: else
4876: if ( wjsi_row.load_type = wip_constants.create_job ) then
4877: l_raw_job := WIP_Work_Order_Pub.G_MISS_DISCRETEJOB_REC;
4878:

Line 4918: raise fnd_api.g_exc_unexpected_error;

4914: wjsi_row.first_unit_completion_date := l_defaulted_sched.first_unit_cpl_date;
4915: wjsi_row.daily_production_rate := l_defaulted_sched.daily_production_rate;
4916: else
4917: l_msg := 'WIP_ML_BAD_KB_LOAD';
4918: raise fnd_api.g_exc_unexpected_error;
4919: end if;
4920: end if;
4921:
4922: l_msg := 'WIP_ML_KB_UPDATE_FAILED';

Line 4929: raise fnd_api.g_exc_unexpected_error;

4925: l_doc_type := INV_Kanban_PVT.G_doc_type_Discrete_Job ;
4926: elsif(wjsi_row.load_type = wip_constants.create_sched) then
4927: l_doc_type := INV_Kanban_PVT.G_doc_type_Rep_Schedule ;
4928: else
4929: raise fnd_api.g_exc_unexpected_error;
4930: end if;
4931:
4932: -- Tell Inventory to update the kanban card's supply status.
4933: -- Abort this request if unsuccessful.

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

4942: when others then
4943: l_status := null ;
4944: end ;
4945:
4946: if((l_status is null) or (l_status <> fnd_api.g_ret_sts_success)) then
4947: raise fnd_api.g_exc_unexpected_error;
4948: end if ;
4949: exception
4950: when others then

Line 4947: raise fnd_api.g_exc_unexpected_error;

4943: l_status := null ;
4944: end ;
4945:
4946: if((l_status is null) or (l_status <> fnd_api.g_ret_sts_success)) then
4947: raise fnd_api.g_exc_unexpected_error;
4948: end if ;
4949: exception
4950: when others then
4951: fnd_message.set_name('WIP', l_msg);

Line 4989: raise fnd_api.g_exc_unexpected_error;

4985: if ( wjsi_row.overcompletion_tolerance_type is not null and
4986: wjsi_row.overcompletion_tolerance_value is not null ) then
4987: if ( wjsi_row.overcompletion_tolerance_type not in (wip_constants.percent, wip_constants.amount) ) then
4988: l_msg:= 'WIP_ML_COMP_TOLERANCE_TYPE';
4989: raise fnd_api.g_exc_unexpected_error;
4990: end if;
4991: if( wjsi_row.overcompletion_tolerance_value < 0 ) then
4992: l_msg := 'WIP_ML_COMP_TOLERANCE_NEGATIVE';
4993: raise fnd_api.g_exc_unexpected_error;

Line 4993: raise fnd_api.g_exc_unexpected_error;

4989: raise fnd_api.g_exc_unexpected_error;
4990: end if;
4991: if( wjsi_row.overcompletion_tolerance_value < 0 ) then
4992: l_msg := 'WIP_ML_COMP_TOLERANCE_NEGATIVE';
4993: raise fnd_api.g_exc_unexpected_error;
4994: end if;
4995: elsif ( wjsi_row.overcompletion_tolerance_type is not null or
4996: wjsi_row.overcompletion_tolerance_value is not null ) then
4997: -- only one overcompletion column was provided

Line 4999: raise fnd_api.g_exc_unexpected_error;

4995: elsif ( wjsi_row.overcompletion_tolerance_type is not null or
4996: wjsi_row.overcompletion_tolerance_value is not null ) then
4997: -- only one overcompletion column was provided
4998: l_msg := 'WIP_ML_COMP_TOLERANCE_NULL';
4999: raise fnd_api.g_exc_unexpected_error;
5000: end if;
5001: end if;
5002: exception
5003: when others then