Skip to main content
1-Visitor
Oct 13, 2014 3:08 PM UTC
Question

Setting Date Effectivity on bulk data is consuming lot of time

Currently working on a data-migration project where Legacy ERP data needs to be loaded as WTPart.

Created WTParts and the Structures using data dump.

Now trying to set Date Effectivity on the loaded parts with respect to the Parent Parts.

Have developed an utility with the help of PTC case CS59121 to load Data effectivity on bulk data.

sample code :

----------------------------------------------------------------------------------------------------

EffManagedVersion[] effVers = new EffManagedVersion[1];

effVers[0] =wtpartLatest;

EffGroup effGroup;

String dateStartString = startDate;

Date datestart = sdf.parse(dateStartString);

Locale locale = new Locale("en-US");

startDate = WTStandardDateFormat.format(datestart,WTStandardDateFormat.WF_STANDARD_DATE_ONLY_FORMAT, locale,TimeZone.getTimeZone("GMT"));

effGroup = new EffGroup(null,wt.effectivity.WTDatedEffectivity.class,(startDate+"-").trim());

effGroup.setEffTypeModifier(EffTypeModifier.EXACT);

effGroup.setEffContext(wtpartParentmaster);

//EffGroupAssistant.appendEffGroups(effVers ,new EffGroup[]{effGroup});

EffGroupAssistant.appendEffGroupsQuietly(effVers ,new EffGroup[]{effGroup});

PersistenceHelper.manager.refresh(wtpartLatest);

----------------------------------------------------------------------------------------------------

While loading the Effectivity came to see that some WTParts are being used as BOM Components under n number of BOM Assemblies(WTParts).

It almost took 1 hour to update 170 objects.

Now it is consuming lot of time. Please help me in this regard.

Thanks,

Niranjan

2 replies

1-Visitor
Dec 12, 2014 10:19 AM UTC

Hi Niranjan,

We are also migrating the data from ERP system to Windchill PDM Link 10.1.

Can you help me in the effectivity configuration in Windchill, Is it same like Valid from date in SAP.

Please suggest.

Thanks

Translate
12-Amethyst
Aug 12, 2016 5:35 PM UTC