rohan_rege
16th September 2002, 23:07
In my case I am trying to simulate the whole Maintain Transactions process.


I have succesfully simulated sessions till tfacp1110s000 .


I am getting a problem simulating the following sessions.
when Continue button is pressed on session tfacp1110s000 Maintain Purchase Invoices...

two sessions open in following order ;

First tfacp1130s000 Match /Approve Purchase Invoices ...and then after it opens another subsession tfacp1131s000 Match Receipts ...with tfacp1130s000 still in the backgrnd.

i tried using the foll. to simulate...but it goes for a toss...and hangs.


f1110s000.handle.sub.process( "tfacp1130s000" , "add" )
f1110s000.continue( error.mess )
message(error.mess)

f1130s000.handle.sub.process( "tfacp1131s000" , "add" )

stpapi.put.field( "tfacp1131s000", "tdpur045.orno", "580751")
ret = stpapi.find( "tfacp1131s000" , error.mess)
message(error.mess)
if ret <> 1 then
message("record not found")
else
ret = stpapi.mark( "tfacp1131s000" , error.mess)
message(error.mess)
if ret then
stpapi.put.field( "tfacp1131s000", "tdpur045.matc", "completely")
endif
endif

stpapi.save( "tfacp1131s000", error.mess )
message(error.mess)

stpapi.end.session("tfacp1131s000")

f1130s000.handle.sub.process( "tfacp1140s000" , "add" )
f1140s000.Approve( error.mess )
message(error.mess)

stpapi.end.session("tfacp1140s000")
stpapi.end.session("tfacp1130s000")
stpapi.end.session("tfacp1110s000")
stpapi.end.session("tfgld1101s000")
stpapi.end.session("tfgld1100m000")


but the program hangs for the above..
any suggestions...
i tried debugging ...but it was not of much help

Al Smith
18th September 2002, 17:11
Hi,
I'm not familiar with the sessions you're using but I'm guessing that both tfacp1130s000 and tfacp1131s000 are subsessions of tfacp1110s000.

Try setting the handle.sub.process as follows.

f1110s000.handle.sub.process( "tfacp1130s000" , "add" )
f1110s000.handle.sub.process( "tfacp1131s000" , "add" )

f1110s000.continue( error.mess )
message(error.mess)

stpapi.put.field( "tfacp1131s000", "tdpur045.orno", "580751")

...

Al.

rohan_rege
18th September 2002, 18:50
actually the issue got solved yesterday.......

this it seems is a inherent problem with AFS where it cant handle
such situation where tfacp1130s000 zooms ro tfacp1131s000 as soon as it is invoked by tfacp1110s000.

So i programatically tricked the system bu updating some fields which were chekced before tfacp1130s000 zoomed to tfacp1131s00 .
so it stopped zooming to tfacp1130s000 directly .
once this was done...i reset back the values i updated to the prev values.


All thanks to Lbencic ........

Thanks to u too for ur suggestion ..:-)

Rgds,
Rohan