DBA Data[Home] [Help]

APPS.BOM_REVISION_API dependencies on MTL_ITEM_REVISIONS

Line 11: | MTL_ITEM_REVISIONS_INTERFACE table. |

7: | |
8: | File Name : BOMOIRVB.pls |
9: | DESCRIPTION : This package contains functions used to assign, validate |
10: | and transact Item Revision data in the |
11: | MTL_ITEM_REVISIONS_INTERFACE table. |
12: | Parameters: org_id organization_id |
13: | all_org process all orgs or just current org |
14: | 1 - all orgs |
15: | 2 - only org_id |

Line 34: MTL_ITEM_REVISIONS_INTERFACE

30: Assign defaults and ID's to item revision record in the interface table
31: REQUIRES
32: err_text out buffer to return error message
33: MODIFIES
34: MTL_ITEM_REVISIONS_INTERFACE
35: MTL_INTERFACE_ERRORS
36: RETURNS
37: 0 if successful
38: SQLCODE if unsuccessful

Line 63: FROM mtl_item_revisions_interface

59: SELECT organization_code OC, organization_id OI,
60: revision R, inventory_item_id III, item_number IIN,
61: transaction_id TI, implementation_date ID, effectivity_date ED,
62: transaction_type A
63: FROM mtl_item_revisions_interface
64: WHERE process_flag = 1
65: and transaction_type in (G_Insert, G_Update)
66: and (all_org = 1
67: OR

Line 75: UPDATE mtl_item_revisions_interface

71: BEGIN
72: /** G_INSERT is 'CREATE'. Update 'INSERT' to 'CREATE' **/
73: stmt_num := 0.5 ;
74: LOOP
75: UPDATE mtl_item_revisions_interface
76: SET transaction_type = G_Insert
77: WHERE process_flag = 1
78: AND upper(transaction_type) = 'INSERT'
79: AND rownum < G_rows_to_commit;

Line 89: UPDATE mtl_item_revisions_interface ori

85: ** ALL INSERTS and UPDATES - Assign Org Id
86: */
87: stmt_num := 1;
88: LOOP
89: UPDATE mtl_item_revisions_interface ori
90: SET organization_id = (SELECT organization_id
91: FROM mtl_parameters a
92: WHERE a.organization_code = ori.organization_code)
93: WHERE process_flag = 1

Line 110: UPDATE mtl_item_revisions_interface

106: ** FOR INSERTS and UPDATES - Assign transaction ids
107: */
108: stmt_num := 2;
109: LOOP
110: UPDATE mtl_item_revisions_interface
111: SET transaction_id = mtl_system_items_interface_s.nextval,
112: transaction_type = upper(transaction_type)
113: WHERE transaction_id is null
114: and process_flag = 1

Line 138: tbl_name => 'MTL_ITEM_REVISIONS_INTERFACE',

134: prog_id => prog_id,
135: req_id => req_id,
136: trans_id => c1rec.TI,
137: error_text => err_text,
138: tbl_name => 'MTL_ITEM_REVISIONS_INTERFACE',
139: msg_name => 'BOM_ORG_ID_MISSING',
140: err_text => err_text);
141: UPDATE mtl_item_revisions_interface
142: SET process_flag = 3

Line 141: UPDATE mtl_item_revisions_interface

137: error_text => err_text,
138: tbl_name => 'MTL_ITEM_REVISIONS_INTERFACE',
139: msg_name => 'BOM_ORG_ID_MISSING',
140: err_text => err_text);
141: UPDATE mtl_item_revisions_interface
142: SET process_flag = 3
143: WHERE transaction_id = c1rec.TI;
144:
145: GOTO continue_loop;

Line 169: tbl_name => 'MTL_ITEM_REVISIONS_INTERFACE',

165: prog_id => prog_id,
166: req_id => req_id,
167: trans_id => c1rec.TI,
168: error_text => err_text,
169: tbl_name => 'MTL_ITEM_REVISIONS_INTERFACE',
170: msg_name => 'BOM_INV_ITEM_ID_MISSING',
171: err_text => err_text);
172: UPDATE mtl_item_revisions_interface
173: SET process_flag = 3

Line 172: UPDATE mtl_item_revisions_interface

