Skip to main content

Hi guys,

I need to migrate absences with a migration job.

One problem, the field ABSENCE_ID is mandatory. 

I would like to be able to ask the job to automatically and incrementally enter the next value of the absence ID (1,2,3...) depending on the employee (EMP_NO field) and the company (COMPANY_ID field). Is this possible? 

 

 

Wishing you a great day <3 

@ksebf 

Normally business objects will have a DB Sequence that will increase the number. Calling that sequence_name.next_val() will bring the next number.

Please check the Procedure/ function, which generate the Absence_ID value and same can be used into source column.

Thanks

Vikas Jain


When creating an absence in IFS the absence is fetched by using this function: Employee_Absence_Id_API.Generate_Absence_Id(company_id, emp_no)

However it can’t be used directly in your source field since it inserts or updates the “LAST_ABSENCE_ID” in table EMPLOYEE_ABSENCE_ID_TAB.

I guess you can try to run this in the method list before running the New method. I have never tried this myself but it might work:

https://docs.ifs.com/techdocs/24r1/030_administration/050_data_management/050_data_migration/070_references/020_tips_and_tricks/tipsandtricksmethodlistprocedures/#calling_functions_from_method_list

 


Reply