jeffersyuan
23rd March 2006, 14:46
Hi ,
I am new guy to program in Baan. I want to know how to trans a value to a session .

For example,
when click a button , a new session will displayed, I want to trans a value to the new session ,and the new session can fill a field with the value trans in.

How to do it ?

Thank you very much.

Jeffers

mr_suleyman
23rd March 2006, 14:56
Hi ,
for your case you can use to zoom function to call other session.
For example : To call sesion tirpt9183m000 :

string process(14),zoomname(18),returnfld(18)
long zoomcode,formpos

process = "tirpt9183m000"
zoomname = "tirpt9183m000"
zoom.to$ (process,Z.SESSION,zoomname,returnfld,formpos)

For second case , you should use EXPORT(), IMPORT() command
for example :
extern domain tcitem trans_item

In your main session :
export(trans_item,trans_item)
In your trans_session :
import(trans_item,trans_item)

That's all about IT


GOOD LUCK !

ARijke
23rd March 2006, 15:16
The function export only works when the other session is already started. The eport and import functions are stand alone functions do not cooperate.

So I advice to use only the import function in the second session.

Rgds, Adriaan

jeffersyuan
23rd March 2006, 15:17
Hi mr_suleyman ,

Thank you for your quick reply. I will try it ! Thank you!

bdittmar
23rd March 2006, 15:54
Hi ,
I am new guy to program in Baan. I want to know how to trans a value to a session .

For example,
when click a button , a new session will displayed, I want to trans a value to the new session ,and the new session can fill a field with the value trans in.

How to do it ?

Thank you very much.

Jeffers

In source session !

choice.user.x:
before.choice:

long export( "variable", ref variable )
string zoom.to$( string process(14), long zoomcode, string zoomname(18), string returnfld(18), long formpos )

In target session !

zoom.from.all:
on.entry:

long import( "variable", ref variable )

call.your.function()

Regards