ayoobi
13th January 2003, 10:42
Hi ,
I want to zoom to a session and return 2 or more values from the zoom session(Standard tools session) . is this possible in baan IV c 4 ? if yes how ?
Best Wishes
Ayoobi
sbakshi
13th January 2003, 15:51
Hi,
Try this
|*****Zoom Section
zoom.from.tihra1101m000:
on.entry:
import("tihra100.mcno",zmcn)
import("tihra100.hrdt",zpdt)
where zmcn and zpdt are variables and then u can use them in your script.
Hope this helps
Sanjiv
jaapzwaan
13th January 2003, 17:10
Hi,
If you want the values returned to the parent session, use the function export in the on.exit of the zoom.from section in the zoom session:
|*****Zoom Section
zoom.from.tihra1101m000:
on.exit:
export("parent.var",child.var)
export("parent.var2",child.var2)
NPRao
13th January 2003, 20:11
Zubair,
This works for me -
function get.emergency.vrc()
{
attr.zoomcode = Z.SESSION
ttadv111.cpac = "tc"
start.session(MODAL, "ttadv1511m000", prog.name$, "ttadv111._index1")
|* Package VRCs
evers = ttadv111.vers
erele = ttadv111.rele
ecust = ttadv111.cust
attr.zoomcode = 0
}
Since you are on BaaN-4 series so you cannot use the start.session function but you can still use the zoom.to$() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_starting_and_stopping_programs_zoom_to) then use the table's index as the return field. Then you can get more than 1 zoom return value.
If those fields are not part of the index then you will have the import/export functions.
I hope this helps you out.
ayoobi
14th January 2003, 12:49
Thanks for all your suggestions but they do not solve this problem
1. I had tried import but it is not working
2. I think export will work but the zoom session is a Tools Session
3. In Zoom.to$() i cannot specifiy a combined field as an argument for Return Field :-(
Best Wishes
Regards
Zubair Ayoobi
jaapzwaan
14th January 2003, 13:43
So you want to zoom to a tools session (of which you don't have the sources of course) and return multiple values.
Can you be more specific: what session are you zooming to and what values do you want to retrieve from that session?
Regards,
Jaap Zwaan
ayoobi
14th January 2003, 14:15
Hi Jaap,
My Requirement is exactly like in Maintain Logical Tables(ttaad4120m00) , where we zoom from table field to ttadv4526s000 and get the full table code . But table code is a combination of three field cpac, cmod , flno in table ttadv420.
Hope this helps in understanding the issue .
Regards
Zubair
jaapzwaan
15th January 2003, 09:55
Zubair,
You only have to declare table ttadv420. After zooming to ttadv4526s000, the selected table is set in ttadv420.cpac/cmod/flno.
This is programmed in the script of ttadv4526
Regards,
Jaap Zwaan
ayoobi
15th January 2003, 11:07
Hi Jaap,
Do you mean to say the value ttaad420.tabl would be set in ttadv4526s000 ? How do i access that field in my script . I tried importing but didnt work . It looks like i missed some basic point .
Best Wishes
Zubair
jaapzwaan
16th January 2003, 10:00
Zubair,
What I'm trying to say is that you don't have to do anything in your script. The ttadv4526s000 session does an export to the calling (your) session. It puts the values in ttadv420.cpac, ttadv420.cmod and ttadv420.flno.
So if you have these variables (by declaring the table ttadv420) in your script, after the zoom, the values are set to the selected record.
To be more specific:
|This is your script !!!
|On field x you zoom to ttadv4526s000
field.x:
after.zoom:
selected.table = ttadv420.cpac & ttadv420.cmod & ttadv420.flno
Regards,
Jaap Zwaan
dnnslbrwn
16th January 2003, 17:07
Zubair,
One thing that has not been said that should clear up some issues...
You have to do all of the importing and exporting of variables inside the session that you called with 'zoom.to'. If you think about if for a minute, after you exit the tools session (or any session that you zoom.to for that matter) and it goes away, where would the import command go to get values? With the second session closed - there would be nothing for the import command to 'talk' to.
As a general rule, I have found that when a session returns values (most any sub-session), the values are either returned in the table field that they are normally stored in - or they are returned in a field called zoom.* [where * is the four letter field code eg: zoom.cpac]. If you try both of these, you will probably find what you are looking for.
Cheers,
-Dennis
pravinwalimbe
16th January 2007, 12:53
Hi All,
I am also facing the simillar problem.
So will anybody tell me the final conclusion of this thread?
Thanks in advance.
:confused:
mark_h
16th January 2007, 14:39
How about some information on your problem? Are you zooming to a tools session? If not then export/import should work and maybe even the suggestion by NPR.
mr_suleyman
16th January 2007, 15:22
Don't forget define parameters variable extern type.
Good Luck !
pravinwalimbe
17th January 2007, 08:19
Hi
I am zooming to a session ttadv4526s000 and want to return ttadv420.cpac, ttadv420.cmod and ttadv420.flno
I tried above options but didn't worked.
Please suggest
Thanks in advance
Hitesh Shah
17th January 2007, 16:34
We have used ttadv3584m000 to get table names . U can also try ttadv4520s000 for getting the table name .