The BPM will not let you define a temporary table within the BPM designer or least I have never been able to.
If you are just looking up data from the Jobhead access it directly, no need to use a temporary table. temporary tables typically only come into play if you want to use the Business Objects for that table.
FOR EACH ttPartTran WHERE (ttPartTran.JobNum="008236" AND
Jim Kinneman
Senior Consultant
Encompass Solutions, Inc
If you are just looking up data from the Jobhead access it directly, no need to use a temporary table. temporary tables typically only come into play if you want to use the Business Objects for that table.
FOR EACH ttPartTran WHERE (ttPartTran.JobNum="008236" AND
> ttPartTran.TranType="MFG-STK"), each JobHead WhereIf you really need to have temporary tables have the BPM call a .p file within which you can define a temporary table. You can pass over values from the BPM including the ttPartTran dataset to the .p file.
> JobHead.JobNum="008236":
Jim Kinneman
Senior Consultant
Encompass Solutions, Inc
--- In vantage@yahoogroups.com, "Herby Dallard" <hdallard@...> wrote:
>
> I am trying to execute the following 4GL code in a BPM Post-Proc action
> directive -Vantage 803.408B.
>
> I am trying to produce a running total of a PartTran's TranQty for a
> specific Job Number(small test before a mass update).
>
> However I keep getting the following error
>
>
>
> Exception caught in: Epicor.Mfg.BO.BpMethod
>
> Error Detail
>
> ============
>
> Message: Compilation error: You cannot define a TEMP-TABLE inside an
> internal procedure. (3355)
>
> ** Could not understand line 18. (196)
>
>
>
> Type: Error
>
> Program: Bpm/Misc.p
>
> Method: DeployProcedure
>
> Table:
>
> Row:
>
> Field:
>
>
>
>
>
>
>
> My Code: FYI: The problem is properly defining a temp table for JobHead that
> I can use in this BPM directive. Any assistance or example will be greatly
> appreciated.
>
> Thanks.
>
>
>
> Define Temp-Table ttJobHead
>
> Like JobHead.
>
> Define Input-Output Parameter Table for ttJobhead.
>
>
>
> Procedure JobHeadNum01Update:
>
>
>
> Define Variable iTranQtyRunTotal As Integer.
>
>
>
> FOR EACH ttPartTran WHERE (ttPartTran.JobNum="008236" AND
> ttPartTran.TranType="MFG-STK"), each ttJobHead Where
> ttJobHead.JobNum="008236":
>
> iTranQtyRunTotal=iTranQtyRunTotal + PartTran.TranQty.
>
> RUN lib\UpdateTableBuffer.p(Input BUFFER JobHead:HANDLE, 'Number01',
> iTranQtyRunTotal).
>
> END.
>
> End Procedure.
>
>
>
>
>
>
>
>
>
> Best Regards,
>
>
>
> Herby Dallard
>
> Information Technology Engineer
>
> Endicott Research Group
>
> hdallard@...
>
> 607-754-9187 ext. 3078
>
> www.ergpower.com <http://www.ergpower.com/>
>
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>