Skip to main content
Solved

Unable to create Work Order and Task via Migration Job

  • 20 June 2024
  • 9 replies
  • 94 views

Hi,

 

We have requirement to create Work Order and Work Task using Create Table from flat file and then MIGRATE Source Data.

We are able to create the Work Order but unable to get the WO_NO (system generated) in order to create the Work Task. There is no getter function to get the WO_NO in ACTIVE_SEPARATE_API

Any help would really appreciated.

Thanks,

Nishith

9 replies

Badge +3

Hi Nishith, 

 

When migrating work orders, use the reference number to keep track of the records. Update that reference number in an unused column within the work order or in a custom field. Then, when migrating work tasks, get the work order number (WO_NO) using the reference number with a subquery in the source column. Once the migration is completed, you can remove the custom field in the work order.

Regards,

Irantha

Userlevel 1
Badge +6

Hi Irantha,

 

Thanks for your reply, but it didn’t work.

Infact we added a Custom field in Work Order table and keeping it unique for each WO_NO. We are updating this field in ACTIVE_SEPRATE_OVERVIEW_CFV (_CFP.CF_NEW__) getting OBJID_@10 (from 1st method list which creating the WO)

For task creation, I used below select statement to get the WO_NO created in Source Column of JT_TASK_LIGHT_UIV.WO_NO, but mig job giving error “missing expression”

SELECT MAX(WO_NO) FROM ACTIVE_SEPARATE_OVERVIEW_CFV ASO WHERE ASO.CF$_C_CUSTWO_NO=IC_BPMS_WO_TASK_T_TAB.CF$_C_CUSTWO_NO;

 

Since, I am getting OBJID_@10 from WO, so even I replaced the Select statement, but still the same error.

SELECT ASO.WO_NO FROM ACTIVE_SEPARATE_OVERVIEW ASO WHERE ASO.OBJID=OBJID_@10

Not allowing to use Select Statement in Source Column under Column Mapping Tab of Mig Job

Badge +3

Hi Nishith,

To review this issue, could you please export and share the migration job or provide a screenshot of the migration job tabs, including the method list attribute?

 

Regards,

Irantha

Userlevel 1
Badge +6

I have attached the file for your reference

Badge +3

Hi Nishith,

I have attached the MIG jobs created for a cloud customer based on the suggestions I made earlier. I hope this helps you adjust your current job.

Regards,

Irantha

Badge +2

Hi @Irantha ,

Can you please attach the import data job for the IC tables above as well?

Thank you!

/Malshani

Badge +3

Hi ,

 

Please find the CRE file attached.

 

Regards,

Irantha

Badge +2

Thank you! i’m going to use this for our customers and will let you know the results.

Userlevel 1
Badge +6

This is resolved now.

We finally designed our Work Order and Work task Migration as below.

  1. Create table from flat file to capture Wo and Wo task from a file with a Custom field to capture Customer WO NO
  2. Migrate Source Data for Work Order, only execute for Order No 10 for each WO. This will execute once where multiple rows provided due to Work Tasks
  3. Migrate Source Data for Work Task, use the Custom field to get the WO_NO for Work task creation

Reply