Quantcast
Channel: SCN : Document List - SAP CRM: Marketing
Viewing all 115 articles
Browse latest View live

CONDITION GENERATION IN TRADE PROMOTION MANAGEMENT

$
0
0

I would like to share my knowledge on condition generation in Trade Promotion Management in SAP CRM. Trade Promotions are discounts that are given to retailers, distributors by CPG companies for merchandising support.

Trade Promotions are run to increase the sales, launch a new product, and penetrate new markets. In order to increase the revenue, manufactures rely on providing discounts on products by which they tend to increase their sales as such their revenues. When the customer places order based on these promotions the discounts provided for the customer needs to be picked in the sales orders created. 

Introduction

In CPG industries normally the back end system is SAP ECC. As such the master data like Customer, Product, and Pricing etc. gets downloaded from ECC to CRM. Since trade promotions are created in CRM, some important customization settings are required to use the condition type from ECC to create discount condition records for those condition types in SAP CRM. For this, the condition maintenance of those condition types needs to be moved from the ECC system to CRM system.

Conditions Generated In TPM

Four different usage based conditions can be generated in SAP CRM on releasing the trade promotion. These are

  1. Campaign Determination (CD)
  2. Rebates(BO)
  3. Pricing (PR)
  4. Free Goods (FG).

The conditions generated can be viewed under the Discounts tab of trade promotion.

1.png

Campaign determination conditions are generated for determining these promotions in the sales orders that will be created for the particular customer. Based on the CD conditions, a promotional discount is consumed in the sales order for the particular customer. In order for a promotional discount to be determined in a Sales order, the sales order needs to be created within the promotional dates for the customer/product combination used in the promotion creation.

Moving Condition Maintenance to SAP CRM

In normal scenarios we do not create conditions for condition type that are downloaded from ECC in CRM (System will not allow the conditions to be created). Condition records for all condition types & tables created in R/3 are maintained in R/3 itself. But in TPM scenario, we need to generate the conditions for the above condition types in CRM while releasing a Promotion. As such we need to move the maintenance of the condition types & tables to SAP CRM.

  1. This customization setting is done in SAP ECC under, SPRO®Integration with Other SAP Components ® Customer Relationship Management ® Basic Functions ® Data Exchange Conditions in Customizing for SAP R/3.  Or directly maintain in table MNTCNT.

V

Tab

App

CTyp

Logical system

3

521

V

ZCD0

CH2CLNT600 (e.g.)

A

524

V

ZCP0

CH2CLNT600 (e.g.)

 

Once these condition types & Condition tables are maintained in this table, they are downloaded using adaptor object DNL_CUST_CNDALL.

Conditions cannot be generated in ECC for these condition types even if they were defined in SAP ECC as their maintenance has been moved to SAP CRM.

3.png


How to create a loyalty program - 1/4

$
0
0

Hello everybody,

 

This document shows how to setup a simple member activity to be used in a loyalty program.

 

Our next document will show how to setup a simple loyalty program, so stay tuned. You can chech here http://scn.sap.com/docs/DOC-44848.

 

Procedure

 

1.     Access IMG

Transaction Code

SPRO

 

 

2.     Access the following path:

Customer Relationship Management->Marketing->Loyalty Management->Member Activities->Define Member Activity Categories and Types

 

3.     Select Member Activity Types and hit the button “New Entries”

Member_activity_caique_escaler.png

 

4.     Assign the values according to the table below:

 

Member Activity Type

Description

Class

Sub.Class

Status

ZPOS_ORDER

POS Order

 

 

X Active

 

5.     Select member activity type “ZPOS_ORDER” and select Define Specific Attributes according to the table below:

Attribute

Type

Amount

1 Mandatory

Currency

1 Mandatory

Retail Store ID

2 Optional

You can check using the image below:

specific_attributes_caique_escaler.png

6.     Select the option Member Activity Categories

categories_caique_escaler.png

7.     Create member activity category according to the table below:

 

Member Activity Category ID

Description

Status

ZPOS_ACTIVITIES

Point Of Sales (POS)

X Active

 

 

8.     Select the ZPOS_ACTIVITIES member activity category and click Assign Member Activity Types

MA_types_caique_escaler.png

9.     Assign the ZPOS_ORDER member activity type

MA_type_cat_caique_escaler.png

10.     Save

 

If you have any question regarding the content fell free to post on the comments.

Note that in the next document, I will post how to create a simple loyalty program, so stay tuned!

With my best regards,

Caíque

Almost all about External list management (ELM)

$
0
0

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.

 

ELM :

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.

 

step1 SPRO.jpg

 

 

* 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.

 

step 2.jpg

* 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.

step3.jpg

Above is the Basic Configuration for ELM and is ready to use.

 

Creation :


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.

mapping.jpg

Note : You can also give your own Mapping Rule. For exmple Constnat which i have shown below.

mapping rule.jpg

 

Step 2 : Creating ELM.

 

Marketing->External List Management ( Create )

Below Screen is for Creating External List ( uploading file ).

1) General Data

    ->ID

    -> 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.

ELM page.JPG

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.

 

 

success ELM.jpg

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.

 

Error ELM.jpg

Click on Error to see further information.

error detail elm.jpg

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

customers.

 

for that purpose we have to use below Structures.

 

CRMT_MKTLIST_ORG_EXT,

CRMT_MKTLIST_PER_EXT,

CRMT_MKTLIST_ADR_EXT,

CRMT_MKTLIST_CP_EXT,

CRMT_MKTLIST_ACT_EXT,

CRMT_MKTLIST_LEA_EXT,

CRMT_MKTLIST_BCI_EXT.

 

We have to create an append structure in above structures in case if we want to add aditional field. below is the screen shot.

appedn struct.jpg

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 

ISO codePERS_COUNTRYISO

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.

Postal CodePERS_POSTL_COD1

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.

 

Debugging

 

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

MKTLIST.

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.

How To: Executing a social media campaign in SAP CRM

$
0
0

Many companies start to interact with their prospects and followers on Facebook, Twitter & Co. Planning and publishing of posts in an organized way starts to evolve with that. Unfortunately very often this planning and publishing process is done completely decoupled from SAP CRM, which results in not being able to measure the ROI of such interactions with prospects and followers.

 

 

