Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor

Main

Poll
What version of Baan have you installed
Baan IV
35%
FP3
4%
FP4
0%
FP5
0%
FP6
0%
FP7
4%
10.2 (incl. 10.2.1)
0%
10.3
9%
10.4
17%
10.5
26%
Other
4%
Total votes: 23

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 17th March 2010, 07:23
king1980 king1980 is offline
Member
 
Join Date: Jan 2010
Posts: 75
king1980 is on a distinguished road
Baan: LN 6.1 - DB: SQL 2005 - OS: Windows 2003
Lightbulb Dal
Baan: Other/Unknown
C/S: None/Unknown

Hi ,
I am new to dal.

I want to use DAL in my session for create the Outbound advice .

Now how i can call the session and it's form commands using DAL .

Regards
king1980
Reply With Quote
  #2  
Old 17th March 2010, 13:11
ARijke ARijke is offline
Guru
 
Join Date: Sep 2005
Posts: 461
ARijke is on a distinguished road
Baan: Baan IV upto LN - DB: -- - OS: --
Hi,

A DAL is 1 tot 1 related to a table. For outbound advice there is already a DAL, whinh225.
Do you have a new table and do you want to build a new DAL for that table? Start with the general info http://www.baanboard.com/programmers...s_dal_overview

Or do you have a session/DLL from where you want to create outbound advice records in whinh225 via the DAL of whinh225? Start here:http://www.baanboard.com/programmers...ctions_dal_dam

regards
Reply With Quote
  #3  
Old 17th March 2010, 14:01
king1980 king1980 is offline
Member
 
Join Date: Jan 2010
Posts: 75
king1980 is on a distinguished road
Baan: LN 6.1 - DB: SQL 2005 - OS: Windows 2003
Lightbulb

Hi ,

I want use std table whinh225, but i want to create the outbound advice as we are generating using AFS.

So how i can write code to ceraete outbound advice and then relese the advice?

Regards
king1980
Reply With Quote
  #4  
Old 17th March 2010, 14:29
vahdani's Avatar
vahdani vahdani is offline
Guru
 
Join Date: Aug 2002
Location: Cologne, Germany
Posts: 419
vahdani is on a distinguished road
Baan: all - DB: all - OS: Unix / Win2K
Hi,

to enter outbound advice I use something like:
Code:
	select	whinh220.*, tcibd001.*
	from	whinh220 for update, tcibd001
	where	whinh220.oorg = :i.oorg
	and	whinh220.orno = :i.orno
	and	whinh220.oset = :i.oset
	and	whinh220.pono = :i.pono
	and	whinh220.seqn = :i.seqn
	and	whinh220.item refers to tcibd001
	selectdo
		if whinh220.lsta <> whinh.lstb.open then
			|Position is done!!
			break
		endif

		select	max(sern):last.sern
		from	whinh225
		where	oorg = :i.oorg
		and	orno = :i.orno
		and	oset = :i.oset
		and	pono = :i.pono
		and	seqn = :i.seqn
		selectdo
		endselect
		rep.dqua = i.quan
		dal.new.object("whinh225")
		dal.set.field("whinh225.oorg", whinh220.oorg)
		dal.set.field("whinh225.orno", whinh220.orno)
		dal.set.field("whinh225.oset", whinh220.oset)
		dal.set.field("whinh225.pono", whinh220.pono)
		dal.set.field("whinh225.seqn", whinh220.seqn)
		dal.set.field("whinh225.sern", last.sern + 1)
		dal.set.field("whinh225.cwar", whinh220.cwar)
		dal.set.field("whinh225.locf", i.loca)
		dal.set.field("whinh225.item", whinh220.item)
		dal.set.field("whinh225.cuni", tcibd001.cuni)
		dal.set.field("whinh225.runn", "A1")
		dal.set.field("whinh225.time", utc.num())
		dal.set.field("whinh225.qadv", i.quan)
		dal.set.field("whinh225.qads", whinh225.qadv)
		dal.set.field("whinh225.mtim", mtime())
		if whinh225.mtim = 0 then
			|* try to prevent duplicates
			dal.set.field("whinh225.mtim", utc.num())
		endif
		ret = dal.save.object("whinh225", db.return.dupl)
		if ret = 0 then
			db.update(twhinh220, db.retry)		
			e = whinh.dll4000.notify.automatic.outbound.process.run(
					"A1",
					array.element.added)
		else
			|show.dal.messages()
			dal.get.error.message(o.emsg)
			if isspace(o.emsg)then
				o.emsg = "Error generating outbound advice!"
			endif
			err.mess = o.emsg
			rprt_send()
		endif
           endselect