168: error_text => err_text,
169: tbl_name => 'MTL_ITEM_REVISIONS_INTERFACE',
170: msg_name => 'BOM_INV_ITEM_ID_MISSING',
171: err_text => err_text);
172: UPDATE mtl_item_revisions_interface
173: SET process_flag = 3
174: WHERE transaction_id = c1rec.TI;
175:
176: IF (ret_code <> 0) THEN

Line 188: UPDATE mtl_item_revisions_interface

184: */
185: IF (c1rec.A = G_Insert) THEN
186: /* For Inserts */
187: stmt_num := 5;
188: UPDATE mtl_item_revisions_interface
189: SET organization_id = nvl(organization_id, c1rec.OI),
190: inventory_item_id = nvl(inventory_item_id, c1rec.III),
191: revision = UPPER(c1rec.R),
192: process_flag = 2,

Line 215: UPDATE mtl_item_revisions_interface

211: END IF;
212: ELSE
213: /* For Updates */
214: stmt_num := 6;
215: UPDATE mtl_item_revisions_interface
216: SET organization_id = nvl(organization_id, c1rec.OI),
217: inventory_item_id = nvl(inventory_item_id, c1rec.III),
218: revision = UPPER(c1rec.R),
219: process_flag = 2,

Line 285: FROM mtl_item_revisions_interface

281: IS
282: CURSOR c1 is
283: SELECT revision R, effectivity_date ED,
284: transaction_id TI, transaction_type TT
285: FROM mtl_item_revisions_interface
286: WHERE organization_id = org_id
287: and inventory_item_id = assy_id
288: and transaction_type in (G_Insert, G_Update)
289: and process_flag = 99;

Line 304: FROM mtl_item_revisions_interface a

300: ** FOR INSERTS and UPDATES - Check for ascending order and identical revs
301: */
302: SELECT count(*)
303: INTO err_cnt
304: FROM mtl_item_revisions_interface a
305: WHERE transaction_id <> c1rec.TI
306: and inventory_item_id = assy_id
307: and organization_id = org_id
308: and process_flag = 4

Line 328: FROM mtl_item_revisions mir

324: stmt_num := 2;
325: IF (c1rec.TT = G_Insert) THEN
326: SELECT count(*)
327: INTO err_cnt
328: FROM mtl_item_revisions mir
329: WHERE inventory_item_id = assy_id
330: and organization_id = org_id
331: and NOT EXISTS (select 'x'
332: from mtl_item_revisions_interface miri

Line 332: from mtl_item_revisions_interface miri

328: FROM mtl_item_revisions mir
329: WHERE inventory_item_id = assy_id
330: and organization_id = org_id
331: and NOT EXISTS (select 'x'
332: from mtl_item_revisions_interface miri
333: where miri.inventory_item_id = mir.inventory_item_id
334: and miri.organization_id = mir.organization_id
335: and miri.revision = mir.revision
336: and miri.process_flag = 4)

Line 355: FROM mtl_item_revisions mir

351: */
352: stmt_num := 3;
353: SELECT count(*)
354: INTO err_cnt
355: FROM mtl_item_revisions mir
356: WHERE inventory_item_id = assy_id
357: and organization_id = org_id
358: and revision <> c1rec.R
359: and NOT EXISTS (select 'x'

Line 360: from mtl_item_revisions_interface miri

356: WHERE inventory_item_id = assy_id
357: and organization_id = org_id
358: and revision <> c1rec.R
359: and NOT EXISTS (select 'x'
360: from mtl_item_revisions_interface miri
361: where miri.inventory_item_id = mir.inventory_item_id
362: and miri.organization_id = mir.organization_id
363: and miri.revision = mir.revision
364: and miri.process_flag = 4)

Line 377: UPDATE mtl_item_revisions_interface

373: END IF;
374: END IF;
375:
376: stmt_num := 4;
377: UPDATE mtl_item_revisions_interface
378: SET process_flag = 4
379: WHERE transaction_id = c1rec.TI;
380: GOTO continue_loop;
381:

Line 392: tbl_name => 'MTL_ITEM_REVISIONS_INTERFACE',

388: prog_id => prog_id,
389: req_id => req_id,
390: trans_id => c1rec.TI,
391: error_text => err_text,
392: tbl_name => 'MTL_ITEM_REVISIONS_INTERFACE',
393: msg_name => 'BOM_REV_INVALID',
394: err_text => err_text);
395: UPDATE mtl_item_revisions_interface
396: SET process_flag = 3

Line 395: UPDATE mtl_item_revisions_interface

391: error_text => err_text,
392: tbl_name => 'MTL_ITEM_REVISIONS_INTERFACE',
393: msg_name => 'BOM_REV_INVALID',
394: err_text => err_text);
395: UPDATE mtl_item_revisions_interface
396: SET process_flag = 3
397: WHERE transaction_id = c1rec.TI;
398: <>
399: null;