This How To describes how planning and publishing of posts can be incorporated into SAP CRM.

1. Use Case:

As a campaign manager I like to plan and execute campaigns without giving a specific target group but addressing „my followers“ via a social media channel (for example Facebook or Twitter) with specific information, such as a product announcement (Tweet in Twitter).
Thereby the goal is to avoid a manual posting of marketing information and to use an automatic process instead (either campaign automation or at least campaign execution via batch job).

2.Process Steps:

1.)  Create a (dummy) target group which contains, as single member, your own company which, as the sender, posts a marketing message in a social media channel. This (dummy) target group is required as the target group is a mandatory field for campaign execution.

1.)  As mail form is a mandatory field for campaign execution too, you also have to create an appropriate mail form for your social media campaign. This mail form (i.e. the text of the mail form) can be used to define the content of the social media post, which has to be processed later on during campaign execution (see chapter 3). The content may vary with the social media channel. In this case you have to define different mail forms for different social media channels.

1.)  Create a campaign/campaign element with an appropriate communication medium (see technical prerequisites), the (dummy) target group and the mail form (as created before). Speaking of Social Media Campaign means a campaign with such a specifically defined communication medium, target group and mail form with the purpose of posting a so called social media post.Execute the social media campaign/campaign element to actually generate the social media post. (As campaign element the social media post can be part of a comprehensively designed marketing campaign)


3. Technical Prerequisites and Implementation:

The following picture outlines the overall architecture of a social media campaign post:

Architecture.png

3.1. Customizing

3.1.1.    Mandatory: Define a new communication medium with an arbitrary but speaking name in customizing (SPRO->Customer Relationship Management-> Marketing-> Marketing Planning and Campaign Management-> Campaign Execution-> Define Communication Medium) and assign the communication method ‚Open Channel‘ to this new communication medium.

 

3.1.1.1.  New communication medium (example ‘SOMI’):

Comm_medium_1.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3.1.1.2. Assignment of communication method to new medium:

Comm_medium_2.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3.1.1.      Optional: In addition you can define a new combination of campaign type/objective/tactic  (SPRO->Customer Relationship Management-> Marketing-> Marketing Planning and Campaign Management-> Basic Data-> Define Types/Objectives/Tactics) which allows you, when creating a social media campaign, to differentiate your campaign accordingly:

Tactic.png

 

 

 

 

 

 

 

 

 

 

 

 

                Example: Campaign Type: ‘Social Media Campaign’, Objective: ‘Brand Awareness’, Tactics: ‘Twitter Post’ and ‘Facebook Post’.

Objectives.png

 

Tactic_2.png

3.2. Implementation:

Implement the open Channel BAdI (can be found in SPRO->Customer Relationship Management-> Marketing-> Marketing Planning and Campaign Management-> Campaign Execution-> Business Add-Ins-> BAdI: Transport of Campaign Data to Open Channel or via transaction SE18, BAdI name: ‘CRM_MKT_EXP_CAMP_DAT’).

BADI.png

Technically speaking: Implement the method EXPORT_CAMPAIGN_DATA of Interface IF_EX_CRM_MKT_EXP_CAMP_DAT. To do so you have to create an according class in customer namespace.

ClassBuilder.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

In this BAdI, the importing parameter IV_CHANNEL of the interface method Export_Campaign_data provides, in case of your Social Media Campaign (see chapter 2) the newly defined social media communication medium. Thus you can, within the BAdI method, determine if you are actually running a Social Media Campaign (i.e. the open channel BAdI implementation is not necessarily restricted to social media campaign implementation only).

The import parameters IS_PROJECT_INFO and, in case of a campaign element, IS_TASK_INFO respectively provide the information about the campaign objective and campaign tactic such as defined in customizing for the regarding campaign type (see chapter customizing 3).

Thus, a fine control which differentiates between different social media channels (e.g. facebook, twitter etc.) can be implemented by evaluating the different marketing tactics.

Depending on which social media channel you want to use to publish your post, you have to implement the use of an appropriate API for the regarding channel (e.g. Twitter, Facebook). To do so you have to get familiar with the appropriate API documentation.

As an example how Social Media APIs can be used within an SAP CRM context (in this case : the CRM interaction center) see SAP notes 1832462 (Master Note: How to Implement Social Media Channel API to Integrate with CRM Interaction Center), 1832480 (How to implement Twitter API for CRM Interaction Center), 1832481 (How to implement Facebook API for CRM Interaction Center), 1881971 (How to implement Sina weibo API for CRM Interaction Center),
1947132 (How to implement WeChat API for CRM Interaction Center). These notes might give you hints how to implement the open channel BAdI for the purposes of social media campaigns.

 

4.Example Campaign:

Based on the afore described settings a Social Media Campaign could, in the CRM WEB UI, look like this:

Campaign.png

 

5.Restriction:

Note that SAP does not deliver an implementation of CRM campaign execution for any social media channel. This document is only meant to be a How-to guide for customer implementations.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Customer Engagement Intelligence CEI - how to integrate customer specific data

$
0
0

Consultants involved in CEI implementation projects recently approached me when doing project effort estimates and project planning. Questions were around customer specific data an the required steps and related efforts to get these data over to the HANA database and available in the CEI segmentation (CEI-Audience Discovery and Targeting) application.

 

Before coming up with estimates, we first have to look at "customer specific data". Potentially we deal with

 

- SAP Standard Tables simply not yet contained in the standard CEI SLT replication schema

- SAP Standard Tables contained in the standard CEI SLT replication schema but extended by Y/Z-Fields

- Customer specific Y/Z-Tables

 

If a required standard table is already contained or not in the SLT replication scheme (set-up during CEI system installation

and post installation configuration) can be checked in the CEI installation guide.

 

https://websmp209.sap-ag.de/~sapidb/011000358700000807912013E -->Page 73

 

If the required ERP/ CRM standard table is missing, it has to be added to the replication schema. This is SLT administration work.

This is obviously always true for customer specific Y/Z-Tables.

In case the standard table is already part of the replication schema (e.g. ERP KNA1 or CRM BUT000) but has been enhanced by

