Baanboard.com

Go Back   Baanboard.com > Forum > Baan SIGs > AFS/DDC/OLE: Function servers

User login

Frontpage Sponsor

Main

Google search


Poll
What version of Baan have you installed
Baan IV
31%
FP3
3%
FP4
0%
FP5
1%
FP6
2%
FP7
4%
10.2 (incl. 10.2.1)
3%
10.3
6%
10.4
19%
10.5
28%
Other
2%
Total votes: 95

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 9th February 2018, 19:27
SandraDiehl's Avatar
SandraDiehl SandraDiehl is offline
Member
 
Join Date: Dec 2006
Location: Sumter, South Carolina
Posts: 31
SandraDiehl is on a distinguished road
Baan: IV C - DB: Oracle - OS: Linux
Quantity (Storage Unit) not allowed

I have search several of the post using AFS for outbound and I have outbound working in other aspects but I am getting the error Quantity (Storage Unit) not allowed yet I can do the manual Maintain Outbound and it defaults to the same storage unit LB as my item. Here is my code and while in debug I have verified the storage unit is LB, I last tried to let the system pick up it's own storage unit by comment out my line and it still gives same message. I wonder if problem is with item and not the code since we have convert non location/lot to location and lot. This item is not lot but is location control and I do have inventory in RAWMAT with unit of LB so not sure why? Any suggest would be great this is a high priority project for me.

|Call to the function
if insert.outbound(run.number, order.type, zzsfc015.pdno,
position, " RAWMAT", itm.cuni, need.qty,
"", date.num(), sera, serb, errmsg) then


|function
function domain tcbool insert.outbound(domain tcmcs.str12 runnumber,
domain tdilc.koob order.type,
domain tcpdno order.number,
domain tcpono order.position,
domain tdilc.loca order.location,
domain tccuni order.stun,
domain tcqiv1 order.qty,
domain tdltc.clot order.lot,
domain tcdate order.date,
ref string strsera(),
ref string strserb(),
ref string msg())
{
long ret
msg = ""
| ret = tt.align.according.domain(order.stun, order.stun, "tccuni")
stpapi.handle.subproc("tdilc4101m000","tdilc4102s000","add")
stpapi.put.field("tdilc4101m000","runnumber",runnumber)
stpapi.put.field("tdilc4101m000","k.o.order",str$(order.type))
stpapi.put.field("tdilc4101m000","ordernr",str$(order.number))
stpapi.continue.process("tdilc4101m000",msg)
if not isspace(msg) then
stpapi.end.session("tdilc4101m000")
return(false)
endif
stpapi.enum.answer("tdilc4102s000","tdilc4102.1",tcyesno.no)
stpapi.put.field("tdilc4102s000","tdilc401.pono",str$(order.position))
stpapi.put.field("tdilc4102s000","tdilc401.loca",order.location)
stpapi.put.field("tdilc4102s000","tdilc401.clot",order.lot)
stpapi.put.field("tdilc4102s000","tdilc401.date",str$(order.date))
| stpapi.put.field("tdilc4102s000","tdilc401.stun",order.stun)
stpapi.put.field("tdilc4102s000","tdilc401.qstr",str$(order.qty))
ret = stpapi.insert("tdilc4102s000",1,msg)
if isspace(msg) then
stpapi.get.field( "tdilc4102s000", "tdilc401.sera", strsera )
stpapi.get.field( "tdilc4102s000", "tdilc401.serb", strserb )
endif
stpapi.end.session("tdilc4513s000")
stpapi.end.session("tdilc4102s000")
stpapi.end.session("tdilc4101m000")
return(true)
}
Reply With Quote
  #2  
Old 9th February 2018, 22:23
SandraDiehl's Avatar
SandraDiehl SandraDiehl is offline
Member
 
Join Date: Dec 2006
Location: Sumter, South Carolina
Posts: 31
SandraDiehl is on a distinguished road
Baan: IV C - DB: Oracle - OS: Linux
I need to stressed that this process works for my items that are lot control when doing outbound, but when I am doing a non lot control item it gives this error.
Reply With Quote
Sponsored Links
  #3  
Old 12th February 2018, 00:41
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,965
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Have your tried one without entering the lot number and date. I have just wondering if putting one of those fields is triggering something in the code. I will check my code when I get to work tomorrow to see if I do anything.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #4  
Old 12th February 2018, 14:29
SandraDiehl's Avatar
SandraDiehl SandraDiehl is offline
Member
 
