klesch
18th July 2002, 11:15
Hi!
I wrote this function. Everything works OK, except that stpapi.update does not do anything. There is no error message, the return value says that the record was stored. But it really isn't.
It's Baan 5.
Please, help.
#pragma used dll ottstpapihand
#define SESS_1 "tisfc0530m000"
#define SESS_2 "tisfc0130s000"
function extern tidpldll0001.zakljuci.operacijo.API(domain tcpdno pdno,
domain tcopno opno,
domain tisfc.utcm cmdt,
domain tiqep2 qcmp,
domain tiqep2 qrjc)
{
string error$(64)
stpapi.put.field(SESS_1, "tisfc010.pdno", pdno)
stpapi.put.field(SESS_1, "tisfc010.opno", str$(opno))
if stpapi.find(SESS_1, error$) = 1 then
if stpapi.mark(SESS_1, error$) then
if stpapi.synchronize.dialog(SESS_1, "modify", error$) then
stpapi.put.field(SESS_2, "tisfc010.cmdt", str$(cmdt))
stpapi.put.field(SESS_2, "qcmp.form", str$(qcmp))
stpapi.put.field(SESS_2, "qrjc.form", str$(qrjc))
stpapi.enum.answer(SESS_2, "tisfc02023", tcyesno.yes)
stpapi.enum.answer(SESS_2, "tisfc01027", tcyesno.no)
stpapi.enum.answer(SESS_2, "tisfc02029", tcyesno.yes)
stpapi.enum.answer(SESS_2, "tisfc01302", tcyesno.yes)
if stpapi.update(SESS_2, true, error$) = 0 then
message(error$)
endif
stpapi.end.session(SESS_2)
endif
endif
endif
stpapi.end.session(SESS_1)
}
I wrote this function. Everything works OK, except that stpapi.update does not do anything. There is no error message, the return value says that the record was stored. But it really isn't.
It's Baan 5.
Please, help.
#pragma used dll ottstpapihand
#define SESS_1 "tisfc0530m000"
#define SESS_2 "tisfc0130s000"
function extern tidpldll0001.zakljuci.operacijo.API(domain tcpdno pdno,
domain tcopno opno,
domain tisfc.utcm cmdt,
domain tiqep2 qcmp,
domain tiqep2 qrjc)
{
string error$(64)
stpapi.put.field(SESS_1, "tisfc010.pdno", pdno)
stpapi.put.field(SESS_1, "tisfc010.opno", str$(opno))
if stpapi.find(SESS_1, error$) = 1 then
if stpapi.mark(SESS_1, error$) then
if stpapi.synchronize.dialog(SESS_1, "modify", error$) then
stpapi.put.field(SESS_2, "tisfc010.cmdt", str$(cmdt))
stpapi.put.field(SESS_2, "qcmp.form", str$(qcmp))
stpapi.put.field(SESS_2, "qrjc.form", str$(qrjc))
stpapi.enum.answer(SESS_2, "tisfc02023", tcyesno.yes)
stpapi.enum.answer(SESS_2, "tisfc01027", tcyesno.no)
stpapi.enum.answer(SESS_2, "tisfc02029", tcyesno.yes)
stpapi.enum.answer(SESS_2, "tisfc01302", tcyesno.yes)
if stpapi.update(SESS_2, true, error$) = 0 then
message(error$)
endif
stpapi.end.session(SESS_2)
endif
endif
endif
stpapi.end.session(SESS_1)
}