sant123
14th March 2002, 19:19
Package Comb B40c2dev
companies attached to the pack comb. A & B

Being in Company A I need to execute a session with company B Data. is it possible.?? Please help.

I was thinking of using bshell6.1 -options -program but not successfull, did log case with Baan and waiting.

Any sugestions, tip...

mark_h
14th March 2002, 20:28
Is there a reason you can not do a change company and then run the session? Is this any session or a specific session? If it is a specific session then you could always prompt the user for the company.


Mark

sant123
15th March 2002, 06:35
Hi, Mark,

We donot want the users to change the company so we took out the session autorizations from ttdsk0203m000( Change COmpany Session). But we want them to be able to execute any display and print sessions ( Standard Baan Sessions also we do not have the source code).

With all this complications how do I achieve this.

Thanks.

mark_h
15th March 2002, 14:33
Right off hand I can not think of a way to do this the way you have discussed. One thing we did was to give them all the sessions they needed in the production company and then only print and display sessions in our simulation company. We left them with the change company option, and then used session authorizations to control what the could run. This option is reserved for only a select group of users.

Another thing we thought about was making them log into which company they wanted. But the users scrapped this idea.

Mark

Han Brinkman
15th March 2002, 16:11
ba6.1 -- -set BSE_COMPNR=B ??

Han

sant123
18th March 2002, 21:08
Hans, I could not use ba6.1 since we have BaanIV.and users go through BW.

I found the workaround, as follows.

1.A create dummy user that has autorization in company A.
2. using bw configurations a profile for user dummy is created as dummy.bwc.
3. create a session for all the users in Comp B, that invokes bw.exe using app_start function with the dummy.bwc as the parameter. also pass the name of the session that needs to be executed in company A.

without even the users realising the bw is executed and gets straight into the perticular baan session. and every one is happy.

the only drawback I see could be the licences, everyhtime they run this session they use a licence, but we even have the control of terminating the session if its idle for more than certain period using session_timeout parameter.

this really worked for me.

Thanks everyone for sharing the ideas, if anyone has any ideas or questions please do not hesitate to post.

Thanks

Sant.

alejandro
18th March 2002, 23:41
Sorry because you close this thread but,

I think you can solve your problem doing this:

1.- Create a customized session called "Execute session in company B"
2.- This session has only one entry field: session to execute
3.- The session has a choice cont.process that execute code I write in step 5
4.- This step is to test that session introduced is a display or print session. If not do not let user to execute step 5. You can put a zoom to this field to session display sessions (for example)
5.- This two lines to execute session in company B from company A:

switch.to.company(B)
wait.and.activate(session)

And that's all. Hope this help.

rchacko
19th March 2002, 02:09
you can still use the command in BW, use it in the command field in your BW configuration:
-- -set PACKAGE_COMB=xxx -set BSE_COMPNR=yyy

where xxx = pkg combination
yyy = company number

migramir
27th March 2002, 00:12
What about using DEM??:confused:

baangan
28th March 2002, 08:20
hi,
using -- -set PACKAGE_COMB=xxx -set BSE_COMPNR=yyy
is worng when you want to dynamically switch to another company during runtime and then return back to the original company after doing some processing.

--set PACKAGE and CPMPNR allows you to set the default package and company number during logging into Baan and not during runtime so that the user need not keep setting the company number and package combination in the user data everytime he wants to work in a different package combination and company.

The best way is to use the functions during runtime:

switch.to.company(target_compnr)
....Do the processing....
switch.to.company(original_compnr)

You can also use compnr.check(), the major difference being switch.to.company(..) demands for more system resources and performs more checks, but compnr.check() just switches to teh company if the user is authorised to that company...

Regards
GK,
Baan Development, NL

KlayVessel
30th March 2002, 07:57
For those without source code, this could be easily added to the session(s) with a product like QKEYtm (from Fullscope (previously RedKlay) (http://www.fullscope.com) or the similar project being developed here in the codes & utilities forum (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=559).

(My opinion would be that QKEY is a lot easier...but them I am the author of QKEY :D )