enhance crm business bw

19
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 1 SAP BW - Enhance SAP CRM Business Activity Transaction and Extract Data to BW Applies to: SAP BW 3.5 / SAP 7.0 Consultants have knowledge in SAP CRM 5.0 / SAP CRM 7.0. For more information, visit the EDW Homepage . Summary Enhance the SAP CRM Business Activity Transaction using transaction EEWB and extract the enhanced data (Custom Data) to BW using Generic Extraction (Function Module Extraction). Author: Suraj Tigga Company: Capgemini Consulting Created on: 4 March 2011 Author Bio Suraj Tigga is a Senior SAP BI / ABAP consultant at Capgemini Consulting, India. Suraj joined Capgemini Consulting in 2008 and has worked on multiple SAP BI implementation and support projects.

Upload: starcrew1

Post on 24-Apr-2015

227 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Enhance CRM BUSiness BW

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 1

SAP BW - Enhance SAP CRM

Business Activity Transaction and

Extract Data to BW

Applies to:

SAP BW 3.5 / SAP 7.0 Consultants have knowledge in SAP CRM 5.0 / SAP CRM 7.0. For more information, visit the EDW Homepage .

Summary

Enhance the SAP CRM Business Activity Transaction using transaction EEWB and extract the enhanced data (Custom Data) to BW using Generic Extraction (Function Module Extraction).

Author: Suraj Tigga

Company: Capgemini Consulting

Created on: 4 March 2011

Author Bio

Suraj Tigga is a Senior SAP BI / ABAP consultant at Capgemini Consulting, India. Suraj joined Capgemini Consulting in 2008 and has worked on multiple SAP BI implementation and support projects.

Page 2: Enhance CRM BUSiness BW

SAP BW - Enhance SAP CRM Business Activity Transaction and Extract Data to BW

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 2

Table of Contents

Scenario .............................................................................................................................................................. 3

Step-by-Step Procedure.................................................................................................................................. 3

Enhancement (EEWB) - Business Activity ...................................................................................................... 3 Easy Enhancement Workbench (EEWB) ..................................................................................................................... 7

Generic Extraction (Business Activity) – Function Module ........................................................................... 11 Extraction Function Module........................................................................................................................................ 11

Generic Datasource ................................................................................................................................................... 13

Function Module Code ............................................................................................................................................... 14

Related Content ................................................................................................................................................ 18

Disclaimer and Liability Notice .......................................................................................................................... 19

Page 3: Enhance CRM BUSiness BW

SAP BW - Enhance SAP CRM Business Activity Transaction and Extract Data to BW

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 3

Scenario

In this document, we would be focusing on the special features involved in enhancement of Business Activity using Easy Enhancement Workbench (EEBW) and extracting the enhanced fields data to SAP BI using Function Module Generic Extraction. In the following, we will pay particular attention to sub areas that make up the special features of SAP CRM Business Activity, enhancement of Business Activity and Extraction.

The document does not cover general customizing, for example, the definition of an Infocube or the Creation of a Datasource for storing SAP CRM data in BI.A basic knowledge of CRM is required.

Step-by-Step Procedure

Above mentioned scenario would consist of primarily two important steps:

a) Enhancement (EEWB) – Business Activity: Creation of Project and required Extension for EEWB for Bus Object (BUSINESS_ACTIVITY) and Extension Type (ACTIVITY_H).

b) Generic Extraction (Business Activity) Function Module: Creation of Generic Datasource and its concerned Function Module to extract data from the required Database tables relevant to Business Activity.

Enhancement (EEWB) - Business Activity

Easy Enhancement Workbench is a development tool with which SAP applications can be extended in a simple manner. This tool provides a wizard, allowing the definition of an extension. The Customizing Include is generated according to that definition.

Using Easy Enhancement Workbench has the following advantages:

- No actions in the Data Dictionary are necessary, a wizard guides you through the extension process

- Tool contains information on all existing Customizing Includes Currently Easy Enhancement Workbench only generates the Customizing Include and its data elements and domains. All UI specific properties are either generated automatically at the application runtime or defined manually.

Object Customizing Include Object Customizing Include

Business Partner CI_EEW_BUT000 Business Transaction Pricing

Parameter Set

CI_EEW_PRICING

Business Transaction

CI_EEW_ORDERADM_H Transaction Item - Price CI_EEW_PRICING_I

Business Transaction Item

CI_EEW_ORDERADM_I Business Transaction Item -Schedule Line

CI_EEW_SCHEDLIN

Activity Header CI_EEW_ACTIVITY_H Transaction Item - Service

