4GL BPM RMA Weirdness

I want to do some simple logging when an RMA is closed.

So I close an RMA in my test database and do a quick trace:

<localTime>4/26/2010 13:23:57:0791079 PM</localTime>
<parameter name='ds' type='Epicor.Mfg.BO.RMAProcDataSet' ><RMAProcDataSet xmlns="http://www.epicor.com/Mfg/100/BO.RMAProc/RMAProc">

Okay, so when I close the RMA, Vantage calls RMAProc.Update, and there's an RMAHead element to the dataset (there's also an RMADtl later on). That's what I expect.

I create a pre-processing directive on RMAProc.Update,

Condition: the ttRMAHead.OpenRMA field has been changed from any to False

Action: Execute this 4GL code:

message "In RMAHead Update.".
if available ttRMAHead then do:
message "Got ttRMAHead with RMANum " + STRING(ttRMAHead.RMANum).
/* ttRMAHead.Date03 = Now.*/
if available ttRMADtl then do:
message "Got ttRMADtl with RMANum " + STRING(ttRMADtl.RMANum).

Here's what I see in the log:

[10/04/26@13:34:13.289-0400] P-007020 T-008564 4 AS AS -- TRACE: SINGLE-RUN Procedure bo/RMAProc.p:Update START (8458)
[10/04/26@13:34:13.305-0400] P-007020 T-008564 1 AS -- (Procedure: 'UpdatePre34_A1 bo/RMAProc.p' Line:4554) In RMAHead Update.
[10/04/26@13:34:13.367-0400] P-007020 T-008564 4 AS AS -- TRACE: SINGLE-RUN Procedure END SUCCESS. (8458)

Basically neither ttRMAHead nor ttRMADtl are available.

That makes no sense! What the heck *is* available in this pre-processing context if not ttRMAHead?

If I try to do an assign, etc. without checking first it blows up because the table isn't available.


Brian W. Spolarich ~ Manager, Information Services ~ Advanced Photonix / Picometrix
    bspolarich@... ~ 734-864-5618 ~ www.advancedphotonix.com