dthomson
10th September 2002, 12:10
I am trying to develop a session using AFS to Report production orders complete (tisfc020m000) using input from a spreadsheet.

Does anyone know if it is possible to log all the subsessions that are started by a main session.

Has anybody out there created an AFS session for completing production orders?, if so could you send me the program script.

Regards

Derek

OmeLuuk
10th September 2002, 13:00
Try to run the AFS program with the options:
-- -dbgfile -keeplog -logfile WhatFiles <AFS session>
in the file WhatFiles you can see all the disk files used including the program options of the subsession.

mark_h
10th September 2002, 15:23
Thanks Omeluuk. I will give this a try.

Derek,

I tried doing a Afs function server for this session early on, but gave up on it. I kept getting a "Null pointer on printer" error or something like that. Support center was not helpful on this at all. I have heard that Baan has fixed this problem, but I am not sure. What type of problem are you having? Maybe you could post the relevant piece of code. That may help someone solve the problem.

Mark

gous99
11th September 2002, 18:38
Hi, I just created an AFS for this session, here we are on Baan IV c3. Also with extension A&D, so it might be different. For us, this works just fine.


g.comp.frm = tcyesno.yes
dt = date.num()
stpapi.put.field("tisfc0202m000", "tisfc001.pdno", str$(hold.pdno))
ret = stpapi.find("tisfc0202m000")
if ret = 1 then
error.flag = false
stpapi.put.field("tisfc0202m000", "qdlv.frm", str$(qtypo))
stpapi.put.field("tisfc0202m000", "comp.frm", str$(g.comp.frm))
stpapi.handle.subproc("tisfc0202m000", "tdilc4113s000", "add")
stpapi.enum.answer("tisfc0202m000", "tisfc01021", tcyesno.yes)
stpapi.enum.answer("tisfc0202m000", "tisfc02024", tcyesno.yes)
stpapi.enum.answer("tisfc0202m000", "tisfc02029", tcyesno.yes)
stpapi.continue.process("tisfc0202m000", gapi.error.code)
if isspace(gapi.error.code) then
error.flag = false
stpapi.put.field("tdilc4113s000", "tdilc402.clot", new.lot)
stpapi.put.field("tdilc4113s000", "tdilc402.date", str$(dt))
stpapi.insert("tdilc4113s000", 0, gapi.error.code)
if strip$(gapi.error.code) <> "" then
message("Could not insert record in Maintain Receipts")
message("The error is: " & gapi.error.code)
stpapi.end.session("tdilc4113s000")
stpapi.end.session("tisfc0202m000")
error.flag = true
return
else
error.flag = false
stpapi.save("tdilc4113s000", gapi.error.code)
if strip$(gapi.error.code) <> "" then
message("Could not save the record in Maintain Receipts")
message("The error is: " & gapi.error.code)
stpapi.end.session("tdilc4113s000")
stpapi.end.session("tisfc0202m000")
error.flag = true
return
else
error.flag = false
endif
endif
else
message("Error occured Clicking on the button in Report Prod Order Completed")
message("The error is: " & gapi.error.code)
error.flag = true
return
endif
else
message("Record not found in Report Production Order Completed")
message("Order Number: " & str.pdno)
stpapi.end.session("tisfc0202m000")
error.flag = true
return
endif
stpapi.end.session("tdilc4113s000")
stpapi.end.session("tisfc0202m000")