Line 485: from mtl_item_revisions_interface

481: CURSOR c0 IS
482: select inventory_item_id AII, organization_id OI,
483: revision R, transaction_id TI,
484: change_notice CN
485: from mtl_item_revisions_interface
486: where process_flag = 2
487: and transaction_type = G_Insert
488: and rownum < G_rows_to_commit;
489: /*

Line 494: from mtl_item_revisions_interface

490: ** All "Insert" and "Update" records grouped by Item
491: */
492: CURSOR c1 IS
493: select inventory_item_id AII, organization_id OI
494: from mtl_item_revisions_interface
495: where process_flag = 99
496: and transaction_type in (G_Insert, G_Update)
497: group by organization_id, inventory_item_id;
498:

Line 515: from mtl_item_revisions_interface

511: attribute11 A11, attribute12 A12, attribute13 A13,
512: attribute14 A14, attribute15 A15, request_id RI,
513: program_application_id PAI, program_id PI,
514: program_update_date PUD, description D
515: from mtl_item_revisions_interface
516: where process_flag = 2
517: and transaction_type = G_Update
518: and rownum < G_rows_to_commit;
519:

Line 554: FROM mtl_item_revisions

550: X_attribute14, X_attribute15, X_request_id,
551: X_program_application_id, X_program_id,
552: X_program_update_date, X_revised_item_sequence_id,
553: X_description
554: FROM mtl_item_revisions
555: WHERE organization_id = c3rec.OI
556: and inventory_item_id = c3rec.III
557: and revision = c3rec.R
558: and implementation_date is NOT NULL;

Line 570: tbl_name => 'MTL_ITEM_REVISIONS_INTERFACE',

566: prog_id => prog_id,
567: req_id => req_id,
568: trans_id => c3rec.TI,
569: error_text => err_text,
570: tbl_name => 'MTL_ITEM_REVISIONS_INTERFACE',
571: msg_name => 'BOM_REV_RECORD_MISSING',
572: err_text => err_text);
573:
574: UPDATE mtl_item_revisions_interface

Line 574: UPDATE mtl_item_revisions_interface

570: tbl_name => 'MTL_ITEM_REVISIONS_INTERFACE',
571: msg_name => 'BOM_REV_RECORD_MISSING',
572: err_text => err_text);
573:
574: UPDATE mtl_item_revisions_interface
575: SET process_flag = 3
576: WHERE transaction_id = c3rec.TI;
577:
578: IF (ret_code <> 0) THEN

Line 600: tbl_name => 'MTL_ITEM_REVISIONS_INTERFACE',

596: prog_id => prog_id,
597: req_id => req_id,
598: trans_id => c3rec.TI,
599: error_text => err_text,
600: tbl_name => 'MTL_ITEM_REVISIONS_INTERFACE',
601: msg_name => 'BOM_COLUMN_NOT_UPDATABLE',
602: err_text => err_text);
603:
604: UPDATE mtl_item_revisions_interface

Line 604: UPDATE mtl_item_revisions_interface

600: tbl_name => 'MTL_ITEM_REVISIONS_INTERFACE',
601: msg_name => 'BOM_COLUMN_NOT_UPDATABLE',
602: err_text => err_text);
603:
604: UPDATE mtl_item_revisions_interface
605: SET process_flag = 3
606: WHERE transaction_id = c3rec.TI;
607:
608: IF (ret_code <> 0) THEN

Line 618: UPDATE mtl_item_revisions_interface

614: ** Update interface record with production record's values
615: */
616:
617: stmt_num := 3;
618: UPDATE mtl_item_revisions_interface
619: SET creation_date = X_creation_date,
620: created_by = X_created_by,
621: change_notice = X_change_notice,
622: ecn_initiation_date = X_ecn_initiation_date,

Line 707: tbl_name => 'MTL_ITEM_REVISIONS_INTERFACE',

