SAP Note 2197465 - E - 20231018

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

SAP Knowledge Base Article

2197465 - SAPconnect (BCS) mails archiving and deletion in CRM including ERMS
specific aspects
Component: CRM-IC-EMS (E-Mail Response Management System), Version: 7, Released On: 01.05.2023

Symptom
You are using BCS mails in SAP CRM business processes. You want to remove the BCS mails from the system together with
the CRM business transactions. In case you are using ERMS (Email Response Management System) you also want to remove
the ERMS based work item and the ERMS status table entries once the BCS mail is removed from the system.

Environment
Handling of archiving improved with SAP CRM 7.0 EhP3 SP12 and CRM 7.0 EHP4 SP2

Resolution
In the following, we describe how various tools and steps can be combined into a process of consistently removing business
transactions and their related SAPconnect mails (=BCS mails) from the CRM system. As a prerequisite the Business Function
BUPA_ILM_BF has to be activated in transaction SFW5, please mind the release information. KBA 1641394 explains how-
to activate Business Function and what to consider.
As described in the SAP Help Portal documentation (Data Archiving in SAP CRM -> Archiving of E-Mails) E-mails get
archived in the same archive as the business transaction itself on CRM-side. A prerequisite for this is the BCS link between
BCS mail and CRM business transaction. This link is created when an in- or outbound BCS mail is linked to a CRM business
transaction.
Removing the data from the system can be achieved by the following steps that relate to the below diagram:
ArchivingMails.png
The sequence (1 to 5) of the steps and the dependencies between certain steps assure that emails and email related data are
removed in a consistent sequence together with the business transactions. The goal is to keep the entire business process
including all transactions and emails in the system until all business transactions of the process are relevant for archiving.
Only then, all transactions and emails will be archived and removed together from the system.
1. Step: Archiving of CRM business transaction and BCS mails
Archiving of the CRM business transaction via the CRM archiving object includes the archiving class for the BCS mails.
This way the business transaction, the BCS mail, and the link are written into the same archive.
For example, you can use archiving object
CRM_ACT_ON CRM Activities to archive Interaction Records
CRM_INCDNT IT Service Management case CRM to archive Service Requests
For further information on available archiving objects, check SAP Help Portal
2. Step: Deletion of CRM business transaction and BCS link
The Deletion of the CRM business transaction as part of the archiving process also deletes the BCS link.

3. Step: Deletion of BCS mails


The Deletion of the BCS mails is done via report RSSODFRE (delete hidden folder entry) and RSBCS_REORG (delete
email). This is only possible when no BCS link exists for the BCS mail and thus depends on step 2. This dependency
assures that email does not get deleted as long as the related business process was not deleted.
The following steps are only relevant for inbound mails routed by ERMS as part of CRM interaction center processes.
4. Step: Archiving and deletion of the ERMS based work item.
Archiving and deletion of ERMS based work items can be achieved via transaction SWW_SARA. As described in SAP
Note 2269600 it is recommended to make this step dependent on the prior deletion of the BCS mail in step 3. This way
the work item will not be removed as long as the e-mail still exists in the system.

5. Step: Deletion of ERMS status table entries


The Deletion of the ERMS status table entries can be done via report CRM_ERMS_DELETE_REPORT (Tables
CRMD_ERMS_HEADER and CRMD_ERMS_STEP). This depends on the preceding steps in two ways: the ERMS
status table is flagged as relevant for deletion in Step 2. In addition the report checks if the BCS mail was really deleted
from the system and only in that case the report will delete the ERMS status table entries. It is recommended to do the
deletion of the status table entries right after deleting the ERMS based workitems (step 4). Reason: Once the workitem is
deleted, the ERMS status table detailed data cannot be hidden any more based on the blocking status of the ERMS work
item BP! To avoid underside access to the ERMS status table details it is thus necessary to delete them as soon as the
work items are deleted.
Additional considerations regarding ERMS use cases:
The BCS reorganization report deletes BCS mails that are not linked via a BCS link (table SRBCSBREL) to another object (like
a CRM business transaction) any more. In CRM ERMS and CRM interaction center processes the object linked to the mail
typically is a CRM business transaction like an interaction record or a service request.
Depending on how ERMS is set up there can be in- and outbound mails that do not have a business transaction assigned to it.
This can lead to the risk that the reports RSSODFRE and RSBCS_REORG deletes inbound mails which are new in the
system and not yet linked to an interaction record or service request so that no BCS link protects the mails from being deleted.
There are two options to avoid this:
Option 1: (recommended) configure an ERMS rule that automatically create a business transaction (interaction record
or service request) for every new inbound mail. For every inbound mail that is a reply to an outbound mail with tracking
ID create a link to the existing service request. This way there will be a BCS link to a service request or interaction record
for every inbound mail. Also see SAP Note 2296835.
Option 2: (work around) start the report RSBCS_REORG only for emails that are older than a time threshold that is
sufficient for the mails to be processed and thus protected from deletion. Example: Start the reorganization report only
for mails older than 2 weeks. Assure that agents pick up new emails in less than 1 week. This way there will an
interaction record for every new mail before the next run of the BCS reorganization reports.
Additionally you might want to protect auto-response and auto-acknowledge mails sent out by ERMS from being deleted. If
you want to avoid that these mails get deleted, you can configure ERMS to automatically create a service request or
interaction record for outbound mail sent by ERMS.
The recommendation to link every mail via a BCS link to a business transaction also is a prerequisite for using the deletion
report for ERMS status table entries: Only mails that were linked to a business transaction and later on deleted together with
the link - will also get deleted by the report (see (Step 5 and dependency to step 2)).
It can happen that business partners that are already blocked in your system will send you new inbound mails. These mails
can be detected by ERMS by using the condition "is corresponding BP blocked Equals True" (see SAP Note 2295448) and use
that information e.g. to route the mails to a team that is skilled to handle these exceptional cases.

See Also
1. In systems with product versions lower than SAP CRM 7.0 EhP3 SP12, use existing options for deleting email related
data can be used in parallel to or after archiving business transactions as follows. For deleting the BCS mail use the BCS
reorganization reports RSSODFRE (delete hidden folder entry) and RSBCS_REORG (delete email) by restricting the
deletion e.g. to mails within a time interval (e.g. 01/01/2014 to 12/31/2014).
2. Archive/delete the ERMS work items using transaction SWW_SARA e.g. by using the same time interval as in step I.).
To make additional checks you can implement the workflow archiving BAdI e.g. as described in SAP Note 2269600.
3. Delete the ERMS status table entries using report/transaction: CRM_ERMS_DELETE_DATA by again setting up a
time interval matching the previous steps

Attributes
Key Value

Other Components BC-SRV-COM (Communication Services: Mail, Fax, SMS, Telephony)

Other Components CRM-IC-CHA-EMA (E-Mail Integration)

Other Components CRM-BF-ML (Email Management)

Other Components CRM-IC-BF (Basic Functions for Business Transactions)

Products
Products

SAP Customer Relationship Management 7.0

SAP enhancement package for SAP CRM all versions

This document is referenced by


SAP Note/KBA Title

You might also like