Você está na página 1de 11

ItemOpenInterfaceSetup&HowTo

Purpose:

DocumentationofthesetupandusageoftheItemOpenImport(IOI)
process
fortheimportofitems.
Scope&Application:

Thisdocumentcanbeusedasasupplementtoloaditemdatathroughthe
OpenInterface.
Contents:

Setup
HowTo
RunningtheItemOpenInterfaceInCreateMode
RunningtheItemOpenInterfaceInUpdateMode
UpdatingItemAttributestoNULL
ImportingMasterandChildRecords
Revisions
TemplateUse
Setup
============================================================
FollowthischecklistbeforeattemptingtoloaditemsviatheItemOpen
Interface:
a)IfanyIOIpatcheshavebeenapplied,verifythatthereareno
invalid
packages.
Tofindinvalidobjects,runthefollowing:
SELECTowner,object_type,object_name
FROMdba_objects
WHEREstatus='INVALID'
b)InsurethatINCOINhasbeenrelinkedifanyIOIpatcheswereapplied.
adrelinksamplecommandlinestorelinkaiap:
'adrelinkforce=yranlib=y"fndaiap"'
c)Checkthatthestandardindexesexistonthemtl_system_items(
mtl_system_items_binRelease11.5)andmtl_system_items_interface
tables.
(Selecttable_name,index_name
Fromall_indexes
Wheretable_namein(''MTLSYSTEM_ITEMS',
'MTL_SYSTEM_ITEMS_INTERFACE',
'MTL_SYSTEMS_ITEMS_B')
Orderbytable_name,index_name;)
ThestandardindexesforRelease11.0.3areasfollows:

mtl_system_items_interface_n1
mtl_system_items_interface_n2
mtl_system_items_interface_u1
mtl_system_items_n1
mtl_system_items_n2
mtl_system_items_n3
mtl_system_items_n4
mtl_system_items_n5
mtl_system_items_n6
ThestandardindexesforRelease11.5areasfollows:
mtl_system_items_interface_n1
mtl_system_items_interface_n2
mtl_system_items_interface_n3
mtl_system_items_interface_u1
mtl_system_items_b_n1
mtl_system_items_b_n2
mtl_system_items_b_n3
mtl_system_items_b_n4
mtl_system_items_b_n5
mtl_system_items_b_n6
mtl_system_items_b_n7
mtl_system_items_b_u1
d)Checkiftheinternalandstandardconcurrentmanagersareupand
running
beforeloadingitems(systemadmin
resp/concurrent/manager/administer)
Checktheactualandtargetprocesses,thenumbersshouldbethesame
foreach.
e)DefineanitemthroughtheDefineItemform.Ifthisdoesnotwork,
thenitisunlikelythatitemswillloadthroughtheinterface.
ex.inventoryresponsibility/items/masteritemsEnteritem
name,
descriptionandattributesneededandsavetheitem.
f)TruncateallIOIinterfacetablesbeforeloading
mtl_system_items_interface:
ex.TRUNCATETABLE<tablename>
MTL_SYSTEM_ITEMS_INTERFACE
MTL_INTERFACE_ERRORS
MTL_ITEM_REVISIONS_INTERFACE
MTL_ITEM_CATEGORIES_INTERFACE
Note:
======
IfPurchasingisfullyinstalledbutInventoryisonlyashared
product,
usersshouldbeabletoruntheIOI.Youshould,however,beawarethat
the

IOIcodeisnotshippedwithstandalonePurchasing.Youwillhaveto
obtain
thecodebydownloadingthelatestIOImegapatches.

HowTo
========
RunningtheItemOpenInterfaceInCreateMode
Populatethemtl_system_items_interfacewiththefollowingminimum
required
columnswhencreatingnewitems:
PROCESS_FLAG=1
TRANSACTION_TYPE='CREATE'
SET_PROCESS_ID=1
ORGANIZATION_ID=MasterOrgid.
DESCRIPTION='Descriptionoftheitem'
ITEM_NUMBERand/orSEGMENT(n)
RunningtheItemOpenInterfaceInUpdateMode
Toupdateexistingitem(s),setTRANSACTION_TYPE='UPDATE'.
CreatingandupdatingitemsinasinglerunoftheItemOpenInterface
isnot
supportedfunctionality.
Forbestperformance,useinventory_item_idwhenupdatingitems.
Functionality
EveryattributeupdateablefromtheItemformisupdateablethroughthe
interface,andallrequiredvalidationsareperformedtoenforce:
ItemAttributeInterdependencies
MasterChildAttributeDependencies
StatusControlledAttributes
TemplatescanbeappliedtoexistingItems.Forbestresults,use
template_id
andtemplate_name.
TheItemstatuscanbechangedforexistingItems,andtheproper
attributes
areDefaulted/Setaccordingly.TheStatuschangeisrecordedin
MTL_PENDING_ITEM_STATUS.
TopopulatematerialcostsfromIOI:
PopulatetheLIST_PRICE_PER_UNITcolumnwitha
valuewhileimportingitemsandyouwillseeyour
materialcostforyouriteminMTL_SYSTEM_ITEMSafter
runningtheItemImportprocess.(CREATEtransaction_typeonly)
Masterlevelcontrolledattributesarecorrectly
propagatedtotheChildrecordswhentheMasterItemrecordisupdated.
WhenlaunchingitemsintotheMasterItemOrg,theChildrecordsare
copied

