jpadilla
19th August 2002, 17:38
I'm using a session that calls titim0101m000 which calls subsession ticpr2210s000, I have the next code.


f0101m000.put.Item("0000006")
f0101m000.handle.subprocess("ticpr2210s000","add")
stpapi.zoom.option("tiitm0101m000",2,"ticpr2210s000",error)
stpapi.continue.process("ticpr2210s000",error)
if strip$(error)<>"" then
messsage (error)
endif
f0101m000.end()


I get the error message "session not available".

I attach the afs.log file.

Any suggestion ???

mark_h
19th August 2002, 17:46
I would try doing a find after you put the item. Check and see if that works. If that does not work I would pull the tiitm0101m000 session up manually, find the part, and then check the zoom to make sure that option is available for that part from form 1.

Mark

jpadilla
19th August 2002, 17:51
Hi Mark,

I 've done the test you say and the find works ok.

I see the process and the session ticpr2210s000 never is started.

Regards

JP

mark_h
19th August 2002, 20:20
Just realized which session you are talking about. On our system tiitm0110m000 actually launches tppdm0110m000. This then launches a menu when you do a zoom. On our system that menu actually has ticpr2230s000 on it. You might want to check the menu on your system and make sure it matches what you are doing in your function server code.

If that does not work and you have source code, then put your tiitm0110m000 in debug mode to see what it is doing.

Mark

jpadilla
19th August 2002, 21:19
Hi Mark,

You're right, i make I changed the session to tppdm0110m000 and subsession to ticpr2230s000 in the above code, and I'm still gettin the same error "Session not available".

any clue??

mark_h
19th August 2002, 21:32
I just dropped your code in a test FS I have. It did not work at all. I had to change tiitm0101m000 to tppdm0110m000 and then it would run. When it got to the stpapi.zoom (for ticpr2230s000) it did nothing. No error, the session did not run or anything happen. I tried a couple of different ways, but none of the zoom options would start. I do not know why they would not start.

Do you have source? That may be your only way to solve this short of calling Baan. I would put the code(tiitm0101m000) in debug mode and step through it to see what it was doing and where the error came from.

Good Luck!

Mark

jpadilla
19th August 2002, 21:46
unfortunately We don't have source, so the only way I have to solve it, is making tests in diferents ways.

The main idea is to update the cost price for a items that we have in an ascii, file. I'm trying to do it with AFS, but If somebody know the best way to do it, I really would appreciate any help...

mark_h
19th August 2002, 22:32
So lets see running ticpr2210m000 in a FS did not work. Trying to launch tiitm0101m000 and then ticpr2230s000 or ticpr2220s000 did not work. What about running ticpr2220s000 by itself? On our system the form on ticpr2220s000 looks like it only has to have the item - we do not use containers. Then it requires that you select a report and a device for the session. Maybe that will work, but then again I am not sure if it will work on yours because of the other post. I usually do not run sub-sessions this way, but maybe it will work for you.

Are you still waiting for Baan on the ticpr2210m000 session? That session worked on our system.

There is another method, but I would use it as a last resort. This requires you to use something like ~Vamsi's source extender or Qkey. In this method you would first create a new session to get the file data. Then in one of the ticpr programs you would add a zoom.from section for the new session. In this section you would import your file name, read through it, and execute the choice.cont section. Then possibly ending the session. Not my choice of solutions. Anyway here is a sample:


zoom.from.tipgc0101m00b:
on.entry:
import("item.f",item.f)
import("item.t",item.f)
import("update.oltm",update.oltm)
import("print.report",print.report)
display.all()
execute(cont.process)
execute(end.program)


I did this using qkey in the Calc. Order Lead Time session(tirou2212m000). Now when I click on a button on the tipgc0101m00b form it zooms to tirou2212m000, calculates the lead time and returns to the tipgc0101m00b session. It was just a thought - I like FS code better.


Mark

jpadilla
19th August 2002, 22:59
I call the session ticpr2220s000 directly, but I get the error "Report not found" I have the next line.

stpapi.set.report ("ticpr2220s000","rticpr222001000","D",error)

what could be wrong??

mark_h
19th August 2002, 23:36
What you have is correct. I do not have a clue why you get the "Report not found error". It may have something to do with the other error you got on the ticpr2210m000 session. Sorry, but you may be stuck waiting on Baan to fix these errors. I can not think of anything else to try.

Mark