hardei
13th November 2007, 06:17
Dear Frnds..

I am copying the Sales Order from one company to another company.I am able to transfer the sales order header(tdsls4500m000,tdsls4100m000) and sales order lines(tdsls4501m000,tdsls4101s000).But in some cases where lines is splitted(tdsls4501m200,tdsls4101s200) i am not able to copy those lines.."Giving error is session tdsls4101s200 been updated by baan user".

There is one split delivery check box on the tdsls4101s000.how to mark it yes.
How to make button unabled

please have a look to code

if tdsls401.sqnb > 0 then
orno1 = tdsls401.orno
pono1 = tdsls401.pono
sqnb1 = tdsls401.sqnb
oqua1 = tdsls401.oqua

stpapi.put.field("tdsls4501m200","tdsls401.pono",str$(pono1))
stpapi.put.field("tdsls4501m200","tdsls401.sqnb",str$(tdsls401.sqnb))

ret1 = stpapi.synchronize.dialog("tdsls4501m200","add",error)
stpapi.put.field("tdsls4101s200","tdsls401.pono",str$(pono1))
stpapi.put.field("tdsls4101s200","tdsls401.sqnb",str$(sqnb1))
stpapi.put.field("tdsls4101s200","tdsls401.oqua",str$(oqua1))

ret1 = stpapi.insert("tdsls4101s200",1,error)

if error <> "" then
message("Problem")
endif
stpapi.end.session("tdsls4101s200")
stpapi.end.session("tdsls4501m200")
endif
stpapi.end.session("tdsls4101s000")
stpapi.end.session("tdsls4501m000")

Awaiting for reply

Thanks in advance

Regards,
Hardei

mark_h
13th November 2007, 15:02
I do not know anything about these sessions, but to check or uncheck a box it should just be a stpapi.put.field command. Just lookup the domain on the form and put the value to check/uncheck the box(str$(tgyenox.yes) to check a box and str$(tgyenox.no) to uncheck a box). Just remember to use the correct domain for the field.