Skip to main content
1-Visitor
October 13, 2014
Question

Setting Date Effectivity on bulk data is consuming lot of time

  • October 13, 2014
  • 2 replies
  • 1995 views

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
December 12, 2014

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

12-Amethyst
August 12, 2016