I release generated oiutbound advice using standard function:
whinh.dll4200.process.outbound(...)
__________________
May the force be with you!
Reply With Quote
  #5  
Old 17th March 2010, 14:41
ARijke ARijke is offline
Guru
 
Join Date: Sep 2005
Posts: 461
ARijke is on a distinguished road
Baan: Baan IV upto LN - DB: -- - OS: --
When using AFS then you need not to worry about DAL. You are executing the session logic. Whether the session is using the DAL is not of importance for you.

Instead of using AFS you could use a function like described by Vahdani.
Reply With Quote
  #6  
Old 17th March 2010, 16:11
king1980 king1980 is offline
Member
 
Join Date: Jan 2010
Posts: 75
king1980 is on a distinguished road
Baan: LN 6.1 - DB: SQL 2005 - OS: Windows 2003
Lightbulb

Hi vahdani

What value i need to pass for array.element.added in the dll function.

Also where i can get the list of functions which are avilable in dll?


Regards
king1980
Reply With Quote
Sponsored Links
  #7  
Old 19th March 2010, 13:10
vahdani's Avatar
vahdani vahdani is offline
Guru
 
Join Date: Aug 2002
Location: Cologne, Germany
Posts: 419
vahdani is on a distinguished road
Baan: all - DB: all - OS: Unix / Win2K
bic_info6.2

Hi,

even if you do not have access to source codes, you can always use bic_info6.2 (in $BSE/bin) to get further information regarding any external functions and documentations (Information between dllusage and enddllusage if any) of any baan object. Here I used following:

bic_info6.2 -eu /baan/ln1/bse/application/whB61U_a_stnd/owhinh/oinhdll4200 > out.txt

to get this:
Code:

---------------------------DLL PROTOTYPES-------------------------------
function extern boolean whinh.dll4200.direct.release.requested(
	 domain whinh.oorg i.order.origin,
	 domain tcorno i.order.number,
	 domain tcsern i.order.set,
	 domain tcpono i.order.line,
	 domain tcpono i.order.sequence,
	 boolean i.back.flush.procedure,
	 domain whinh.outb i.action,
	 boolean i.advice.created )

	Expl.:	This function determines whether the "release" activity must be
		executed automatically.
	Pre:	Line activities are already created
	Post:
	Input:	i.order.origin		- Order Origin
		i.order.number		- Order Number
		i.order.set		- Order Set
		i.order.line		- Order Line
		i.order.sequence	- Order Line Sequence
		i.back.flush.procedure	- Backflush Procedure Y/N
		i.action		- Current Activity
		i.advice.created	- Advice already present. If so, then
					  line activities are present as well.
	Output:	n.a.
	Return:	true	if the activity must be executed automatically.
		false	if the activity must not be executed automatically.
	
function extern long whinh.dll4200.fill.skip.orders.for.shipping.constraint(
	 domain whinh.oorg i.order.origin,
	 domain tcorno i.order,
	 domain tcsern i.order.set,
	 domain tcpono i.order.line,
	 domain tcpono i.order.sequence,
	 domain tcscon i.shipping.constraint,
	 domain tcqiv1 i.shortage.quantity,
	 boolean i.back.flush.procedure,
	 domain whinh.outb i.action,
	 ref domain tcmcs.long io.skip.orders.allocated,
	 ref domain tcorno io.skip.order.array() fixed,
	 ref domain tcwset io.skip.order.set.array(),
	 ref domain tcscon io.shipping.constraint.array(),
	 ref domain tcyesno o.new.order.notified )

	Expl.:	This function determines whether an order line has a
		shortage that blocks the release of the whole order
		or the whole order set.
		This blocking can be caused by the shipping constraint.
		This blocking is only applicable if shipping constraint must be
		checked during release advice and the relase advice is executed
		automatically.
	Pre:	Line activities are already created
	Post:
	Input:	i.order.origin		- Order Origin
		i.order			- Order Number
		i.order.set		- Order Set
		i.order.line		- Order Line
		i.order.sequence	- Order Line Sequence
		i.shipping.constraint	- Shipping Constraint
		i.shortage.quantity	- Shortage Quantity
		i.back.flush.procedure	- Backflush Procedure Y/N
		i.action		- Current Activity
	Output:	io.skip.orders.allocated- number of orders / sets in array
		io.skip.order.array	- Array of orders that must be skipped
					  because of shipping constraint
		io.skip.order.set.array	- Array of order sets / sales order sets
		io.shipping.constraint.array	- Array of shipping constraints
		o.
	Return:	0/DALHOOKERROR
	
