alibaba
16th September 2004, 17:32
hi guys:
I was tried insert a BOm record into tibom1501m000 via AFS, in AFS manual,insert a record to type3 form I must set stpapi.change.view first,
but I want insert a new line of record into bom , execute stpapi.change.view return value equal "2"(Another view found (err.mesg is empty)).and other stapi.insert/stpapi.syna...can't be execute!
example in the manual:
stpapi.put.field("dtfsa1502m000", "dtfsa102.seno", str$(i.seno)
ret = stpapi.change.view("dtfsa1502m000", error.msg)
if ret = 1 then
ret = stpapi.synchronize.dialog("dtfsa1502m000", "add", error.msg)
if ret then
stpapi.put.field("dtfsa1102s000", "dtfsa102.pono", str$(new.pono)
stpapi.put.field("dtfsa1102s000", "dtfsa102.name", new.name)
ret = stpapi.insert("dtfsa1502m000", true, error.msg)
if not ret then
ret = stpapi.recover("dtfsa1102s000", error.msg)
endif
endif
stpapi.end.session("dtfsa1502m000", error.msg)
if insert a new record into "dtfsa1502m000"."ret = stpapi.change.view("dtfsa1502m000", error.msg)" return 2!
why?
and how to insert a new record into a type3 form?
thank a lot!
I was tried insert a BOm record into tibom1501m000 via AFS, in AFS manual,insert a record to type3 form I must set stpapi.change.view first,
but I want insert a new line of record into bom , execute stpapi.change.view return value equal "2"(Another view found (err.mesg is empty)).and other stapi.insert/stpapi.syna...can't be execute!
example in the manual:
stpapi.put.field("dtfsa1502m000", "dtfsa102.seno", str$(i.seno)
ret = stpapi.change.view("dtfsa1502m000", error.msg)
if ret = 1 then
ret = stpapi.synchronize.dialog("dtfsa1502m000", "add", error.msg)
if ret then
stpapi.put.field("dtfsa1102s000", "dtfsa102.pono", str$(new.pono)
stpapi.put.field("dtfsa1102s000", "dtfsa102.name", new.name)
ret = stpapi.insert("dtfsa1502m000", true, error.msg)
if not ret then
ret = stpapi.recover("dtfsa1102s000", error.msg)
endif
endif
stpapi.end.session("dtfsa1502m000", error.msg)
if insert a new record into "dtfsa1502m000"."ret = stpapi.change.view("dtfsa1502m000", error.msg)" return 2!
why?
and how to insert a new record into a type3 form?
thank a lot!