Solved

Close Previous Line - Migration Job

  • 30 September 2021
  • 2 replies
  • 108 views

Userlevel 4
Badge +7

Hi all,

 

I have an excel migration for Supplier for Purchase Part. This allows price lists to be created by users and inserted to the price list tab. However, if a price list is active - this prevents the tool from working. Is there a way to close an active price list automatically before the new price list is inserted?

icon

Best answer by pwlm 8 October 2021, 13:48

View original

This topic has been closed for comments

2 replies

Userlevel 4
Badge +9

S4PP price lists have effectivity dates (date from/date to)

I presume you are getting an ‘interval already exists or overlaps and existing interval’ error message?

So, you need to have two migration jobs.

  1. Close any Price Lists for any Supplier/partcode combinations you are about to update by setting the ‘To date’ to today -1
  2. Add the new Price list entries with a ‘From Date’ set to today

You can chain DataMig jobs together by calling the first from the 2nd using a CONNJOB parameter which allows for some degree of error checking before processing.

 

Userlevel 4
Badge +11

Hi @robert_g,

The CONNJOB isn’t an available rule for Excel Migration jobs.

This can be achieved by adding a row to the start of the Source Mapping which calls a custom function that performs the following steps:

  1. Check if date of new entry will overlap with existing entries.
  2. If overlap then call autonomous procedure to amend VALID_UNTIL date on existing entries.
  3. the DM job will then execute with no errors.

Cheers,

Pete