function extern long whinh.dll4200.process.outbound(
	 domain whinh.outb i.action,
	 domain tcyesno i.use.default.reports,
	 domain tcmcs.long i.advice.report,
	 domain tcmcs.long i.shortage.report,
	 domain whinh.oorg i.order.origin,
	 domain tcorno i.order.number,
	 domain tcwset i.order.set,
	 domain tcpono i.order.line,
	 domain tcpono i.order.sequence,
	 domain tcpono i.advice,
	 domain tcpono i.bom.line,
	 domain tcqiv1 i.qty.planned,
	 domain whinh.btno i.run fixed,
	 domain whhuid i.handling.unit,
	 domain tcdate i.shipping.date.from,
	 domain tcdate i.shipping.date.to,
	 boolean i.read.for.update,
	 domain whinh.oalg i.advice.log,
	 boolean i.mask,
	 boolean i.xdock,
	 domain whinh.load i.load,
	 domain whinh.shpm i.shipment,
	 domain whloca i.location,
	 domain tcyesno i.print.ownership,
	 domain tcyesno i.print.item.storage.conditions,
	 domain tcyesno i.print.location.storage.conditions,
	 boolean i.check.manual.process.allowed,
	 ref domain tcqiv1 o.qty.shortage )

	Expl:	General function for processing outbound advice. Outbound Advice
		can be generated, released or undone, depending on the
		input action:
		- empty		The next action according to the order type
		- advise	Generate the advise records. The inventory is
				allocated on warehouse and location level.
		- release	Release the advise records for further
				processing.
		- direct	Generate and directly release the advise.
		- undo		Released advise lines which are not yet
				picked and not released advise lines are
				removed.
		- undo.release	Released advise lines which are not yet
				picked are put back on not released. The
				advise is not removed.
		- undo.advise	Not released advise lines are removed.

		Note: In case the outbound order line is read for update,
		no commits are occuring
		Only for items with status equal to active
		(whwmd210.iwhs = whwmd.iwhs.active) an outbound advice
		may be generated.
		If the status is equal to tentative, a message must be printed
		to the Shortage Report, stating the item is tentative and
		cannot be issued.
		NOTE: in case the warehouse on the outbound order line is
		WMS controlled, this DLL will not do anything.
		The 'Max Planned delivery date" is filled with the selection
		field dldt.t of whinh420[0,1]m000. If selection field is
		not enabled then the maximum time of today is taken.
	Pre: 	db.retry.point must be set
		The Outbound Order Line (whinh220) must be current when the
		function is called with read for update (i.read.for.update' has
		value TRUE).
	Post:	According to the input action
		In case read for update is true, the outbound order line
		(whinh220) should be updated after calling this dll and a
		commit or abort has to follow.
		In case read for update is false, the outbound order line is
		updated within this dll, where also the commit and abort takes
		place.
		For action = create.advice also the commit or abort transaction
		must be done by the calling program.
	Input:	- i.action	: input action:
					- advice
					- advice.only
					- direct.outbound
					- release
					- direct
					- undo
					- undo.advise
					- undo.release
					- backflush
					- create.advice
					- pick
					- empty
		- i.use.default.reporst	: use default reports
		- i.advice.report	: advice report ID
		- i.shortage.report	: shortage report ID
		- i.origin	: order origin
		- i.order	: order number
		- i.order.set	: order set
		- i.order.line	: line number
		- i.sequence	: sequence number
		- i.advice	: advice - filled if release is requested for a
				  specific advice
		- i.bom.line	: Bom Line - filled if generate advice is
				  requested for a single BOM Line
		- i.qty.planned	: planned quantity to advise;
				  must only be filled when part of the
				  ordered qty must be advised
		- i.run	: runnumber
		- i.handling.unit: handling unit to process (release or pick)
		- i.shipping.date.from:	Minimum date to select lines
						of fulfillment plan
		- i.shipping.date.to:	Maximum date to select lines
						of fulfillment plan.
		- i.read.for.update
				: true,  the warehousing order line is already
					 read for update and must be updated
					 outside this dll.
				  false, the warehousing order line is not read
					 for update
		- i.advice.log	: advice log
		- i.mask	: true,  if procedure must be followed
					 according the procedure-mask
				  false, advise/release and picking of inventory
					 (inclusive shipments) is done
					 automatically
		- i.xdock	: create X (cross) dock order for shortage
		- i.load	: the load to attache to the generated advice
		- i.shipment	: the shipment to attache to the generated
				  advice
		- i.location	: the location attached to the generated advice
		- i.print.ownership :	Print the ownership records Yes/No/empty
		- i.print.item.storage.conditions: Print item storage conditions
						   yes/no
		- i.print.location.storage.conditions: Print location storage
						       conditions yes/no
				If 'empty' is passed for one of the print.fields
				then default values are determined.
		- i.check.manual.process.allowed :
				 - must be true when called from UI-scripts
				 - can be set to true for specific situations
				 - must be set to false otherwise.
	Output: - o.qty.shortage	: shortage quantity
	Returns:0,	Process Outbound OK
		DALHOOKERROR, Process Outbound resulted in an error
	
