komal_hole
17th July 2020, 09:02
Hi everyone,

I am trying to delete payment advice record through AFS and that is MMT Session tfcmg1609m000 (Payment Advice header Session) & tfcmg1101m000 (Payment advice Line Sub session )

for that i have wrote this code. i am expecting that when we try to delete the record from header session it should delete complete record along with respective lines as well

code is executing without any error message but record is not deleting

stpapi.put.field("tfcmg1609m000", "tfcmg109.btno", str$(temp_btno2))
ret = stpapi.find("tfcmg1609m000", error.msg)
ret = stpapi.mark("tfcmg1609m000",error.msg)
|stpapi.get.field("tfcmg1609m000","tfcmg109.btno",error)
if ret = 1 then
ret = stpapi.delete("tfcmg1609m000", true, error.msg)
stpapi.enum.answer("tfcmg1609m000", "tfcmg00008", tcyesno.yes)
stpapi.enum.answer("tfcmg1609m000", "tfcmg00019", tcyesno.yes)
if not ret then
ret = stpapi.recover("tfcmg1609m000", recover.msg)
endif
endif

Please kindly give some suggestions..

Note: when we delete the record if Payment advice status is Assign then system ask 2 message 1.tfcmg00008 and 2.tfcmg00019


Thanks in advance,
Komal

mark_h
20th July 2020, 15:08
When you run the session manually does it work that way? I mean typically in 4c4 we had to delete lines before deleting a header record..

Seems there are also some issues with MMT sessions and AFS. Might be better off using dal2 functionality.