CI_EEW_SERVICE_I

Activity Item CI_EEW_ACTIVITY_I Transaction - Additional

Extension CI_EEW_CUSTOMER_H

Opportunity CI_EEW_OPPORT_H Transaction Item - Additional

CI_EEW_CUSTOMER_I

Page 4: Enhance CRM BUSiness BW

SAP BW - Enhance SAP CRM Business Activity Transaction and Extract Data to BW

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 4

Extension

Lead CI_EEW_LEAD_H SDB - Symptom CI_EEW_ISMP

Transaction Item - Product

CI_EEW_PRODUCT_I SDB - Solution CI_EEW_ISOL

Transaction Item - Financing

Product

CI_EEW_FINPROD_I Marketing element: Basic data

CI_EEW_MKTPL_BDINC

Business Transaction - Sales

Set

CI_EEW_SALES Marketing element: Execution

CI_EEW_MKTPL_CHINC

Business Transaction -

Shipping Set

CI_EEW_SHIPPING Installed Base (header) CI_EEW_IBIB

Business Transaction - Billing Set

CI_EEW_BILLING Installed Base Component -

Addition/Specialization

CI_EEW_IBSP

Organizational Unit Set

CI_EEW_ORGMAN CRM Case CI_EEW_CRMT_CMG

System Landscape must be set up in order to be able to use system-wide generation. The system landscape must be set up in order to be able to use system-wide generation.

Cross-application components General application functions Easy Enhancement Workbench Maintain system landscape

Page 5: Enhance CRM BUSiness BW

SAP BW - Enhance SAP CRM Business Activity Transaction and Extract Data to BW

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 5

Subobjects for the business transaction can be enhanced, they offer a customer include structure for new fields:

EEWB Bus Object Extension Type EEWB Bus Object Extension Type

ACCOUNT_PLAN BASIC_DATA (Basic Data) COMPLAINTS BILLING(Extend Billing Set)

ADS ADS (Analytical Data Storage) COMPLAINTS CUSTOMER_H(Extend Transactional Extn)

BUPA ADD_NEW_ATTRIBUTES_TABLE (Add New Attributes)

COMPLAINTS CUSTOMER_I(Extend Item Additional Extn)

BUPA ADD_NEW_FIELDS (Add New Fields)

COMPLAINTS ORGMAN(Extend Organizational Unit Set)

BUPR ADD_NEW_ATTRIBUTES_TABLE (Add New Attributes)

COMPLAINTS PRICING(Extend Pricing parameter Set)

BUSINESS_ACTIVITY ACTIVITY_H(Extend Activity) COMPLAINTS PRICING_I(Extend Item Price)

BUSINESS_ACTIVITY ORGMAN(Extend Organizational Unit Set)

COMPLAINTS PRODUCT_I(Extend Item Product)

BUSINESS_TRANSACTION ADD_NEW_FIELDS(Add New Fields)

COMPLAINTS SALES(Extend Sales Set)

BUSINESS_TRANSACTION ADD_NEW_ITEM_COMPONENT(New Business Transaction Comps)

COMPLAINTS SCHEDLIN(Extend Item Schedule Line)

BUSINESS_TRANSACTION CUSTOMER_H(Extend Transaction Additional Extension)

COMPLAINTS SHIPPING(Extend Shipping Set)

BUSINESS_TRANSACTION CUSTOMER_I(Extend Item Additional Extension)

INDIVIDUAL_OBJECT ADS(Created Analytical Data Storage)

BUSINESS_TRANSACTION ORDERADM_H(Extend Transaction Header)

INSTALLED_BASE ADDITION(Extend Supplement)

BUSINESS_TRANSACTION ORDERADM_I(Extend Transaction Item)

INSTALLED_BASE INSTALLED_BASE(Extend Installed Base)

CATEGORY_ENHANCEMENT ADD_ATTRIBUTES(Add Category Attributes)

LEAD CUSTOMER_H(Extend Transactional Add. Extension)

CATEGORY_ENHANCEMENT ADD_OBJECT_LINKS(Category: Add Object Rel.)

LEAD LEAD_H(Extend Lead)

Page 6: Enhance CRM BUSiness BW

SAP BW - Enhance SAP CRM Business Activity Transaction and Extract Data to BW

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 6

OPPORTUNITY CUSTOMER_H(Extend Transaction Add Extn)

LEAD ORGMAN(Extend Organizational Unit Set)

OPPORTUNITY CUSTOMER_I(Extend Item Add Extension)

