jmawuh
4th August 2004, 15:20
Hi,
I'm having problems with the session tdilc4102s000.
First of all -we are using Baan4c4 with sp 15
first we generate clots in lotcontrol, then we generate sales orders which gets this item on stock. and there is the problem - the session tdilc4102s000 doesent work and the errormessage "Item/serialno does not exist" comes up every time - but when i finish the generated salesorder manually the session tdilc4102s000 works without any problems
- enclused you'll find the part of the code which doesnt work
function long create.sls.order(domain tccuno cuno.or, long grno.or, domain tcitem item.or, domain tdltc.clot clot.or, domain tcqsl1 oqua.or)
{
long retval
string err_msg(40)
string orno.or(6)
string pono.or(4)
if grno.or = 9 then | 9 = Nummernkreis für Rücklieferungen
stpapi.put.field(SornoK, "tdsls040.orno", str$(grno.or)) |Nummernkreis
stpapi.put.field(SornoK, "tdsls040.cuno", str$(cuno.or)) |Kundennummer
stpapi.put.field(SornoK, "tdsls040.cotp", "RL1")
retval = stpapi.insert(SornoK,true, err_msg) |DS einfügen
if not retval then | --> Errormessages ausgeben
while true
stpapi.get.mess.code(SornoK,err_msg)
message(err_msg)
if isspace(err_msg) then
break
endif
error=1
endwhile
stpapi.recover(SornoK,err_msg)
else
|Auftragspositionen anlegen
stpapi.handle.subproc(SornoK, SornoF, "add") |Handler für Subprog erstellen
err_msg = ""
stpapi.get.field(SornoK, "tdsls040.orno", orno.or)
|stpapi.application.option(SornoK, 1, 1, err_msg)
stpapi.continue.process(SornoK, err_msg)
stpapi.put.field(SornoF, "tdsls041.orno", orno.or)
stpapi.put.field(SornoF, "tdsls041.pono", "10")
stpapi.put.field(SornoF, "tdsls041.item", item.or)
stpapi.put.field(SornoF, "tdsls041.oqua", str$(oqua.or))
stpapi.put.field(SornoF, "tdsls041.clot", clot.or)
retval = stpapi.insert(SornoF,true, err_msg)
if not retval then | --> Errormessages ausgeben
while true
stpapi.get.mess.code(SornoF,err_msg)
message(err_msg)
if isspace(err_msg) then
break
endif
error=1
endwhile
stpapi.recover(SornoF,err_msg)
else
|Auslagerung mit MINUS Menge erstellen
stpapi.handle.subproc(SornoF, SIlc, "add") |Handler für Subprog erstellen
err_msg = ""
stpapi.get.field(SornoF, "tdsls041.pono", pono.or)
stpapi.continue.process(SornoF, err_msg)
|stpapi.put.field(SIlc, "tdilc401.koor", str$(tdilc.koob.act.sls))
|stpapi.put.field(SIlc, "tdilc401.orno", orno.or)
stpapi.put.field(SIlc, "tdilc401.pono", pono.or)
|stpapi.put.field(SIlc, "tdilc401.sera", "0")
|stpapi.put.field(SIlc, "tdilc401.serb", "1")
stpapi.put.field(SIlc, "tdilc401.item",item.or)
stpapi.put.field(SIlc, "tdilc401.clot"," clot.or)
stpapi.put.field(SIlc, "tdilc401.qstr", str$(oqua.or))
stpapi.put.field(SIlc, "tdilc401.qsts", str$(oqua.or))
stpapi.put.field(SIlc, "tdilc401.stun", "st")
retval = stpapi.insert(SIlc,true, err_msg)
if not retval then | --> Errormessages ausgeben
while true
stpapi.get.mess.code(SIlc,err_msg)
message(err_msg)
if isspace(err_msg) then
break
endif
error=1
endwhile stpapi.recover(SIlc,err_msg)
else
stpapi.continue.process(SIlc, err_msg)
endif
endif
endif
stpapi.end.session("tdilc4513s000")
stpapi.end.session(SIlc, err_msg)
stpapi.handle.subproc(SornoF, SIlc, "kill")
stpapi.end.session(SornoF, err_msg) | Subsession schliessen
stpapi.handle.subproc(SornoK, SornoF, "kill") | Handler für Subsession zerstören
stpapi.end.session(SornoK, err_msg) | Session schliessen
endif
return(retval)
}
sorry, but all formating has been lost, when i copied the code !!!
Thanx alot
June
I'm having problems with the session tdilc4102s000.
First of all -we are using Baan4c4 with sp 15
first we generate clots in lotcontrol, then we generate sales orders which gets this item on stock. and there is the problem - the session tdilc4102s000 doesent work and the errormessage "Item/serialno does not exist" comes up every time - but when i finish the generated salesorder manually the session tdilc4102s000 works without any problems
- enclused you'll find the part of the code which doesnt work
function long create.sls.order(domain tccuno cuno.or, long grno.or, domain tcitem item.or, domain tdltc.clot clot.or, domain tcqsl1 oqua.or)
{
long retval
string err_msg(40)
string orno.or(6)
string pono.or(4)
if grno.or = 9 then | 9 = Nummernkreis für Rücklieferungen
stpapi.put.field(SornoK, "tdsls040.orno", str$(grno.or)) |Nummernkreis
stpapi.put.field(SornoK, "tdsls040.cuno", str$(cuno.or)) |Kundennummer
stpapi.put.field(SornoK, "tdsls040.cotp", "RL1")
retval = stpapi.insert(SornoK,true, err_msg) |DS einfügen
if not retval then | --> Errormessages ausgeben
while true
stpapi.get.mess.code(SornoK,err_msg)
message(err_msg)
if isspace(err_msg) then
break
endif
error=1
endwhile
stpapi.recover(SornoK,err_msg)
else
|Auftragspositionen anlegen
stpapi.handle.subproc(SornoK, SornoF, "add") |Handler für Subprog erstellen
err_msg = ""
stpapi.get.field(SornoK, "tdsls040.orno", orno.or)
|stpapi.application.option(SornoK, 1, 1, err_msg)
stpapi.continue.process(SornoK, err_msg)
stpapi.put.field(SornoF, "tdsls041.orno", orno.or)
stpapi.put.field(SornoF, "tdsls041.pono", "10")
stpapi.put.field(SornoF, "tdsls041.item", item.or)
stpapi.put.field(SornoF, "tdsls041.oqua", str$(oqua.or))
stpapi.put.field(SornoF, "tdsls041.clot", clot.or)
retval = stpapi.insert(SornoF,true, err_msg)
if not retval then | --> Errormessages ausgeben
while true
stpapi.get.mess.code(SornoF,err_msg)
message(err_msg)
if isspace(err_msg) then
break
endif
error=1
endwhile
stpapi.recover(SornoF,err_msg)
else
|Auslagerung mit MINUS Menge erstellen
stpapi.handle.subproc(SornoF, SIlc, "add") |Handler für Subprog erstellen
err_msg = ""
stpapi.get.field(SornoF, "tdsls041.pono", pono.or)
stpapi.continue.process(SornoF, err_msg)
|stpapi.put.field(SIlc, "tdilc401.koor", str$(tdilc.koob.act.sls))
|stpapi.put.field(SIlc, "tdilc401.orno", orno.or)
stpapi.put.field(SIlc, "tdilc401.pono", pono.or)
|stpapi.put.field(SIlc, "tdilc401.sera", "0")
|stpapi.put.field(SIlc, "tdilc401.serb", "1")
stpapi.put.field(SIlc, "tdilc401.item",item.or)
stpapi.put.field(SIlc, "tdilc401.clot"," clot.or)
stpapi.put.field(SIlc, "tdilc401.qstr", str$(oqua.or))
stpapi.put.field(SIlc, "tdilc401.qsts", str$(oqua.or))
stpapi.put.field(SIlc, "tdilc401.stun", "st")
retval = stpapi.insert(SIlc,true, err_msg)
if not retval then | --> Errormessages ausgeben
while true
stpapi.get.mess.code(SIlc,err_msg)
message(err_msg)
if isspace(err_msg) then
break
endif
error=1
endwhile stpapi.recover(SIlc,err_msg)
else
stpapi.continue.process(SIlc, err_msg)
endif
endif
endif
stpapi.end.session("tdilc4513s000")
stpapi.end.session(SIlc, err_msg)
stpapi.handle.subproc(SornoF, SIlc, "kill")
stpapi.end.session(SornoF, err_msg) | Subsession schliessen
stpapi.handle.subproc(SornoK, SornoF, "kill") | Handler für Subsession zerstören
stpapi.end.session(SornoK, err_msg) | Session schliessen
endif
return(retval)
}
sorry, but all formating has been lost, when i copied the code !!!
Thanx alot
June