EXTERNAL LIST MANAGEMENT
For business scenarios there is a deal with large amounts of data, customers require solutions that are scalable and robust. This is vital especially in the case of marketing where newsletters and special campaigns are addressed to millions of customers through communication channels like e-mail or SMS. ELM serves for this purpose.
External List Management is used to pull data from external sources such as Flat files (text, csv) and upload the same in System for Creation of Business Partners or Marketing Prospects, Activities, Leads, and Target Groups.
The Steps involved in ELM are:
- Get the data from the data source.
- Map the data as per the requirement
- Create Business Partner or Business Transactions
The data comes from the different source with different formats. It is categorized and mapped with the corresponding fields. Therefore, before uploading we need to know the headers to which it is mapped. Hence mapping format comes into picture.
MAPPING FORMAT:
The use of mapping format is to create a header for the data that is uploaded in the ELM.
First, let us see the WebUI part and then move on to the functionality and the code involved.
Go to Transaction code “CRM_UI” in SAP-GUI
Choose “Marketing PROF” in the business role.
Select “Marketing” from the left panel
Choose “Create Mapping Format”.
![1.png]()
The above image is the page from creating the Mapping Format.
The field “ID” is mandatory, in some systems it has to start with ‘0’ (optional).
The next field “Mapping Format” gives the description of it.
The field “Filter Criterion” tells how the field names are categorized.
![1.png]()
The field “Category” helps users to find products or fields, which is most, related to their interests.
The different types of category available are:
![1.png]()
Addresses:
An address is a contact address. It consists of address-relevant data about the person (for example, the first and last name) or the organization (for example, the company name), and the postal address (for example, the postal code and city).
Activity:
The time during the CRM lifecycle. The business activities keep a record of any interaction that has taken place between your company and its customers.
For more: http://help.sap.com/saphelp_crm50/helpdata/en/57/e90d3888a11c10e10000009b38f8cf/frameset.htm
Leads:
A lead is a business transaction which describes, stores, updates, and manages the potential interest of (and interaction with) a business partner over a certain timeframe. In other words, a lead represents a potential chance to make business.
For more: http://help.sap.com/saphelp_crm50/helpdata/en/42/b66d0ad5951d65e10000000a1553f6/frameset.htm
Marketing prospects:
If marketing attributes are need in the ELM, then MP comes into picture. A marketing prospect is a potential customer. Marketing prospect is a new category of mapping format added to support the upload of large amounts (high-volume) of address data in an efficient manner.
For more: http://scn.sap.com/community/crm/marketing/blog/2014/01/03/use-marketing-prospect-or-business-partner-for-storing-prospect-data-in-sap-crm
Note: The combination of above categories display all their fields under Available Target Fields.
In this mapping format, we can also create some fixed values or constants for certain fields.
For example, if the person who involves in this activity is ‘Male’, then each time in the file we do not need to specify that it is male. We can assign it as a constant value. You use the mapping rule "Constant" to assign a constant value to a field.
All mapped records will then get the value you enter in the Constant field, irrespective of the field's original value in the external list.
Select the row for which you need the constant.
Click on the “Add Mapping Rule”.
Select “Constant” under the Mapping Rule.
Assign the constant value and click on back button, which is on the left.
![1.png]()
![1.png]()
You use the mapping rule "Values" to assign certain values to a mapped field.
![1.png]()
You use the mapping rule "Code" to maintain ABAP code for mapping fields that need data or value conversion before mapping.
![1.png]()
Finally once the constants or values or code is applied the Mapping Format page looks like this (below).
![1.png]()
Functionalities involved in Mapping Format:
Once the mapping format is created, each and every unit(like fields, constants, codes, etc…) have GUID which is seen in the package “CRM_MKTLIST_MAPPING_DESIGN”.
Once the mapping format is created, the following table are affected:
- CRMD_MKTLIST_MA [Marketing attributes] >>> Affected when there is “Marketing Attributes” in the ‘Filter Criterion’.
- CRMD_MKTLIST_MF [Mapping format] >>> Contains the fields name and the position of the field name.
- CRMD_MKTLIST_MH [Mapping Header] >>> Holds description, tells about the type of format
- CRMD_MKTLIST_MS [Mapping survey] >>> If there is any Questionaire purpose
- CRMD_MKTLIST_MT [Mapping Header Description] >>> Same as MH, but describes about the language.
- CRMD_MKTLIST_MV [Mapping Value] >>> for values assigning.
Let us consider the following example:
![1.png]()
A mapping format (ID: 0ARA0) [in AG3 system] is created. Now let us see what are the tables affected on creation of this format.
Once the Mapping format is created, its details (like Mapping format ID, Description, format type) are stored in the CRMD_MKTLIST_MH table and a GUID is created for this. This is the starting point for us to trace the entire case.
![1.png]()
![1.png]()
With the help of Format GUID, it is easy to find what the fields associated with it.
The fields are found in the table CRMD_MKTLIST_MF. The “Position_Source” in this table tells at which position the field is located.
![1.png]()
In the mapping format, which we took as example, contains Marketing Attributes (MA), so the table CRMD_MKTLIST_MA is also registering this activity.
![1.png]()
Similarly, if the mapping formats contains any Questionnaire or survey question, CRMD_MKTLIST_MS will be reflected.
The table CRMD_MKTLIST_MT is same as the CRMD_MKTLIST_MH but the extra thing it has is the language.
![1.png]()
Let us assign some values to the mapping format for the field “TITLE”.
![1.png]()
The table CRMD_MKTLIST_MV stores these values.
![1.png]()
External List Management
In short, External List Management involves procuring external data, defining mapping formats, checking and preparing the data, updating existing data, creating business partners, creating marketing prospects, using these business partners and marketing prospects in marketing campaigns, and analyzing (reporting) the methods used.
The data from external providers could include information on:
- Business partner and marketing prospect addresses
- Marketing attributes of business partners and marketing prospects
- Business transactions-related information, such as activities and leads
- Survey details
Implement Workflow Customizing
Before you go to ELM step you need to go to SWU3 (T-code) for automatic Workflow customizing and make proper settings.
You need to go to PFTC and open WS14000029 then go to Workflow builder then go to its Basic Data and in Agent assignment Task you need to check “General Task”.
![1.png.jpg]()
Understanding WebUI
![1.png]()
The field “ID” is mandatory.
The field “External List Origin” tells from whom the data is taken or collected.
The field “External List Type” tells how the data is collected the data either created or rented or bought.
You can also use the External List for certain number of days by specifying the date in field “Permitted End-of-Use”.
The field “Permitted No. of Uses” tells how many times the External List can be used.
The next field is “Mapping Format”, which describes which type of mapping format you are going to use. (Either for creating Business Partners or Business Transactions).
The “Delimiter” is a character used to specify the boundary between separate, independent regions in plain text or other data streams. The commonly used delimiters are: comma, semicolon, tabulator. But the user can also use any delimiter by choosing the option “other characters”.
![1.png]()
Then, if the Mapping Format is of type “Address”, the process steps shown are:
![1.png]()
If it is of type “Marketing Prospects”,
![1.png]()
If it is of type “Activity” or “Lead”,
![1.png]()
If it is of type “Addresses and Activity” or “Addresses and Lead”, the responsible steps are combined.
Read File: This will read the data from the file and store the data in the CRM system
Map Data: This will start mapping the data from the file using the map that you created in the the system to the BP information
Maintain Business Partner: This will Create BP if the mapping format is meant for creating a new ID to the person or Maintain the BP information if BP already existing.
Create Marketing Prospects: Similar to BP Creation, involved when Mapping format is concerned with marketing prospects.
Create Business Transactions: This will create leads or activities when creating or uploading the BP information.
Check for Duplicates: The previously mapped data is read from the tables holding data and checked.
Check for Postal Correctness: You check the address data for postal correctness. The system scans through the address data and if the postal data is found to be incorrect or incomplete, the data is marked as erroneous and not used to create business partners.
Once the file is uploaded, the Scheduling must be set to either “Immediately” (if the process wants to run at once) or “Date & Time” (if the process wants to run on particular date and time).
Once all the process are done, the resulting page is shown below:
![1.png]()
![1.png]()
Delete list in CRM:
The user marks the step for the deletion of the list, gives a start date / time and saves the list. A workflow is started that processes the data.
Understanding the Tables
As already stated, for each unit a GUID is created. The below table diagram shows where the various GUID’s are stored.
![1.png]()
The above example is taken for the demonstration.
The table CRMD_MKTLIST_H contains the GUID for the External List, which is said as LIST_GUID, which represents the whole date that is uploaded in ELM.
![1.png]()
The table CRMD_MKTLIST_PH contains the GUID for Package. (Here, the package is collection of Mapping format ID, ELM ID, Target Group, Separator and the file that is uploaded)
![1.png]()
The table CRMD_MKTLIST_S contains the steps that are done during ELM process step and the status of each step.
![1.png]()
![1.png]()
The table CRMD_MKTLIST_I contains the Item GUID for the Business Partner for Person, Organization. Moreover, flag for Postal Check and the Duplicate Check is set in this table.
![1.png]()
The table CRMD_MKTLIST_T contains the text language of ELM.
![1.png]()
The table CRMD_MKTLIST_L maps the LIST_GUID and PACKAGE_GUID.
![1.png]()
The table CRMD_MKTLIST_C contains the actual data record.
![1.png]()
The table CRMD_MKTLIST_PER, CRMD_MKTLIST_ORG, CRMD_MKTLIST_ADR contains the person details, organization details and address details respectively, which is uploaded via ELM.
![1.png]()
Check for Duplicates: The previously mapped data is read from the tables like CRMD_MKTLIST_ORG, CRMD_MKTLIST_PER, CRMD_MKTLIST_ADR and checked if records of the lists exist already as business partner in the system.
Delete list in CRM:
The data in the tables
- CRMD_MKTLIST_E
- CRMD_MKTLIST_C
- CRMD_MKTLIST_ORG
- CRMD_MKTLIST_PER
- CRMD_MKTLIST_ADR
- CRMD_MKTLIST_S
- CRMD_MKTLIST_L
- CRMD_MKTLIST_PH
- CRMD_MKTLIST_I
are deleted.
In the table CRMD_MKTLIST_H, the delete flag is set.
This step is optional for the processing of the data. It is necessary for rented data.
If errors occur, the step can be repeated for the erroneous records.
Where Data’s are exactly stored?
- The data of the organization and person must be in a single record in the file.
- The table below lists details of organization-related and person-related mapping fields.
- The column BP Table contains a list of table names where mapped entries are stored during business partner processing.
Mapping Field | Description | BP Table | BP Field |
ORGANISATION | | | |
ORG_TITLE_KEY | Title of the business partner | BUT000 | TITLE |
ORG_NAME1 | Name 1 of the business partner | BUT000 | NAME_ORG1 |
ORG_NAME2 | Name 2 of the business partner | BUT000 | NAME_ORG2 |
ORG_NAME3 | Name 3 of the business partner | BUT000 | NAME_ORG3 |
ORG_LEGALFORM | BP: Legal form of the business partner | BUT000 | LEGAL_ENTY |
ORG_FOUND_DATE | Founded on date of the organization | BUT000 | FOUND_DAT |
ORG_TELEPHONE | Telephone: Dialing code number of the business partner | ADRC | TEL_NUMBER |
ORG_TEL_EXT | Telephone: Extension of the business partner | ADRC | TEL_EXTENS |
ORG_FAX | Fax number: Dialing code number of the business partner | ADRC | FAX_NUMBER |
ORG_FAX_EXT | Fax number: Extension of the business partner | ADRC | FAX_EXTENS |
ORG_URI | URI, for example, homepage or ftp address of the business partner | ADR12 | URI_SRCH |
ORG_LANGUAGE | Business partner language | BUT000 | BU_LANGU |
ORG_URI_TYPE | Indicator for URI type | ADR12 | URI_TYPE |
ORGANISATION ADDRESS | | | |
ORG_CITY | City of the business partner | ADRC | CITY1 |
ORG_POSTL_COD1 | City postal code of the business partner | ADRC | POST_CODE1 |
ORG_POSTL_COD2 | PO box postal code of the business partner | ADRC | POST_CODE2 |
ORG_PO_BOX | PO box of the business partner | ADRC | PO_BOX |
ORG_PO_BOX_CIT | PO box city of the business partner | ADRC | PO_BOX_ LOC |
ORG_STREET | Street of the business partner | ADRC | STREET |
ORG_HOUSE_NO | House number of the business partner | ADRC | HOUSE_NUM1 |
ORG_COUNTRYISO | Country ISO code of the business partner | ADRC | COUNTRY |
ORG_REGION | Region (state, province, county) of the business partner | ADRC | REGION |
ORG_ID_NUMBER | Identification number of the business partner | BUT0ID | IDNUMBER |
ORG_NATION | ID of the international address version of the business partner | ADRC | NATION |
Person PERS_TITLE_KEY | Title of the business partner | BUT000 | TITLE |
PERS_FIRSTNAME | First name of business partner | BUT000 | NAME_FIRST |
PERS_LASTNAME | Last name of business partner | BUT000 | NAME_LAST |
PERS_INITIAL | Second forename of the person | BUT000 | NAMEMIDDLE |
PERS_TITLE_ACA1 | Academic title: Key of the business partner (organization) | BUT000 | TITLE_ACA1 |
PERS_BIRTHDATE | Date of birth of business partner | BUT000 | BIRTHDT |
PERS_*** | Gender of business partner | BUT000 | XSEXM, XSEXF, XSEXU |
PERS_MARITALSTAT | Marital status of business partner | BUT000 | MARST |
PERS_TELEPHON | Telephone no.: Dialing code number of the business partner | BUT051 (B2B) ADRC (B2C) | TEL_ NUMBER |
PERS_TEL_EXT | Telephone no.: Extension of the business partner | BUT051 (B2B) ADRC (B2C) | TEL_ EXTENS |
PERS_FAX | Fax number: Dialing code number of the business partner | BUT051 (B2B) ADRC (B2C) | FAX_NUMBER |
PERS_FAX_EXT | Fax number: Extension of the business partner | BUT051 (B2B) ADRC (B2C) | FAX_EXTENS |
PERS_E_MAIL | E-mail address of the business partner | BUT051 (B2B) ADR6 (B2C) | SMTP_ADDRESS SMTP_ADDR |
PERS_PAGER | Pager information stored as telephone number with an SMS indicator | ADR13 | PAGER_NMBR |
PERS_LANGUAGE | Business partner language | BUT000 | BU_LANGU |
PERS_LANGU_CORR | Correspondence language of the business partner | BUT000 | LANGU_CORR |
Person address PERS_CITY | City of the business partner | ADRC | CITY1 |
PERS_POSTL_COD1 | City postal code of the business partner | ADRC | POST_CODE1 |
PERS_POSTL_COD2 | PO box postal code of the business partner | ADRC | POST_CODE2 |
PERS_PO_BOX | PO box of the business partner | ADRC | PO_BOX |
PERS_PO_BOX_CIT | PO box city of the business partner | ADRC | PO_BOX_LOC |
PERS_STREET | Street of the business partner | ADRC | STREET |
PERS_HOUSE_NO | House number of the business partner | ADRC | HOUSE_NUM1 |
PERS_COUNTRYISO | Country ISO code of the business partner | ADRC | COUNTRY |
PERS_REGION | Region (state, province, county) of the business partner | ADRC | REGION |
PERS_ID_NUMBER | Identification number of the business partner | BUT0ID (B2C) | IDNUMBER |
PERS_NATION | ID of the international address version of the business partner | ADRC | NATION |
Description of function | CP_FUNCTIONNAME | Function name of the business partner | BUT051 |
CP_FUNCTIONKEY | Function key | BUT051 | PAFKT |
- The table below lists details of activity-related mapping fields. The column Activity Table contains a list of table names where mapped entries are stored during business transaction creation.
Mapping Field | Description | Activity Table | Field |
Activity TEMPLATE_ID | ID of activity template | CRMD_ORDERADM_H | OBJECT_ID |
PROCESS_TYPE | Business transaction type | CRMD_ORDERADM_H | PROCESS_TYPE |
DESCRIPTION | Transaction description | CRMD_ORDERADM_H | DESCRIPTION |
ACTUAL_DATE_FROM | Actual date from | SCAPPT | DATE_FROM |
ACTUAL_TIME_FROM | Actual time from | SCAPPT | TIME_FROM |
ACTUAL_DATE_TO | Actual date to | SCAPPT | DATE_FROM |
ACTUAL_TIME_TO | Actual time to | SCAPPT | TIME_FROM |
USER_STATUS | Object status | CRM_JEST | STAT |
PRIORITY | Priority of the activity | CRMD_ACTIVITY_H | PRIORITY |
CATEGORY | Category of the activity | CRMD_ACTIVITY_H | CATEGORY |
- The table below lists details of lead-related mapping fields. The column Lead Table contains a list of table names where mapped entries are stored during business transaction creation.
Mapping Field | Description | Lead Table | Field |
Lead TEMPLATE_ID
| ID of lead template | CRMD_ORDERADM_H | OBJECT_ID |
PROCESS_TYPE | Business transaction type | CRMD_ORDERADM_H | PROCESS_TYPE |
DESCRIPTION | Transaction description | CRMD_ORDERADM_H | DESCRIPTION |
START_DATE | Lead: Start date | SCAPPT | DATE_FROM |
EXP_END_DATE | Lead: Expected end date | SCAPPT | DATE_FROM |
USER_STATUS | Object status | CRM_JEST | STAT |
LEAD_PRIORITY | Opportunity/lead priority | CRMD_LEAD_H | IMPORTANCE |
LEAD_GROUP | Lead group | CRMD_LEAD_H | LEAD_TYPE |
MANUAL_QUAL_LEV | Lead qualification level (manual) | CRMD_LEAD_H | QUAL_LEVEL_MAN |
ORIGIN | Origin of opportunity/lead | CRMD_LEAD_H | SOURCE |
- The table below lists details of response-related mapping fields. The column Table contains a list of table names where mapped entries are checked against the tables under Table and the fields under Field during data mapping.
Mapping Field | Description | Table | Field |
Response PERS_RESP_CODE | CRM Marketing: ICRH - personalized response code - character | CRMD_IM_ML_ITEM | PRC |
COUPON_CODE | Coupon code | CRMD_MKTPL_COUP | OFRCODE |
CAMPAIGN_ELEMENT | Campaign element | CGPL_TASK | EXTERNAL_ID |
ORG_NUMBER | Business partner number of organization | BUT000 | PARTNER |
PER_NUMBER | Business partner number of person | BUT000 | PARTNER |
Classes, Function Modules and Reports for ELM
Process Steps:
The steps involved in this process belongs to Function Module CRM_MKTLIST_STAGING_PROCESS
1. Upload
Calls the method UPLOAD
In this function module the data (given by form routine UPLOAD) is saved into the database table CRMD_MKTLIST_C.
2. Map Data
Calls form routine CONVERT
This function creates the items for the table CRMD_MKTLIST_I.
The form routine CONVERT_DATA_CACHE distinguishes two cases:
- If the mapping format contains fields or advanced mapping rules (values mapping etc.) the function module CRM_MKTLIST_MAP_CONVERT is called.
- If the mapping format contains no fields and no advanced mapping rules the BAdI method MAP_AND_CONVERT_DATA is called.
3. Postal Check
Calls form routine POSTAL_CHECK
In the form routine ranges are built. The range describes the first record number and the last record number of entries in table CRMD_MKTLIST_C.
4. Duplicate check
Calls form routine DUPLICATE_CHECK
In the form routine ranges are built. The range describes the first record number and the last record number of entries in table CRMD_MKTLIST_C. This range is used in the following function module.
In this form routine the BAdI method DUPLICATE_CHECK is called. In the default implementation of this BAdI method the function module CRM_MKTLIST_DUP_CHECK_INT is called.
5. Maintain Business Partner
- Calls form routine CREATEBP
In the form routine ranges are built. The range describes the first record number and the last record number of entries in table CRMD_MKTLIST_C. This range is used in the following function module.
- Calls function module CRM_MKTLIST_STAGING_CREATE_BP
In this function module the records (described in the range table) are read from the different tables of the staging area, dependent on B2B or B2C data records.
6. Create Business Transaction
- Calls form routine BADI_CALL_CREATEBTX
In this form routine the BAdI method CREATE_BUSINESS_TRANSACTIONS is called. In the default implementation of this BAdI method some private methods are called in order to create activities or leads.
7. Maintain Target Group
- Calls form routine MAINTAINTG
In the form routine a new profile set is built (if needed)
- Calls function module CRM_MKTLIST_STAG_MAINTAIN_TG
In this function module a new target group is created (if needed).
- Calls BAdI method AFTER_TG_CREATION
In the default implementation this BAdI method is empty.
8. Delete List
- Calls form routine DELETE
- Calls function module CRM_MKTLIST_STAGING_DELETE
In this function module the content of the staging area is read. The created business partners are checked (because only rented business partners can be deleted).
BAdI Methods:
The first place where the breakpoint hits is CL_DEF_IM_CRM_MKTLIST_BADI
![1.png]()
Thanks for your patience to read the above document.
>>> Aravindanne.