2
Go to start of metadata CRM Business Transactions Introduction As a depature from regular ERP "fat table" design, CRM embraces a new data model concept for business transactions called the "one-order" concept. The one order concept is relatively simple, yet very elegant. Each busines transaction type is store in common set of tables which we will call segments, and then has segments specific to the business transaction type. This means a sales order, activity, lead, opportunity, complaint, etc. all live in the same central tables. This allows for an easier technical copy control and search. The order guid is used to handle this. Basic Data Model Let's a take a look at the structure of a business transaction Primary Header Table: CRMD_ORDERADM_H which is also known as ORDERADM_H Primary Item Table: CRMD_ORDERADM_I which is known as ORDERADM_I These tables are then related to various segments through a linkage table known as CRMD_LINK. Examples of segments are CRMD_ACTIVITY_H and CRMD_PRODUCT_I. Extensions to Data Model The header of a business transaction and items of a business transaction can be extended using the EEWB. By using this tool it is recommend to extend the tables CRMD_CUSTOMER_H and CRMD_CUSTOMER_I. These segments are considered fully qualified segments of the business transaction and have all the other features as a regular segment of the transaction. By using these segments via the EEWB, we can re-use the fields throughout the whole CRM application without much extra effort. The fields are added via the customing includes that are named in the fashion CI_EEW_CUSTOMER_H and CI_EEW_CUSTOMER_I. BADI Framework for Business Transactions Each segment offers a badi for validating the segment and adding additional fields of the segment. The badi's follow the convention CRM_<segment>_BADI except for PARTNER and PAYPLAN segments which start with COM. In addition the following BADI's are available: CRM_COPY_BADI - Copy Control ORDER_SAVE - manipulate data before save Please keep in mind in all badi's should not call any SAVE related function modules. You should use the *_OB api function modules to modify the data at this layer to avoid recursion errors. Also please keep in mind that badi for a segment is only triggered when the data in that segment has been updated or "touched". Event Framework The event handler framework is used by the CRM business transaction framework to notify changes within the transaction to other segments within. The event framework can be accessed through transaction CRMV_EVENT. You can determine what events are called as a business transaction is edited by setting the user parameter CRM_EVENT_TRACE to 'X' on your userid. The report CRMV_EVENT_TRACE will allow you to see the results. The event framework is quite useful when a badi will not meet your requirements. API's & BAPI's for business transactions SE37: CRM_ORDER_MAINTAIN & SE38: CRM_ORDER_MAINTAIN CRM_<SEGMENTNAME>_OW CRM_<SEGEMENTNAME>_READ_OW CRMXIF_ORDER_SAVE CRMXIF_ORDER_EXTRACT

SAP CRM Concepts

  • Upload
    simran

  • View
    236

  • Download
    0

Embed Size (px)

DESCRIPTION

Basic SAP CRM Concepts

Citation preview

Go to start of metadata CRM Business TransactionsIntroductionAs a depature from regular ERP "fat table" design, CRM embraces a new data model concept for business transactions called the "one-order" concept. The one order concept is relatively simple, yet very elegant. Each busines transaction type is store in common set of tables which we will call segments, and then has segments specific to the business transaction type. This means a sales order, activity, lead, opportunity, complaint, etc. all live in the same central tables. This allows for an easier technical copy control and search. The order guid is used to handle this.Basic Data ModelLet's a take a look at the structure of a business transactionPrimary Header Table: CRMD_ORDERADM_H which is also known as ORDERADM_HPrimary Item Table: CRMD_ORDERADM_I which is known as ORDERADM_IThese tables are then related to various segments through a linkage table known as CRMD_LINK. Examples of segmentsare CRMD_ACTIVITY_H andCRMD_PRODUCT_I.Extensions to Data ModelThe header of a business transaction and items of a business transaction can be extended using the EEWB. By using this tool it is recommend to extend the tables CRMD_CUSTOMER_H and CRMD_CUSTOMER_I. These segments are considered fully qualified segments of the business transaction and have all the other features as a regular segment of the transaction. By using these segments via the EEWB, we can re-use the fields throughout the whole CRM application without much extra effort.The fields are added via the customing includes thatare named in the fashion CI_EEW_CUSTOMER_H and CI_EEW_CUSTOMER_I.BADI Framework for Business TransactionsEach segment offers a badi for validating the segment and adding additional fields of the segment. The badi's follow the convention CRM__BADI except for PARTNER and PAYPLAN segments which start with COM.In addition thefollowing BADI's are available:CRM_COPY_BADI - Copy ControlORDER_SAVE - manipulate data before savePlease keep in mind in all badi's should notcall any SAVE related function modules. You should use the *_OB api function modules to modify the data at this layerto avoid recursion errors. Also please keep in mind that badi for a segment is only triggered when the data in that segment has been updated or "touched".Event FrameworkThe event handler framework is used by the CRM business transaction framework to notify changes within the transaction to other segments within. The event framework can be accessed through transaction CRMV_EVENT. You can determine what events are called as a business transaction is edited by setting the user parameter CRM_EVENT_TRACE to 'X' on your userid. The report CRMV_EVENT_TRACE will allow you to see the results. The event framework is quite useful when a badi will not meet your requirements.API's & BAPI's for business transactionsSE37: CRM_ORDER_MAINTAIN & SE38: CRM_ORDER_MAINTAINCRM__OWCRM__READ_OWCRMXIF_ORDER_SAVECRMXIF_ORDER_EXTRACTPRODUCT MASTER DATA - Three important tables COMM_PRODUCT COMM_PR_FRG_REL COMM_PRMATTechnically a product does not have any segments until assigned to product category!!! The product subtype hierarchy R3PRODSTYP defines this i.e MAT_FERT which has:COMM_PR_MATCOMM_PR_UNITYou must assign a product a valid category before you can assign it segment data!

In CRM all types of partners (sold-to, ship-to,prospect, vendor, etc) are considered business partners. This allows for us to usepartners in transactions based onroles they occupy.Data Model We call Business Partners: "BUPA's" per naming convention in CRM Central Data stored in BUT000 Most tables/segments start such as BUT* or CRMM_BUT_* Relationships stored in BUT050 Partner id is primary key BUPA guid is secondary key Extensions are handled via the EEWB. Don't try to write these from scratch unless you know BDT and prefer doing things in more painful fashion.API's & BAPI's for the Business PartnerBAPI_BUPA_* or BUPA_*Common ones are:BAPI_BUPA_CREATE_FROM_DATABAPI_BUPA_ADDRESSES_GETBAPI_BUPA_ADDRESS_GET_DETAIL