I’m trying to load Functional Objects using the Equipment_Functional_API. But I’m unable to set the “Belongs to Object” or SUP MCH CODE via this API and view Equipment_Functional_UIV.
Any suggestions, how do this under Data Migration Job?
Thanks
Page 1 / 1
Hi @SPRRAJ
can you show us your migration jobs and also your legacy data (only a few records) please?
I suppose you are using 1 migration job (procedure CREATE_TABLE_FROM_FILE) to load your raw data and 2nd migration job (procedure MIGRATE_SOURCE_DATA) to fetch the data from the 1st migration job.
You’re trying to migrate a tree/hierarchy and that means you need a kind of master record with no “Belongs to Object” or SUP MCH CODE content and then the tree/hierarchy below this master records which needs this information to the level of this tree above.
Example:
HQ is my master record (MCH_CODE HC, CONTRACT 501) → Level 1
SERVICE_SITE (and REPAIR) are on the 2nd level
→ MCH_CODE SERVICE_SITE, CONTRACT 501
→ SUP_MCH_CODE HC, SUP_CONTRACT 501
SUP_MCH_CODE = Belongs to object
SUP_CONTRACT= Belongs to site
ABC (and DARE) are on the 3rd level
→ MCH_CODE ABC, CONTRACT 501
→ SUP_MCH_CODE SERVICE_SITE, SUP_CONTRACT 501
etc.
A SQL can be the following one and this is something you can include in your 2nd migration job (in the source_name column).
SELECT LEVEL lvl, contract,mch_Code,sup_contract,sup_mch_code, CONCAT ( LPAD ( ' ', LEVEL*3-3 ), mch_Code ) navigator,SUBSTR(SYS_CONNECT_BY_PATH(mch_Code,';'),2)||';' path2 FROM equipment_functional_uiv WHERE contract='501' CONNECT BY PRIOR mch_Code = sup_mch_Code START WITH MCH_CODE='HQ';
But I don’t know how your legacy data (your raw data) looks like.
/Jens
Hi @Jens
Thanks for your reply. Yes you are right, the data structure that you explained above, I’m using a similar one with 2 level tree/hierarchy. The top level Master data is already in the IFS environment and I’m loading the lower level data with the SUP_MCH_CODE & SUP_CONTRACT data in the IC Table. Unfortunately I can’t show the data due to the security reasons.
But I’m using the view “EQUIPMENT_FUNCTIONAL_UIV ”and the API “EQUIPMENT_FUNCTIONAL_API” as shown in the attachments. I’m using a separate method “EQUIPMENT_FUNCTIONAL_API.UPDATE_FUNCTIONAL_OBJECT” to update the SUP_MCH_CODE against a particular MCH_CODE once it is created via the API “EQUIPMENT_FUNCTIONAL_API” because there is no provision of loading the SUP_MCH_CODE directly via the API “EQUIPMENT_FUNCTIONAL_API”. This way the loading process is very slow. I’ve to load almost 6 million records. Is there anyway we can increase the performance.
Thanks
Hi @SPRRAJ , @Jens,
Could you give me a hint, I’m trying a lot of time to upload by data migration, the information of belongs to, through data migration, in IFS V 10, never got a problem, but now, there is no way to update that information to functional object and serial object, please I would really appreciate help on this topic.
I can not find the fields SUP_MCH_CODE and SUP_CONTRACT in EQUIPMENT_OBJECT_UIV, EQUIPMENT_FUNCTIONAL_UIV, EQUIPMENT_OBJECT, in addition I can’t find that field in the data base EQUIPMENT_OBJECT_TAB, is gone, the only view that I do can find those fields are EQUIPMENT_ALL_OBJECT_UIV, but when I execute the migration job there is no update of that fields.
Thanks you very much in advance.
David Pintado.
EquipmentObject (and therefore also EquipmentFunctional etc.) has changed it’s primary key between versions. The primary key is no longer CONTRACT, MCH_CODE it is EQUIPMENT_OBJECT_SEQ.
The fields SUP_MCH_CODE, SUP_CONTRACT does no longer exists, instead the relation to the parent is stored in FUNCTIONAL_OBJECT_SEQ. That field contains the EQUIPMENT_OBJECT_SEQ from the parent.
So if you want to build a structure you need to find EQUIPMENT_OBJECT_SEQ for the parent object you have by Equipment_Object_API.Get_Equipment_Object_Seq(contract_, mch_code_).
Then you send that in as FUNCTIONAL_OBJECT_SEQ when creating the child object.