Sandy Blondino
15th August 2008, 20:33
Hello Everyone,
I'm having trouble with an AFS session. I've written several before but never ran into this problem.
After filling in the to and from fields with a value, the value is blank, so the close project update never works.

Thanks for any advice.
Sandy
Here is the code snippet.

while errf = 0
nbrfields = string.scan(input.rec, "%s", tipcs020.cprj)

|read the next record from the text file
temp.proj = tipcs020.cprj
|call tipcs2250m000 Close Project to close the sub project
stpapi.put.field("tipcs2250m000", "cprj.f", temp.proj)
stpapi.put.field("tipcs2250m000", "cprj.t", temp.proj)
stpapi.set.report("tipcs2250m000", "rtipcs225001000", "D", err.msg)
stpapi.set.report("tipcs3250s000", "rtipcs325001000", "D", err.msg)
stpapi.continue.process("tipcs2250m000", err.msg)

stpapi.print.report("tipcs2250m000", err.msg)
stpapi.print.report("tipcs3250s000", err.msg)

stpapi.end.session("tipcs3250s000")
stpapi.end.session("tipcs2250m000")

errf = seq.gets(input.rec, 6, fp)
endwhile

mark_h
18th August 2008, 14:38
You might want to contact r_nagu from this thread here (http://www.baanboard.com/baanboard/showthread.php?t=23355&highlight=tipcs2250m000) to see if they do not mind sharing their solution. I do not think the two set reports will work. I know there are problems with multiple reports and automatic subsessions. Do you have source code?

Sandy Blondino
18th August 2008, 14:41
Hi Mark,
No, we don't have source code.

Sandy

tnzabo
10th July 2013, 18:45
I know this is terribly old but I'm working on AFS for the Close Project session now and wondered if you were able to get it to work?