DBA Data[Home] [Help]

APPS.WIP_JOBCLOSE_PRIV dependencies on WIP_CONSTANTS

Line 38: IF (l_logLevel <= wip_constants.trace_logging) THEN

34: BEGIN
35: x_returnStatus := fnd_api.g_ret_sts_success;
36: fnd_file.put_line(FND_FILE.LOG,'Populate Close Temp');
37:
38: IF (l_logLevel <= wip_constants.trace_logging) THEN
39: l_params(1).paramName := 'p_organization_id';
40: l_params(1).paramValue := p_organization_id ;
41: wip_logger.entryPoint(p_procName => 'wip_jobclose_priv.populate_close_temp',
42: p_params => l_params,

Line 79: (WIP_CONSTANTS.UNRELEASED,

75: FROM WIP_DJ_CLOSE_TEMP WDCT
76: WHERE WDCT.WIP_ENTITY_ID = WE.WIP_ENTITY_ID)
77: AND DJ.STATUS_TYPE IN
78: -- (1,3,4,5,6,7,9,11,15)
79: (WIP_CONSTANTS.UNRELEASED,
80: WIP_CONSTANTS.RELEASED,
81: WIP_CONSTANTS.COMP_CHRG,
82: WIP_CONSTANTS.COMP_NOCHRG ,
83: WIP_CONSTANTS.HOLD ,

Line 80: WIP_CONSTANTS.RELEASED,

76: WHERE WDCT.WIP_ENTITY_ID = WE.WIP_ENTITY_ID)
77: AND DJ.STATUS_TYPE IN
78: -- (1,3,4,5,6,7,9,11,15)
79: (WIP_CONSTANTS.UNRELEASED,
80: WIP_CONSTANTS.RELEASED,
81: WIP_CONSTANTS.COMP_CHRG,
82: WIP_CONSTANTS.COMP_NOCHRG ,
83: WIP_CONSTANTS.HOLD ,
84: WIP_CONSTANTS.CANCELLED ,

Line 81: WIP_CONSTANTS.COMP_CHRG,

77: AND DJ.STATUS_TYPE IN
78: -- (1,3,4,5,6,7,9,11,15)
79: (WIP_CONSTANTS.UNRELEASED,
80: WIP_CONSTANTS.RELEASED,
81: WIP_CONSTANTS.COMP_CHRG,
82: WIP_CONSTANTS.COMP_NOCHRG ,
83: WIP_CONSTANTS.HOLD ,
84: WIP_CONSTANTS.CANCELLED ,
85: WIP_CONSTANTS.FAIL_BOM,

Line 82: WIP_CONSTANTS.COMP_NOCHRG ,

78: -- (1,3,4,5,6,7,9,11,15)
79: (WIP_CONSTANTS.UNRELEASED,
80: WIP_CONSTANTS.RELEASED,
81: WIP_CONSTANTS.COMP_CHRG,
82: WIP_CONSTANTS.COMP_NOCHRG ,
83: WIP_CONSTANTS.HOLD ,
84: WIP_CONSTANTS.CANCELLED ,
85: WIP_CONSTANTS.FAIL_BOM,
86: WIP_CONSTANTS.FAIL_ROUT,

Line 83: WIP_CONSTANTS.HOLD ,

79: (WIP_CONSTANTS.UNRELEASED,
80: WIP_CONSTANTS.RELEASED,
81: WIP_CONSTANTS.COMP_CHRG,
82: WIP_CONSTANTS.COMP_NOCHRG ,
83: WIP_CONSTANTS.HOLD ,
84: WIP_CONSTANTS.CANCELLED ,
85: WIP_CONSTANTS.FAIL_BOM,
86: WIP_CONSTANTS.FAIL_ROUT,
87: WIP_CONSTANTS.FAIL_CLOSE

Line 84: WIP_CONSTANTS.CANCELLED ,

80: WIP_CONSTANTS.RELEASED,
81: WIP_CONSTANTS.COMP_CHRG,
82: WIP_CONSTANTS.COMP_NOCHRG ,
83: WIP_CONSTANTS.HOLD ,
84: WIP_CONSTANTS.CANCELLED ,
85: WIP_CONSTANTS.FAIL_BOM,
86: WIP_CONSTANTS.FAIL_ROUT,
87: WIP_CONSTANTS.FAIL_CLOSE
88: )

Line 85: WIP_CONSTANTS.FAIL_BOM,

81: WIP_CONSTANTS.COMP_CHRG,
82: WIP_CONSTANTS.COMP_NOCHRG ,
83: WIP_CONSTANTS.HOLD ,
84: WIP_CONSTANTS.CANCELLED ,
85: WIP_CONSTANTS.FAIL_BOM,
86: WIP_CONSTANTS.FAIL_ROUT,
87: WIP_CONSTANTS.FAIL_CLOSE
88: )
89: AND ( p_class_type IS NULL OR

Line 86: WIP_CONSTANTS.FAIL_ROUT,

82: WIP_CONSTANTS.COMP_NOCHRG ,
83: WIP_CONSTANTS.HOLD ,
84: WIP_CONSTANTS.CANCELLED ,
85: WIP_CONSTANTS.FAIL_BOM,
86: WIP_CONSTANTS.FAIL_ROUT,
87: WIP_CONSTANTS.FAIL_CLOSE
88: )
89: AND ( p_class_type IS NULL OR
90: DJ.CLASS_CODE IN ( SELECT CLASS_CODE

Line 87: WIP_CONSTANTS.FAIL_CLOSE

83: WIP_CONSTANTS.HOLD ,
84: WIP_CONSTANTS.CANCELLED ,
85: WIP_CONSTANTS.FAIL_BOM,
86: WIP_CONSTANTS.FAIL_ROUT,
87: WIP_CONSTANTS.FAIL_CLOSE
88: )
89: AND ( p_class_type IS NULL OR
90: DJ.CLASS_CODE IN ( SELECT CLASS_CODE
91: FROM WIP_ACCOUNTING_CLASSES

Line 172: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN

168:
169: --
170: -- Bug 5345660 exitPoint for normal exit.
171: --
172: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN
173: wip_logger.exitPoint(
174: p_procName => 'wip_close_priv.populate_close_temp',
175: p_procReturnStatus => x_returnStatus,
176: p_msg => 'procedure normal exit',

Line 187: IF (l_logLevel <= wip_constants.trace_logging) THEN

183: WHEN others THEN
184: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
185: l_msg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
186:
187: IF (l_logLevel <= wip_constants.trace_logging) THEN
188: wip_logger.exitPoint(p_procName=>'wip_close_priv.populate_close_temp',
189: p_procReturnStatus => x_returnStatus,
190: p_msg => l_msg,
191: x_returnStatus => l_return_Status);

Line 224: IF (l_logLevel <= wip_constants.trace_logging) THEN

220: l_msg_count NUMBER ;
221: l_msg_data VARCHAR2(200);
222: l_msg VARCHAR(240);
223: BEGIN
224: IF (l_logLevel <= wip_constants.trace_logging) THEN
225: l_params(1).paramName := 'p_from_release_date';
226: l_params(1).paramValue := p_from_release_date ;
227: l_params(2).paramName := 'p_to_release_date';
228: l_params(2).paramValue := p_to_release_date ;

Line 344: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN

340: fnd_file.put_line(FND_FILE.LOG,'x_from_completion_date : '||to_char(x_from_completion_date));
341: fnd_file.put_line(FND_FILE.LOG,'x_to_completion_date : '||to_char(x_to_completion_date));
342: fnd_file.put_line(FND_FILE.LOG,'x_act_close_date : '||to_char(x_act_close_date));
343:
344: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN
345: wip_logger.exitPoint(
346: p_procName => 'wip_close_priv.time_zone_conversions',
347: p_procReturnStatus => x_returnStatus,
348: p_msg => 'procedure normal exit',

Line 356: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN

352: WHEN others THEN
353: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
354: l_msg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
355:
356: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN
357: wip_logger.exitPoint(
358: p_procName=>'wip_close_priv.time_zone_conversions',
359: p_procReturnStatus => x_returnStatus,
360: p_msg => l_msg,

Line 388: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN

384: l_failed_ids dbms_sql.number_table;
385:
386: BEGIN
387:
388: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN
389: l_params(1).paramName := 'p_organization_id';
390: l_params(1).paramValue := p_organization_id;
391: l_params(2).paramName := 'p_group_id';
392: l_params(2).paramValue := p_group_id;

Line 433: SET status_type = WIP_CONSTANTS.FAIL_CLOSE

429: x_returnstatus := FND_API.G_RET_STS_ERROR;
430:
431: FORALL i IN l_failed_ids.FIRST .. l_failed_ids.LAST
432: UPDATE wip_discrete_jobs
433: SET status_type = WIP_CONSTANTS.FAIL_CLOSE
434: WHERE organization_id = p_organization_id AND
435: wip_entity_id = l_failed_ids(i);
436:
437: l_failed_ids.DELETE;

Line 443: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN

439:
440: --
441: -- Bug 5345660 exitPoint for normal exit.
442: --
443: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN
444: wip_logger.exitPoint(
445: p_procName => 'wip_close_priv.prior_date_release',
446: p_procReturnStatus => x_returnStatus,
447: p_msg => 'procedure normal exit',

Line 456: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN

452: WHEN others THEN
453: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
454: l_msg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
455:
456: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN
457: wip_logger.exitPoint(
458: p_procName=>'wip_close_priv.prior_date_release',
459: p_procReturnStatus => x_returnStatus,
460: p_msg => l_msg,

Line 533: IF (l_logLevel <= wip_constants.trace_logging) THEN

529: l_failed_jobs WIP_DJ_CLOSE_TEMP.WIP_ENTITY_NAME%TYPE ;
530: l_failed_counter NUMBER ;
531: BEGIN
532:
533: IF (l_logLevel <= wip_constants.trace_logging) THEN
534: l_params(1).paramName := 'p_organization_id';
535: l_params(1).paramValue := p_organization_id ;
536: l_params(1).paramName := 'p_group_id';
537: l_params(1).paramValue := p_group_id ;

Line 563: SET STATUS_TYPE = WIP_CONSTANTS.FAIL_CLOSE

559: EXIT WHEN c_pending_txns%NOTFOUND ;
560: END LOOP ;
561:
562: UPDATE WIP_DISCRETE_JOBS
563: SET STATUS_TYPE = WIP_CONSTANTS.FAIL_CLOSE
564: WHERE WIP_ENTITY_ID IN
565: (SELECT WIP_ENTITY_ID
566: FROM WIP_DJ_CLOSE_TEMP
567: WHERE GROUP_ID = p_group_id

Line 585: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN

581:
582: --
583: -- Bug 5345660 exitPoint for normal exit.
584: --
585: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN
586: wip_logger.exitPoint(
587: p_procName => 'wip_close_priv.pending_txns',
588: p_procReturnStatus => x_returnStatus,
589: p_msg => 'procedure normal exit',

Line 601: IF (l_logLevel <= wip_constants.trace_logging) THEN

597: END IF;
598: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
599: l_msg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
600:
601: IF (l_logLevel <= wip_constants.trace_logging) THEN
602: wip_logger.exitPoint(p_procName=>'wip_close_priv.pending_txns',
603: p_procReturnStatus => x_returnStatus,
604: p_msg => l_msg,
605: x_returnStatus => l_return_Status);

Line 680: IF (l_logLevel <= wip_constants.trace_logging) THEN

676: l_msg VARCHAR(240);
677: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
678: l_failed_counter NUMBER ;
679: BEGIN
680: IF (l_logLevel <= wip_constants.trace_logging) THEN
681: l_params(1).paramName := 'p_organization_id';
682: l_params(1).paramValue := p_organization_id ;
683: l_params(1).paramName := 'p_group_id';
684: l_params(1).paramValue := p_group_id ;

Line 709: SET STATUS_TYPE = WIP_CONSTANTS.FAIL_CLOSE

705: END IF;
706: end loop;
707:
708: UPDATE WIP_DISCRETE_JOBS
709: SET STATUS_TYPE = WIP_CONSTANTS.FAIL_CLOSE
710: WHERE WIP_ENTITY_ID IN
711: (SELECT WIP_ENTITY_ID
712: FROM WIP_DJ_CLOSE_TEMP
713: WHERE GROUP_ID = p_group_id

Line 727: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN

723:
724: --
725: -- Bug 5345660 exitPoint for normal exit.
726: --
727: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN
728: wip_logger.exitPoint(
729: p_procName => 'wip_close_priv.pending_clocks',
730: p_procReturnStatus => x_returnStatus,
731: p_msg => 'procedure normal exit',

Line 743: IF (l_logLevel <= wip_constants.trace_logging) THEN

739: END IF;
740: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
741: l_msg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
742:
743: IF (l_logLevel <= wip_constants.trace_logging) THEN
744: wip_logger.exitPoint(p_procName=>'wip_close_priv.pending_clocks',
745: p_procReturnStatus => x_returnStatus,
746: p_msg => l_msg,
747: x_returnStatus => l_return_Status);

Line 797: SET STATUS_TYPE = WIP_CONSTANTS.FAIL_CLOSE

793: END IF;
794: end loop;
795:
796: UPDATE WIP_DISCRETE_JOBS
797: SET STATUS_TYPE = WIP_CONSTANTS.FAIL_CLOSE
798: WHERE WIP_ENTITY_ID IN
799: (SELECT WIP_ENTITY_ID
800: FROM WIP_DJ_CLOSE_TEMP
801: WHERE GROUP_ID = p_group_id

Line 844: l_propagate_job_change_to_po = WIP_CONSTANTS.YES) THEN

840: for l_jobRec in c_jobs loop
841: -- add code to cancel PO/requisitions if exists and applicable
842: IF(po_code_release_grp.Current_Release >=
843: po_code_release_grp.PRC_11i_Family_Pack_J AND
844: l_propagate_job_change_to_po = WIP_CONSTANTS.YES) THEN
845: -- try to cancel all PO/requisitions associated to the jobs.
846: wip_osp.cancelPOReq(p_job_id => l_jobRec.wip_entity_id,
847: p_org_id => p_organization_id,
848: p_clr_fnd_mes_flag => 'Y',

Line 902: IF (l_logLevel <= wip_constants.trace_logging) THEN

898: fnd_file.put_line(FND_FILE.LOG,'Inside Procedure Close Date ');
899: x_returnStatus := fnd_api.g_ret_sts_success;
900: l_failed_counter := 0 ;
901:
902: IF (l_logLevel <= wip_constants.trace_logging) THEN
903: l_params(1).paramName := 'p_organization_id';
904: l_params(1).paramValue := p_organization_id ;
905: l_params(1).paramName := 'p_group_id';
906: l_params(1).paramValue := p_group_id ;

Line 931: SET STATUS_TYPE = WIP_CONSTANTS.FAIL_CLOSE

927: END LOOP ;
928: fnd_file.put_line(FND_FILE.LOG,'Number of failed jobs because of past close date : '||l_failed_counter);
929:
930: UPDATE WIP_DISCRETE_JOBS
931: SET STATUS_TYPE = WIP_CONSTANTS.FAIL_CLOSE
932: WHERE WIP_ENTITY_ID IN
933: (SELECT WIP_ENTITY_ID
934: FROM WIP_DJ_CLOSE_TEMP
935: WHERE GROUP_ID = p_group_id

Line 952: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN

948:
949: --
950: -- Bug 5345660 exitPoint for normal exit.
951: --
952: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN
953: wip_logger.exitPoint(
954: p_procName => 'wip_close_priv.past_close_date',
955: p_procReturnStatus => x_returnStatus,
956: p_msg => 'procedure normal exit',

Line 967: IF (l_logLevel <= wip_constants.trace_logging) THEN

963: CLOSE c_pending_txns ;
964: END IF;
965: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
966: l_msg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
967: IF (l_logLevel <= wip_constants.trace_logging) THEN
968: wip_logger.exitPoint(p_procName=>'wip_close_priv.past_close_date',
969: p_procReturnStatus => x_returnStatus,
970: p_msg => l_msg,
971: x_returnStatus => l_return_Status);

Line 1037: IF (l_logLevel <= wip_constants.trace_logging) THEN

1033:
1034: BEGIN
1035: fnd_file.put_line(FND_FILE.LOG,'Open PO Check');
1036:
1037: IF (l_logLevel <= wip_constants.trace_logging) THEN
1038: l_params(1).paramName := 'p_organization_id';
1039: l_params(1).paramValue := p_organization_id ;
1040: l_params(1).paramName := 'p_group_id';
1041: l_params(1).paramValue := p_group_id ;

Line 1075: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN

1071:
1072: --
1073: -- Bug 5345660 exitPoint for normal exit.
1074: --
1075: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN
1076: wip_logger.exitPoint(
1077: p_procName => 'wip_close_priv.check_open_po',
1078: p_procReturnStatus => x_returnStatus,
1079: p_msg => 'procedure normal exit',

Line 1091: IF (l_logLevel <= wip_constants.trace_logging) THEN

1087: END IF;
1088: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1089: l_msg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
1090:
1091: IF (l_logLevel <= wip_constants.trace_logging) THEN
1092: wip_logger.exitPoint(p_procName=>'wip_close_priv.check_open_po',
1093: p_procReturnStatus => x_returnStatus,
1094: p_msg => l_msg,
1095: x_returnStatus => l_return_Status);

Line 1122: IF (l_logLevel <= wip_constants.trace_logging) THEN

1118:
1119: BEGIN
1120: x_returnStatus := fnd_api.g_ret_sts_success;
1121: fnd_file.put_line(FND_FILE.LOG,'lot validate');
1122: IF (l_logLevel <= wip_constants.trace_logging) THEN
1123: l_params(1).paramName := 'p_organization_id';
1124: l_params(1).paramValue := p_organization_id ;
1125: l_params(1).paramName := 'p_group_id';
1126: l_params(1).paramValue := p_group_id ;

Line 1146: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN

1142:
1143: --
1144: -- Bug 5345660 exitPoint for normal exit.
1145: --
1146: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN
1147: wip_logger.exitPoint(
1148: p_procName => 'wip_close_priv.lot_validate',
1149: p_procReturnStatus => x_returnStatus,
1150: p_msg => 'procedure normal exit',

Line 1158: IF (l_logLevel <= wip_constants.trace_logging) THEN

1154: EXCEPTION
1155: WHEN others THEN
1156: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1157: l_msg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
1158: IF (l_logLevel <= wip_constants.trace_logging) THEN
1159: wip_logger.exitPoint(p_procName=>'wip_jobclose_priv.lot_validate',
1160: p_procReturnStatus => x_returnStatus,
1161: p_msg => l_msg,
1162: x_returnStatus => l_return_Status);

Line 1200: IF (l_logLevel <= wip_constants.trace_logging) THEN

1196: BEGIN
1197: x_returnStatus := fnd_api.g_ret_sts_success;
1198: fnd_file.put_line(FND_FILE.LOG,'delete Existing reservations');
1199:
1200: IF (l_logLevel <= wip_constants.trace_logging) THEN
1201: l_params(1).paramName := 'p_organization_id';
1202: l_params(1).paramValue := p_organization_id ;
1203: l_params(1).paramName := 'p_group_id';
1204: l_params(1).paramValue := p_group_id ;

Line 1235: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN

1231:
1232: --
1233: -- Bug 5345660 exitPoint for normal exit.
1234: --
1235: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN
1236: wip_logger.exitPoint(
1237: p_procName => 'wip_close_priv.delete_reservation',
1238: p_procReturnStatus => x_returnStatus,
1239: p_msg => 'procedure normal exit',

Line 1251: IF (l_logLevel <= wip_constants.trace_logging) THEN

1247: END IF;
1248: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1249: l_msg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
1250:
1251: IF (l_logLevel <= wip_constants.trace_logging) THEN
1252: wip_logger.exitPoint(p_procName=>'wip_jobclose_priv.delete_reservation',
1253: p_procReturnStatus => x_returnStatus,
1254: p_msg => l_msg,
1255: x_returnStatus => l_return_Status);

Line 1374: (WIP_CONSTANTS.DISC_CLASS,

1370: AND WDJ.CLASS_CODE = WAC.CLASS_CODE
1371: AND TEMP.GROUP_ID = p_group_id
1372: AND WAC.CLASS_TYPE IN
1373: --(1,3,5,6)
1374: (WIP_CONSTANTS.DISC_CLASS,
1375: WIP_CONSTANTS.NS_ASSET_CLASS,
1376: WIP_CONSTANTS.LOT_CLASS,
1377: WIP_CONSTANTS.EAM_CLASS ) ;
1378:

Line 1375: WIP_CONSTANTS.NS_ASSET_CLASS,

1371: AND TEMP.GROUP_ID = p_group_id
1372: AND WAC.CLASS_TYPE IN
1373: --(1,3,5,6)
1374: (WIP_CONSTANTS.DISC_CLASS,
1375: WIP_CONSTANTS.NS_ASSET_CLASS,
1376: WIP_CONSTANTS.LOT_CLASS,
1377: WIP_CONSTANTS.EAM_CLASS ) ;
1378:
1379: SELECT COUNT(*)

Line 1376: WIP_CONSTANTS.LOT_CLASS,

1372: AND WAC.CLASS_TYPE IN
1373: --(1,3,5,6)
1374: (WIP_CONSTANTS.DISC_CLASS,
1375: WIP_CONSTANTS.NS_ASSET_CLASS,
1376: WIP_CONSTANTS.LOT_CLASS,
1377: WIP_CONSTANTS.EAM_CLASS ) ;
1378:
1379: SELECT COUNT(*)
1380: INTO l_expense_jobs

Line 1377: WIP_CONSTANTS.EAM_CLASS ) ;

1373: --(1,3,5,6)
1374: (WIP_CONSTANTS.DISC_CLASS,
1375: WIP_CONSTANTS.NS_ASSET_CLASS,
1376: WIP_CONSTANTS.LOT_CLASS,
1377: WIP_CONSTANTS.EAM_CLASS ) ;
1378:
1379: SELECT COUNT(*)
1380: INTO l_expense_jobs
1381: FROM WIP_DJ_CLOSE_TEMP TEMP,

Line 1390: AND WAC.CLASS_TYPE = WIP_CONSTANTS.NS_EXPENSE_CLASS ;

1386: AND WDJ.ORGANIZATION_ID = p_organization_id
1387: AND WAC.ORGANIZATION_ID = p_organization_id
1388: AND WDJ.CLASS_CODE = WAC.CLASS_CODE
1389: AND TEMP.GROUP_ID = p_group_id
1390: AND WAC.CLASS_TYPE = WIP_CONSTANTS.NS_EXPENSE_CLASS ;
1391:
1392: -- Bug 4890159. Performance Fix
1393: -- saugupta 1-Jun-06
1394: /*

Line 1655: IF (l_logLevel <= wip_constants.trace_logging) THEN

1651: fnd_file.put_line(FND_FILE.OUTPUT,'WIP DISCRETE JOB CLOSE OUTPUT');
1652: fnd_file.put_line(FND_FILE.OUTPUT,'*****************************');
1653: -- write parameter value to log file
1654:
1655: IF (l_logLevel <= wip_constants.trace_logging) THEN
1656: l_params(1).paramName := 'p_organization_id';
1657: l_params(1).paramValue := p_organization_id ;
1658: l_params(2).paramName := 'p_class_type';
1659: l_params(2).paramValue := p_class_type;

Line 1702: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN

1698: x_act_close_date => l_act_close_date ,
1699: x_returnstatus => l_return_status
1700: );
1701: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1702: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN
1703: wip_logger.log(p_msg => 'time zone conversion failed',
1704: x_returnStatus => l_return_Status);
1705: END IF;
1706: RAISE FND_API.G_EXC_ERROR ;

Line 1779: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN

1775: x_group_id => l_group_id ,
1776: x_ReturnStatus => l_return_status
1777: );
1778: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1779: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN
1780: wip_logger.log(p_msg => 'populate_close_temp',
1781: x_returnStatus => l_return_Status);
1782: END IF;
1783: RAISE FND_API.G_EXC_ERROR ;

Line 1789: p_new_status => WIP_CONSTANTS.PEND_CLOSE ,

1785:
1786: /*Bug 6908428: Raise workflow notifications for eam workorders for status change to Pending close */
1787: EAM_WorkOrderTransactions_PUB.RAISE_WORKFLOW_STATUS_PEND_CLS(
1788: p_group_id => l_group_id ,
1789: p_new_status => WIP_CONSTANTS.PEND_CLOSE ,
1790: ERRBUF => l_errMsg ,
1791: RETCODE => l_return_status
1792: );
1793:

Line 1795: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN

1791: RETCODE => l_return_status
1792: );
1793:
1794: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1795: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN
1796: wip_logger.log(p_msg => 'error during eam update workflow to pending close' || l_errMsg,
1797: x_returnStatus => l_return_Status);
1798: END IF;
1799: RAISE FND_API.G_EXC_ERROR ;

Line 1804: SET status_type = WIP_CONSTANTS.PEND_CLOSE ,

1800: END IF;
1801: /*Bug 6908428*/
1802:
1803: UPDATE wip_discrete_jobs
1804: SET status_type = WIP_CONSTANTS.PEND_CLOSE ,
1805: request_id = fnd_global.conc_request_id ,
1806: last_update_date = sysdate,
1807: last_updated_by = fnd_global.user_id,
1808: last_update_login = fnd_global.login_id,

Line 1821: p_new_status => WIP_CONSTANTS.PEND_CLOSE,

1817: /*Bug 6908428: Updating the status in eam_work_order_details pending close for eam workorders */
1818: EAM_WorkOrderTransactions_PUB.Update_EWOD(
1819: p_group_id => l_group_id,
1820: p_organization_id => p_organization_id,
1821: p_new_status => WIP_CONSTANTS.PEND_CLOSE,
1822: ERRBUF => l_errMsg,
1823: RETCODE => l_return_status
1824: );
1825:

Line 1827: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN

1823: RETCODE => l_return_status
1824: );
1825:
1826: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1827: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN
1828: wip_logger.log(p_msg => 'eam update workoder error during pending close ' || l_errMsg,
1829: x_returnStatus => l_return_Status);
1830: END IF;
1831: RAISE FND_API.G_EXC_ERROR ;

Line 1870: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN

1866: x_warning := 1 ;
1867: --
1868: -- Bug 5345660 Added profile check before invoking wip_logger
1869: --
1870: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN
1871: wip_logger.log(p_msg => l_msg,
1872: x_returnStatus => l_return_Status);
1873: END IF;
1874: END IF;

Line 1912: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN

1908: x_warning := 1 ;
1909: --
1910: -- Bug 5345660 Added profile check before invoking wip_logger
1911: --
1912: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN
1913: wip_logger.log(p_msg => l_msg,
1914: x_returnStatus => l_return_Status);
1915: END IF;
1916: END IF;

Line 1938: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN

1934: x_warning := 1 ;
1935: --
1936: -- Bug 5345660 Added profile check before invoking wip_logger
1937: --
1938: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN
1939: wip_logger.log(p_msg => l_msg,
1940: x_returnStatus => l_return_Status);
1941: END IF;
1942: END IF;

Line 1965: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN

1961: x_warning := 1 ;
1962: --
1963: -- Bug 5345660 Added profile check before invoking wip_logger
1964: --
1965: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN
1966: wip_logger.log(p_msg => l_msg,
1967: x_returnStatus => l_return_Status);
1968: END IF;
1969: END IF;

Line 1991: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN

1987: x_warning := 1 ;
1988: --
1989: -- Bug 5345660 Added profile check before invoking wip_logger
1990: --
1991: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN
1992: wip_logger.log(p_msg => l_msg,
1993: x_returnStatus => l_return_Status);
1994: END IF;
1995: END IF;

Line 2018: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN

2014: l_msg := fnd_message.get;
2015: --
2016: -- Bug 5345660 Added profile check before invoking wip_logger
2017: --
2018: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN
2019: wip_logger.log(p_msg => l_msg,
2020: x_returnStatus => l_return_Status);
2021: END IF;
2022: END IF;

Line 2036: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN

2032: x_returnstatus => l_return_status,
2033: p_organization_id => p_organization_id,
2034: p_group_id => l_group_id );
2035: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2036: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN
2037: wip_logger.log(p_msg => 'LOT_VALIDATE procedure failed',
2038: x_returnStatus => l_return_Status);
2039: END IF;
2040: RAISE FND_API.G_EXC_ERROR ;

Line 2056: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN

2052: p_organization_id => p_organization_id,
2053: p_group_id => l_group_id );
2054:
2055: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2056: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN
2057: wip_logger.log(p_msg => 'DELETE_RESERVATIONS procedure failed',
2058: x_returnStatus => l_return_Status);
2059: END IF;
2060: END IF;

Line 2174: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN

2170: p_org_id => p_organization_id
2171: );
2172: -- Bug 5370550
2173: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2174: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN
2175: wip_logger.log(p_msg => 'costing function error',
2176: x_returnStatus => l_return_Status);
2177: END IF;
2178: RAISE FND_API.G_EXC_ERROR ;

Line 2187: p_new_status => WIP_CONSTANTS.CLOSED,

2183:
2184: /*Bug 6908428: updating the status of eam workorders in eam_work_order_details to closed and workflow update*/
2185: EAM_WorkOrderTransactions_PUB.RAISE_WORKFLOW_STATUS_PEND_CLS(
2186: p_group_id => l_group_id,
2187: p_new_status => WIP_CONSTANTS.CLOSED,
2188: ERRBUF => l_errMsg,
2189: RETCODE => l_return_Status
2190: );
2191:

Line 2193: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN

2189: RETCODE => l_return_Status
2190: );
2191:
2192: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2193: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN
2194: wip_logger.log(p_msg => 'error during eam update workflow to closed' || l_errMsg,
2195: x_returnStatus => l_return_Status);
2196: END IF;
2197: RAISE FND_API.G_EXC_ERROR ;

Line 2203: p_new_status => WIP_CONSTANTS.CLOSED,

2199:
2200: EAM_WorkOrderTransactions_PUB.Update_EWOD(
2201: p_group_id => l_group_id,
2202: p_organization_id => p_organization_id,
2203: p_new_status => WIP_CONSTANTS.CLOSED,
2204: ERRBUF => l_errMsg,
2205: RETCODE => l_return_status
2206: );
2207:

Line 2209: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN

2205: RETCODE => l_return_status
2206: );
2207:
2208: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2209: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN
2210: wip_logger.log(p_msg => 'eam update workoder error while job close' || l_errMsg,
2211: x_returnStatus => l_return_Status);
2212: END IF;
2213: RAISE FND_API.G_EXC_ERROR ;

Line 2229: STATUS_TYPE = WIP_CONSTANTS.CLOSED

2225: AND wdct.GROUP_ID = l_group_id),
2226: LAST_UPDATE_DATE = SYSDATE,
2227: last_updated_by = fnd_global.user_id,
2228: last_update_login = fnd_global.login_id,
2229: STATUS_TYPE = WIP_CONSTANTS.CLOSED
2230: WHERE ORGANIZATION_ID = p_organization_id
2231: AND WIP_ENTITY_ID IN (SELECT WIP_ENTITY_ID
2232: FROM WIP_DJ_CLOSE_TEMP
2233: WHERE ORGANIZATION_ID = p_organization_id

Line 2240: WIP_CONSTANTS.EAM,

2236:
2237: UPDATE WIP_ENTITIES
2238: SET ENTITY_TYPE = --DECODE(entity_type,6,7,5,8,3),
2239: DECODE(entity_type,
2240: WIP_CONSTANTS.EAM,
2241: WIP_CONSTANTS.CLOSED_EAM,
2242: WIP_CONSTANTS.LOTBASED ,
2243: WIP_CONSTANTS.CLOSED_OSFM ,
2244: WIP_CONSTANTS.CLOSED_DISC),

Line 2241: WIP_CONSTANTS.CLOSED_EAM,

2237: UPDATE WIP_ENTITIES
2238: SET ENTITY_TYPE = --DECODE(entity_type,6,7,5,8,3),
2239: DECODE(entity_type,
2240: WIP_CONSTANTS.EAM,
2241: WIP_CONSTANTS.CLOSED_EAM,
2242: WIP_CONSTANTS.LOTBASED ,
2243: WIP_CONSTANTS.CLOSED_OSFM ,
2244: WIP_CONSTANTS.CLOSED_DISC),
2245: LAST_UPDATE_DATE = SYSDATE,

Line 2242: WIP_CONSTANTS.LOTBASED ,

2238: SET ENTITY_TYPE = --DECODE(entity_type,6,7,5,8,3),
2239: DECODE(entity_type,
2240: WIP_CONSTANTS.EAM,
2241: WIP_CONSTANTS.CLOSED_EAM,
2242: WIP_CONSTANTS.LOTBASED ,
2243: WIP_CONSTANTS.CLOSED_OSFM ,
2244: WIP_CONSTANTS.CLOSED_DISC),
2245: LAST_UPDATE_DATE = SYSDATE,
2246: last_updated_by = fnd_global.user_id,

Line 2243: WIP_CONSTANTS.CLOSED_OSFM ,

2239: DECODE(entity_type,
2240: WIP_CONSTANTS.EAM,
2241: WIP_CONSTANTS.CLOSED_EAM,
2242: WIP_CONSTANTS.LOTBASED ,
2243: WIP_CONSTANTS.CLOSED_OSFM ,
2244: WIP_CONSTANTS.CLOSED_DISC),
2245: LAST_UPDATE_DATE = SYSDATE,
2246: last_updated_by = fnd_global.user_id,
2247: last_update_login = fnd_global.login_id

Line 2244: WIP_CONSTANTS.CLOSED_DISC),

2240: WIP_CONSTANTS.EAM,
2241: WIP_CONSTANTS.CLOSED_EAM,
2242: WIP_CONSTANTS.LOTBASED ,
2243: WIP_CONSTANTS.CLOSED_OSFM ,
2244: WIP_CONSTANTS.CLOSED_DISC),
2245: LAST_UPDATE_DATE = SYSDATE,
2246: last_updated_by = fnd_global.user_id,
2247: last_update_login = fnd_global.login_id
2248: WHERE ORGANIZATION_ID = p_organization_id

Line 2308: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN

2304:
2305: --
2306: -- Bug 5345660 exitPoint for normal exit.
2307: --
2308: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN
2309: wip_logger.exitPoint(
2310: p_procName => 'wip_close_priv.wip_close',
2311: p_procReturnStatus => x_returnStatus,
2312: p_msg => 'procedure normal exit',

Line 2328: p_new_status => WIP_CONSTANTS.FAIL_CLOSE,

2324:
2325: /*Bug 6908428: Update the status of eam_work_order_details to failed close and proceed workflow notification*/
2326: EAM_WorkOrderTransactions_PUB.RAISE_WORKFLOW_STATUS_PEND_CLS(
2327: p_group_id => l_group_id,
2328: p_new_status => WIP_CONSTANTS.FAIL_CLOSE,
2329: ERRBUF => l_errMsg,
2330: RETCODE => l_return_Status
2331: );
2332:

Line 2334: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN

2330: RETCODE => l_return_Status
2331: );
2332:
2333: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2334: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN
2335: wip_logger.log(p_msg => 'error during eam update workflow to fail closed' || l_errMsg,
2336: x_returnStatus => l_return_Status);
2337: END IF;
2338: RAISE FND_API.G_EXC_ERROR ;

Line 2344: p_new_status => WIP_CONSTANTS.FAIL_CLOSE,

2340:
2341: EAM_WorkOrderTransactions_PUB.Update_EWOD(
2342: p_group_id => l_group_id,
2343: p_organization_id => p_organization_id,
2344: p_new_status => WIP_CONSTANTS.FAIL_CLOSE,
2345: ERRBUF => l_errMsg,
2346: RETCODE => l_return_status
2347: );
2348:

Line 2350: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN

2346: RETCODE => l_return_status
2347: );
2348:
2349: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2350: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN
2351: wip_logger.log(p_msg => 'eam update workoder error during fail close' || l_errMsg,
2352: x_returnStatus => l_return_Status);
2353: END IF;
2354: RAISE FND_API.G_EXC_ERROR ;

Line 2364: STATUS_TYPE = WIP_CONSTANTS.FAIL_CLOSE

2360: UPDATE WIP_DISCRETE_JOBS wdj
2361: SET LAST_UPDATE_DATE = SYSDATE,
2362: last_updated_by = fnd_global.user_id,
2363: last_update_login = fnd_global.login_id,
2364: STATUS_TYPE = WIP_CONSTANTS.FAIL_CLOSE
2365: WHERE ORGANIZATION_ID = p_organization_id
2366: AND WIP_ENTITY_ID IN (SELECT WIP_ENTITY_ID
2367: FROM WIP_DJ_CLOSE_TEMP
2368: WHERE ORGANIZATION_ID = p_organization_id

Line 2381: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN

2377: --
2378: -- Bug 5345660 exitPoint for exception exit.
2379: --
2380: l_msg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
2381: IF fnd_log.g_current_runtime_level <= wip_constants.trace_logging THEN
2382: wip_logger.exitPoint(
2383: p_procName => 'wip_close_priv.wip_close',
2384: p_procReturnStatus => x_returnStatus,
2385: p_msg => l_msg,