Thamarai
3rd September 2016, 07:38
Hi,
Getting the below error in AFS code. Please help to resolve it.
B:0067488:2016-09-02[14:38:26.574]:::(00020):Flow:3gl call returned: ( "add.set+save" )
B:0067489:2016-09-02[14:38:26.574]:::(00020):Flow: -->> (depth 07): add.api.message.text([<1379> ]=1,[<1380> ]="Command disabled") (in object ottstp_stddll)
B:0067490:2016-09-02[14:38:26.574]:::(00020):Flow: -->> (depth 08): set.api.error.status([<1378> ]=1) (in object ottstp_stddll)
B:0067491:2016-09-02[14:38:26.574]:::(00020):Flow: <<-- (depth 08): set.api.error.status([<1378> ]=1) (in object ottstp_stddll)
B:0067492:2016-09-02[14:38:26.574]:::(00020):Flow: <<-- (depth 07): add.api.message.text([<1379> ]=1,[<1380> ]="Command disabled") (in object ottstp_stddll)
B:0067493:2016-09-02[14:38:26.574]:::(00020):Flow: -->> (depth 07): get.api.error.status.as.string() (in object ottstp_stddll)
B:0067494:2016-09-02[14:38:26.574]:::(00020):Flow: <<-- (depth 07): get.api.error.status.as.string() (in object ottstp_stddll)
Regards,
Thamarai
mark_h
4th September 2016, 20:21
Post your code and that may assist someone in seeing the issue. There could be a variety of reasons command disable error message pop up.
Ajesh
4th September 2016, 20:21
Please post your code..
Thamarai
6th September 2016, 08:04
tfgldf1101m100.put.Batch(g.batch.number)
tfgldf1101m100.put.Fiscal_Year(g.fiscal.year)
tfgldf1101m100.put.Trans._Type(g.transaction.type)
l.ret = tfgldf1101m100.find(l.fs.error.message)
if l.ret <> 1 and not isspace(l.fs.error.message) then
dal.set.error.message("@" & l.fs.error.message)
tfgldf1101m100.end(l.fs.error.message)
return(DALHOOKERROR)
endif
l.ret = tfgldf1101m100.mark(l.fs.error.message)
if l.ret <> 1 and not isspace(l.fs.error.message) then
dal.set.error.message("@" & l.fs.error.message)
tfgldf1101m100.end(l.fs.error.message)
return(DALHOOKERROR)
endif
tfgldf1101m100.Transaction_Entry(l.fs.error.message)
if not isspace(l.fs.error.message) then
dal.set.error.message("@" & l.fs.error.message)
tfgldf1101m100.end(l.fs.error.message)
return(DALHOOKERROR)
endif
return(0)
Thamarai
6th September 2016, 08:04
tfacpf2600m000.put.Business_Partner(ltpro212.bpid)
tfacpf2600m000.put.Supplier_Invoice(ltpro212.bill)
| tfacpf2600m000.put.Reference("Non po payment")
tfacpf2600m000.put.Reference("Non PO Payment") |#ROH.11.04
tfacpf2600m000.put.Invoice_Date(ltpro212.indt)
tfacpf2600m000.put.Due_Date(ltpro212.indt) |#ROH.11.04.N
tfacpf2600m000.put.Rate_Determiner(l.rate.determiner)
tfacpf2600m000.put.Amount(ltpro212.amnt)
tfacpf2600m000.put.Cash_Flow_Reason("A01")
tfacpf2600m000.put.Payment_Method("MCH")
tfacpf2600m000.put.Original_Pay_to_Business_Partner(ltpro212.bpid)
tfacpf2600m000.put.Business_Partner_Bank("")
l.ret = tfacpf2600m000.insert(true, l.fs.error.message)
if not l.ret or not isspace(l.fs.error.message) then
dal.set.error.message("@" & trim$(l.fs.error.message))
l.ret = tfacpf2600m000.recover(l.fs.error.message)
tfacpf2600m000.end()
tfgldf1101m100.end()
return(DALHOOKERROR)
endif
l.ln.invoice = tfacpf2600m000.get.Document()
tfacpf2600m000.end()
tfacpf2600m000.handle.sub.process( "tfacp1120m000", "add")
tfacpf1120m000.put.Ledger_Account(ltpro212.gcod)
tfacpf1120m000.put.Amount(ltpro212.amnt)
tfacpf1120m000.put.Dimension_1(ltpro214.sbud)
tfacpf1120m000.put.Dimension_2(ltpro212.dept)
tfacpf1120m000.put.Tax_Code(ltpro214.ztax)
l.tax.seq = 1
tfacpf1120m000.put.Registration_Number_Sequence_Own(l.tax.seq)
l.ret = tfacpf1120m000.insert(true, l.fs.error.message)
if not l.ret or not isspace(l.fs.error.message) then
dal.set.error.message("@" & trim$(l.fs.error.message))
l.ret = tfacpf1120m000.recover(l.fs.error.message)
tfacpf1120m000.end()
tfacpf2600m000.end()
tfgldf1101m100.end()
return(DALHOOKERROR)
endif
tfacpf1120m000.end()
tfacpf2600m000.end()
tfgldf1101m100.end()
mark_h
6th September 2016, 14:43
Where exactly in the code is the error coming from? Because I am not sure this piece of code is correct. Not familiar with tfacp2600m000 - from this code the tfacp2600m000 session closes, yet you have a stpapi.handle for tfacp2600m000 being the parent session for tfacp1120m000. If tfacp2600 actually closes and returns to the tfgld1101m100 session then it should be the parent of the tfacp1120m000 session. Now if tfacp2600m000 is the parent session for tfacp1120m000 then you need to get rid of the tfacp2600m000.end routine. At the same time I would expect an action on the tfacp2600m000 session that launches tfacp1120m000.
l.ln.invoice = tfacpf2600m000.get.Document()
tfacpf2600m000.end()
tfacpf2600m000.handle.sub.process( "tfacp1120m000", "add")
bhushanchanda
6th September 2016, 15:08
Hi,
AFAIK, tfacp1210m000 can't be used with tfacp2600m000 reason being - the session is not used anymore. I believe, you are trying to insert the purchase invoice transactions. In that case, you need to use tfgld1102m300.
My advice will be, before writing an AFS, create a sample transaction manually, note down the sessions used, draw a flow of the functionality and then write the AFS.
The basic flow here will be ->
tfgld1101m000 - > tfgld1101m100 -> tfacp2600m000 -> tfgld1102m300