function extern long whinh.dll4200.search.inventory.structure.for.locations(
	 boolean i.initialize,
	 domain tccwar i.warehouse,
	 domain tcitem i.item,
	 domain tcclot i.lot,
	 domain tcibd.sern i.serial,
	 domain tccuni i.ordered.unit,
	 domain tcqst1 i.ordered.quantity,
	 domain whhuid i.handling.unit,
	 domain tcowns i.ownership,
	 domain tccom.bpid i.owner,
	 ref domain whloca o.found.location,
	 ref domain tcdate o.found.inventory.date,
	 ref domain whwmd.pkdf o.found.package.def,
	 ref domain tccuni o.found.unit,
	 ref domain tcqst1 o.found.quantity )

	Expl:	This function searches for Locations where inventory is
		present for the Item and Warehouse (also based on the other
		input arguments). The functionality is similar to the outbound
		advice action (see function search.inventory.structure).
		Each time a stockpoint is found, the output is returned.
		Note that whinh110 already has allocated whwmd250, so
		whinr.dll2000 must skip the whwmd250 check.
	Pre: 	-
	Post:	-
	Input:	i.initialize		true for first call, else false
		i.warehouse		Warehouse
		i.item			Item
		i.lot			Lot Code
		i.serial		Serial Number
		i.ordered.unit		The unit of the ordered quantity
		i.ordered.quantity	Ordered quantity
		i.handling.unit		Handling Unit
		i.ownership		Ownership (Customer Owned / Consigned)
		i.owner			Owner
	Output: o.found.location	Location
		o.found.inventory.date	Inventory Date
		o.found.package.def	Package Definition
		o.found.unit		Unit
		o.found.quantity	Quantity
	Returns:0 / DALHOOKERROR
	
function extern boolean whinh.dll4200.skip.line.for.shipping.constraint(
	 domain whinh.oorg i.order.origin,
	 domain tcorno i.order,
	 boolean i.set.order.set,
	 domain tcwset i.order.set,
	 domain tcpono i.order.line,
	 domain tcpono i.sequence,
	 domain tcmcs.long i.skip.orders.allocated,
	 const domain tcorno i.skip.order.array() fixed,
	 const domain tcwset i.skip.order.set.array(),
	 const domain tcscon i.shipping.constraint.array() )

	Expl.:	This function checks whether an order line must be skippped
		because of shipping constraints.
		If Shipping Constraint = Ship Order Complete then check whether
		current order is in skip.order array
		If Shipping Constraint = Ship Order Set Complete then check
		whether order and set are in "skip arrays"
	Pre:
	Post:
	Input:	i.order.origin		- Order Origin
		i.order			- Order Number
		i.set.order.set		- Indication whether order.set is filled
		i.order.set		- Order Set
		i.order.line		- Order Line
		i.sequence		- Order Line Sequence
		i.skip.orders.allocated	- Number of orders / sets in array
		i.skip.order.array	- Array of orders that must be skipped
					  because of shipping constraint
		i.skip.order.set.array	- Array of order sets
		i.shipping.constraint.array	- Array of shipping constraints
						  to be able to check order or
						  order and set.
	Output:	NA
	Return:	0/DALHOOKERROR
__________________
May the force be with you!

Last edited by vahdani : 19th March 2010 at 14:50. Reason: Complete Listing added
Reply With Quote
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 On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to bypass DAL in Baan Vc trchandra Tools Development 8 27th July 2010 11:11
When DAL 1 or DAL 2 in Infor LN 6.1 gget79 Tools Development 5 27th May 2009 11:23
about deactivate DaL hujiehujie Tools Development 0 12th April 2008 10:40
Dal & Gtm bigjack Tools Development 0 27th December 2006 12:05
DAL activation srinivas Tools Development 5 2nd January 2003 08:07


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


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