cherokee
16th February 2005, 16:38
Hello everyone,
I want to insert some Item Codes by Item Code System but this session (tiitm0112m00) gives this error "Record Already Exists".. which isn't.
.....
select tiitm012.*
from tiitm012
where tiitm012._index1 = {:citt,:dummy.cuno,:suno,:tiitm001.item,:dummy.cntr}
selectdo
selectempty
stpapi.put.field("tiitm0112m000","tiitm012.citt",citt)
stpapi.put.field("tiitm0112m000","tiitm012.cuno","")
stpapi.put.field("tiitm0112m000","tiitm012.suno",suno)
stpapi.put.field("tiitm0112m000","tiitm012.item",tiitm001.item)
stpapi.put.field("tiitm0112m000","tiitm012.cntr","")
stpapi.change.view("tiitm0112m000")
stpapi.put.field("tiitm0112m000","tiitm012.citt",citt)
stpapi.put.field("tiitm0112m000","tiitm012.cuno","")
stpapi.put.field("tiitm0112m000","tiitm012.suno",suno)
stpapi.put.field("tiitm0112m000","tiitm012.item",tiitm001.item)
stpapi.put.field("tiitm0112m000","tiitm012.cntr","")
stpapi.put.field("tiitm0112m000","tiitm012.aitc",aitc)
stpapi.insert("tiitm0112m000",true, err.mesg) |it returns ("Record already Exists")
if not isspace(err.mesg) then
stpapi.recover("tiitm0112m000",err.mesg)
endif
stpapi.end.session("tiitm0112m000")
endselect
Any idea what can be the problem?
Thanks in advance.
Carlos :confused:
I want to insert some Item Codes by Item Code System but this session (tiitm0112m00) gives this error "Record Already Exists".. which isn't.
.....
select tiitm012.*
from tiitm012
where tiitm012._index1 = {:citt,:dummy.cuno,:suno,:tiitm001.item,:dummy.cntr}
selectdo
selectempty
stpapi.put.field("tiitm0112m000","tiitm012.citt",citt)
stpapi.put.field("tiitm0112m000","tiitm012.cuno","")
stpapi.put.field("tiitm0112m000","tiitm012.suno",suno)
stpapi.put.field("tiitm0112m000","tiitm012.item",tiitm001.item)
stpapi.put.field("tiitm0112m000","tiitm012.cntr","")
stpapi.change.view("tiitm0112m000")
stpapi.put.field("tiitm0112m000","tiitm012.citt",citt)
stpapi.put.field("tiitm0112m000","tiitm012.cuno","")
stpapi.put.field("tiitm0112m000","tiitm012.suno",suno)
stpapi.put.field("tiitm0112m000","tiitm012.item",tiitm001.item)
stpapi.put.field("tiitm0112m000","tiitm012.cntr","")
stpapi.put.field("tiitm0112m000","tiitm012.aitc",aitc)
stpapi.insert("tiitm0112m000",true, err.mesg) |it returns ("Record already Exists")
if not isspace(err.mesg) then
stpapi.recover("tiitm0112m000",err.mesg)
endif
stpapi.end.session("tiitm0112m000")
endselect
Any idea what can be the problem?
Thanks in advance.
Carlos :confused: