cancel
Showing results for 
Search instead for 
Did you mean: 

messages

former_member193027
Participant
0 Kudos

hi,

In EVM status we have large No of unprocessed and invalid messages. Can you provide me the best practice for deleting this messages .Also can there be automation done whereby a) if messages fail, they would be deleted from system automatically  b) reprocessing of failed EVM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Dipak,

A) There is no standard utility available to automatically delete failed event messages. But there are archiving programs available which you can schedule as

background job based on Event Dates to delete unprocessed and/or failed

event messages. Follow this two programs to first archive and subsequent

delete those entries

1) /SAPTRX/ARCHIVE_EVM_WRITE - Provide Event dates as selection to

run this program faster

2) /SAPTRX/ARCHIVE_EVM_DELETE - Select in production mode

B) There is no standard utility available to reprocess the failed EVM.

You will have to create custom utility to find Failed EVM records and change

necessary information and then reprocess events for /SAPTRX/BAPI_EH_ADDEVENTMSG_02.

Hope this explain. Please do let me know if more information is required.

Thanks,

Kinjal Rathod

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Dipak,

To mitigate the risk of failing and accumulating unprocessed message in EVM tables.

First, schedule the below batch job to run every 15 or 30 mins.

Program /SAPTRX/PROCESS_LOCKED_EHS - Locked EH Message Processors

Second, Schedule this batch job program /SAPTRX/DELETE_UNPR_MSG in background and specify the residence time (RT) in days for example 120 days.  If you don't give residence time, then system takes default 100 days.  It will delete unprocessed messages belong to inactive EH older than residence time.

Before deleting any messages or event handlers, you followed the archiving and deleting strategy because once you delete permanently then you can't retrieve the message.

Regards

GGOPII

Former Member
0 Kudos

Hello Gopi,

/SAPTRX/DELETE_UNPR_MSG program is not looking for any events locked under /SAPTRX/LOCKEDEH table and therefore if the event data is deleted using the unprocess message program, it will keep that event message entry orphan in lockedeh table. And it will never be deleted from /SAPTRX/LOCKEDEH tables.

Specially for high volume customers, where the data retention is always the challenge, it will be best practice to use archiving programs instead standalone utility program to delete data from system. And standard EVM_WRITE program also follow residence checks and more flexibility to archive data on different selection criteria compare to /SAPTRX/DELETE_UNPR_MSG program.

Thanks,

Kinjal Rathod

former_member193027
Participant
0 Kudos

Business do not want to archive since they want to just delete the messages. Hence may be we need to drop off the archiving concept here

Former Member
0 Kudos

Hello Dipak,

Still you can use these programs to delete the records from system. You no need to save archive files in other system.

Thanks,

Kinjal Rathod

Former Member
0 Kudos

Hi Kinjal,

The program you given which will delete all Event Message irrespective of processed and unprocessed messages.  As Dipak client is not performing archiving, so this would not be a right solution as per my understanding. 

This is Dipak query

"hi,

In EVM status we have large No of unprocessed and invalid messages. Can you provide me the best practice for deleting this messages .Also can there be automation done whereby a) if messages fail, they would be deleted from system automatically  b) reprocessing of failed EVM".

As per my knowledge, scheduling the 

Program /SAPTRX/PROCESS_LOCKED_EHS - Locked EH Message Processors and scheduling this batch job program /SAPTRX/DELETE_UNPR_MSG would be an ideal solution.  I have checked the program /SAPTRX/DELETE_UNPR_MSG today and simulated in system, it retrieves the data from below tables:

/saptrx/evm_unpr

/saptrx/evm_hdr

/saptrx/evm_cst

/saptrx/evm_edl

/saptrx/evm_lai

/saptrx/evm_lid

/saptrx/evm_mer

/saptrx/evm_ned

/saptrx/evm_nev

/saptrx/evm_pai

/saptrx/evm_pid

/saptrx/evm_thd

/saptrx/evm_txl

/saptrx/evm_afb

/saptrx/evm_afc

/saptrx/evm_afh

/saptrx/evm_afr

/saptrx/evm_ref

/saptrx/evm_sta

/saptrx/evm_par

/saptrx/evm_eem

/saptrx/evm_doc

Regards

GGOPII

Former Member
0 Kudos

Hello Gopi,

The reason to go with Standard deletion approach is mentioned below:

1) Events which are in invalid status will never recorded in /SAPTRX/EVM_UNPR table and never be picked up by report /SAPTRX/DELETE_UNPR_MSG (This is one of the requirement of Dipak to delete failed messages too)

2) /SAPTRX/EVM_WRITE program only delete entries of processed messages if those messagres are not linked to any event handler (So saying it will delete all processed message irrespective is not true). All processed messages are only eligible for EVM_WRITE if respective event handler is deleted from system, which means the event messages are irrelevant and ready for deletion

3) SAP never recommend to use /SAPTRX/DELETE* program in production system and use archiving deletion (Even if you dont want to store archiving files)

Hope this explains now.

Regards,

Kinjal Rathod