Dear community,
We're currently migration BOMs from ECC to S/4 HANA and we're facing the following challenge for lots of BOMs --> error:
History requirement only supported if engineering change mgmt is active
(Message Class 29, Message Number 659). Tool: Migration Cockpit, Direct Transfer & Upload File approach.
The rootcause seems to be inside method check_deletion (SE37 --> CNV_PE_S4_PP_MATERIAL_BOM_ECN --> IF_CNV_PE_S4_BOM_MIG~PROCESS_DATA, lines 72-89):

This method sorts source-table STPO descending based on STLKN (Node), then compares if the number of lines in STPO is the same with the highest STLKN it finds:

I managed to add an internal counter to renumber the items (STLKN, STVKN, IDENTIFIER, ITEM_NODE, VGKNT) and are being takenover properly, such that the method is by-passed, but the BOMs were not migrated correctly in S/4 HANA, as the ECN-to numbers are missing and all the items are shown in the new BOM as active, even if they were previously deleted.
Any hints on how to migrate data like this?