intoMTL_SYSTEM_ITEMS_INTERFACEforvalidation,andareidentifiedwith
a
transaction_typeof'AUTO_CHILD'.Theserecordsaredeletedifthe
parameter'DeleteProcessedRows'hasbeenpassedas'Yes',andremain
for
diagnosticpurposesiftheparameterispassedas'No'.
WhenthedefiningattributeforaFunctionalareaisenabled,theproper
defaultcategorysetandcategoryisassignedtotheItem.
Forexample:IfanInventoryitemisselected,andthedefaultcategory
set
forInventoryitemsis"inv.items",withadefaultcategoryof
"misc.misc",
thisisthecategorysetandcategorythatwillbeassignedduringthe
IOI
process.
NotSupportedIssues
=========================================
1.ItemCostscannotbeUPDATED(using"UPDATE"transaction_type)
throughtheinterface.
2.NewItemrevisionscannotbeaddedtoexistingItems.
3.CurrentfunctionalitydoesnotsupportupdatestoaPTOMODELITEM
through
theIOIupdatefeature.Seenotes:1076412.6and2121870.6

UpdatingItemAttributestoNULL

ThemethodtoupdatethesecolumnstoNULListousethefollowing
values:
forNumericfields:insert999999
forCharacterfields:insert'!'
forDatefields:theabovelistdoesnotincludeanyupdateabledate
fields.
ImportingMasterandChildRecords
==================================
Previously,IOIprocesseditemsinanorderthatdidnotrecognizethat
Master
ItemswereloadedbeforechildrecordsinMTL_SYSTEM_ITEMS.Therefore,
users
wereadvisedtoImportMasterRecordsfirstinonerunandthen
separately
ImportChildrecords.
TheIOIcodenowautomaticallyseparatesMasterrecordsfromChildren,
and
processesMasterrecordsfirst.However,asoneIOIprocessisnot
awareof
otherIOIprocessesrunninginparallel,donotsplitagivenitem's
separate

OrganizationrecordsintotwodifferentSET_PROCESS_IDsthatarebeing
runin
parallel.DoingsomaycausetheChildrecordtobeprocessedbeforethe
Masterrecord.
MasterlevelcontrolledattributesarecorrectlypropagatedtotheChild
recordswhentheMasterItemrecordisupdated.
WhenlaunchingitemsintotheMasterItemOrg,theChildrecordsare
copied
intoMTL_SYSTEM_ITEMS_INTERFACEforvalidation,andareidentifiedwith
a
transaction_typeof'AUTO_CHILD'.
ImportingCategories
====================
APPLYPatch 1644995forR11.0.Thisfunctionalityisnotavailablein
R11iuntil11.5.5.
Withthisenhancement,theuserwillhavetheflexiblitytoimport
multipleitemcategory
assignmentaspartoftheitemimportprocess.
Theuserproceduresareasfollows:
1.Populatetheiteminterfacetables(mtl_system_items_interface)
Thisstepisnecessaryifyouarecreatingitemsandcategoriesin
thesamerun.Forimportingitemcategoryassignmentsforalready
existingitems,youdonotneedtopopulateiteminterfacetable.
Fordetailsregardingpopulatingtheiteminterfacetable,please
refertoOpenInterfaceManual.
2.Poplatetheitemcategoriesinterfacetable
(mtl_item_categories_interface)
Thistablehasthefollowingcolumns:
INVENTORY_ITEM_IDNUMBER
CATEGORY_SET_IDNUMBER
CATEGORY_IDNUMBER
LAST_UPDATE_DATEDATE
LAST_UPDATED_BYNUMBER
CREATION_DATEDATE
CREATED_BYNUMBER
LAST_UPDATE_LOGINNUMBER
REQUEST_IDNUMBER
PROGRAM_APPLICATION_IDNUMBER
PROGRAM_IDNUMBER
PROGRAM_UPDATE_DATEDATE
ORGANIZATION_IDNUMBER
TRANSACTION_IDNUMBER
PROCESS_FLAGNUMBER
CATEGORY_SET_NAMEVARCHAR2(30)
CATEGORY_NAMEVARCHAR2(81)

