rochus
9th August 2006, 22:20
i'm trying to import sales order header into Baan (5),
but after
stapi.insert i got message ("Business partner or overall business partner" is
inactive".
Message is coming from tipcs-module. i fill up just 6 fields,if i do this manually, it works.
anybody imported sales order headers in b5 oder ln ?
thanks
mark_h
9th August 2006, 23:43
Have you searched this forum for the session number? Try that first - there are a lot of threads on sales orders and you might find a solution there.
If not post your code and someone may see the problem. Also keep in mind that you may just need a stpapi update or a session update.
rochus
10th August 2006, 00:02
yes, i searched through all available sources,
but mostly thy are for baan4 ore or b5 - positions
here's my source:
stpapi.find("tdsls4500m000",error.mess)
ret = stpapi.synchronize.dialog("tdsls4500m000", "add", error.mess)
if ret then
stpapi.put.field("tdsls4100s000","tdsls400.ofbp",cucrm001.bpid)
stpapi.put.field("tdsls4100s000","tdsls400.stbp",cucrm001.bpid)
stpapi.put.field("tdsls4100s000","tdsls400.odat",str$(cucrm001.qdate))
stpapi.put.field("tdsls4100s000","tdsls400.corg", str$(etol(cucrm000.corg)))
stpapi.put.field("tdsls4100s000","tdsls400.crep",cucrm001.crep)
stpapi.put.field("tdsls4100s000","tdsls400.refb",cucrm001.refb)
stpapi.put.field("tdsls4100s000","tdsls400.sotp",cucrm000.cotp)
stpapi.put.field("tdsls4100s000","tdsls400.xhky", str$(cucrm001.quote_id))
ret = stpapi.insert("tdsls4500m000", true, error.mess)
if not ret then
if not ret then
stpapi.recover("tdsls4100s000",error.mess)
endif
endif
stpapi.end.session("tdsls4100s000")
stpapi.end.session("tdsls4500m000")
endif
thanks for any hint
mark_h
10th August 2006, 15:51
Well I can't really help with the code - since we do not use this session and it sounds like you are talking LN. The code looks okay from what I gathered on other posts. The first thing I recommend is that you validate the data and the variables - make sure the data works manually and each of the variables are strings. I was just thinking on our system "cotp" is an enumerated variable. Second if you have source code for the sessions you can put them in debug mode and trace through the code to see what the problem is. And also I recommend contacting Baan to see if there is a session or stpapi upgrade you might need. Again I am not sure if that is the case, but it might be.
Good Luck - you may have to wait for an LN expert.
rochus
10th August 2006, 21:27
old:
stpapi.put.field("tdsls4100s000","tdsls400.odat",str$(cucrm001.qdate))
new:
stpapi.put.field("tdsls4100s000","tdsls400.odat.date",str$(cucrm001.qdate))
because i fill only the day, not the time (cucrm001.qdate is tfgld.date),
message was wrong
thanks a lot