manojsharma
10th February 2011, 21:17
Dear All ,

I am writing AFS on whina1210m000 with following code


stpapi.put.field("whina1210m000","item.type.f",str$(tckitm.purchase))
stpapi.put.field("whina1210m000","item.type.t",str$(tckitm.purchase))
stpapi.put.field("whina1210m000","item.f",str$(tidis100.item))
stpapi.put.field("whina1210m000","item.t",str$(tidis100.item))
stpapi.put.field("whina1210m000","warehouse.f", str$(tidis100.cwar)) |
stpapi.put.field("whina1210m000","warehouse.t", str$(tidis100.cwar)) |
stpapi.put.field("whina1210m000", "pr.error.rep",str$(tcyesno.no))
stpapi.put.field("whina1210m000", "on.hand",str$(tcyesno.yes))
stpapi.put.field("whina1210m000", "include.antendated",str$(tcyesno.yes))
stpapi.put.field("whina1210m000", "item.details",str$(tcyesno.yes))
stpapi.put.field("whina1210m000", "supp.zero.stoc",str$(tcyesno.yes))
stpapi.put.field("whina1210m000", "wh.details",str$(tcyesno.yes))
stpapi.put.field("whina1210m000", "inv.det",str$(tcyesno.yes))
stpapi.put.field("whina1210m000", "stoc.date", str$(open.date))
stpapi.put.field("whina1210m000", "currency","INR")
stpapi.set.report("whina1210m000", "rwhina121022001","D", error.msg)
if isspace(error.msg) then stpapi.form.command("whina1210m000",5,"exec.cont.process",error.msg )
endif
stpapi.end.session("whina1210m000")


At the same time stpapi.set.report is with one customized report code of my own , however i tried with available standard report then also it is not comming.
I am not able to Display the report with this AFS however same can be done manually.

Please help urgently.
:confused:

mark_h
10th February 2011, 22:53
First I assume you are putting all the fields on the form and you have the correct field name. Second assumption is that the report number is correct. Then the first thing I would try is to remove str$ from the fields that are already strings. Like item and warehouse.

mark_h
10th February 2011, 22:56
oops I also assume open.date is a format like tcdate. I am also assuming that this is ln and those item.f and item.t are not segmented items.

You should also try this with your report and the standard report.