I am VERY new to SAP / ABAP so please ignore my lack of knowledge.
I will try to explain this in as detail as possible.
I am creating leave request using PT_ARQ_REQUEST_EXECUTE and command EXECUTE_SAVE and it works no problem.
I am doing same for update with command either being EXECUTE_SAVE for saving or EXECUTE_SEND for submit.
but when I try to delete using the EXECUTE_DELETE command, I get CX_OS_OBJECT_NOT_FOUND runtime error.
The leave request exist. I can update, approve, reject but just can't delete.
Even after getting that error, I can go back and approve or update that same request. So leave request record is not the problem.
I am also calling the following two function modules before I call the execute one:
PT_ARQ_REQUEST_PREPARE with command PREPARE_DELETE
PT_ARQ_REQUEST_CHECK with command CHECK_DELETE
and then
PT_ARQ_REQUEST_EXECUTE with command EXECUTE_DELETE.
If the leave request didn't exist, would I not get the runtime way earlier?
At this point, I have no idea what to do.
Can someone please point me in the right direction?
Thank you.