I replied to your first post but your code sample reinfoces what I had said there; you are not doing anything with the Temp Table ttPartPlant so your code is never being called. Your code states:
for each ttPart where (ttPart.RowMod = 'U' or ttPart.RowMod = 'A') no-lock.
ttPart.ShortChar05 = 'M'.
ttPart.Date01 = TODAY.
End.
You need to add the following after your existing code:
For each ttPartPlant no-lock where (ttPartPlant.RowMod = 'A' or ttPartPlant.RowMod = 'U').
For each Part no-lock where (ttPartPlant.Company = Part.Company and ttPartPlant.PartNum = Part.PartNum).
If available Part then do:
Run lib\UpdateTableBuffer.p(input BUFFER Part:HANDLE, 'ShortChar05', 'M').
Run lib\UpdateTableBuffer.p(input BUFFER Part:HANDLE, 'Date01', TODAY).
End.
End.
End.
for each ttPart where (ttPart.RowMod = 'U' or ttPart.RowMod = 'A') no-lock.
ttPart.ShortChar05 = 'M'.
ttPart.Date01 = TODAY.
End.
You need to add the following after your existing code:
For each ttPartPlant no-lock where (ttPartPlant.RowMod = 'A' or ttPartPlant.RowMod = 'U').
For each Part no-lock where (ttPartPlant.Company = Part.Company and ttPartPlant.PartNum = Part.PartNum).
If available Part then do:
Run lib\UpdateTableBuffer.p(input BUFFER Part:HANDLE, 'ShortChar05', 'M').
Run lib\UpdateTableBuffer.p(input BUFFER Part:HANDLE, 'Date01', TODAY).
End.
End.
End.
--- In vantage@yahoogroups.com, "cooner_55421" <cooner_55421@...> wrote:
>
> Hi,
>
> I've asked this before, it's been a while with no luck, thought I'd try again.
> I have set up a pre-processing BPM on the Part Update method.
> No conditions, just an action:
> The BPM updates UD fields if I change values while on the part tab in part maintenance.
> I would also like to update these UD fields if I change any values while on the Part Plant tab.
>
> Here is the current action:
>
> for each ttPart where (ttPart.RowMod = 'U' or ttPart.RowMod = 'A') no-lock.
> ttPart.ShortChar05 = 'M'.
> ttPart.Date01 = TODAY.
> End.
>
> Any ideas how I can update the UD fields when a change happens to values on the Part Plant tab?
>
> Thanks
>