Sorting Redlined BOM uses Non-Redlined Data for Sorting
Given the following code:
ITable redlinedBom = ...
IAgileClass cls = pi.getItem().getAgileClass();
IAttribute attr = cls.getAttribute(ItemConstants.ATT_BOM_BOM_LIST01);
ITable.ISortBy sortBy = table.createSortBy(attr, ITable.ISortBy.Order.DESCENDING);
ITwoWayIterator itr = table.getTableIterator(new ITable.ISortBy[] { sortBy });
The resulting itr appears to return data as though it sorted using the released values, not the values in the Redlined BOM. Is this a known issue and is there a work around?
How are you getting the ITable ? you should first set the revision to the pending ECO on that item from which you wanna get the redlined values like : ((IItem)item).setRevision(“ECO12345”); and then you proceed to get the redlined BOM table like: ITable table = item.getTable(ITEM_CONSTANTS.TABLE_REDLINEBOM); Are you facing this issue even after writing the code in this way?
Update to my answer: I tested the piece of code in our 9.3.5 & 9.3.6 environment and found similar behavior as reported by you. So it indicates that it’s a Agile code bug. I could also find the same issue if I try to sort the Parts History table by Local Client Time in Ascending Order with SDK API. I suggest you log a defect with Oracle Dev.