Z/Y-fields the required action depends whether the enhancements were already existing when initially setting up the CEI/ SLT environment

(-> no additional action required). In case the table enhancements were made after setting up CEI/ SLT, some SLT administration

work is to be done.

Check out this:

http://scn.sap.com/thread/3389132

 

In all cases HANA View modelling and CEI Application Server customizing is required in order to make the additional tables/ fields consumable

for users e.g. using CEI-Audience Discovery and Targeting.

 

Hope this helps to come up with and effort estimate for your individual project situation.

 

Deployment Recommendations for Customer Engagement Intelligence 1.1

$
0
0

There is a new presentation available (see link below) that guides you trough the different CEI deployment options and provides guidance on

what's recommended and what's allowed in the context of CEI with ERP/ CRM and non SAP system integration.

 

Capture.PNG

 

Link

 

If you have further questions pls. do not hesitate to get in touch with me.

CEI - Client Handling

$
0
0

Introduction:

 

In a typical customer situation the HANA based application Customer Engagement Intelligence (CEI) regularly runs in an integrated scenario on replicated ERP and CRM data. In many cases we face the situation that customers have setup different clients in their ERP and CRM source systems feeding CEI.

 

This could result e.g. in the below situation:

 

CEI Application ClientSource Client of replicated CRM dataSource Client of replicated ERP Data
100200300

 

In the event that one extends e.g. a customer segmentation model in CEI-ADT by implementing customer specific HANA views, certain modeling rules have to be considered in order to enable the CEI application running in a client 100 to consume application tables with containing records <> client 100.

 

Pls. note: If one deals e.g. with data replicated from non SAP system with no client/ mandant field in the source tables, the following is not relevant!

However if the data contains a client/ mandant column and below rules have not been followed while modeling the custom views this could result in issues

when trying to consume data through the custom view from the CEI application. This is because when the CEI application accesses the views via ADBC the currenty CEI application client is passed to the HANA DB/ views as session parameter used for filtering data.

 

Rules:

 

To support different clients per schema in CEI the following rules are recommended to be followed:

  • All CEI HANA Views shall be defined as cross client.
  • All CEI HANA Views shall handle filtering on the correct client inside of the view. It should be done in a transparent way to the view consumers.
  • Client for a particular schema (e.g. SAP_CUAN_CRM) shall be retrieved as a derived Input Parameter from the Client Mapping Table (CUANC_CLNTMAP). Derived Parameters are available in Analytical and graphical Calculation Views. Naming conventions for such parameters shall be $$IP_<SCHEMA>_CLIENT$$ (e.g. $$IP_CRM_CLIENT$$).
  • Client for SAP<SID> Schema shall be retrieved from the session context ($$client$$).
  • Data Foundations of Attribute Views, Analytical Views and graphical Calculation Views shall be filtered on the corresponding client.
  • Analytical Views that are directly consumed via SQL, SQLScript, CE Functions (standalone case) shall join the Client Mapping Table within the view and filter it on the session client. Reason for this is unavailability of derived Parameters in the Attribute views, SQL Script as well as outside of HANA.
  • If an Attribute View is consumed both directly via SQL (standalone) and inside of Analytical or graphical Calculation View (embedded) then two versions of the view should be created:

           - with filter on the derived client for the embedded scenario. Naming convention for an Attribute View for embedded scenarion is e.g. AT_<VIEWNAME>_CF.

           - with join to the client mapping table for the standalone scenario.

  • Attribute Views consumed inside of Analytical or graphical Calculation Views should not contain a join to the client mapping table.
  • Analytical Views and graphical Calculation Views should not contain a join to the client mapping table for filtering the correct client.

 

Examples:

 

You can check how the above rules are implemented in the standard views AT_COUNTRY and AT_COUNTRY_CF to be found in ...sap/hana-app/cuan/common/internal/Attribute Views.

1.png

2.png

HANA Live Content and CEI

$
0
0

There were some questions around SAP CEI and HANA Live Content. Pls. see development feedback below.

 

Due to software dependencies, functional and performance reasons standard CEI solution does not use HANA Live views as basis for the CEI standard content.

 

However -

  • It is possible for a customer to use HANA Live views in CEI for example in the ADT-scenario;
  • If HANA Live and CEI are running on the same HANA system the data is only replicated once; Both applications can work on the same data base.

 

Thus for the positioning at a customer one can propose a solution with CEI and HANA Live on the same HANA. They fit well together.


Harvesting Tweets into Social Intelligence tables using a Python Script

$
0
0

Disclaimer

 

This tutorial is intended as a guide for the creation of demo/test data only. The sample script provided is not intended for use in a productive system.


Purpose

The main purpose of this document is to show you how social posts can be provided for the product SAP Customer Engagement Intelligence (from Release 1.1., SP02 onwards).The following tutorial explains one way of collecting tweets from Twitter based on a search term in order to use them in the Sentiment Engagement workset of the Social Contact Intelligence solution.The pre-installed Python Interpreter from the SAP HANA client is used to execute a Python script from SAP HANA Studio (alternatively an Eclipse IDE like Aptana Studio can be used). The script inserts the collected tweets into Business Suite Foundation database tables SOCIALDATA and SOCIALUSERINFO in a configured schema. If you run the script with the default settings, it harvests 100 records in one run for a given search term. You can, however, change the script settings to retrieve more data per run.To run the script, you will also need to make a few customizing and configuration settings in order to use the Pydev Plugin in SAP HANA studio.

Prerequisites

Make sure that the following prerequisites are met before you start out:

  • Installation of SAP HANA studio and SAP HANA Client

Install SAP HANA studio and SAP HANA Client and apply for a HANA user with Read, Write,and Update authorization for foundation database tables SOCIALDATA and SOCIALUSERINFO in the respective schema.
Note down the following information, you will need it later (see section 'Customizing and Running the Script'):

    1. SAP HANA server name
    2. Port Number of SAP HANA server
    3. Database user and password
    4. Schema where the tables SOCIALDATA and SOCIALUSERINFO are located.

       

      Note:

       

      .The release of software component of the tables SOCIALDATA and SOCIALUSERINFO from SP03 (included in software component SAP_BS_FND 747 )

      Please check SAP help file https://help.sap.com/hana/SAP_HANA_Studio_Installation_Update_Guide_en.pdf for more information about SAP HANA studio installation.

      Tested with SAP HANA studio 64bit with minimal Version: 1.0.7200 and SAP HANA client 64bit, Microsoft Windows 7, 64 bit version.

       

  • Application Registration in Twitter
    If you don't already have them, register your application and get your consumer key and consumer secret as follows:
    1. Open the URL: https://apps.twitter.com/ and register your application.
    2. Note down the consumer key and the consumer secret.

 