Join Date: Dec 2006
Location: Sumter, South Carolina
Posts: 31
SandraDiehl is on a distinguished road
Baan: IV C - DB: Oracle - OS: Linux
Mark,
The logic that I included is without the lot number. I have two processes that does outbound, one is when I am reporting production which uses the lot number and this process is issuing the material that is raw material no lot number. All raw material is just location control and it seems to be happening with all my raw material. I have another developer that is working on another process as well attempting to automatically create the outbound and he too ran into the same error.
Currently my work around is just to write the record directly to tdilc401 and then do the release. I don't like doing this much rather use AFS to do the validations but there was NO true reason to be getting that error since I could use the same items in the session and it would pull up the LB without any issues.
Reply With Quote
  #5  
Old 12th February 2018, 14:48
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,965
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Code looks a lot like mine so makes me wonder if it might be data related. Have you tried multiple parts?

Code:
|******************************************************************************
|* API Code for Maintaining Outbound.
|******************************************************************************
function extern insert_outbound(	domain	tcmcs.str12	runnumber,
					domain  tdilc.kooa	order.type,
					domain	tcorno		order.number,
					domain	tcpono		order.position,
					domain	tdilc.loca	order.location,
					domain	tccuni		order.stun,
					domain	tcqiv1		order.qty,
					domain	tdltc.clot	order.lot,
					domain	tcdate		order.date,
					ref	string		strsera(),
					ref	string		strserb(),
					ref     string          msg())
{
	msg = ""
	stpapi.handle.subproc("tdilc4101m000","tdilc4102s000","add")
	stpapi.put.field("tdilc4101m000","runnumber",runnumber)
	stpapi.put.field("tdilc4101m000","k.o.order",str$(order.type))
	stpapi.put.field("tdilc4101m000","ordernr",str$(order.number))
	stpapi.continue.process("tdilc4101m000",msg)
	if not isspace(msg) then
		stpapi.end.session("tdilc4101m000")
		return
	endif
	stpapi.enum.answer("tdilc4102s000","tdilc4102.1",tcyesno.no)
	stpapi.put.field("tdilc4102s000","tdilc401.pono",str$(order.position))
	stpapi.put.field("tdilc4102s000","tdilc401.loca",order.location)
| 092404.st - Add lot and date to insert outbound.	
	stpapi.put.field("tdilc4102s000","tdilc401.clot",order.lot)
	stpapi.put.field("tdilc4102s000","tdilc401.date",str$(order.date))
| 092404.end	
	stpapi.put.field("tdilc4102s000","tdilc401.stun",order.stun)
	stpapi.put.field("tdilc4102s000","tdilc401.qstr",str$(order.qty))
	rc = stpapi.insert("tdilc4102s000",1,msg)
	if isspace(msg) then
		stpapi.get.field( "tdilc4102s000", "tdilc401.sera", strsera )
		stpapi.get.field( "tdilc4102s000", "tdilc401.serb", strserb )
	endif
	stpapi.end.session("tdilc4513s000")
	stpapi.end.session("tdilc4102s000")
	stpapi.end.session("tdilc4101m000")
}

Is there any possibility that the part you are trying might have some of the flags set that might make it think it is lot controlled?
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #6  
Old 12th February 2018, 14:53
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,965
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
I went and found where I call my routine - in my case the lot and date are empty in that table below.

insert_outbound(tdapi401.runn, tdilc.kooa.act.sfc, tdapi401.orno, tdapi401.pono,
tdapi401.loca, tiitm001.stgu, tdapi401.qsts, tdapi401.clot, tdapi401.date,
strsera, strserb, errmsg)
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
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
Storage Unit vs Inventory Unit donnawren Distribution, Transportation & Warehousing 5 20th January 2015 20:56
Handling Unit functionality baazigar Distribution, Transportation & Warehousing 4 19th February 2012 16:54
Picked Quantity cannot be greater than Released Quantity in Inventory Unit toaaron Distribution, Transportation & Warehousing 1 21st January 2005 22:06
using dll tiitmdll0003 ckassab Tools Development 2 7th December 2004 01:52
Negative Quantity not allowed riazsayeed Distribution, Transportation & Warehousing 1 26th March 2004 14:52


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


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