Solved

Migration job for API method

  • 18 September 2020
  • 8 replies
  • 1450 views

Userlevel 5
Badge +9

When trying to create migration job for method  Invent_Part_Quantity_Util_API.Move_Part and it’s not possible to save the job but you get error :

Error making attribute and references - IntfaceMethodList.ILLARGTYPE:Arguement VALIDATE_HU_STRUCT_POSITION_ has illegal type. Only datatype DATE VARCHAR2 NUMBER allowed

 

Same with Inventory_part_in_stock_API.Issue_Part_with_Posting

Reason seems to be that there are boolean arguments and this is not supported in data migration.

 

Is there a way around this issue?

icon

Best answer by eqbstal 25 September 2020, 17:25

View original

8 replies

Userlevel 4
Badge +11

Hi @atvanst,
You could wrap those method calls with your own procedures and convert BOOLEAN to VARCHAR2?

#occamsrazor

Is that an option for you?

Cheers,

Pete

Userlevel 5
Badge +9

Hi,

Unforturnately this is not an option for us as due to support agreement we are not allowed to create new procedures in the database. 

Regards,

Anna

Userlevel 7
Badge +21

atvanst,

Are you not able to remove the boolean fields from the source list and let them default?

Steve

Userlevel 5
Badge +9

 

As you see it’s not even possible to save the migration job

Userlevel 7
Badge +21

This is a bit tricky:

Prepare a migration job that fills a table with the part to be moved and the needed parameters for that (I normally use intface_conv_list and intface_conv_list_cols (via Solution Manager\Data Management\Data Migration\Data Migration Basic Data).

Next prepare an event that is triggered by a new row in intface_conv_list_cols. This event will kick of the move part (Invent_Part_Quantity_Util_API.Move_Part).

After this the row must be deleted from intface_conv_list_cols (or you have to include somesort of audit date in conversion list name, but that goes beyond this small explanation).

Succes,

Steve

Userlevel 1
Badge +5

Eqbstal,

Could you please explain the steps more precisely

Userlevel 7
Badge +21

Create a new conversion list with name PARTSTOMOVE

Create migration job:

Image 1 - Loading the fields
Image 2 - Loading the fields part 2

The fields are all the fields that will be used as parameters towards (only the ones that are not defaulted) the Invent_Part_Quantity_Util_API.Move_Part procedure:

Image 3 - Fields that are parameters

Prepare the next migration job:

Image 4 - Start of loading
Image 5 - Loading the columns of the Conversion List

Notice the following things in Image 5:

  1. On Pos 10 hardcoded the list name is given
  2. On Pos 20 the key to the old value is given. In this situation, you can track when it was loaded (easy for maintenance of the table later on)
  3. On Pos 30 all the fields are combined with ‘|’ as delimiter. In the example only a part of the total string has been entered. You will have to add all the fields as in Image 1 and 2.

This will load the conversion list.

Prepare a new trigger on the conversion list columns which only will work if the conv_list_id = ‘PARTSTOMOVE’

In the event you will have to do something like:

Read a record from the intface_conv_list_cols

Loop thru the content of field new_value and assign the value to the appropriate field.

Once ready call the procedure with the fields as parameters.

The event is not the easiest to build.

 

Note: you could also use a custom LU and fill that with the values from the loaded file and use that as a base for the trigger.

Userlevel 1
Badge +5

Thanks Eqbstal,

Got it working, I’ve created custom table since conv list has char limit to 200, additionally inside migration job I’ve constructed key ref string as follows:

'CONTRACT='||CONTRACT||'^'||'PART_NO='||PART_NO||'^'||'CONFIGURATION_ID='||CONFIGURATION_ID||'^'||'LOCATION_NO='||LOCATION_NO||'^'||'LOT_BATCH_NO='||LOT_BATCH_NO||'^'||'SERIAL_NO='||SERIAL_NO||'^'||'ENG_CHG_LEVEL='||ENG_CHG_LEVEL||'^'||'WAIV_DEV_REJ_NO='||WAIV_DEV_REJ_NO||'^'||'ACTIVITY_SEQ='||ACTIVITY_SEQ||'^'||'HANDLING_UNIT_ID='||HANDLING_UNIT_ID||'^'||'TO_CONTRACT='||TO_CONTRACT||'^'||'TO_LOCATION_NO='||TO_LOCATION_NO||'^'||'QTY_TO_MOVE='||QTY_TO_MOVE||'^'

Thanks to that I’m able to fetch each segment by IFSAPP.Client_sys.Get_Key_Reference_Value ('&NEW:CF$_VALUE', 'CONTRACT' );

 

 

 

Reply