Setup
1) Configuring Python in SAP HANA Studio Client

Python Version 2.6 is already embedded in SAP HANA client, so you do not need to install Python from scratch.To configure Python API  to connect to SAP HANA, proceed as follows.

  1. Copy and paste the following files from C:\Program Files\SAP\hdbclient\hdbcli to \Program Files\SAP\hdbclient\Python\Lib
    1. _init_.py
    2. dbapi.py
    3. resultrow.py
  2. Copy and paste the following files from C:\Program Files\SAP\hdbclient to C:\Program Files\SAP\hdbclient\Python\Lib
    1. pyhdbcli.pdb
    2. pyhdbcli.pyd

Note:

In Windows OS, by default the installation path is C:\Program Files\SAP\..  for a  64bit installation SAP HANA studio and SAP HANA Database client.

If you opted for a 32 bit installation, the default path is C:\Program Files(x86)\sap\..

2) Setting up the Editor to Run the File


     Carry out the following steps:

 

  1. Install Pydev plugin to use Python IDE for Eclipse
    The preferred method is to use the Eclipse IDE from SAP HANA studio. To be able to run the python script, you first need to install the Pydev plugin in SAP HANA studio:
    1. Open SAP HANA studio, click Help on menu tab and select Install New Software...
    2. Click the button Add... and enter the following information:
      py.jpg
    3. Select the settings as shown in this screenshot:  

      py2.jpg
    4. Press Next twice
    5. Accept the license agreements, then press Finish.
    6. Restart SAP HANA studio.
  2. Configure the Python Interpreter
    In SAP HANA studio, carry out the following steps:
    1. Select the menu entries Window -> Preferences.
    2. Select PyDev -> Interpreters -> Python Interpreter.
    3. Click New... button, type in an Interpreter Name. Enter in field Interpreter Executable the following executable file C:\Program Files\sap\hdbclient\Python\Python.exe. Press ok twice.
  3. Create a Python project
    In SAP HANA studio, carry out the following steps:
    1. Click File -> New -> Project..., then select Pydev project.
    2. Type in a project name(example: TWITTER_DATA_COLLECTION), then press Finish.
    3. Right-click on your project. Click New -> File, then type your file name (for example: data_harvest_tweets.py). Press Finish.
  4. Create an external library path
    In SAP HANA studio, carry out the following steps:
    1. Right-click on your project, select properties and Pydev-PYTHONPATH.
    2. Select the tab External Libraries, then click on Add source folder C:\Program Files\SAP\hdbclient\Python\Lib.
    3. Press Apply, then OK.
  5. Import the script   Alternatively you can save the python script with .py extension in your file location and import this file to your project.
    1. Copy the  Python script which is available at the end of this Document.
    2. In SAP HANA Studio,Open your newly created Python file from your project and paste the script.
    3. Click Save.

           py5.jpg

Customizing and Running the Script

1) Customizing and User Input for Python Script

  1. In your Eclipse editor, open the file data_harvest_tweets.py and maintain the following parameter in the START OF CUSTOMIZING STEPS section of the script:

    input.png
  2. Save the file.
    Feel free to adopt the search query and its options to your needs. Now you are ready to run the script.

 

2) Executing the Script

  1. Run the script from your editor.

    execute.png
  2. Enter the search term(s).
    Now you will receive data from Twitter, as you can see in your Eclipse IDE.
    The script can be run multiple times: It can extract data based on a search term for up to the last 7 days.
    You have now set up harvesting.

2) Checking the Results in the Database Tables

  1. Execute a select statement of your corresponding database tables.
  2. Check your tweets.

 

REFERENCES:

https://help.sap.com/hana/SAP_HANA_Studio_Installation_Update_Guide_en.pdf

https://apps.twitter.com/

https://dev.twitter.com/docs/using-search

http://scn.sap.com/community/developer-center/hana/blog/2012/06/08/sap-hana-and-python-yes-sir

 

 

 