703: prog_id => prog_id,
704: req_id => req_id,
705: trans_id => c0rec.TI,
706: error_text => err_text,
707: tbl_name => 'MTL_ITEM_REVISIONS_INTERFACE',
708: msg_name => 'BOM_NULL_REV',
709: err_text => err_text);
710:
711: UPDATE mtl_item_revisions_interface

Line 711: UPDATE mtl_item_revisions_interface

707: tbl_name => 'MTL_ITEM_REVISIONS_INTERFACE',
708: msg_name => 'BOM_NULL_REV',
709: err_text => err_text);
710:
711: UPDATE mtl_item_revisions_interface
712: SET process_flag = 3
713: WHERE transaction_id = c0rec.TI;
714:
715: IF (ret_code <> 0) THEN

Line 741: tbl_name => 'MTL_ITEM_REVISIONS_INTERFACE',

737: prog_id => prog_id,
738: req_id => req_id,
739: trans_id => c0rec.TI,
740: error_text => err_text,
741: tbl_name => 'MTL_ITEM_REVISIONS_INTERFACE',
742: msg_name => 'BOM_INVALID_ORG_ID',
743: err_text => err_text);
744:
745: UPDATE mtl_item_revisions_interface

Line 745: UPDATE mtl_item_revisions_interface

741: tbl_name => 'MTL_ITEM_REVISIONS_INTERFACE',
742: msg_name => 'BOM_INVALID_ORG_ID',
743: err_text => err_text);
744:
745: UPDATE mtl_item_revisions_interface
746: SET process_flag = 3
747: WHERE transaction_id = c0rec.TI;
748:
749: IF (ret_code <> 0) THEN

Line 776: tbl_name => 'MTL_ITEM_REVISIONS_INTERFACE',

772: prog_id => prog_id,
773: req_id => req_id,
774: trans_id => c0rec.TI,
775: error_text => err_text,
776: tbl_name => 'MTL_ITEM_REVISIONS_INTERFACE',
777: msg_name => 'BOM_INV_ITEM_INVALID',
778: err_text => err_text);
779: UPDATE mtl_item_revisions_interface
780: SET process_flag = 3

Line 779: UPDATE mtl_item_revisions_interface

775: error_text => err_text,
776: tbl_name => 'MTL_ITEM_REVISIONS_INTERFACE',
777: msg_name => 'BOM_INV_ITEM_INVALID',
778: err_text => err_text);
779: UPDATE mtl_item_revisions_interface
780: SET process_flag = 3
781: WHERE transaction_id = c0rec.TI;
782:
783: IF (ret_code <> 0) THEN

Line 813: tbl_name => 'MTL_ITEM_REVISIONS_INTERFACE',

809: prog_id => prog_id,
810: req_id => req_id,
811: trans_id => c0rec.TI,
812: error_text => err_text,
813: tbl_name => 'MTL_ITEM_REVISIONS_INTERFACE',
814: msg_name => 'ENG_PARENTECO_NOT_EXIST',
815: err_text => err_text);
816: UPDATE mtl_item_revisions_interface
817: SET process_flag = 3

Line 816: UPDATE mtl_item_revisions_interface

812: error_text => err_text,
813: tbl_name => 'MTL_ITEM_REVISIONS_INTERFACE',
814: msg_name => 'ENG_PARENTECO_NOT_EXIST',
815: err_text => err_text);
816: UPDATE mtl_item_revisions_interface
817: SET process_flag = 3
818: WHERE transaction_id = c0rec.TI;
819:
820: IF (ret_code <> 0) THEN

Line 828: UPDATE mtl_item_revisions_interface

824: END;
825: END IF;
826:
827: stmt_num := 8;
828: UPDATE mtl_item_revisions_interface
829: SET process_flag = 99
830: WHERE transaction_id = c0rec.TI;
831:
832: <>

Line 888: table, MTL_ITEM_REVISIONS_INTERFACE, into the production table,

884: NAME
885: Transact_Item_Revision
886: DESCRIPTION
887: Insert and update item revision data from the interface
888: table, MTL_ITEM_REVISIONS_INTERFACE, into the production table,
889: MTL_ITEM_REVISIONS.
890: REQUIRES
891: prog_appid Program application id
892: prog_id Program id

Line 889: MTL_ITEM_REVISIONS.

885: Transact_Item_Revision
886: DESCRIPTION
887: Insert and update item revision data from the interface
888: table, MTL_ITEM_REVISIONS_INTERFACE, into the production table,
889: MTL_ITEM_REVISIONS.
890: REQUIRES
891: prog_appid Program application id
892: prog_id Program id
893: req_id Request id

