günther
27th September 2004, 17:15
Hi,
I'm currently trying to control tisfc1101m000 via afs. I can toggle tisfc010.fixd without problems but I cannot change tisfc010.rsdt and tisfc010.rsdp.
Has anyone ever tried or even been succesful?
Günther
mark_h
27th September 2004, 17:29
Not done a AFS on this session - just wondering are you changing fxpd from yes to no? If so have you tried changing the flag doing a save and end, then refinding the record to update on the other fields? Maybe if you post the code someone else will see something.
Mark
günther
28th September 2004, 11:09
My problem was that I passed the date in a wrong format. I played with different versions of date such as ddmmyyyy, ddmmyyyy, dd.mm.yy and so on, but
domain tcdate new.date
new.date = date.num()
stpapi.put.field("tisfc1101m000", "tisfc010.rsdt", str$(new.date))
is the way to go for dates... I guess that's nowhere documented?
Günther
mark_h
28th September 2004, 15:19
Or you can skip the new.date and do something like this:
stpapi.put.field("tdilc4401m000","prdt.t",str$(date.num()+1000))
I use this format all over the place to push out date ranges.
Mark
Bruce21
7th December 2004, 12:17
Hello,
i have the same problem with this session:
By saving it with AFS tisfc010.rpdt doesn't update.
Thank you in advance, kind regards Martin
Below is my code:
stpapi.put.field(S1, "tisfc010.pdno", str$("802482"))
stpapi.put.field(S1, "tisfc010.opno", str$("220"))
retcode = stpapi.find(S1)
if retcode = 1 then
stpapi.put.field(S1, "tisfc010.rsdt", str$(date.num()))
retcode = stpapi.save(S1,err_msg)
stpapi.end.session(S1)
günther
7th December 2004, 14:22
You mean tisfc010.prdt? I'm not really familiar with that field, but I have been told to use tisfc010.rsdt for our purposes.
Bruce21
7th December 2004, 14:34
sorry for the mistake
i mean tisfc010.prdt as you mentioned before, but the above afs-code doesn't change this field. (??)
Andreas
7th December 2004, 16:07
... I guess that's nowhere documented?
SYNTAX
void stpapi.put.field(string session, string field, string value, [long element])
ARGUMENTS
session
Name of the session this command is executed on.
field
Name of the field whose value is desired.
value
The value of the field specified in field is set to the contents of this parameter. Any necessary type conversion is performed, however, Date and UTC fields must be put in the internal Baan format. Enum fields must be put in the internal byte value.
Examples: str$(date.num()), str$(-123.45), str$(etol(tcyesno.yes)).
element
Array element whose value is to be set in the case of arrays or
repeating fields.
From 'Developer's Guide for Application Function Server' (U8006A US) ;)
Andreas