#Python Script starts here
import urllib2;
import urllib;
import sys;
import json;
import time;
import uuid;
from time import gmtime, strftime
import dbapi;
import binascii;
#This script is used to harvest tweets from Twitter based on the Customizing settings below and then inserts the tweets to Social foundation database tables.(SOCIALDATA and SOCIALUSERINFO)
##########################################################START OF CUSTOMIZING STEPS################################################################################################################################
#1.create connection to database
#Please enter the input parameters to connect to HANA system)
server = ''            #HANA server
port =                   #integer value, so please don't enclose in quotes
username = ''     #Your Database system user name
password = ''         #password for your user
schema = ''          #HANA database table schema name
#2.customer access tokens (Please supply your consumer key and consumer secret token)
#https://apps.twitter.com/app/new (register your application and get access tokens)
c_key        = ''  #CONSUMER_KEY
c_sec        = ''  #CONSUMER_SECRET
#3.Proxy setting
proxy = '';  #if you have Proxy setting, specify it here..otherwise input an empty string
#4. Additional data to fill in database tables
client             = ''  #Client number for your database table
socialmediachannel = ''   #Social media channel name like 'TW'. You can enter Maximum 3 characters,this has to be in sync with SCI customizing
##########################################################END OF CUSTOMIZING ##########################################################################################################################################
#Please do not edit from here..
# Application based OAuth Authentication (OAuth2)
class OAuth2Helper(object):    # variables    c_key = "";         # Consumer key    c_sec = "";         # Consumer secret    proxy = "";    api_url = "";    # predefined    TYPE_TWITTER = "TWITTER";    # more    APIURL_TWITTER = "https://api.twitter.com/oauth2/token";    # api_url could be empty if type is given.    def __init__(self, api_url, customer_key, customer_secret, proxy=""):        self.api_url = api_url;        self.c_key = customer_key;        self.c_sec =customer_secret;        self.proxy = proxy;    # THIS FUNCITON SHOULD BE FINALLY CALLED    # for twitter: header    def generateHeader(self, atype=TYPE_TWITTER):        if atype == self.TYPE_TWITTER:            self.api_url = self.APIURL_TWITTER;            return "Bearer %s" % self.obtainBearerToken_twitter();    def obtainBearerToken_twitter(self):        # step 1. generate bearer token credential        bearer_token_credential =  "%s:%s" % (self.c_key, self.c_sec);        # step 2. generate Base64 encoded credential        base64_bearer_token_credential = binascii.b2a_base64(bearer_token_credential)[:-1];        # step 3. connect        handler = urllib2.BaseHandler();        proxy = self.proxy;        if proxy is not None and proxy != '':            #print ' Using proxy: ' + str(proxy)            handler = urllib2.ProxyHandler({'http': proxy, 'https': proxy})        try:            opener = urllib2.build_opener(handler);            opener.addheaders = [ ('Content-Type', "application/x-www-form-urlencoded;charset=UTF-8"),                                  ('Authorization', "Basic %s" % base64_bearer_token_credential)];                       data = opener.open(self.api_url, data="grant_type=client_credentials").read();            # step 5. parse json string            json_data = json.loads(data, encoding="utf-8");            return json_data["access_token"];        except:            print "[ERROR]\n%s" % ("\n".join("%s" % info for info in sys.exc_info()));            return None;        return base64_bearer_token_credential;    def escapeParameter(self, text):        return urllib.quote(str(text), safe="~");
#############################################################################################################################################################################
#checking mandatory customizing user settings : server,port, username, password, schema, c_key, c_sec
print 'checking the input customizing  settings \n'
count = 0;
var_input = server;
var_name = 'HANA Server name';
def check_config(var_name,var_input):    if (var_input == ""):        print var_name +" "+ 'is not filled.';        return;
while (count < 7):    if (count == 1):        var_input = port;        var_name = 'HANA port';    elif (count == 2):        var_input = username;        var_name = 'HANA system username';    elif (count == 3):        var_input = password;        var_name = 'HANA System password';    elif (count == 4):        var_input = schema;        var_name = 'HANA Database table schema';    elif (count == 5):        var_input = c_key;        var_name = 'Twitter Consumer Key';    elif (count == 6):        var_input = c_sec;        var_name = 'Twitter Consumer secret token';    check_config(var_name,var_input);    count = count + 1;
if( len(server) > 0 or len(port) > 0 or len(username) > 0 or len(password) > 0  or len(schema) > 0 or len(c_key) > 0 or len(c_sec) > 0 ):    print('Configuration settings is filled.. \n');
elif ( server == '' or port == '' or username == '' or password == '' or schema == '' or c_key == '' or c_sec == '' ):    sys.exit('Please fill in configuration steps in Python script and continue..');
#Searching tweets (Please input the search_term)
while True:    resp = raw_input("Please enter your search term? \n")    if resp == "":        resp = raw_input('If you wish to exit enter stop (or) enter your search term \n')    if resp == 'stop':        sys.exit();    if len(resp) > 0:        break;    if not resp:        continue
search_term = resp;
#HANA database connection
hdb_target = dbapi.connect(server, port, username, password);
cursor_target = hdb_target.cursor();
#Authenticating and Connecting to search_url to harvest data
search_url = "https://api.twitter.com/1.1/search/tweets.json";
apiurl = "https://api.twitter.com/oauth2/token";
params = [("q",search_term),("count","100"),("lang",''),("result_type","recent")];
oauth2 = OAuth2Helper(apiurl, c_key, c_sec, proxy);
# connection
handler = urllib2.BaseHandler();
header = oauth2.generateHeader();
#handling proxy
if proxy is not None and proxy != '':    print 'Twitter: Using proxy: ' + str(proxy)    handler = urllib2.ProxyHandler({'http': proxy, 'https': proxy})
#mapping tweets to the fields and inserting it to the database tables.
record_count = 0;
print ('Inserting records into table...');
try:    opener = urllib2.build_opener(handler);    opener.addheaders = [('Authorization', header)];    http_url = ("%s?%s") % (search_url, "&".join(['%s=%s' % (param, oauth2.escapeParameter(value)) for (param, value) in params]));    data = opener.open(http_url, data=None).read();    json_data_tweets = json.loads(data);    #while count < total_len :    for tweet in json_data_tweets["statuses"]:        tweet_id = tweet['id']        from_user_lang = tweet['lang']        id_str = tweet['id_str']        user = tweet['user']        from_user_id = user['id']        from_screen_name = user['screen_name']        from_user_name = user['name']        userProfileLink = 'https://twitter.com/%s' % (from_screen_name)        socialPostLink = 'https://twitter.com/%s/status/%s' % (from_user_id, id_str)        profile_image_url = user['profile_image_url']        replication_createdat = strftime("%Y%m%d%H%M%S", gmtime()) #get current time        created_at = tweet['created_at']        if created_at is None:            continue        created_at = time.strftime('%a, %d %b %Y %H:%M:%S +0000', time.strptime(tweet['created_at'], '%a %b %d %H:%M:%S +0000 %Y'))        text = tweet['text'].encode('utf-8')        text = text.replace('\n', '')        uuid_str = str(uuid.uuid1())        socialdatauuid = uuid_str.replace("-","")        client = client        socialmediachannel = socialmediachannel        if len(text) == 0:            continue        inssql = "insert into" +" "+ schema + ".SOCIALDATA (CLIENT, SOCIALDATAUUID, SOCIALPOST, LANGUAGE, SOCIALMEDIACHANNEL, CREATEDBYUSER, CREATIONDATETIME,  SOCIALPOSTLINK, CREATIONUSERNAME, SOCIALPOSTSEARCHTERMTEXT, SOCIALPOSTTEXT, CREATEDAT) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"        cursor_target.execute(inssql, (client, socialdatauuid, tweet_id, from_user_lang, socialmediachannel, from_user_id, created_at,  socialPostLink, from_user_name, search_term, text, replication_createdat))        inssql = "upsert" +" "+ schema + ".SOCIALUSERINFO (CLIENT, SOCIALMEDIACHANNEL, SOCIALUSER, SOCIALUSERPROFILELINK, SOCIALUSERACCOUNT, SOCIALUSERNAME, SOCIALUSERIMAGELINK, CREATEDAT) values (?, ?, ?, ?, ?, ?, ?, ?) with primary key"        cursor_target.execute(inssql, (client, socialmediachannel, from_user_id, userProfileLink, from_screen_name, from_user_name, profile_image_url, replication_createdat))        hdb_target.commit()        record_count = record_count + 1        print ('record number',record_count,created_at, from_user_name, tweet_id, text)
except:    print "[ERROR]\n%s" % ("\n".join("%s" % info for info in sys.exc_info()));
print 'Total number of records inserted: ', record_count;
#End of Python script