ORGANIZATION_CODEVARCHAR2(3)
ITEM_NUMBERVARCHAR2(81)
TRANSACTION_TYPEVARCHAR2(10)
SET_PROCESS_IDNOTNULLNUMBER

Theuserneedstopopulatethefollowingmandatorycolumnsin
itemcategoriesinterfacetable:
A.Eitherinventory_item_idoritem_number.
Whenitemandcategoryarebeingimportedtogether,thenusercan
onlyspecifytheitem_number,sinceitemidwillbegeneratedby
theimportprocess.
B.Eitherorganization_idororganization_codeorboth.
C.Thetransaction_typecolumnshouldbe'CREATE'.Wedonotsupport
'UPDATE'or'DELETE'foritemcategoryassignment.
D.Eithercategory_set_idorcategory_set_nameorboth.
E.Eithercategory_idorcategory_nameorboth.
F.Process_flagcolumnas1.
G.Populatetheset_process_idcolumn.Theitemandcategory
interface
recordsshouldhavethesameset_process_id,ifyouareimporting
itemandcategoryassignmenttogether.
Forbetterperformancepopulateorganization_idinsteadof
organization_code,
category_set_idinsteadofcategory_set_name,category_idinsteadof
category
name.Foralreadyexistingitems,populateinventory_item_idinstead
ofitem
number.
3.Afterpopulatingtheitemandcategoryinterfacetables,launch
theItemImportprocessfromtheapplications.Intheitemimport
parametersform,fortheparameter'setprocessid',specifythe
'setprocessid'valuegiveninthemtl_item_categories_interface
table.
Theparameter'CreateorUpdate'canhavehaveanyvalue.Through
theimportprocess,wecanonlycreateitemcategoryassignment(s).
UpdationorDeletionofitemcategoryassignmentisnotsupported.
4.Oncetheconcurrentprocesscompletes,checkthe
mtl_interface_errors
tableforanyerror(s)duringtheitemandcategoryimport.Correct
thoseerrorconditionsintheinterfacetablesandruntheitem
import
again.Iftheprocess_flagis7,thatmeanstheitemcategory
interface
recordsweresuccessfullyimported.
Revisions
==============================
Note:
UsingtheITEM_NUMBERcolumninthemtl_system_items_interface
table

isrequiredifyouarepopulatingrevisiondataintothe
mtl_item_revisions_interfacetable.ThevalueoftheITEM_NUMBERmust
equal
theconcatenatedsegments(n)oftheitembeingimported,plusthe
segment
separator.Ifyouarenotimportingrevisionhistoryyoucanpopulate
either
ITEM_NUMBERortheSEGMENT(n)column(s)orboth.
Forhistoricalitemrevisiondata,doNOTpopulatetheREVISIONcolumn
in
themtl_system_items_interfacetable.Thiscolumnisusedonlyifthe
current
revisionoftheitemisbeingimported.
Populatethesecolumnsinthemtl_item_revisions_interfacetable:
PROCESS_FLAG=1
TRANSACTION_TYPE='CREATE'
SET_PROCESS_ID=1
ORGANIZATION_ID=MasterOrgID.
REVISION
EFFECTIVITY_DATE
IMPLEMENTATION_DATE
ITEM_NUMBER=(Mustmatchtheitem_numberinmtl_system_items_interface
table.)
Eachrowinthemtl_item_revisions_interfacetablemusthavethe
REVISIONand
EFFECTIVITY_DATEinalphabetical(ASCIIsort)andchronologicalorder.
TherevisionformatmustmatchthestartingrevisionintheOrganization
Parameters.Forexample,ifthestartingrevisionis'00A'thenthe
REVISION
columninmtl_item_revisions_interfacemustmatchthisformat(00A,00B,
etc.).
Thestartingrevisionissometimesreferredtoasthedefaultrevision.
UnderInventoryresponsibilitynavigateto:
Setup/Organizations/Parametersto
verifytheStartingRevisioninthe"Revision,Lot,Serial"alternate
region.
AnExampleofRevisionHistoryImport:
Org.ParametersStartingRevision=00A
Organization_id=204(masterorg)
Thecurrentrevisionoftheitembeingloadedis'00C'andthereis
historical
dataforrevisions'00A'and'00B'.
Insertonerecordintothemtl_system_items_interfacetableforthenew
item:
INSERTINTO
mtl_system_items_interface
(
process_flag,
transaction_type,
item_number,
description,
organization_id,
set_process_id)
VALUES

