DBA Data[Home] [Help]

APPS.MRP_SELECT_ALL_FOR_RELEASE_PUB dependencies on MRP_RECOMMENDATIONS

Line 65: | for update in mrp_recommendations and |

61: l_succ_rows := 0;
62:
63: /* --------------------------------------------------+
64: | Call function to select rows which will be included|
65: | for update in mrp_recommendations and |
66: | mrp_sugg_rep_schedules. |
67: +----------------------------------------------------*/
68:
69: l_no_rec_rows := select_rec_rows(l_where_clause);

Line 82: | Process rows in mrp_recommendations. |

78: update_pre_process_errors(l_no_rec_rows,
79: l_no_rep_rows);
80:
81: /*---------------------------------------------------+
82: | Process rows in mrp_recommendations. |
83: +----------------------------------------------------*/
84:
85:
86: if(l_no_rec_rows > 0) then

Line 90: | Update Attributes in MRP_RECOMMENDATIONS |

86: if(l_no_rec_rows > 0) then
87:
88:
89: /*---------------------------------------------------+
90: | Update Attributes in MRP_RECOMMENDATIONS |
91: +----------------------------------------------------*/
92:
93: update_recom_attrib(
94: l_employee_id,

Line 186: update mrp_recommendations

182: /*-----------------------------------------------------+
183: | Set All Old Error messages to Null. |
184: +------------------------------------------------------*/
185:
186: update mrp_recommendations
187: set release_errors = NULL
188: where transaction_id IN
189: (SELECT number1 from mrp_form_query
190: where

Line 201: update mrp_recommendations mr

197: +--------------------------------------------------- --*/
198:
199: l_mesg_str := FND_MESSAGE.GET_STRING('MRP', 'MRP_REL_ALL_MODEL');
200:
201: update mrp_recommendations mr
202: set release_errors = l_mesg_str
203: where transaction_id IN
204: (SELECT number1 from mrp_form_query
205: where

Line 215: update mrp_recommendations mr

211: where msi.compile_designator = mr.compile_designator
212: AND msi.bom_item_type in (1, 2, 3, 5));
213: --Bug3294041 Do not let user release Action=none records.
214: l_mesg_str := FND_MESSAGE.GET_STRING('MRP', 'MRP_REL_ACTION_NONE');
215: update mrp_recommendations mr
216: set release_errors = l_mesg_str
217: where transaction_id IN
218: (SELECT number1 from mrp_form_query
219: where

Line 246: update mrp_recommendations mr

242: +--------------------------------------------------------*/
243:
244: l_mesg_str := FND_MESSAGE.GET_STRING('MRP', 'MRP_REL_ALL_KANBAN');
245:
246: update mrp_recommendations mr
247: set release_errors = release_errors||l_mesg_str
248: where transaction_id IN
249: (SELECT number1 from mrp_form_query
250: where

Line 269: update mrp_recommendations mr

265: +---------------------------------------------------------------*/
266:
267: l_mesg_str := FND_MESSAGE.GET_STRING('MRP', 'MRP_REL_ALL_CUST_SUPP');
268:
269: update mrp_recommendations mr
270: set release_errors = release_errors||l_mesg_str
271: where transaction_id IN
272: (SELECT number1 from mrp_form_query
273: where

Line 285: update mrp_recommendations mr

281: +----------------------------------------------------------------*/
282:
283: l_mesg_str := FND_MESSAGE.GET_STRING('MRP', 'MRP_REL_ALL_IN_SOURCE_PLAN');
284:
285: update mrp_recommendations mr
286: set release_errors = release_errors||l_mesg_str
287: where transaction_id IN
288: (SELECT number1 from mrp_form_query
289: where

Line 303: update mrp_recommendations mr

299: l_mesg_str := FND_MESSAGE.GET_STRING('MRP', 'MRP_NO_FLOW_ROUTING');
300: -- bug 5462184: added check of source_vendor_id and organization_id in where clause
301: -- This will not allow release of recommendations whose source type is Make-At
302:
303: update mrp_recommendations mr
304: set release_errors = release_errors||l_mesg_str
305: where transaction_id IN
306: (SELECT number1 from mrp_form_query
307: where query_id = g_rec_query_id)

Line 403: * release. This is done for records in table mrp_recommendations. *

399:
400: /******************************************************************
401: * This function inserts rows in mrp_form_query for all the *
402: * transaction id of the records which need to be selected for *
403: * release. This is done for records in table mrp_recommendations. *
404: ******************************************************************/
405:
406: FUNCTION Select_Rec_Rows(p_where_clause IN VARCHAR2) return NUMBER
407: IS

Line 438: ' from mrp_recommendations mr' ||

434: '-1, '||
435: 'TRUNC(SYSDATE), '||
436: '-1, ' ||
437: 'mr.transaction_id ' ||
438: ' from mrp_recommendations mr' ||
439: ' where transaction_id IN ' ||
440: '(SELECT transaction_id from mrp_orders_sc_v ' ||
441: ' where ' ||
442: l_where_clause ||

Line 530: --- Updates Attributes in mrp_recommendations for records to be selected

526:
527: /***********************************************************************
528: * This procedure performs 2 sets of functions:
529:
530: --- Updates Attributes in mrp_recommendations for records to be selected
531: for release.
532:
533: --- Updated post processing errors to the release errors column
534: in mrp_recommendations. The errors are updated

Line 534: in mrp_recommendations. The errors are updated

530: --- Updates Attributes in mrp_recommendations for records to be selected
531: for release.
532:
533: --- Updated post processing errors to the release errors column
534: in mrp_recommendations. The errors are updated
535: in between attribut update statements. The order of these
536: SQL statements is of great significance, otherwise client side
537: field properties such (as REQUIRED/UPDATABLE are affected).
538: Indiscriminately changing the order will create Client Side

Line 588: update mrp_recommendations mr

584: /*-------------------------------------------------------------+
585: | Update implement as attribute for planned orders. |
586: +--------------------------------------------------------------*/
587:
588: update mrp_recommendations mr
589: set implement_as =
590: (select
591: mfg.lookup_code
592: from

Line 615: update mrp_recommendations mr

611: AND mr.implement_as IS NULL;
612: --
613: -- missed out in 115.16, bug 2601516
614: --
615: update mrp_recommendations mr
616: set implement_as =
617: (select
618: mfg.lookup_code
619: from mfg_lookups mfg,

Line 638: update mrp_recommendations mr

634: AND mr.status = 0
635: AND nvl(mr.applied, 0) = 2
636: AND mr.implement_as IS NULL;
637: --
638: update mrp_recommendations mr
639: set implement_status_code =
640: (select
641: orders_default_job_status
642: from mrp_workbench_display_options

Line 657: update mrp_recommendations mr

653: | default implement unit number for planned orders which are |
654: | unit number control.
655: ---------------------------------------------------------------*/
656:
657: update mrp_recommendations mr
658: set implement_end_item_unit_number =
659: nvl(implement_end_item_unit_number,end_item_unit_number)
660: where transaction_id in
661: (select number1 from mrp_form_query

Line 676: update mrp_recommendations mr

672: | for planned order which is unit number control |
673: ---------------------------------------------------------------*/
674:
675: l_mesg_str := fnd_message.get_string('MRP', 'MRP_REL_ALL_UNIT_NUMBER');
676: update mrp_recommendations mr
677: set release_errors = release_errors || l_mesg_str
678: where transaction_id in
679: (select number1 from mrp_form_query
680: where query_id=g_rec_query_id)

Line 689: | Update the following attributes in mrp_recommendations for |

685: where msi.compile_designator=mr.compile_designator
686: and msi.effectivity_control=2);
687:
688: /*--------------------------------------------------------------+
689: | Update the following attributes in mrp_recommendations for |
690: | Planned orders being implemented as Purchase Requisitions and |
691: | Purchase Requisitions being rescheduled. |
692: | |
693: +---------------------------------------------------------------*/

Line 695: update mrp_recommendations mr

691: | Purchase Requisitions being rescheduled. |
692: | |
693: +---------------------------------------------------------------*/
694:
695: update mrp_recommendations mr
696: set implement_location_id =
697: (select
698: hr.location_id
699: from hr_locations hr,

Line 719: update mrp_recommendations mr

715: +---------------------------------------------------------------*/
716:
717: l_mesg_str := FND_MESSAGE.GET_STRING('MRP', 'MRP_REL_ALL_LOCATION');
718:
719: update mrp_recommendations mr
720: set release_errors = release_errors || l_mesg_str
721: where transaction_id IN
722: (SELECT number1 from mrp_form_query
723: where

Line 733: update mrp_recommendations mr

729: if(l_employee_id is NULL) then
730:
731: l_mesg_str := FND_MESSAGE.GET_STRING('MRP', 'MRP_REL_ALL_EMPLOYEE');
732:
733: update mrp_recommendations mr
734: set release_errors = release_errors || l_mesg_str,
735: implement_as = NULL,
736: release_status = 2
737: where transaction_id IN

Line 748: | Update following attributes in mrp_recommendations |

744:
745: end if;
746:
747: /*------------------------------------------------------+
748: | Update following attributes in mrp_recommendations |
749: | for planned orders, purchase reqs and |
750: | discete jobs. |
751: | |
752: | implement job_name implement_employee_id |

Line 761: update mrp_recommendations mr

757: | implement_task_id rescheduled_flag |
758: | implement_firm |
759: +-------------------------------------------------------*/
760: --dbms_output.put_line('going ot implement_date');
761: update mrp_recommendations mr
762: SET
763: implement_date = nvl(mr.implement_date, relall_next_work_day(
764: mr.organization_id,
765: 1,

Line 795: update mrp_recommendations mr

791: +---------------------------------------------------------------*/
792:
793: l_mesg_str := FND_MESSAGE.GET_STRING('MRP', 'MRP_REL_ALL_IMPL_DATE');
794:
795: update mrp_recommendations mr
796: set release_errors = release_errors || l_mesg_str
797: where transaction_id IN
798: (SELECT number1 from mrp_form_query
799: where

Line 812: update mrp_recommendations mr

808: +---------------------------------------------------------------*/
809:
810: l_mesg_str := FND_MESSAGE.GET_STRING('MRP', 'MRP_REL_ALL_NO_PROJECT');
811:
812: update mrp_recommendations mr
813: set release_errors = release_errors || l_mesg_str
814: where transaction_id IN
815: (SELECT number1 from mrp_form_query
816: where

Line 829: update mrp_recommendations mr

825: and mp.organization_id = mr.organization_id);
826:
827: l_mesg_str := FND_MESSAGE.GET_STRING('MRP', 'MRP_REL_ALL_NO_TASK');
828:
829: update mrp_recommendations mr
830: set release_errors = release_errors || l_mesg_str
831: where transaction_id IN
832: (SELECT number1 from mrp_form_query
833: where

Line 846: | Update following attributes in mrp_recommendations |

842: and mp.project_reference_enabled = 1
843: and mp.organization_id = mr.organization_id);
844:
845: /*------------------------------------------------------+
846: | Update following attributes in mrp_recommendations |
847: | for planned orders, purchase reqs and |
848: | discete jobs. |
849: | |
850: | implement job_name implement_employee_id |

Line 859: update mrp_recommendations mr

855: | implement_task_id rescheduled_flag |
856: | implement_firm |
857: +-------------------------------------------------------*/
858:
859: update mrp_recommendations mr
860: SET
861: implement_quantity =
862: nvl(implement_quantity,
863: DECODE(mr.disposition_status_type,

Line 914: | Update the following attributes in mrp_recommendations for |

910: AND mr.release_errors IS NULL
911: AND mr.order_type IN (2, 3, 5);
912:
913: /*--------------------------------------------------------------+
914: | Update the following attributes in mrp_recommendations for |
915: | planned orders: |
916: | Quantity In Process Implement WIP Class Code |
917: +---------------------------------------------------------------*/
918:

Line 925: update mrp_recommendations mr

921: ** the quantity in process is already updated in the client and we don't
922: ** need to do it here.
923: */
924:
925: update mrp_recommendations mr
926: set quantity_in_process =
927: DECODE(mr.number1,
928: -9999, mr.quantity_in_process,
929: GREATEST(0,

Line 955: update mrp_recommendations mr

951:
952: /*-------------------------------------------------------------------+
953: | update load_type
954: +--------------------------------------------------------------------*/
955: update mrp_recommendations mr
956: SET
957: load_type =decode(order_type, 5, decode(implement_as, 3, 1, 2, 8, null),
958: 3, 4, 2, 16, null)
959: where transaction_id in

Line 968: update mrp_recommendations

964: /*--------------------------------------------------------------+
965: | Update attributes for Errored Records |
966: +---------------------------------------------------------------*/
967:
968: update mrp_recommendations
969: SET
970: implement_as = NULL,
971: implement_quantity = NULL,
972: implement_date = NULL,

Line 983: UPDATE mrp_recommendations

979: /*______________________________________________________________+
980: | Bug 1826152 Set Status And Applied fields for color change |
981: +_______________________________________________________________*/
982: --
983: UPDATE mrp_recommendations
984: SET status = 0,
985: applied = 2
986: WHERE order_type IN (2,3,5)
987: AND nvl(release_status,2) = 1

Line 1091: * mrp_recommendations and mrp_sugg_rep_schedules. *

1087:
1088:
1089: /******************************************************************
1090: * Function to find number of records with release errors in *
1091: * mrp_recommendations and mrp_sugg_rep_schedules. *
1092: ******************************************************************/
1093:
1094: FUNCTION Count_Row_Errors return NUMBER IS
1095: l_rep_errors NUMBER;

Line 1108: from mrp_recommendations

1104: SELECT
1105: count(1)
1106: into
1107: l_rec_errors
1108: from mrp_recommendations
1109: where transaction_id IN
1110: (SELECT number1 from mrp_form_query
1111: where
1112: query_id = g_rec_query_id)

Line 1661: update mrp_recommendations mr set

1657: l_wip_job_prefix := FND_PROFILE.VALUE('WIP_JOB_PREFIX');
1658:
1659: select userenv('SESSIONID') into l_session_id from dual;
1660:
1661: update mrp_recommendations mr set
1662: implement_job_name = l_wip_job_prefix||to_char(wip_job_number_s.nextval)
1663: where implement_job_name=to_char(l_session_id)
1664: and mr.implement_as =3
1665: --and mr.organization_id=arg_org_id /*5735558*/

Line 1689: update mrp_recommendations mru set implement_job_name = l_wip_job_prefix||to_char(wip_job_number_s.nextval)

1685: BEGIN
1686:
1687: l_wip_job_prefix := FND_PROFILE.VALUE('WIP_JOB_PREFIX');
1688:
1689: update mrp_recommendations mru set implement_job_name = l_wip_job_prefix||to_char(wip_job_number_s.nextval)
1690: where 1 < (select count(*)
1691: FROM mrp_recommendations mr
1692: WHERE mr.release_errors is NULL
1693: AND mr.implement_quantity > 0

Line 1691: FROM mrp_recommendations mr

1687: l_wip_job_prefix := FND_PROFILE.VALUE('WIP_JOB_PREFIX');
1688:
1689: update mrp_recommendations mru set implement_job_name = l_wip_job_prefix||to_char(wip_job_number_s.nextval)
1690: where 1 < (select count(*)
1691: FROM mrp_recommendations mr
1692: WHERE mr.release_errors is NULL
1693: AND mr.implement_quantity > 0
1694: -- AND mr.organization_id = arg_org_id
1695: AND mr.compile_designator = arg_compile_desig