SAP CEI ADT - How to open the ADT default segmentation profile with a defined attribute

$
0
0

Since this question was raised by a consultant and the answer is not obvious I thought it may worth this post.

 

Question:

In the sample below, the active attribute/ preview when opening the segmentation profile is "State". How can this be changed/ influenced?

 

1.PNG.jpg

 

Answer:

The user role menu customizing (TA LPD_CUST) is used to customize the application navigation bar and it’s entries.

1.PNG.jpg.png


In this transaction one can define a parameter SEL_ATTRIB which controls the displayed default parameter when opening the default segmentation profile.

 

TA LPD_CUST:

1.PNG.jpg

 

It can only be defined once in the application and in case in your system you've set up multiple segmentation profiles it'll only work for the profiles that contain the very same parameter. In case you want to have different parameters for different users/ segmentation profiles you'd have to define different user roles with different LPD_CUST set up.

How to Integrate SAP Infinite Insight with SAP CEI

How to setup SAP Customer Engagement Intelligence (CEI) SAP InfiniteInsight (KXEN) Integration

$
0
0

With SAP Customer Engagement Intelligence, you can now use SAP InfiniteInsight based scoring, for example, in SAP CEI - Audience Discovery and Targeting. Based on SAP InfiniteInsight you can automatically train predictive models, which reduces the effort of the business analyst, and provides best results.

 

To enable the usage of SAP InfiniteInsight, you must set up the SAP InfiniteInsight host and the data connection with SAP Customer Engagement Intelligence. The integration setup of SAP InifiniteInsight with SAP Customer Engagement Intelligence is not part of the SAP Customer Engagement Intelligence delivery.

 

You can implement the setup on a project basis:

Creation of a Marketing Profile Set based on the standard CRM_MKTTG_BP_BIRTHDATE Infoset thru the WebUI Segment Builder

$
0
0

Objective: Creation of a Marketing Profile Set based on the standard CRM_MKTTG_BP_BIRTHDATE Infoset thru the WebUI Segment Builder.

 

Problems: Standard CRM_MKTTG_BP_BIRTHDATE Infoset DOES NEVER RETURN ANY RESULTS on the segmentation builder of the WebUI client (no matter the filter you specify).

 

Other cases:  However if we create a new Data source with data "Extraction from Query" (transaction RS02) based on this standard CRM_MKTTG_BP_BIRTHDATE Infoset and we test the functionality using transaction RSA3, IT DOES RETURN RESULTS (using the same filters as in the segmentation builder)! Of course the segmentation builder works with other attribute lists.

 

NEW: IF WE DON’T SPECIFY ANY SEGMENTATION BASE IN THE PROFILE GROUP, IT DOES RETURN RESULTS!!! (GO TO THE END OF THE DOCUMENT FOR DETAILS)

 

Steps followed:

  1. Review Standard Infoset CRM_MKTTG_BP_BIRTHDATE (Transaction SQ02).
    1. Review Data Reading Program code: do we have to change the standard code? We have only remove the "BREAK-POINT" statement.
  2. Creation of a Data source based on the standard CRM_MKTTG_BP_BIRTHDATE Infoset (Transaction CRMD_MKTDS).
  3. Creation of an Attribute List based on that standard Data source and selection the Birth date as a filter in the Attribute list (Transaction CRMD_MKTDS).
  4. On the segment builder of the WebUI set any filter (Example: “TODAY”).

 

Steps in detail:

  1. Review Standard Infoset CRM_MKTTG_BP_BIRTHDATE
    1. SQ02.
    2. (Image deleted)
    3. Review Data Reading Program code (Code attached)
    4. (Image deleted)
  2. Creation of a Data source based on the standard CRM_MKTTG_BP_BIRTHDATE Infoset
    1. Data source: Transaction: SPRO – Customer Relationship Management - Marketing – Segmentation - Maintain Data Sources and Attribute Lists: CRMD_MKTDS
      1. Create Data Source
      2. (Image deleted)
        1. Infoset: CRM_MKTTG_BP_BIRTHDATE.
        2. Business Partner Field: CRMT_MKTTG_IS_BIRTHDATE-PARTNER_GUID
      3. (Image deleted)
      4. Result:
      5. (Image deleted)
  3. Attribute List
    1. Creation of the Attribute List
    2. (Image deleted)
    3. Assign Data Source:
    4. (Image deleted)
    5. Selection of the Birth date as a filter in the Attribute list:
    6. (Image deleted)
    7. Result:
    8. (Image deleted)
  4. Segment builder of the WebUI:
    1. Access to WebUI with marketing role.
    2. Create Segment:
    3. Creation of Profile Set
    4. Graphical modeler
    5. Create Filter: We have already tried many different filters (we already seen notes referring to this matter).
    6. Example1: “today”
    7. Count target group. Here I would like to stand out that once you click on the “Count” option, immediately it shows 0 results. In other words, it doesn’t process any information. With other attribute lists it takes some time to process, no matter the filter or the attribute list you use. However if we create a new Data source with data "Extraction from Query" (transaction RS02) based on this standard CRM_MKTTG_BP_BIRTHDATE Infoset and we test the functionality using transaction RSA3, IT DOES RETURN RESULTS (with “today” filter and other)! So it seems that the problem has to do with the segment builder, not the Infoset.
    8. Result: it never return any results no matter the filter you specify.

 

 

