som.papai
10th September 2007, 15:24
Hi all,
i want to write a AFS for "Generation purchase order from production order"
for that session is "tisfc2250m000" this,ok.
But when stpapi.continue.process is click error showing "Report not found"
plz help me.

script is this


v.cotp="P04"
v.grno=48
spool.device = "D"
spool.preview = true

stpapi.put.field( "tisfc2250m000", "suno.f", v.suno)

stpapi.put.field( "tisfc2250m000", "pdno.f", str$(v.pdno))
stpapi.put.field( "tisfc2250m000", "order.series", str$(v.grno))

stpapi.put.field( "tisfc2250m000", "ordr.type", v.cotp)
stpapi.set.report("tisfc2250m000", "tisfc225001000", spool.device, error)|at this stage error variable is null

stpapi.continue.process("tisfc2250m000", error) |here error variable got value "Report Not Found"
stpapi.print.report("tisfc2250m000", error)
stpapi.end.session("tisfc2250m000",error)

Regards
Sudipta Som

mr_suleyman
10th September 2007, 15:35
Did you check your report is avaliable on your current language type and compiled ???


G.Luck !

george7a
10th September 2007, 16:35
Hi,

In the stpapi.set.report function, you have to add "r" to the name of the report. Example:


stpapi.set.report("tisfc2250m000", "rtisfc225001000", spool.device, error)
stpapi.continue.process("tisfc2250m000", error)
| it is better to add this condition
if isspace(error) then
stpapi.print.report("tisfc2250m000", error)
endif
stpapi.end.session("tisfc2250m000",error)

I hope it helps,

- George

som.papai
11th September 2007, 06:07
thankx.
:)

Mario
16th December 2011, 10:06
Hi,

Can someone post the complete script (AFS for tisfc2250 - generate subcontracting purchase orders - B4). The script I wrote does not generate any purchase order. No messages / errors in AFS. AFS log is OK. We created all kind of AFS scripts for this customer without any problem.

Thanks !