{"id":593,"date":"2011-01-11T10:18:29","date_gmt":"2011-01-11T07:18:29","guid":{"rendered":"https:\/\/enginhafizoglu.com\/?p=593"},"modified":"2011-09-29T10:17:11","modified_gmt":"2011-09-29T07:17:11","slug":"creating-maintenance-activities-with-mtl_system_items_interface","status":"publish","type":"post","link":"https:\/\/enginhafizoglu.com\/?p=593","title":{"rendered":"Creating Maintenance Activities with MTL_SYSTEM_ITEMS_INTERFACE"},"content":{"rendered":"<p>We create custom table for inserting datas into the mtl_system_items_iterface table. I create an excel sheet and it has same columns with &#8220;<span style=\"color: red;\">xx_item_create<\/span>&#8221; table. Then for inserting data into the XX_ITEM_CREATE table, I use the program &#8220;<span style=\"color: red;\">Toad<\/span>&#8220;. The path is Database &gt; Import &gt; Import Table Data. You can insert the datas from excel to database table using this Import Table Data function. (<span style=\"color: red;\">Don&#8217;t use this function for the standard oracle tables!!!<\/span>) <!--more--><\/p>\n<p>[sql]CREATE TABLE APPS.XX_ITEM_CREATE(<br \/>\nORG_CODE VARCHAR2(3 BYTE),<br \/>\nACTIVITY_CODE VARCHAR2(40 BYTE),<br \/>\nACTIVITY_DESCRIPTION VARCHAR2(240 BYTE),<br \/>\nTEMPLATE VARCHAR2(30 BYTE),<br \/>\nPRIMARY_UOM_CODE VARCHAR2(25 BYTE),<br \/>\nEAM_ACTIVITY_TYPE_CODE VARCHAR2(30 BYTE),<br \/>\nEAM_ACTIVITY_SOURCE_CODE VARCHAR2(30 BYTE),<br \/>\nEAM_ACTIVITY_CAUSE_CODE VARCHAR2(30 BYTE),<br \/>\nEAM_ACT_SHUTDOWN_STATUS VARCHAR2(30 BYTE),<br \/>\nITEM_CATEGORY VARCHAR2(240 BYTE)) ;[\/sql]<\/p>\n<p>Then we insert the data into the mtl_system_items_iterface using above table.<\/p>\n<p>[sql]INSERT INTO inv.mtl_system_items_interface msii<br \/>\n(MSII.ORGANIZATION_CODE,<br \/>\nMSII.SET_PROCESS_ID,<br \/>\nMSII.TRANSACTION_TYPE,<br \/>\nMSII.PROCESS_FLAG,<br \/>\nMSII.SEGMENT1,<br \/>\nMSII.DESCRIPTION,<br \/>\nMSII.TEMPLATE_ID,<br \/>\nMSII.PRIMARY_UOM_CODE,<br \/>\nMSII.EAM_ACTIVITY_CAUSE_CODE,<br \/>\nMSII.EAM_ACTIVITY_TYPE_CODE,<br \/>\nMSII.EAM_ACTIVITY_SOURCE_CODE,<br \/>\nMSII.EAM_ACT_SHUTDOWN_STATUS,<br \/>\nMSII.CREATE_SUPPLY_FLAG,<br \/>\nMSII.TRACKING_QUANTITY_IND,<br \/>\nMSII.ONT_PRICING_QTY_SOURCE,<br \/>\nMSII.DUAL_UOM_DEVIATION_HIGH,<br \/>\nMSII.DUAL_UOM_DEVIATION_LOW)<br \/>\n(SELECT xxinn.org_code organization_code,<br \/>\n123456 set_process_id,<br \/>\n&#8216;CREATE&#8217; transaction_type,<br \/>\n1 process_flag,<br \/>\nxxinn.ACTIVITY_CODE segment1,<br \/>\nxxinn.ACTIVITY_DESCRIPTION DESCRIPTION,<br \/>\n19 TEMPLATE_ID,&#8211;@Activity template id<br \/>\nXXINN.PRIMARY_UOM_CODE PRIMARY_UNIT_OF_MEASURE,<br \/>\nFLV.LOOKUP_CODE ACTIVITY_CAUSE_CODE,<br \/>\nFLV1.LOOKUP_CODE ACTIVITY_TYPE_CODE,<br \/>\nFLV2.LOOKUP_CODE ACTIVITY_SOURCE_CODE,<br \/>\nDECODE (xxinn.EAM_ACT_SHUTDOWN_STATUS,<br \/>\n&#8216;Gerekli De\u011fil&#8217;, 1, &#8216;Gerekli&#8217;, 2, NULL) EAM_ACT_SHUTDOWN_STATUS,<br \/>\n&#8216;Y&#8217; CREATE_SUPPLY_FLAG,<br \/>\n&#8216;P&#8217; TRACKING_QUANTITY_IND,<br \/>\n&#8216;P&#8217; ONT_PRICING_QTY_SOURCE,<br \/>\n0,<br \/>\n0<br \/>\nFROM APPS.XX_ITEM_CREATE XXINN,<br \/>\napplsys.fnd_lookup_values flv,<br \/>\napplsys.fnd_lookup_values flv1,<br \/>\napplsys.fnd_lookup_values flv2<br \/>\nWHERE 1 = 1<br \/>\nAND flv.lookup_type(+) = &#8216;MTL_EAM_ACTIVITY_CAUSE&#8217;<br \/>\nAND XXINN.EAM_ACTIVITY_CAUSE_CODE = flv.meaning(+)<br \/>\nAND flv.LANGUAGE(+) = &#8216;TR&#8217;<br \/>\nAND flv1.lookup_type(+) = &#8216;MTL_EAM_ACTIVITY_TYPE&#8217;<br \/>\nAND XXINN. EAM_ACTIVITY_TYPE_CODE = flv1.meaning(+)<br \/>\nAND flv1.LANGUAGE(+) = &#8216;TR&#8217;<br \/>\nAND flv2.lookup_type(+) = &#8216;MTL_EAM_ACTIVITY_SOURCE&#8217;<br \/>\nAND XXINN.EAM_ACTIVITY_SOURCE_CODE = flv2.meaning(+)<br \/>\nAND flv2.LANGUAGE(+) = &#8216;TR&#8217;);<br \/>\n[\/sql]<\/p>\n<p>Then I run the request &#8216;<span style=\"color: red;\">Import Items<\/span>&#8216;. It&#8217;s in Enterprise Asset Management responsibility. The path is Interfaces &gt; Import Items. <span style=\"color: red;\">Don&#8217;t forget the insert datas for the master organization if you use multi org!!! <\/span>If you don&#8217;t assign a cost category for activities at organization level, you can probably face with a cost error. I use mtl_item_categories_interface for these category assignments.<\/p>\n<p>Here is the code.<\/p>\n<p>[sql]INSERT INTO inv.mtl_item_categories_interface mici(<br \/>\nMICI.ITEM_NUMBER,<br \/>\nMICI.ORGANIZATION_CODE,<br \/>\nMICI.TRANSACTION_TYPE,<br \/>\nMICI.CATEGORY_SET_ID,<br \/>\nMICI.CATEGORY_ID,<br \/>\nMICI.PROCESS_FLAG,<br \/>\nMICI.SET_PROCESS_ID)<br \/>\n(SELECT XXINN.ACTIVITY_CODE ITEM_NUMBER,<br \/>\nXXINN.ORG_CODE ORGANIZATION_CODE,<br \/>\n&#8216;CREATE&#8217; TRANSACTION_TYPE,<br \/>\n&#8216;1100000042&#8217; CATEGORY_SET_ID, &#8211;Category set id which you want to assign<br \/>\n&#8216;2124&#8217; CATEGORY_ID, &#8212;TANIMSIZ-TANIMSIZ-TANIMSIZ category which you want to assign<br \/>\n&#8216;1&#8217; PROCESS_FLAG,<br \/>\n123456 SET_PROCESS_ID<br \/>\nFROM APPS.XX_ITEM_CREATE XXINN);<br \/>\n[\/sql]<\/p>\n<p>After the inserting process I run the &#8220;<span style=\"color: red;\">Import Item Category Assignments<\/span>&#8221; request. You can find this request in an inventory responsibility. The path is Items &gt; Import &gt; Import Item Category Assignments.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We create custom table for inserting datas into the mtl_system_items_iterface table. I create an excel sheet and it has same columns with &#8220;xx_item_create&#8221; table. Then for inserting data into the XX_ITEM_CREATE table, I use the program &#8220;Toad&#8220;. The path is Database &gt; Import &gt; Import Table Data. You can insert the datas from excel to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-593","post","type-post","status-publish","format-standard","hentry","category-oracle-e-is-yonetim-sistemi"],"_links":{"self":[{"href":"https:\/\/enginhafizoglu.com\/index.php?rest_route=\/wp\/v2\/posts\/593","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/enginhafizoglu.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/enginhafizoglu.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/enginhafizoglu.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/enginhafizoglu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=593"}],"version-history":[{"count":12,"href":"https:\/\/enginhafizoglu.com\/index.php?rest_route=\/wp\/v2\/posts\/593\/revisions"}],"predecessor-version":[{"id":594,"href":"https:\/\/enginhafizoglu.com\/index.php?rest_route=\/wp\/v2\/posts\/593\/revisions\/594"}],"wp:attachment":[{"href":"https:\/\/enginhafizoglu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=593"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/enginhafizoglu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=593"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/enginhafizoglu.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=593"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}