DBA Data[Home] [Help]

APPS.WPS_COMMON dependencies on MRP_NET_RESOURCE_AVAIL

Line 68: * MRP_NET_RESOURCE_AVAIL if not already there.

64:
65:
66: /*
67: * Procedure that populates the resource availability into
68: * MRP_NET_RESOURCE_AVAIL if not already there.
69: */
70: PROCEDURE Populate_Resource_Avails (p_simulation_set IN VARCHAR2,
71: p_organization_id IN NUMBER,
72: p_start_date IN DATE,

Line 88: -- in MRP_NET_RESOURCE_AVAIL, then no need to call MRP again

84: p_errmesg := 'Success';
85:
86: if (p_reload = 0) then -- check if we want to refresh the data
87: -- Check to make sure that if the resource information is already inserted
88: -- in MRP_NET_RESOURCE_AVAIL, then no need to call MRP again
89: -- The p_start_date, p_cutoff_date can be modified by
90: -- resource_info_found_in_mrp function if this function
91: -- returns FALSE so that we can get a new from_date to
92: -- call MRP_RHX_RESOURCE_AVAILABILITY

Line 145: -- in MRP_NET_RESOURCE_AVAIL, then no need to call MRP again

141: p_errmesg := 'Success';
142:
143: if (p_reload = 0) then -- check if we want to refresh the data
144: -- Check to make sure that if the resource information is already inserted
145: -- in MRP_NET_RESOURCE_AVAIL, then no need to call MRP again
146: -- The p_start_date, p_cutoff_date can be modified by
147: -- resource_info_found_in_mrp function if this function
148: -- returns FALSE so that we can get a new from_date to
149: -- call MRP_RHX_RESOURCE_AVAILABILITY

Line 160: delete from mrp_net_resource_avail

156: end if;
157:
158: -- information not found in MRP, call MRP
159: if(p_delete_data = 1) then
160: delete from mrp_net_resource_avail
161: where organization_id = p_organization_id
162: and simulation_set = p_simulation_set
163: and trunc(shift_date) >= trunc(p_start_date)
164: and trunc(shift_date) <= trunc(p_cutoff_date);

Line 216: -- in MRP_NET_RESOURCE_AVAIL, then no need to call MRP again

212: p_errmesg := 'Success';
213:
214: if (p_reload = 0) then -- check if we want to refresh the data
215: -- Check to make sure that if the resource information is already inserted
216: -- in MRP_NET_RESOURCE_AVAIL, then no need to call MRP again
217: -- The p_start_date, p_cutoff_date can be modified by
218: -- resource_info_found_in_mrp function if this function
219: -- returns FALSE so that we can get a new from_date to
220: -- call MRP_RHX_RESOURCE_AVAILABILITY

Line 276: -- in MRP_NET_RESOURCE_AVAIL, then no need to call MRP again

272: p_errmesg := 'Success';
273:
274: if (p_reload = 0) then -- check if we want to refresh the data
275: -- Check to make sure that if the resource information is already inserted
276: -- in MRP_NET_RESOURCE_AVAIL, then no need to call MRP again
277: -- The p_start_date, p_cutoff_date can be modified by
278: -- resource_info_found_in_mrp function if this function
279: -- returns FALSE so that we can get a new from_date to
280: -- call MRP_RHX_RESOURCE_AVAILABILITY

Line 291: delete from mrp_net_resource_avail

287: end if;
288:
289: -- information not found in MRP, call MRP
290: if(p_delete_data = 1) then
291: delete from mrp_net_resource_avail
292: where organization_id = p_organization_id
293: and simulation_set = p_simulation_set
294: and trunc(shift_date) >= trunc(p_start_date)
295: and trunc(shift_date) <= trunc(p_cutoff_date);

Line 331: * MRP_NET_RESOURCE_AVAIL.

327:
328:
329: /*
330: * Procedure that populates the resource availability into
331: * MRP_NET_RESOURCE_AVAIL.
332: */
333: PROCEDURE Populate_Individual_Res_Avails (p_simulation_set IN VARCHAR2,
334: p_organization_id IN NUMBER,
335: p_resource_id IN NUMBER,

Line 353: delete from mrp_net_resource_avail

349: p_errmesg := 'Success';
350:
351: IF (p_reload <> 0) then
352: -- remove all entries for this resource and repopulate
353: delete from mrp_net_resource_avail
354: where organization_id = p_organization_id
355: and simulation_set = p_simulation_set
356: and resource_id = p_resource_id
357: and decode(p_department_id,null,-1,department_id) = nvl(p_department_id,-1);

Line 363: -- in MRP_NET_RESOURCE_AVAIL, then no need to call MRP again

359: --and trunc(shift_date) <= trunc(p_cutoff_date);
360:
361: ELSE
362: -- Check to make sure that if the resource information is already inserted
363: -- in MRP_NET_RESOURCE_AVAIL, then no need to call MRP again
364: -- The p_start_date, p_cutoff_date can be modified by
365: -- individual_res_info_found_in_mrp function if this function
366: -- returns FALSE so that we can get a new from_date and to_date to
367: -- call MRP_RHX_RESOURCE_AVAILABILITY

Line 401: * MRP_NET_RESOURCE_AVAIL.

397: END Populate_Individual_Res_Avails ;
398:
399: /*
400: * Procedure that populates the resource availability into
401: * MRP_NET_RESOURCE_AVAIL.
402: */
403: PROCEDURE Populate_Individual_Ins_Avails (p_simulation_set IN VARCHAR2,
404: p_organization_id IN NUMBER,
405: p_resource_id IN NUMBER,

Line 432: delete from mrp_net_resource_avail

428: to_char(p_cutoff_date));
429: */
430: IF (p_reload <> 0) then
431: -- remove all entries for this resource and repopulate
432: delete from mrp_net_resource_avail
433: where organization_id = p_organization_id
434: and simulation_set = p_simulation_set
435: and resource_id = p_resource_id
436: and instance_id = p_instance_id

Line 444: -- in MRP_NET_RESOURCE_AVAIL, then no need to call MRP again

440: --and trunc(shift_date) <= trunc(p_cutoff_date);
441:
442: ELSE
443: -- Check to make sure that if the resource information is already inserted
444: -- in MRP_NET_RESOURCE_AVAIL, then no need to call MRP again
445: -- The p_start_date, p_cutoff_date can be modified by
446: -- individual_res_info_found_in_mrp function if this function
447: -- returns FALSE so that we can get a new from_date and to_date to
448: -- call MRP_RHX_RESOURCE_AVAILABILITY

Line 487: * Basically delete the MRP_NET_RESOURCE_AVAIL table only for the date

483: END Populate_Individual_Ins_Avails ;
484:
485: /*
486: * Wrapper on top of MRP_RHX_RESOURCE_AVAILABILITY.calc_res_avail.
487: * Basically delete the MRP_NET_RESOURCE_AVAIL table only for the date
488: * range specified by p_start_date and p_cutoff_date and for the passed
489: * in simulation_set identifier.
490: */
491: PROCEDURE populate_mrp_avail_resources(p_simulation_set IN varchar2,

Line 580: delete from mrp_net_resource_avail

576:
577:
578: BEGIN
579: -- clean up the table for the date range first
580: delete from mrp_net_resource_avail
581: where organization_id = p_organization_id
582: and simulation_set = p_simulation_set
583: and trunc(shift_date) >= trunc(p_start_date)
584: and trunc(shift_date) <= trunc(p_cutoff_date);

Line 588: -- availability information into MRP_NET_RESOURCE_AVAIL

584: and trunc(shift_date) <= trunc(p_cutoff_date);
585:
586: -- open the cursor and loop through each department resource and call
587: -- MRP_RHX_RESOURCE_AVAILABILITY.calc_res_avail to insert resource
588: -- availability information into MRP_NET_RESOURCE_AVAIL
589: IF (p_wip_entity_id IS NULL) THEN
590: OPEN dept_res;
591: LOOP
592: FETCH dept_res into x_department_id,

Line 627: * Basically delete the MRP_NET_RESOURCE_AVAIL table only for the date

623:
624:
625: /*
626: * Wrapper on top of wps_res_instance_availability.calc_ins_avail.
627: * Basically delete the MRP_NET_RESOURCE_AVAIL table only for the date
628: * range specified by p_start_date and p_cutoff_date and for the passed
629: * in simulation_set identifier.
630: */
631: PROCEDURE populate_mrp_avail_res_inst

Line 775: delete from mrp_net_resource_avail

771:
772:
773: BEGIN
774: -- clean up the table for the date range first
775: delete from mrp_net_resource_avail
776: where organization_id = p_organization_id
777: and simulation_set = p_simulation_set
778: and trunc(shift_date) >= trunc(p_start_date)
779: and trunc(shift_date) <= trunc(p_cutoff_date);

Line 783: -- availability information into MRP_NET_RESOURCE_AVAIL

779: and trunc(shift_date) <= trunc(p_cutoff_date);
780:
781: -- open the cursor and loop through each department resource and call
782: -- MRP_RHX_RESOURCE_AVAILABILITY.calc_res_avail to insert resource
783: -- availability information into MRP_NET_RESOURCE_AVAIL
784: IF (p_wip_entity_id IS NULL) THEN
785: OPEN dept_ins;
786: LOOP
787: FETCH dept_ins into x_department_id,

Line 832: * Basically delete the MRP_NET_RESOURCE_AVAIL table only for the date

828:
829:
830: /*
831: * Wrapper on top of MRP_RHX_RESOURCE_AVAILABILITY.calc_res_avail.
832: * Basically delete the MRP_NET_RESOURCE_AVAIL table only for the date
833: * range specified by p_start_date and p_cutoff_date and for the passed
834: * in simulation_set identifier.
835: */
836: PROCEDURE populate_single_mrp_avail_res(p_simulation_set IN varchar2,

Line 861: -- availability information into MRP_NET_RESOURCE_AVAIL

857:
858: BEGIN
859: -- open the cursor and loop through each department resource and call
860: -- MRP_RHX_RESOURCE_AVAILABILITY.calc_res_avail to insert resource
861: -- availability information into MRP_NET_RESOURCE_AVAIL
862: OPEN dept_res;
863: LOOP
864: FETCH dept_res into x_department_id,
865: x_24hr_flag;

Line 883: * Basically delete the MRP_NET_RESOURCE_AVAIL table only for the date

879: END populate_single_mrp_avail_res;
880:
881: /*
882: * Wrapper on top of MRP_RHX_RESOURCE_AVAILABILITY.calc_res_avail.
883: * Basically delete the MRP_NET_RESOURCE_AVAIL table only for the date
884: * range specified by p_start_date and p_cutoff_date and for the passed
885: * in simulation_set identifier.
886: */
887: PROCEDURE populate_single_mrp_avail_ins(p_simulation_set IN varchar2,

Line 917: -- availability information into MRP_NET_RESOURCE_AVAIL

913:
914: BEGIN
915: -- open the cursor and loop through each department resource and call
916: -- MRP_RHX_RESOURCE_AVAILABILITY.calc_res_avail to insert resource
917: -- availability information into MRP_NET_RESOURCE_AVAIL
918: -- dbms_output.put_line('In populate single mrp avail ins.......');
919:
920: OPEN dept_ins;
921: LOOP

Line 942: * Function that checks against the MRP_NET_RESOURCE_AVAIL to see

938:
939: END populate_single_mrp_avail_ins;
940:
941: /*
942: * Function that checks against the MRP_NET_RESOURCE_AVAIL to see
943: * if the resource availability for the organization is already populated.
944: * If not, returns the p_from_date to the latest date in the table so
945: * that the caller can use the p_date_from and p_date_to to call MRP to
946: * populate the missing data

Line 958: -- fetch the max shift_date and min shift_date from mrp_net_resource_avail

954: max_date_to DATE;
955: status BOOLEAN := TRUE;
956: BEGIN
957:
958: -- fetch the max shift_date and min shift_date from mrp_net_resource_avail
959: -- for the specified org and simulation set
960: select trunc(min(shift_date)), trunc(max(shift_date))
961: into max_date_from, max_date_to
962: from mrp_net_resource_avail

Line 962: from mrp_net_resource_avail

958: -- fetch the max shift_date and min shift_date from mrp_net_resource_avail
959: -- for the specified org and simulation set
960: select trunc(min(shift_date)), trunc(max(shift_date))
961: into max_date_from, max_date_to
962: from mrp_net_resource_avail
963: where organization_id = p_organization_id
964: and simulation_set = p_simulation_set;
965:
966: if (max_date_from is NULL) then

Line 971: -- mrp_net_resource_avail or not, if not, set p_date_from and p_date_to

967: return FALSE;
968: end if;
969:
970: -- compare and see if the passed in start and from date are in the
971: -- mrp_net_resource_avail or not, if not, set p_date_from and p_date_to
972: -- to cover the date range that are not already in the mrp table
973: if (p_date_from < max_date_from) then
974: status := FALSE;
975: if (p_date_to <= max_date_to) then

Line 988: * Function that checks against the MRP_NET_RESOURCE_AVAIL to see

984:
985: END resource_info_found_in_mrp;
986:
987: /*
988: * Function that checks against the MRP_NET_RESOURCE_AVAIL to see
989: * if the resource availability for the organization is already populated.
990: * If not, returns the p_from_date to the latest date in the table so
991: * that the caller can use the p_date_from and p_date_to to call MRP to
992: * populate the missing data.

Line 1007: -- fetch the max shift_date and min shift_date from mrp_net_resource_avail

1003: max_date_to DATE;
1004: status BOOLEAN := TRUE;
1005: BEGIN
1006:
1007: -- fetch the max shift_date and min shift_date from mrp_net_resource_avail
1008: -- for the specified org and simulation set
1009: select trunc(min(shift_date)), trunc(max(shift_date))
1010: into max_date_from, max_date_to
1011: from mrp_net_resource_avail

Line 1011: from mrp_net_resource_avail

1007: -- fetch the max shift_date and min shift_date from mrp_net_resource_avail
1008: -- for the specified org and simulation set
1009: select trunc(min(shift_date)), trunc(max(shift_date))
1010: into max_date_from, max_date_to
1011: from mrp_net_resource_avail
1012: where organization_id = p_organization_id
1013: and simulation_set = p_simulation_set
1014: and resource_id = p_resource_id
1015: and instance_id is null

Line 1023: -- mrp_net_resource_avail or not, if not, set p_date_from and p_date_to

1019: return FALSE;
1020: end if;
1021:
1022: -- compare and see if the passed in start and from date are in the
1023: -- mrp_net_resource_avail or not, if not, set p_date_from and p_date_to
1024: -- to cover the date range that are not already in the mrp table
1025: if (p_date_from < max_date_from) then
1026: status := FALSE;
1027: if (p_date_to <= max_date_to) then

Line 1040: * Function that checks against the MRP_NET_RESOURCE_AVAIL to see

1036:
1037: END single_res_info_found_in_mrp;
1038:
1039: /*
1040: * Function that checks against the MRP_NET_RESOURCE_AVAIL to see
1041: * if the resource availability for the organization is already populated.
1042: * If not, returns the p_from_date to the latest date in the table so
1043: * that the caller can use the p_date_from and p_date_to to call MRP to
1044: * populate the missing data.

Line 1061: -- fetch the max shift_date and min shift_date from mrp_net_resource_avail

1057: max_date_to DATE;
1058: status BOOLEAN := TRUE;
1059: BEGIN
1060:
1061: -- fetch the max shift_date and min shift_date from mrp_net_resource_avail
1062: -- for the specified org and simulation set
1063: select trunc(min(shift_date)), trunc(max(shift_date))
1064: into max_date_from, max_date_to
1065: from mrp_net_resource_avail

Line 1065: from mrp_net_resource_avail

1061: -- fetch the max shift_date and min shift_date from mrp_net_resource_avail
1062: -- for the specified org and simulation set
1063: select trunc(min(shift_date)), trunc(max(shift_date))
1064: into max_date_from, max_date_to
1065: from mrp_net_resource_avail
1066: where organization_id = p_organization_id
1067: and simulation_set = p_simulation_set
1068: and resource_id = p_resource_id
1069: and instance_id = p_instance_id

Line 1078: -- mrp_net_resource_avail or not, if not, set p_date_from and p_date_to

1074: return FALSE;
1075: end if;
1076:
1077: -- compare and see if the passed in start and from date are in the
1078: -- mrp_net_resource_avail or not, if not, set p_date_from and p_date_to
1079: -- to cover the date range that are not already in the mrp table
1080: if (p_date_from < max_date_from) then
1081: status := FALSE;
1082: if (p_date_to <= max_date_to) then