Hi All , I have been working with ELM since past few days. and I would like to share some knowledge about ELM , Configuration for ELM , Enhancing ELM , Troubleshooting ELM and someother things or tips as well.
What is ELM : ELM , External List Management is used to pull data from external sources such as your Flat files ( text , csv) and upload the same in System for Creation of Business Partnes , Activities , Lead or Prospect and Target Groups.
So the ELM : 1st gets data from External Source, 2nd it Maps that data as per your requirment and 3rd it creates Business Partner or Business Transactions ( Activity , Lead ).
You can use this for High Volume data as well.
So before you start using ELM you need to do some configuration.
Goto SPRO->Customer Relationship Management->Marketing->External List Management.
* Define List Type :
In this activity you define types for your lists. The values that you define here will then be available in the input help for the field Type. It consists of a technical key and a short description. In our Case we have used standard but you can create your own List type. Just create New List type and select while creating ELM. You can also check Rented indicator ( If the data in an address list is rented, a category must be assigned to this list in which in Customizing the indicator is set to Rented.)
For Rented : :
Business partner master records where the indicator Rented is set, are not distributed to CRM Mobile and not distributed to the connected OLTP Systems. Only when the indicator Rented is removed from the business partner, can the master record distribution take place.
* Define List Origin :
In this activity you define the possible origins of your lists.
The values that you define here are available in the input help for the field Origin.
For each origin defined you can set the Consumer indicator to determine whether general business partners or consumers are created when you generate business partners.
You Can assign the the origin of an identification type for the business partner. For detailed information, see the definition of Origin.
Identification numbers must be mapped to the fields ORG_ID_NUMBER or PERS_ID_NUMBER in ELM's mapping tool.
in our case we needed to create customer for particular Identification type so above two statement is very important if you need to create your business partner
if you want them to create with Identification number.
* Implement Workflow Customizing :
Before you do this step you need to go to SWU3(tcode) for automatic Workflow customizing and make proper settings.
You need to goto PFTC and open WS14000029 then goto Workflow builder then goto its Basic Data and in Agent assignment Task you need to check Genral Task.
Above is the Basic Configuration for ELM and is ready to use.
1) For using ELM we need to create Mapping Formats.
2) Creating ELM. Give Mapping format , List type , List origin and your file path while executing ELM.
3) check for errors ( if any ) or see the data.
in Detail : Step 1 : Creating Mapping Formats:
Go To Marketingprofessional Business Role and Create Mapping.( One Time Activity ).
1) you need to Feel ID for Maping Format and Categoty : you can select the Categories of Data which has to be uploaded.
(In my scenario I am creating Business Partner and Activity Transaction , So i Have Selected Addresses and Activities)
2) Now You need to MAP. For More Ease you can select a file in which your data will be there. upload it and make sure it doesnt have
header data and only one row of data. Or else you can directly Map the data. (as i have done below)
Left Side of table ( Field mapping , contains field which will get uploaded ). Select the Value from Left , Select the number of columns from right and Click on Map.
In below screen shot its been shown.
Note : You can also give your own Mapping Rule. For exmple Constnat which i have shown below.
Step 2 : Creating ELM.
Marketing->External List Management ( Create )
Below Screen is for Creating External List ( uploading file ).
1) General Data
-> External List Origin ( This we have defined while customization ELM ) : We have assigned 1 Identification number for our External List origin as External List Management
-> External List Type : Declared in customizing.
( Customizing is shown above )
-> Mapping Format : Give Mapping Format which we have created in above step.
2) Process Steps :
1) Read Data : We have to provide File path by clicking button "Select Client File" or "Select Server File".
Give deliminator as per your requirement.
2) Map Data : this tick will Map Data From File to Mapping Format we have created.
3) Maintain Business Partner : This Will be ticked if one wants to create business Partner From File
( We have to define and wrote logic in Badi : CRM_MKTLIST_BADI)
This Business Add-In (BAdI) is implemented as a part of External List Management (ELM).
For Business Partner Creation : Method : CREATE_BUSINESS_PARTNERS
4) Create Business Transaction : This Will be ticked if one wants to create business transaction From File
( We have to define and write logic in Badi : CRM_MKTLIST_BADI)
This Business Add-In (BAdI) is implemented as a part of External List Management (ELM).
For Business transaction Creation : Method : CREATE_BUSINESS_TRANSACTIONS.
You need to mention in the External list when to run the list. Immediately or on certain time.
Note : You can also look into default implementation class :CL_DEF_IM_CRM_MKTLIST_BADI for refrence.
after filling all mandatory and required fields you have to press button in upper left corner "Start".
This will start ELM and dpending your process steps functions will trigger.
Below screen shot is of after completion of Process steps.
after Successfull execution of ELM you can see the list recird by clicking on button "Show List Records".
Error Handling in ELM. When your file contains some error ( you can also write your own logic , in this case I have).
Below is the screen shot.
Click on Error to see further information.
Error Handling in ELM. (CODE)
ES_ERROR-TYPE = 'E'. ES_ERROR-ID = LV_MSGID. ES_ERROR-NUMBER = LV_MSGNUMBER. ES_ERROR-PARAMETER = LS_MKTLIST_PER-C_HEAD_GUID. ES_ERROR-MESSAGE = LV_MSGTEXT. ES_ERROR-MESSAGE_V1 = LS_MKTLIST_ADR-ID_NUMBER. EV_ERROR = 'X'. APPEND ES_ERROR TO ET_MESSAGE.
Note : Remember to pass C_HEAD_GUID while appending the message to exporting table of method.
For more info : http://scn.sap.com/thread/3386674.
Enhancing and Adding fields in ELM for mapping :
There are requirments to add custom fields for elm because may be standard fields are not sufficient enough for some
for that purpose we have to use below Structures.
We have to create an append structure in above structures in case if we want to add aditional field. below is the screen shot.
As soon as the append structures are created and activated, respective fields would start appearing as available fields for the mapping formats.
How To : Create BP with Stree2 field ( Which is not available in standard CRMT_MKTLIST_ADR_EXT struct )
Step 1 : We added appenbd structure with 1 field ( stree2 in our case ) in CRMT_MKTLIST_ADR_EXT.
Step 2 : This field now will be available for mapping,. Map the field with your file's field.
Step 3 : Write logic to add street2 in BP. in method ofIF_EX_CRM_MKTLIST_BADI~CREATE_BUSINESS_PARTNERS. There are two methods
CREATE_PERSON and UPDATE_PERSON ( if you have copied standard classes method which we described above).
(As its a badi you can write logic easily with your requirment , and even standard logic if you see is very easy to understand).
Issues and its Resolution :
If you have created the mapping for Addresses and if you have not added
it will throw an error. "Address incomplete; enter country". So you have add Country Code in your mapping.
If tour taget file doesnot contain country you can add Constant in mapping rule.
above filed for PO code is also nessacary.
Campaing Element is also nessacary to create business transaction such as activities and leads.
I have read about doing implicit enhancement in method CHECK_RESPONSE of class CL_CRM_MKTLIST_MR_CHECK_TOOLS and write the logic to remove corresponding error message with message class CRM_MKTLIST_MR and message id 281.
But in my case I have created a DUMMY campaign Id and
Commented my badis code for creation of docflow (badi code) in this way you dont need to do implicit enahancement although that is also very good approach.
As we have implemented the badi CRM_MKTLIST_BADI. one must need to debug as sometime debugging is the only option
but when you run ELM these process steps are triggered by workflow user so if you directly put external breakpoint in badi it wont stop for debugging so below is the way for debugging.
1) Open FM(Se37) CRM_MKTLIST_WORKFLOW_DEBUG put external breakpoint here.
2) Go to your user parameters for which you want to enable debugging (SU3) and insert a Parameter with ID CRM_DEBUG_CODE and value as
3) Now put external breakpoint in badi methods.
4) Run ELM. Debbuging session will open . 1st it will go on FM CRM_MKTLIST_WORKFLOW_DEBUG. press F8 , you will be in your badi method in which you have put external Breakpoint. so it will stop there and you can debug...
Thats it.. please share if i am missing any point. Thanks all for reading.