Line 897: MTL_ITEM_REVISIONS_INTERFACE

893: req_id Request id
894: user_id User id
895: login_id Login id
896: MODIFIES
897: MTL_ITEM_REVISIONS_INTERFACE
898: MTL_ITEM_REVISIONS
899: RETURNS
900: 0 if successful
901: SQLCODE if error

Line 898: MTL_ITEM_REVISIONS

894: user_id User id
895: login_id Login id
896: MODIFIES
897: MTL_ITEM_REVISIONS_INTERFACE
898: MTL_ITEM_REVISIONS
899: RETURNS
900: 0 if successful
901: SQLCODE if error
902: NOTES

Line 931: FROM mtl_item_revisions_interface

927: attribute11 A11, attribute12 A12, attribute13 A13,
928: attribute14 A14, attribute15 A15, request_id RI,
929: program_application_id PAI, program_id PI,
930: program_update_date PUD, description D, transaction_id TI
931: FROM mtl_item_revisions_interface
932: WHERE process_flag = 4
933: AND transaction_type = G_Update
934: AND rownum < G_rows_to_commit;
935: BEGIN

Line 941: INSERT INTO mtl_item_revisions

937: ** Insert Item Revisions
938: */
939: stmt_num := 1;
940: LOOP
941: INSERT INTO mtl_item_revisions
942: (
943: INVENTORY_ITEM_ID,
944: ORGANIZATION_ID,
945: REVISION,

Line 1008: FROM mtl_item_revisions_interface

1004: PROGRAM_ID,
1005: PROGRAM_UPDATE_DATE,
1006: REQUEST_ID,
1007: DESCRIPTION
1008: FROM mtl_item_revisions_interface
1009: WHERE process_flag = 4
1010: and transaction_type = G_Insert
1011: and rownum < 500;
1012:

Line 1016: UPDATE mtl_item_revisions_interface mri

1012:
1013: EXIT when SQL%NOTFOUND;
1014:
1015: stmt_num := 2;
1016: UPDATE mtl_item_revisions_interface mri
1017: SET process_flag = 7
1018: WHERE process_flag = 4
1019: and transaction_type = G_Insert
1020: and EXISTS (SELECT NULL

Line 1021: FROM mtl_item_revisions mir

1017: SET process_flag = 7
1018: WHERE process_flag = 4
1019: and transaction_type = G_Insert
1020: and EXISTS (SELECT NULL
1021: FROM mtl_item_revisions mir
1022: WHERE mir.inventory_item_id = mri.inventory_item_id
1023: AND mir.organization_id = mri.organization_id
1024: AND mir.revision = mri.revision);
1025: stmt_num := 3;

Line 1038: UPDATE mtl_item_revisions

1034: WHILE continue_loop LOOP
1035: commit_cnt := 0;
1036: FOR c1rec IN c1 LOOP
1037: commit_cnt := commit_cnt + 1;
1038: UPDATE mtl_item_revisions
1039: SET last_update_date = c1rec.LUD,
1040: last_updated_by = c1rec.LUB,
1041: last_update_login = c1rec.LUL,
1042: implementation_date = c1rec.ID,

Line 1070: UPDATE mtl_item_revisions_interface mri

1066: AND organization_id = c1rec.OI
1067: AND revision = c1rec.R;
1068:
1069: stmt_num := 5;
1070: UPDATE mtl_item_revisions_interface mri
1071: SET process_flag = 7
1072: WHERE transaction_id = c1rec.TI;
1073: END LOOP;
1074:

Line 1101: interface table, MTL_ITEM_REVISIONS_INTERFACE.

1097: NAME
1098: Import_Item_Revision
1099: DESCRIPTION
1100: Assign, Validate, and Transact the Item Revision record in the
1101: interface table, MTL_ITEM_REVISIONS_INTERFACE.
1102: REQUIRES
1103: err_text out buffer to return error message
1104: MODIFIES
1105: RETURNS

Line 1180: DELETE from mtl_item_revisions_interface

1176:
1177: stmt_num := 4;
1178: IF (del_rec_flag = 1) THEN
1179: LOOP
1180: DELETE from mtl_item_revisions_interface
1181: WHERE process_flag = 7
1182: AND rownum < G_rows_to_commit;
1183:
1184: EXIT when SQL%NOTFOUND;