rahul_mittal23
25th July 2013, 13:35
Please advise , as my code is not working.... its giving me message "Payment/Receipt not allowed... though i am passing the value for the same.


date = date.num()
bank = "B43"
paym = "RCH"
comp = get.compnr()
stpapi.put.field("tfcmg4120m000", "tfcmg401.btno",str$(69565))
stpapi.put.field("tfcmg4120m000", "tfcmg401.cuno",str$(tdinc011.cuno))
stpapi.put.field("tfcmg4120m000", "tfcmg401.comp",str$(tdinc011.comp))
stpapi.put.field("tfcmg4120m000", "tfcmg401.tadv",str$(3))
stpapi.put.field("tfcmg4120m000", "tfcmg401.ttyp",str$(tdinc011.ttyp))
stpapi.put.field("tfcmg4120m000", "tfcmg401.ninv",str$(tdinc011.invn))
stpapi.put.field("tfcmg4120m000", "tfcmg401.srno",str$(0))
stpapi.put.field("tfcmg4120m000", "tfcmg401.amnt",str$(tdinc011.chea))
stpapi.put.field("tfcmg4120m000", "tfcmg401.lapa",str$(0))
stpapi.put.field("tfcmg4120m000", "tfcmg401.disa",str$(0))
stpapi.put.field("tfcmg4120m000", "tfcmg401.pdam",str$(0))
stpapi.put.field("tfcmg4120m000", "tfcmg401.plan",str$(date))
stpapi.put.field("tfcmg4120m000", "tfcmg401.refr",str$(tdinc011.cheq))
stpapi.put.field("tfcmg4120m000", "tfcmg401.paym",str$(paym))
stpapi.put.field("tfcmg4120m000", "tfcmg401.bank",str$(bank))
stpapi.insert("tfcmg4120m000",true,error.msg)
if isspace(error.msg) then
stpapi.end.session("tfcmg4120m000")
else
message("%s",error.msg)
stpapi.recover("tfcmg4120m000",error.msg)
stpapi.end.session("tfcmg4120m000")
return
endif

rahul_mittal23
25th July 2013, 13:39
Its Baan IVc4..

Tom de Valk
7th August 2013, 10:11
What is the exact error message? Do you have an (error) message code?

Maybe the Receipt Method 'RCH' does not exist in the financial company you are working in?