User login
|
|
Frontpage Sponsor
|
|
Poll
|
How big is your Baan-DB (just Data AND Indexes) 0 - 200 GB 16% 200 - 500 GB 28% 500 - 800 GB 2% 800 - 1200 GB 9% 1200 - 1500 GB 9% 1500 - 2000 GB 14% > 2000 GB 21% Total votes: 43 |
Baanboard at LinkedIn
|

|
|
|
 |

9th February 2018, 19:27
|
 |
Member
|
|
Join Date: Dec 2006
Location: Sumter, South Carolina
Posts: 32
|
|
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)
}
|

9th February 2018, 22:23
|
 |
Member
|
|
Join Date: Dec 2006
Location: Sumter, South Carolina
Posts: 32
|
|
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.
|

12th February 2018, 00:41
|
 |
Guru
|
|
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,194
|
|
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.
|

12th February 2018, 14:29
|
 |
Member
|
|
Join Date: Dec 2006
Location: Sumter, South Carolina
Posts: 32
|
|
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.
|

12th February 2018, 14:48
|
 |
Guru
|
|
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,194
|
|
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.
|

12th February 2018, 14:53
|
 |
Guru
|
|
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,194
|
|
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.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|