maheswar
27th January 2011, 15:00
Hi All,
I am writing an afs to insert data into Maintain Transaction session tfgld1101m000 .
I want to execute the start.set(group button) button of this session by afs, so that one new batch number will be created, under which i can insert the transaction type and i can insert other details for that transaction type.
But i am not getting how to execute this start.set(group button) by afs.
Please Help me.
Thanks & Regards,
maheswar
v_kewl
27th January 2011, 15:16
For Group button use function "stpapi.change.view" in you afs script.
Regards,
Gaurav B
maheswar
27th January 2011, 16:07
I have tried , but it is not working.
mark_h
27th January 2011, 16:52
This is the correct forum for AFS questions. You can search this forum for tfgld1101m000 and see what code is available. This is some old code I no longer use
| Always insert a new batch
| batch.number = 0
| stpapi.put.field("tfgld1101m000","tedt.df",str$(date.num()))
| stpapi.put.field("tfgld1101m000","tfgld101.year",str$(year.f))
| stpapi.put.field("tfgld1101m000","fprd.f",str$(peri.f))
| stpapi.put.field("tfgld1101m000","rprd.f",str$(peri.f))
| stpapi.put.field("tfgld1101m000","bref.f","Surrogate Burden Process")
| stpapi.put.field("tfgld1101m000","vyer.f",str$(year.f))
| stpapi.put.field("tfgld1101m000","vprd.f",str$(curr.tax.period))
| rc = stpapi.change.view("tfgld1101m000",errmsg)
|
| stpapi.put.field("tfgld1101m000","tfgld101.ttyp","JSB")
| rc = stpapi.insert("tfgld1101m000", true, errmsg)
| if rc = 0 or not isspace(errmsg) then
| stpapi.error = true
| stpapi.recover("tfgld1101m000",errmsg)
| message("Creating batch problem...call IT." & errmsg)
| stpapi.end.session("tfgld1101m000",errmsg)
| return(true)
| endif
I actually think you can just put all the fields and do an insert.
maheswar
28th January 2011, 16:20
Hello Sir,
Thank you for your suggestion.
By inserting data for all fields its working successfully.
with
Thank & Regards
Mahes