cancel
Showing results for 
Search instead for 
Did you mean: 

Messages not deleted from application log.

Former Member
0 Kudos

Hi,

I am using ORDER_SAVE badi. In that I am filling the application log with CRM_MESSAGE_COLLECT.

Messages are getting updated to the existing appln log.

But for every save press, enter press the same error messages are repeating. Previous error messages are not deleted from appln log.

I have used the FM CRM_MESSAGES_DELETE before CRM_MESSAGE_COLLECT. Even then it is not deleted from the appln log.

Please any one help me.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Sirivaram,

Solution for ur problem is:

As you are raising custom errors on ORDER you need to delete them individual in ORDER_SAVE BADI..

first you call FM

CRM_MESSAGES_DELETE by filling

IT_R_MSGID,IT_R_MSGIDNO with ur message numbers and message class which you raised initially,

IV_REF_OBJECT with GUID of the Order,

IV_CALLER_NAME with 'ORDERADM_H',

This will surely delete all the messages you have raised on the Order thru custom dev..\

Siva

Former Member
0 Kudos

Hi Harish,

I am also facing the same problem in my event handlers...Are you able to solve your issue..If so can you pls give me some inputs on this?

Thanks inadvance.

Former Member
0 Kudos

Hi Sirivaram,

I am not very sure about how your BADI implementation looks like.

DATA: LS_MSGIDNO TYPE BAL_S_IDNO,

LT_MSGIDNO TYPE BAL_R_IDNO.

If <error_condition>.

CALL FUNCTION 'CRM_MESSAGE_COLLECT'

EXPORTING

IV_CALLER_NAME = 'ORDER'

IV_REF_OBJECT = LV_GUID

IV_CUMULATE = 'X'.

ELSE.

LS_MSGIDNO-SIGN = 'I'.

LS_MSGIDNO-OPTION = 'EQ'.

LS_MSGIDNO-LOW-MSGID = <msg class>.

LS_MSGIDNO-LOW-MSGNO = <msg no>.

APPEND LS_MSGIDNO TO LT_MSGIDNO.

CALL FUNCTION 'CRM_MESSAGES_DELETE'

EXPORTING

IT_R_MSGIDNO = LT_MSGIDNO

IV_REF_OBJECT = LV_GUID

IV_CALLER_NAME = 'ORDER'.

Hope this solves your problem!

Jash.