Baanboard.com

Go Back   Baanboard.com > Forum > Baan SIGs > Code & Utilities

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
37%
Installation Wizard into new VRC
39%
Manual into existing VRC
3%
Manual into new VRC
21%
Total votes: 38

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 14th January 2003, 00:18
Francesco's Avatar
Francesco Francesco is offline
Guru
 
Join Date: Aug 2001
Location: Antwerp, BE
Posts: 727
Francesco is on a distinguished road
Baan: 5b - DB: Oracle - OS: Solaris
Launch exchange scheme from custom session.

I was recently asked to give somebody of our EDI group access to the exchange module, so that she could perform imports as required.

Since I am reluctant to give anybody access to exchange for obvious reasons, I decided to write a session that would limit exchange capabilities to a single (predefined) script and grant access to this session instead.

Below is the code that I used in the script for this session. The form really only requires a start button, but you can make that as fancy as you wish.

Code:
|****************************** declaration section ***************************

declaration:
| Includes
	#include "ituxch0224"	
	#include <bic_tt>	

| Variables normally found on form, all made extern
	extern	domain tuxch.cxch	cxch.f		fixed	| Exchange scheme (mandatory)
	extern	domain tuxch.cxch	cxch.t		fixed	| 
	extern	domain tuxch.cbat	cbat.f		fixed	| Batch
	extern	domain tuxch.cbat	cbat.t		fixed	| 
	extern	domain tuxch.pint	seqn.f			| Sequence Number
	extern	domain tuxch.pint	seqn.t			| 
	extern	domain tuxch.yesno	comp.yn			| Change Company Number
	extern	domain tuxch.comp	scr.comp		| Company No.
	extern	domain tuxch.redo	redo.type		| Type of redo xch scheme
	extern	domain tuxch.yesno	error.rej.yn		| Include error rejected recs in redo
	extern	domain tuxch.yesno	cond.rej.yn		| Include conditional rejects in redo

| Program variables
		string			SCHEME(8)		| Exchange Scheme to be run
		string			BATCH(8)		| Batch to be run
|		long			SEQN			| Sequence Number to be run

|****************************** program section *******************************

before.program:
	SCHEME = "ODYEDIBP"		| Exchange scheme to be activated by session
	BATCH = "10"
|	SEQN = 10
	
	| Set exchange type to non-regular
	xch.type = nre.import
	| Set key value
	ukey = generate.unique.key()
	
	| Set form variables
	cxch.f = SCHEME
	cxch.t = SCHEME
	cbat.f = BATCH
	cbat.t = BATCH
	seqn.f = 0
	seqn.t = 9999
	scr.comp = get.compnr()
	redo.type = tuxch.redo.new
	
	skip.yn = no
	
	suppress.yn = no	
	error.rej.yn = no
	cond.rej.yn = no
	uncompress.yn = no

|****************************** form section **********************************

form.1:
init.form:
	get.screen.defaults()
	
|****************************** choice section ********************************

choice.cont.process:
before.choice:
	check.all.input()
on.choice:
	status.off()
	process.range.of.xch.schemes()
	status.on()
after.choice:
	handle.run.num(true)
	
|****************************** function section ******************************

functions:

function extern display.log.table()
{
	table ttuxch009			| Log table (Batch Lines)

	tuxch009.cxch = cxch.f
	tuxch009.txch = xch.type
	if redo.type = new.run then
		tuxch009.runn = run.num - 1
	else
		tuxch009.runn = run.num
	endif
	tuxch009.tryn = get.next.try.num(tuxch009.cxch, xch.type, 
				tuxch009.runn) - 1 
	if xch.type = nre.import then
		tuxch009.cbat = cbat.f
	else
		tuxch009.cbat = ""
	endif
	start.session(MODELESS, "tuxch0509m000", "tuxch0224m000", "")
}
__________________
Cheers,

Francesco
..............................................................

Admiral Business Solutions | My World | Baan Board | IT Happens!

"If everyone is thinking alike, then somebody isn't thinking" -- George Patton
"It's easy to cry 'bug' when the truth is that you've got a complex system and sometimes it takes a while to get all the components to co-exist peacefully." -- Doug Vargas
Reply With Quote
Sponsored Links
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CODE: Validate Import Exchange Scheme Data gfasbender Code & Utilities 10 18th November 2009 00:19
parent session code (without parent source) mbdagla Tools Development 2 11th October 2002 10:25
How to execute exchange scheme from Baan 4GL/3GL code vgobiraj Tools Development 4 16th January 2002 01:14


All times are GMT +2. The time now is 20:14.


©2001-2017 - Baanboard.com - Baanforums.com