LEAD PRODUCT_I(Extend Item Product)

OPPORTUNITY OPPORT_H(Extend Opportunity LEAD SCHEDLIN(Extend Item Schedule Line)

OPPORTUNITY ORGMAN(Extend Organizational Unit Set

SALES_TRANSACTION

BILLING(Extend Billing Set)

OPPORTUNITY PRICING(Extend Pricing Parameter Set)

SALES_TRANSACTION

CUSTOMER_H(Extend Transac. Add. Extn)

OPPORTUNITY PRICING_I(Extend Item Price) SALES_TRANSACTION

CUSTOMER_I(Extend Item Add. Extn)

OPPORTUNITY PRODUCT_I(Extend Item Product)

SALES_TRANSACTION

ORGMAN(Extend Organizational unit Set)

OPPORTUNITY SCHEDLIN(Extend Item Schedule Line)

SALES_TRANSACTION

PRICING(Extend Pricing parameter set)

Page 7: Enhance CRM BUSiness BW

SAP BW - Enhance SAP CRM Business Activity Transaction and Extract Data to BW

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 7

Easy Enhancement Workbench (EEWB)

Below are the steps mentioned to create a Project and the required Extension meant for Business Activity. Listed below are the fields which are to be enhanced for the Business Activity Transaction:

Batch / Lot #(CHAR-15) , Date of Interaction(DATS-8), Time(TIMS-6), Product ID(CHAR-40), Product Description(CHAR-40), Sales Order Ref(CHAR-40),Delivery Doc Ref(CHAR-40), Customer PO(CHAR-40), Contact Method(CHAR-40), Product Group(CHAR-40), Contact Method(CHAR-20), Product Group9CHAR-20), Product Group(CHAR-30), Product Group(CHAR-50), Product Group(CHAR-10), Contact Method39CHAR-30),Contact Method(CHAR-20), and Product Group3(CHAR-10)

Step1: Go to transaction EEWB and create Project ‘ZIRFIELDS’ as below:

Step2: Right-Click and create Extension ‘ZIINTFIELDS1’ for the above mentioned fields using the Wizard:

Define Title:

Page 8: Enhance CRM BUSiness BW

SAP BW - Enhance SAP CRM Business Activity Transaction and Extract Data to BW

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 8

Select Business Transaction Types:

Define Fields:

Page 9: Enhance CRM BUSiness BW

SAP BW - Enhance SAP CRM Business Activity Transaction and Extract Data to BW

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 9

Assign Fields

Define Relevance of Fields for Follow-up Functions

Complete the execution after all the above steps are done successfully

Page 10: Enhance CRM BUSiness BW

SAP BW - Enhance SAP CRM Business Activity Transaction and Extract Data to BW

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 10

Step3: Check the Business Activity transaction for the added custom fields:

Custom fields are successfully added.

Page 11: Enhance CRM BUSiness BW

SAP BW - Enhance SAP CRM Business Activity Transaction and Extract Data to BW

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 11

Generic Extraction (Business Activity) – Function Module

To fetch the above custom fields values we would perform the following steps:

a) Function Module to extract the Business Activity Custom field Values

b) Generic Datasource which would be linked with Function Module

Extraction Function Module

Step1: Create the Structure ’ZCRM_ACTIVITY_H’ which would contain the custom fields values along with the Activity Header GUID

Step2: Create a function module ‘ZBI_CRM_ACTIVITY_H’ to extract the relevant data

Data Flow:

CRMD_ORDERADM_H

(Business Transaction)

CRMD_ACTIVITY_H

(Activity)

CRMD_CUSTOMER_H

(Transaction - Customer Extension)

GUID = GUID GUID = GUID

Page 12: Enhance CRM BUSiness BW

SAP BW - Enhance SAP CRM Business Activity Transaction and Extract Data to BW

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 12

Pseudo-Code:

- Fetch all the newly created CRM Business Activity transactions from table CRMD_ORDERADM_H.

- For all the entries fetched above, fetch the ‘Contact Method3’ and ‘Product Group’ from table CRMD_ACTIVITY_H header table.

- For the entries fetched from table CRMD_ORDERADM_H, get the ‘Product Group3’ from table CRMD_CUSTOMER_H.

- Based on the above values brought in above three steps, combine the data and populate the extractor output records.

For complete code, refer to section Function Module Code.

Page 13: Enhance CRM BUSiness BW

SAP BW - Enhance SAP CRM Business Activity Transaction and Extract Data to BW

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 13

Generic Datasource

Step1: Go to transaction RSO2, Create Generic Datasource ‘ZCRM_ACTIVITY_H’