(1,
'CREATE',
'Rev_hist_test',
item_number
'IOIRevisionPart',
description
204,
1
);
commit;
Insert3recordsintomtl_item_revisions_interface,oneforeach
revisionfrom
'00A'through'00C'.TheREVISIONandEFFECTIVITY_DATEcolumnsmustbe
in
alphabetical(ASCIIsort)andchronologicalorder.
INSERTINTO
mtl_item_revisions_interface
(
process_flag,
transaction_type,
set_process_id,
item_number,
organization_id,
revision,
effectivity_date,
implementation_date)
VALUES
(1,
'CREATE',
1,
'Rev_hist_test',
204,
'00A',
revision
sysdate7,
effectivity_date
sysdate7
);
INSERTINTO
mtl_item_revisions_interface
(
process_flag,
transaction_type,
set_process_id,
item_number,
organization_id,
revision,
effectivity_date,
implementation_date)
VALUES
(1,
'CREATE',
1,
'Rev_hist_test',
204,
'00B',
revision
sysdate6,
effectivity_date

sysdate6
);
INSERTINTO
mtl_item_revisions_interface
(
process_flag,
transaction_type,
set_process_id,
item_number,
organization_id,
revision,
effectivity_date,
implementation_date)
VALUES
(1,
'CREATE',
1,
'Rev_hist_test',
204,
'00C',
revision
sysdate5,
effectivity_date
sysdate5
);
commit;
RuntheIOIprocess.Navigate>Inventory:Items:ImportItems
Thereare6parameterstoentertobegintheprocess:
1.Specifyoneorallorganizations.
2.Validateitems,yesorno.
3.Processitems,yesorno.
4.Deleteprocessedrows,yesorno.
5.Processset(nullforall)
6.Createorupdateitems(1forcreate,2forupdate)
Note:
IfyouareimportingMasterandChildrecords,inserttheminto
the
mtl_system_items_interfaceandmtl_item_revisions_interfacetables,and
run
thematthesametimebysettingthe'AllOrganizations'parameterto
'Yes'.
Ifyoudonotdothis,thentheChildrevisionrecordswillnotbe
imported.
Whathappensis,aftertheMasterrecordsareimported,theIOIprocess
sets
theprocess_flag=3fortheremainingrecordsinthe
mtl_item_revisions_interfacetable.Thereisabug/patchforthis
issue:1216978,availableinthenextminipack.
ErrorChecking:
======================================
Whenimportingmultiplerevisions,ifonerecordforanitemfails
validation,
allrevisionsforthatitemfail.

Resolvefailedrowsbycheckingthemtl_interface_errorstable.
SELECT
table_name,
column_name,
error_message,
message_name
FROM
mtl_interface_errors;
Master/org##errorsTheseshowinthecolumn_nameinsteadofthe
error_message.Theyindicatemasterandchilditemattributesdonot
match.
Thefollowingpl/sqlpackagesdefinethecolumnsin
mtl_system_items_interface
forthemaster/org##error.Thesepackagesarelocatedin
$INV_TOP/admin/sql.
INVPVM1B.pls: 'master/org1a'
INVPVM1B.pls: 'master/org2'
'master/org3'
INVPVM2B.pls: 'master/org4'
'master/org5'
'master/org6'
INVPVM3B.pls: 'master/org7a'
'master/org7b'
'master/org7c'
master/org1a:SUMMARY_FLAGthruATTRIBUTE1
master/org2:ATTRIBUTE2thruITEM_CATALOG_GROUP_ID
master/org3:CATALOG_STATUS_FLAGthruAUTO_LOT_ALPHA_PREFIX
master/org4:START_AUTO_LOT_NUMBERthruACCEPTABLE_RATE_DECREASE
master/org5:CUMULATIVE_TOTAL_LEAD_TIMEthruCARRYING_COST
master/org6:POSTPROCESSING_LEAD_TIMEthruATO_FORECAST_CONTROL
master/org7a,7b,&7c:ENGINEERING_DATEthruVEHICLE_ITEM_FLAG
(overlapswithmaster/org6.Checkpl/sqlpackageforexactattributes.)
TemplateUse
=======================================================
ItemattributespopulatedinMTL_SYSTEM_ITEMS_INTERFACEtakeprecedence
(holdtheirvalue)evenifatemplateisalsospecifiedinMSII.
However,astatuscontrolledattribute,meaningonethatcanderiveits
value
fromthe'itemstatus'thatisbeingassignedtotheitem,suchas
purchasing_enabled_flag,mayinturnoverridethevaluepopulatedin
MSII.
Tousepurchasing_enabled_flagasanexample,ifyouspecified
purchasing_enabled_flagas'N'inMSII,andas'Y'inthetemplate,but
ifin
thetemplateyouareapplyingthereisan'itemstatus'suchthatit
makes
purchasing_enabled_flagbe'Y',thenthatvalue,'Y',prevails.
So,firstcheckthevalueof'Itemstatus'attributeinthetemplate
applied.
Thengoto/setup/items/statuscodesform,andqueryonthiscode,to
seethe

valueofpurchasing_enabled_flag.Ifitis'Y',thenthatisthereason
the
valueafterimportis'Y'.

Você também pode gostar