Purchased Parts

Hello.

I have two BAQs but I am trying to get information from one to show up in the other. Basically, I want to see P parts and their ApprovedDate and Effective date.

I don’t understand why a P part will show up in my BOM Record but not my P Parts. Take for example the part 267426C… shows up in my BOM Record but not my P Parts, even though I am using the same tables.

My BOM Record:

select 
	[ECORev].[GroupID] as [ECORev_GroupID],
	[ECORev].[PartNum] as [ECORev_PartNum],
	[ECORev].[RevisionNum] as [ECORev_RevisionNum],
	[ECORev].[CheckInDate] as [ECORev_CheckInDate],
	[ECORev].[CheckedOut] as [ECORev_CheckedOut],
	[ECORev].[ApprovedDate] as [ECORev_ApprovedDate],
	[ECORev].[EffectiveDate] as [ECORev_EffectiveDate],
	[ECORev].[RollupDate] as [ECORev_RollupDate],
	[Part].[TypeCode] as [Part_TypeCode]
from Erp.ECORev as ECORev
inner join Erp.Part as Part on 
	ECORev.Company = Part.Company
	and ECORev.PartNum = Part.PartNum
where (ECORev.CheckInDate >= @pStartDate  and ECORev.CheckInDate <= @pEndDate)
order by ECORev.CheckInDate

My P Parts:

select 
	[Part].[PartNum] as [Part_PartNum],
	[Part].[PartDescription] as [Part_PartDescription],
	[PartRev].[RevisionNum] as [PartRev_RevisionNum],
	[Part].[CreatedBy] as [Part_CreatedBy],
	[Part].[CreatedOn] as [Part_CreatedOn],
	[Part].[TypeCode] as [Part_TypeCode],
	[PartRev].[ChangedBy] as [PartRev_ChangedBy],
	[PartRev].[ChangedOn] as [PartRev_ChangedOn],
	(len(Part.PartNum)) as [Calculated_PartLength],
	[ECORev].[GroupID] as [ECORev_GroupID],
	[ECORev].[RevisionNum] as [ECORev_RevisionNum],
	[ECORev].[CheckInDate] as [ECORev_CheckInDate],
	[ECORev].[CheckedOut] as [ECORev_CheckedOut],
	[ECORev].[ApprovedDate] as [ECORev_ApprovedDate],
	[ECORev].[EffectiveDate] as [ECORev_EffectiveDate]
from Erp.Part as Part
left outer join Erp.PartRev as PartRev on 
	Part.Company = PartRev.Company
	and Part.PartNum = PartRev.PartNum
left outer join Erp.ECORev as ECORev on 
	PartRev.Company = ECORev.Company
	and PartRev.PartNum = ECORev.PartNum
where (Part.TypeCode = 'P'  and Part.CreatedOn >= @StartDate  and Part.CreatedOn <= @EndDate  and Part.PartNum = @myPartNum)
 and (PartRev.PartNum is null)

Do your purchased parts have revisions? Most companies generally do not revision purchased parts, but your Company might.

Yes, they do. Rev shows up on “BOM Record”, but not “P Parts”.

I would remove this. PartNum can never be NULL in the table.

1 Like

Thank you. I believe that fixed the issue.