Function Module: ZBI_CRM_ACTIVITY_H

Extract Structure: ZCRM_ACTIVITY_H

Next Steps (Required in SAP BI):

a) Map the standard datasource (0CRM_SALES_ACT_1 – Activities) and Generic Datasource (ZCRM_ACTIVITY_H) to DSO 0SAL_DS01 (ODS for Activities).

0SAL_DS01

(ODS for Activities)

0CRM_SALES_ACT_1

(Activities Header)

ZCRM_ACTIVITY_H

(Generic Extractor)

Page 14: Enhance CRM BUSiness BW

SAP BW - Enhance SAP CRM Business Activity Transaction and Extract Data to BW

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 14

Function Module Code

Complete Code:

FUNCTION zbi_crm_activity_h.

*"----------------------------------------------------------------------

*"*"Local Interface:

*" IMPORTING

*" VALUE(I_REQUNR) TYPE SRSC_S_IF_SIMPLE-REQUNR

*" VALUE(I_DSOURCE) TYPE SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL

*" VALUE(I_MAXSIZE) TYPE SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL

*" VALUE(I_INITFLAG) TYPE SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL

*" VALUE(I_READ_ONLY) TYPE SRSC_S_IF_SIMPLE-READONLY OPTIONAL

*" VALUE(I_REMOTE_CALL) TYPE SBIWA_FLAG DEFAULT SBIWA_C_FLAG_OFF

*" TABLES

*" I_T_SELECT TYPE SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL

*" I_T_FIELDS TYPE SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL

*" E_T_DATA STRUCTURE ZCRM_ACTIVITY_H OPTIONAL

*" EXCEPTIONS

*" NO_MORE_DATA

*" ERROR_PASSED_TO_MESS_HANDLER

*"----------------------------------------------------------------------

TABLES zcrm_activity_h.

****** TYPES DECLARATION *****************

* Get the values from CRMD_ACTIVITY_H

TYPES : BEGIN OF typ_crmd_activity_h ,

guid TYPE crmt_object_guid ,

zzprogrp3 TYPE zeew_dataelement0802 ,

zzcontactmethod4 TYPE zeew_dataelement0901 ,

zz_ir_cm TYPE zeew_dataelement1501,

END OF typ_crmd_activity_h ,

* Transaction Customer Enhancement

BEGIN OF typ_crmd_customer_h ,

guid TYPE crmt_object_guid ,

zzprogrp4 TYPE zeew_dataelement0902 ,

END OF typ_crmd_customer_h .

* Work Area

DATA : wa_crmd_activity_h TYPE typ_crmd_activity_h ,

wa_e_t_data TYPE zcrm_activity_h ,

wa_crmd_customer_h TYPE typ_crmd_customer_h.

* Internal Table

DATA: t_crmd_activity_h TYPE STANDARD TABLE OF typ_crmd_activity_h ,

t_crmd_customer_h TYPE STANDARD TABLE OF typ_crmd_customer_h.

* Auxiliary Selection criteria structure

DATA: l_s_select TYPE srsc_s_select.

* Maximum number of lines for DB table

STATICS: s_s_if TYPE srsc_s_if_simple,

* counter

s_counter_datapakid LIKE sy-tabix,

* cursor

s_cursor TYPE cursor.

* Select ranges

Page 15: Enhance CRM BUSiness BW

SAP BW - Enhance SAP CRM Business Activity Transaction and Extract Data to BW

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 15

RANGES: l_r_objid FOR zcrm_activity_h-object_id ,

l_r_ptype FOR zcrm_activity_h-process_type.

* Initialization mode (first call by SAPI) or data transfer mode

* (following calls) ?

IF i_initflag = sbiwa_c_flag_on.

************************************************************************

* Initialization: check input parameters

* buffer input parameters

* prepare data selection

************************************************************************

* Check DataSource validity

CASE i_dsource.

WHEN 'ZCRM_ACTIVITY_H'.

WHEN OTHERS.

IF 1 = 2. MESSAGE e009(r3). ENDIF.

* this is a typical log call. Please write every error message like this

log_write 'E' "message type

'R3' "message class

'009' "message number

i_dsource "message variable 1

' '. "message variable 2

RAISE error_passed_to_mess_handler.

ENDCASE.

APPEND LINES OF i_t_select TO s_s_if-t_select.

* Fill parameter buffer for data extraction calls

s_s_if-requnr = i_requnr.

s_s_if-dsource = i_dsource.

s_s_if-maxsize = i_maxsize.

