Hello Experts,
I have a problem with message deletion.
In CRM_SRV_SDL BAdI , i call a Function Module ( non RFC call ). If this FM fails I log an error message using FUNCTION 'CRM_MESSAGE_COLLECT'
and then the above failed FM is called again in a TRFC queue in a Back ground task.
Within this queue if the FM is executed correctly I need to delete the error message.
I use the following to achieve that:
* Clear any old integration error message from CRM order
ls_idno-sign = 'I'.
ls_idno-option = 'EQ'.
ls_idno-low-msgid = 'Z_MRS_CRM'.
ls_idno-low-msgno = '017'.
APPEND ls_idno TO lt_idno[].
CALL FUNCTION 'CRM_MESSAGES_DELETE'
EXPORTING
it_r_msgidno = lt_idno
iv_ref_object = iv_crm_h_guid
iv_ref_kind = 'A'
EXCEPTIONS
appl_log_error = 1
OTHERS = 2.
Unfortunately this is not working. 'CRM_MESSAGES_DELETE' is neither raising an exception nor deleting the message.
Am i missing something?
Thanks for your help in advance.
Best Regards,
Setu