SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 1
Step by Step Guide to CRM
Analytical Data Storage (ADS)
Using SAP NetWeaver BW Analysis
Process Designer (APD)
Applies to:
SAP NetWeaver BW. For more information, visit the EDW homepage.
Summary
The Analytical Data Storage (ADS) enables SAP Customer Relationship Management (SAP CRM) business applications to efficiently access information from SAP NetWeaver BW using SAP NW BW Analysis Process Designer.
Author: Sohil Shah
Company: Deloitte Consulting India Pvt. Ltd.
Created on: 12 September 2010
Author Bio
Sohil is working as SAP NetWeaver BW consultant at Deloitte Consulting India Pvt. Ltd. He has an experience around 6 years in the field of SAP.
He is the technical reviewer of an SAP Press book “A Practical Guide to SAP NetWeaver Business Warehouse 7.0”
Step by Step Guide to CRM Analytical Data Storage (ADS) Using SAP NetWeaver BW Analysis Process Designer (APD)
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 2
Table of Contents
Introduction ......................................................................................................................................................... 3
Business Requirement ........................................................................................................................................ 3
What is APD........................................................................................................................................................ 4
CRM EEWB (Easy Enhancement Workbench) .................................................................................................. 4
Functionality: ................................................................................................................................................... 4
ADS (Analytical Data Storage) Functionality: ................................................................................................. 4
Step by step guide: ............................................................................................................................................. 4
ADS creation: .................................................................................................................................................. 4
APD Creation: ............................................................................................................................................... 10
Conclusion ........................................................................................................................................................ 16
Appendix 1 ........................................................................................................................................................ 17
Appendix 2 ........................................................................................................................................................ 18
Related Content ................................................................................................................................................ 19
Disclaimer and Liability Notice .......................................................................................................................... 20
Step by Step Guide to CRM Analytical Data Storage (ADS) Using SAP NetWeaver BW Analysis Process Designer (APD)
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 3
Introduction
This article shows the step by step procedure to create ADS and how to update it using SAP NW BW APD.
Business Requirement
Customer Trend stratification is utilized in determining the correct approach to managing a customer relationship. Service level commitments, sales and marketing strategies, credit considerations, and customer support all potentially reference customer stratification as a means to easily identify the relative value of a particular customer.
Here Trend is the Customer Attribute and based on the sales happening for a given customer in a given period will be loaded to Sales Cube.
The query will be created from this cube and Trend will be calculated as follows:
Trend = Net Value This Year Current Period - Net Value Last Year Same Period
Based on this KF value APD transformation Routine will find the Customer trend as follows:
Trend Stratification Value Description
> $3,000+ 1 Increase
Within $2999 + or - 2 No Change
< $3,000- 3 Decrease
And then APD will post these values to corresponding Business Partner in CRM through ADS.
With this information organization will have visibility whether Business is increasing, decreasing with the particular customer and further strategic decisions will be made based on this.
BW CRM
ECC
Sales Cube
Sales Data
APD Transformation
Custom Program to update BP master data in CRM
BP Master Data
Stratification ADS Query
Step by Step Guide to CRM Analytical Data Storage (ADS) Using SAP NetWeaver BW Analysis Process Designer (APD)
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 4
What is APD
The Analysis Process Designer is the application environment for the SAP data mining solution. The Analysis Process Designer (APD) makes it possible to find and identify the hidden or complex relationships between data in a simple way. The APD workbench provides an intuitive graphical interface that enables you to visualize, transform, and deploy data from your business warehouse. Various data transformations are provided for this purpose, such as statistical and mathematical calculations, and data cleansing or structuring processes.
An APD generally consists of three parts:
Data Sources: Read data from InfoProviders, Attributes of a Characteristic, Query, Flat Files, Database Tables
Transformations: Filter restricted amount of data, Aggregate Data, Join data from different Data Sources, ABAP Routines, Formula, Sort data, etc.
Data Targets: Write data directly to Data Store Objects(DSOs),Flat files, Update CRM Attributes, Change attributes of a Characteristics, etc.
CRM EEWB (Easy Enhancement Workbench)
Functionality:
A Wizard based development tool to extend SAP applications.
Create Extensions to CRM transactions / master data (e.g. BUT000 – BP Master)
Supports configuration to link new fields / tables to their source (in our scenario to SAP NW BW).
ADS (Analytical Data Storage) Functionality:
A dedicated table in CRM to store BI Analytical results for further uses.
Created with BI InfoObjects as field templates.
User defined Key and Data fields.
Created with the EEWB.
Step by step guide:
ADS creation:
1. Log in to SAP CRM System.
2. Go to Transaction EEWB.
3. Create Project Give Project Name and Description Give the Package Save.
Step by Step Guide to CRM Analytical Data Storage (ADS) Using SAP NetWeaver BW Analysis Process Designer (APD)
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 5
4. Maintain Transport request Save.
5. Create Extension.
Here enter the Name & Description.
Select Analytical Data Storage (ADS) from the EEW Bus. Object F4 help, as shown below.
Step by Step Guide to CRM Analytical Data Storage (ADS) Using SAP NetWeaver BW Analysis Process Designer (APD)
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 6
Once you select Analytical Data Storage (ADS) in above step, in Extension type F4 help you will
have only one option of Analytical Data Storage (ADS), as shown below.
6. After this system will call the wizard.
Step by Step Guide to CRM Analytical Data Storage (ADS) Using SAP NetWeaver BW Analysis Process Designer (APD)
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 7
Click Continue on Start tab.
7. Define Scenario name on the next screen Continue. Transparent table will get created with the
same name as that of Scenario name in this step.
Step by Step Guide to CRM Analytical Data Storage (ADS) Using SAP NetWeaver BW Analysis Process Designer (APD)
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 8
8. On the next screen, enter appropriate BW System name Continue.
Step by Step Guide to CRM Analytical Data Storage (ADS) Using SAP NetWeaver BW Analysis Process Designer (APD)
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 9
9. On the next screen, enter the list of InfoObjects required for retraction. Here you can maintain the
Key fields of the ADS table going to be created. Click on Continue.
Step by Step Guide to CRM Analytical Data Storage (ADS) Using SAP NetWeaver BW Analysis Process Designer (APD)
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 10
10. On confirmation tab page it will summarize the wizard steps.
By this the ADS table is created. The table name would be same as that of created under Step 7.
APD Creation:
1. Log in to SAP NW BW system.
2. Go to transaction RSANWB.
3. Create New Analysis Process.
4. Take the “Query” as Data Source and select the Query by “Choose Query” option.
Step by Step Guide to CRM Analytical Data Storage (ADS) Using SAP NetWeaver BW Analysis Process Designer (APD)
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 11
Step by Step Guide to CRM Analytical Data Storage (ADS) Using SAP NetWeaver BW Analysis Process Designer (APD)
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 12
5. Drag the Routine transformation to get the Trend information based on Net Value.
Step by Step Guide to CRM Analytical Data Storage (ADS) Using SAP NetWeaver BW Analysis Process Designer (APD)
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 13
Here Trend (KYF_0004) has been calculated at query level as follows:
Trend = Net Value This Year Current Period - Net Value Last Year Same Period
The following Routine is written to get the Trend values: (Find the complete code in the Appendix 1)
6. Now add the data target as CRM attributes (A in following diagram).
Step by Step Guide to CRM Analytical Data Storage (ADS) Using SAP NetWeaver BW Analysis Process Designer (APD)
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 14
Steps for Data Target (A):
Select Logical system of the CRM system Data Target as Analytical Data Storage Select
Subobject from created list of ADSs.
Steps for Transformation (B): Select Same Info Object as shown below.
7. Activate and execute the APD and check the log.
Step by Step Guide to CRM Analytical Data Storage (ADS) Using SAP NetWeaver BW Analysis Process Designer (APD)
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 15
8. Go to CRM system and check the table field entries (In our case check under SE11 ZSBTR).
9. Now in CRM system write ABAP program to update Trend attribute to Business partner table
(BUT000). See the sample code in Appendix 2.
Step by Step Guide to CRM Analytical Data Storage (ADS) Using SAP NetWeaver BW Analysis Process Designer (APD)
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 16
Conclusion
This is one of the ways we can update the attributes of CRM using BW APD. There are few other ways to do so. Plz look at the screenshot.
Step by Step Guide to CRM Analytical Data Storage (ADS) Using SAP NetWeaver BW Analysis Process Designer (APD)
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 17
Appendix 1
TYPES: BEGIN OF y_source_fields ,
KYF_0004 TYPE FLOAT ,
SOLD_TO TYPE /BI0/OISOLD_TO ,
FISCPER TYPE /BI0/OIFISCPER ,
SOLD_TO__ZTREND TYPE /BIC/OIZTREND ,
END OF y_source_fields .
TYPES: yt_source_fields TYPE STANDARD TABLE OF y_source_fields .
TYPES: BEGIN OF y_target_fields ,
KYF_0004 TYPE /BI0/OINETVAL_INV ,
SOLD_TO TYPE /BI0/OISOLD_TO ,
FISCPER TYPE /BI0/OIFISCPER ,
SOLD_TO__ZTREND TYPE /BIC/OIZTREND ,
END OF y_target_fields .
TYPES: yt_target_fields TYPE STANDARD TABLE OF y_target_fields .
*---------- Begin of type definitions -------------------------------
*TYPES: ...
*----------- End of type definitions --------------------------------
FORM compute_data_transformation
USING it_source TYPE yt_source_fields
ir_context TYPE REF TO if_rsan_rt_routine_context
EXPORTING et_target TYPE yt_target_fields .
*--------- Begin of transformation code -----------------------------
DATA: ls_source TYPE y_source_fields,
ls_target TYPE y_target_fields.
LOOP AT it_source INTO ls_source.
IF ls_source-KYF_0004 GE 3000. --------------------------- 1
ls_target-SOLD_TO = ls_SOURCE-SOLD_TO.
LS_TARGET-FISCPER = ls_source-FISCPER.
ls_target-SOLD_TO__ZTREND = '1'.
ENDIF.
IF ls_source-KYF_0004 BETWEEN -2999 AND 2999. ---------------- 2
ls_target-SOLD_TO = ls_SOURCE-SOLD_TO.
LS_TARGET-FISCPER = ls_source-FISCPER.
ls_target-SOLD_TO__ZTREND = '2'.
ENDIF.
IF ls_source-KYF_0004 lE -3000. --------------------------------- 3
ls_target-SOLD_TO = ls_SOURCE-SOLD_TO.
LS_TARGET-FISCPER = ls_source-FISCPER.
ls_target-SOLD_TO__ZTREND = '3'.
ENDIF.
* MOVE-CORRESPONDING ls_source TO ls_target.
APPEND ls_target TO et_target.
ENDLOOP.
Step by Step Guide to CRM Analytical Data Storage (ADS) Using SAP NetWeaver BW Analysis Process Designer (APD)
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 18
Appendix 2
REPORT ZTEST_UPDATE_TREND.
TABLES : BUT000.
TYPES: BEGIN OF lt_zsbtr,
f_0sold_to type BU_PARTNER,
F_ZTREND type ZTREND,
END OF lt_zsbtr.
DATA : IT_ZSBTR TYPE STANDARD TABLE OF LT_ZSBTR,
it_but000 type standard table of but000.
DATA : LS_zsbtr type lt_zsbtr.
FIELD-SYMBOLS : <LFS_BUT000> TYPE BUT000.
SELECT F_0SOLD_TO F_ZTREND FROM ZSBTR INTO table IT_ZSBTR.
sort it_zsbtr by f_0sold_to.
select * from but000 into table it_but000 for all entries in it_zsbtr where partner =
it_zsbtr-f_0sold_to.
LOOP AT IT_BUT000 ASSIGNING <lfs_but000>.
read table it_zsbtr with key f_0sold_to = <lfs_but000>-
partner binary search into ls_zsbtr.
if sy-subrc is initial.
<lfs_but000>-ZZTREND = ls_zsbtr-F_ZTREND.
endif.
endloop.
modify but000 from table it_but000.
commit work.
Step by Step Guide to CRM Analytical Data Storage (ADS) Using SAP NetWeaver BW Analysis Process Designer (APD)
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 19
Related Content
Easy Enhancement Workbench on SAP Help
APD on SAP Forums
Analysis Process Designer Part 1 on SDN
Step by Step Guide to CRM Analytical Data Storage (ADS) Using SAP NetWeaver BW Analysis Process Designer (APD)
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 20
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.
Top Related