* Fill field list table for an optimized select statement

* (in case that there is no 1:1 relation between InfoSource fields

* and database table fields this may be far from beeing trivial)

APPEND LINES OF i_t_fields TO s_s_if-t_fields.

ELSE. "Initialization mode or data extraction ?

************************************************************************

* Data transfer: First Call OPEN CURSOR + FETCH

* Following Calls FETCH only

************************************************************************

* First data package -> OPEN CURSOR

IF s_counter_datapakid = 0.

* Fill range tables BW will only pass down simple selection criteria

* of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.

LOOP AT s_s_if-t_select INTO l_s_select WHERE fieldnm = 'OBJECT_ID'.

MOVE-CORRESPONDING l_s_select TO l_r_objid.

APPEND l_r_objid.

ENDLOOP.

Page 16: Enhance CRM BUSiness BW

SAP BW - Enhance SAP CRM Business Activity Transaction and Extract Data to BW

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 16

LOOP AT s_s_if-t_select INTO l_s_select WHERE fieldnm = 'PROCESS_TYPE'.

MOVE-CORRESPONDING l_s_select TO l_r_ptype.

APPEND l_r_ptype.

ENDLOOP.

* Determine number of database records to be read per FETCH statement

* from input parameter I_MAXSIZE. If there is a one to one relation

* between DataSource table lines and database entries, this is trivial.

* In other cases, it may be impossible and some estimated value has to

* be determined.

OPEN CURSOR WITH HOLD s_cursor FOR

SELECT * FROM crmd_orderadm_h

WHERE object_id IN l_r_objid AND

process_type IN l_r_ptype.

ENDIF.

* "First data package ?

* Fetch records into interface table.

* named E_T_'Name of extract structure'.

FETCH NEXT CURSOR s_cursor

APPENDING CORRESPONDING FIELDS

OF TABLE e_t_data

PACKAGE SIZE s_s_if-maxsize .

IF sy-subrc EQ 0 .

SORT e_t_data BY guid ASCENDING.

* Retrieve the values from table CRMD_ACTIVITY_H

SELECT guid

zzprogrp3

zzcontactmethod4

zz_ir_cm

FROM crmd_activity_h

INTO TABLE t_crmd_activity_h

FOR ALL ENTRIES IN e_t_data

WHERE guid EQ e_t_data-guid.

IF sy-subrc EQ 0.

SORT t_crmd_activity_h BY guid ASCENDING.

ENDIF.

* retreive data from table CRMD_CUSTOMER_H

SELECT guid

zzprogrp4

FROM crmd_customer_h

INTO TABLE t_crmd_customer_h

FOR ALL ENTRIES IN e_t_data

WHERE guid EQ e_t_data-guid.

IF sy-subrc EQ 0.

SORT t_crmd_customer_h BY guid ASCENDING.

ENDIF.

LOOP AT e_t_data INTO wa_e_t_data.

* Read records from table CRMD_ACTIVITY_H

READ TABLE t_crmd_activity_h INTO wa_crmd_activity_h

WITH KEY guid = wa_e_t_data-guid BINARY SEARCH.

IF sy-subrc EQ 0.

MOVE-CORRESPONDING wa_crmd_activity_h TO wa_e_t_data.

ENDIF.

* Read records from table CRMD_CUSTOMER_H

READ TABLE t_crmd_customer_h INTO wa_crmd_customer_h

WITH KEY guid = wa_e_t_data-guid BINARY SEARCH.

Page 17: Enhance CRM BUSiness BW

SAP BW - Enhance SAP CRM Business Activity Transaction and Extract Data to BW

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 17

IF sy-subrc EQ 0.

wa_e_t_data-zzprogrp4 = wa_crmd_customer_h-zzprogrp4.

ENDIF.

MODIFY e_t_data FROM wa_e_t_data.

CLEAR wa_e_t_data.

ENDLOOP.

ENDIF .

IF sy-subrc <> 0.

CLOSE CURSOR s_cursor.

RAISE no_more_data.

ENDIF.

s_counter_datapakid = s_counter_datapakid + 1.

ENDIF. "Initialization mode or data extraction ?

ENDFUNCTION.

Page 18: Enhance CRM BUSiness BW

SAP BW - Enhance SAP CRM Business Activity Transaction and Extract Data to BW

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 18

Related Content

For more information visit EDW Homepage.

Help.sap.com

Page 19: Enhance CRM BUSiness BW

SAP BW - Enhance SAP CRM Business Activity Transaction and Extract Data to BW

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 19

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.