Other cases:

 

  1. Creation of a new Data source with data "Extraction from Query" where you enter the name of your new query
    1. Creation of a Data source based on the standard CRM_MKTTG_BP_BIRTHDATE Infoset
      1. Standard Infoset CRM_MKTTG_BP_BIRTHDATE:
      2. We fill the form and select “Extraction from Query”:
      3. Press SAVE and define which fields will be available for selection and which of them will be visible.
    2. RSA3: Extractor checker in order to test the Data source:
      1. We specify the Data source:
      2. IT DOES RETURN RESULTS:
      3. ALV Grid:

 

 

NEW: It seems that it has to do with the Segmentation Basis selected in the creation of a Profile Set, because if we do not select any, it does return results. But we need to create this Profile Set based on a particular Segmentation Basis called BS Usuarios Registrados.

 

  • Segment builder – Profile Set of the WebUI
    • Segmentation Basis: we leave it in blanc.

    • Graphical modeler

    • Create Filter: We have already tried many different filters (we already seen notes referring to this matter).

    • Example1: “today”

    • Count target group.

    • Result: IT DOES RETURN RESULTS!!! àConclusion: the problem is the Segmentation Basis

 

  • Define Segmentation Basis:
    • Transaction: SPRO – Customer Relationship Management - Marketing – Segmentation – Classic Segmentation - Define Segmentation Basis.
      • BS Usuarios Registrados:

 

  • Define Reports for Creating Segmentation Bases
    • Transaction: SPRO – Customer Relationship Management - Marketing – Segmentation – Classic Segmentation - Define Reports for Creating Segmentation Bases
      • ZMK_UTL_MGR_SITES_UREG

 

 

  • Define Usage for Segments:
    • Transacción: SPRO – Customer Relationship Management - Marketing – Segmentation – General Settings - Define Usage for Segments.
      • ZBS_UR à02 Segmentatión Basis

 

  • Attribute List:
    • Category:

There is no Category 02 Segmentatión Basis!!! Why??

    • Usage ID

 

New: It seems that it has to do with the Segmentation Basis selected in the creation of a Profile Set, because if we do not select any, it does return results. But we need to create this Profile Set based on a particular Segmentation Basis called BS Usuarios Registrados. Why is not posible to select Category 02 Segmentation Basis in the creation of the Attribute List?



Solution:-

  • It seems that the standard Infoset doesn’t work by itself with Segmentation Basis. Two SAP notes have been applied and a new Field Group has been added to the Infoset (in order to distint the Segmentation Base).
    • CRMT_MKTTG_IS_BIRTHDATE-MGRGUID
    • 1966298: MGR_GUID is not populated correctly to infoset read program
    • 2007687:Segmentation InfoSet queries saved with incorrect Master Group
  • For that reason we had to create a new Infoset based on the standard CRMT_MKTTG_IS_BIRTHDATE, but adding this new Field MGRGUID to the Group Fields.

 

 

 

This document was generated from the following discussion: Creation of a Marketing Profile Set based on the standard CRM_MKTTG_BP_BIRTHDATE Infoset thru the WebUI Segment Builder

Now available - Customer Engagement Intelligence as free trial in the cloud

$
0
0

About SAP Customer Engagement Intelligence powered by SAP HANA:

 

SAP® Customer Engagement Intelligence (CEI) is a fully integrated software suite that consists of three applications:

 

- SAP Customer Value Intelligence (CEI-CVI)


- SAP Audience Discovery (CEI-ADT)

 

- SAP Account Intelligence mobile app. (CEI-AI)

 

Powered by the SAP HANA® platform, the suite enables real-time insight, interaction, and execution for excellence in sales, marketing, and service.

 

 

How to request your free trial:

 

Simply follow the links below and walk through the request process with just a few clicks.

 

CEI

 

 


After the successful set-up of your personal application instance you'll receive an email with system URL and logon credentials.
 

Enjoy your test drive!
 
 
 

Discounts showing half of Fixed Spend entered

$
0
0

Hello All,

 

The below issue is a CRM TPM issue.

 

Problem Statement:


During the discount generation for TP’s for hierarchy, the trade spend values were not equally distributed within the accounts for the hierarchy node.

This majorly happened when the TP had 2 retrospective spend types in one TP.


Steps to Replicate:


We are trying to create a TP with 2 Retrospective Spend Method conditions, one for Unit and other Lumpsum.

When the discount amount is entered in planning bucket for the Lumpsum discount method condition, the value gets distributed in half for the accounts in a Account Hierarchy (Trade Promotion is created at hierarchy level)

 

We have the current situation where there is 1 product and fortunately one customer in the account hierarchy.

But then too the discounts are generated in halves.

 

Refer the below screen captures;

 

Fixed Spend of GBP 2500 entered

Values+Entered.png

Discount shows as GBP 1250

Discounts+generated.png


Resolution:


As a part of resolution, implement the below SAP notes.

0001818251  Condition generation: spend values for split periods of TPM

0002023128  Trade Spend value is not distributed correctly on conditions

 

Appreciate your feedback over the same.

Keep Sharing..!!

 

Thanks & Regards,

Dinesh Rupraj


Integration of SAP InfiniteInsight (KXEN)

Campaign to Sales Discount - Configuration Steps

$
0
0

Usage of Campaign to provide sales discounts : - The configuration related to establishing the relationship between the Marketing and Sales areas in SAP CRM.

1.  Definition of Condition maintenance Group:

Transaction Path - IMG >> Customer Relationship Management >> Master Data >> Conditions and Condition Technique >> Condition
Technique: Basics >> Create Maintenance Group

 

2. Assignment of Condition Maintenance Group:

Transaction Path - IMG >> Customer Relationship Management >> Trade Promotion Management >> Trade Promotion >> Condition Maintenance >> Assign Condition Maintenance groups

 

3. Assignment of Condition Type to the Condition Maintenance Group:

Transaction Path - IMG >> Customer Relationship Management >> Trade Promotion Management >> Trade Promotion >> Condition Maintenance >> Assign Condition Maintenance groups

 

4. Assignment of the Condition Maintenance Group to the Condition Maintenance Group context.

Transaction Path - IMG >> Customer Relationship Management >> Trade Promotion Management >> Trade Promotion >> Condition Maintenance >> Define Maintenance Groups for Context

 

5. Pricing Procedure:

Transaction Path - IMG >> Customer Relationship Management >> Basic Functions >> Pricing >> Define Settings for Pricing >> Create Pricing Procedure

 

6. Condition Type Settings: 

Transaction Path - IMG >> Customer Relationship Management >> Basic Functions >> Pricing > Define Settings for Pricing >> Create Condition Types

 

7. Access Sequence:

Transaction Path - IMG >> Customer Relationship Management >> Basic Functions >> Pricing >> Define Settings for Pricing >> Create Access Sequences

 

8. Condition Table and its fields:

Transaction Path - IMG >> Customer Relationship Management >> Basic Functions >> Pricing >> Define Settings for Pricing >> Create Condition Tables

CEI - Client Handling

$
0
0

Introduction:

 

In a typical customer situation the HANA based application Customer Engagement Intelligence (CEI) regularly runs in an integrated scenario on replicated ERP and CRM data. In many cases we face the situation that customers have setup different clients in their ERP and CRM source systems feeding CEI.

 

This could result e.g. in the below situation:

 

CEI Application ClientSource Client of replicated CRM dataSource Client of replicated ERP Data
100200300

 

In the event that one extends e.g. a customer segmentation model in CEI-ADT by implementing customer specific HANA views, certain modeling rules have to be considered in order to enable the CEI application running in a client 100 to consume application tables with containing records <> client 100.

 

Pls. note: If one deals e.g. with data replicated from non SAP system with no client/ mandant field in the source tables, the following is not relevant!

However if the data contains a client/ mandant column and below rules have not been followed while modeling the custom views this could result in issues

when trying to consume data through the custom view from the CEI application. This is because when the CEI application accesses the views via ADBC the currenty CEI application client is passed to the HANA DB/ views as session parameter used for filtering data.

 

Rules:

 

To support different clients per schema in CEI the following rules are recommended to be followed:

  • All CEI HANA Views shall be defined as cross client.
  • All CEI HANA Views shall handle filtering on the correct client inside of the view. It should be done in a transparent way to the view consumers.
  • Client for a particular schema (e.g. SAP_CUAN_CRM) shall be retrieved as a derived Input Parameter from the Client Mapping Table (CUANC_CLNTMAP). Derived Parameters are available in Analytical and graphical Calculation Views. Naming conventions for such parameters shall be $$IP_<SCHEMA>_CLIENT$$ (e.g. $$IP_CRM_CLIENT$$).
  • Client for SAP<SID> Schema shall be retrieved from the session context ($$client$$).
  • Data Foundations of Attribute Views, Analytical Views and graphical Calculation Views shall be filtered on the corresponding client.
  • Analytical Views that are directly consumed via SQL, SQLScript, CE Functions (standalone case) shall join the Client Mapping Table within the view and filter it on the session client. Reason for this is unavailability of derived Parameters in the Attribute views, SQL Script as well as outside of HANA.
  • If an Attribute View is consumed both directly via SQL (standalone) and inside of Analytical or graphical Calculation View (embedded) then two versions of the view should be created:

           - with filter on the derived client for the embedded scenario. Naming convention for an Attribute View for embedded scenarion is e.g. AT_<VIEWNAME>_CF.

           - with join to the client mapping table for the standalone scenario.

  • Attribute Views consumed inside of Analytical or graphical Calculation Views should not contain a join to the client mapping table.
  • Analytical Views and graphical Calculation Views should not contain a join to the client mapping table for filtering the correct client.

 

Examples:

 

You can check how the above rules are implemented in the standard views AT_COUNTRY and AT_COUNTRY_CF to be found in ...sap/hana-app/cuan/common/internal/Attribute Views.

1.png

2.png

Now available - Customer Engagement Intelligence as free trial in the cloud

$
0
0

About SAP Customer Engagement Intelligence powered by SAP HANA:

 

SAP® Customer Engagement Intelligence (CEI) is a fully integrated software suite that consists of three applications:

 

- SAP Customer Value Intelligence (CEI-CVI)


- SAP Audience Discovery (CEI-ADT)

 

- SAP Account Intelligence mobile app. (CEI-AI)

 

Powered by the SAP HANA® platform, the suite enables real-time insight, interaction, and execution for excellence in sales, marketing, and service.

 

 

How to request your free trial:

 

Simply follow the links below and walk through the request process with just a few clicks.

 

CEI

 

 


After the successful set-up of your personal application instance you'll receive an email with system URL and logon credentials.
 

Enjoy your test drive!
 
 
 

Configuration of Demand Management Foundation(DMF) for TPO

$
0
0

What is TPO ?

TPO assists CPG manufacturer strategically to optimize the trade spending across their total product portfolio. Trade Promotion Optimization is an approach that uses business rules, constraints, and goals to mathematically create a trade calendar that can meet all of these requirements. Optimization is helpful for strategic questions, such as “what combination of promotional events (feature price, frequency, timing & depth of deal allowances) will meet or beat my revenue and/or profit goals and still stay within my trade promotion budget?” Right TPO models can also solve for ratio mix of revenue, volume and/or profitability, as well as profit contribution for both the manufacturer and retailer.


SAP TPO enables trade marketing and sales teams to leverage advanced predictive modeling to suggest optimal price and merchandising decisions based on goals and objectives, or to assess revenue, volume and profitability.


SAP DMF: Demand Management Foundation provides predictive demand driven forecasts and optimization simulations for all promotion planning across channels and customer segments. In DMF you can do model and forecast for set of customers, channels and markets.  By using demand data, DMF systems help to forecast and optimize the predictions as per the requirement. It’s a science engine, which transforms historical demand data into models for generating forecasting & optimization. SAP TPO uses ‘Bayesian ‘science techniques. A forecast run is created for each call of science system (DMF). The forecast run can be used to see the parameters and results of each prediction that adds to the what-if scenario.


The following settings are few important ones for TPO:

1)  Defining Model Hierarchy

2) Maintaining Model profiles

3) Maintaining Forecast profiles

4) Maintain RFC settings between CRM, BW and DMF system


Upload the data in DMF system and with above settings, you can  perform forecasting or simulation from CRM system.



Viewing all 115 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>