Tuesday, February 2, 2016

1959569 - How to enable HANA Text Analysis and develop HANA database procedure for CRM social post sentiment calculation

Symptom
You want to enable HANA TA on CRM social data table and calculate sentiment from the HANA TA result table.


Other Terms
HANA Text Analysis
CRM
Social Media
Sentiment


Reason and Prerequisites
You have activated Business Function CRM_SMI_INBOX.
The primary DB of CRM is HDB version 1.0 SPS05 or above. The recommended HDB version is 1.0 SPS07.
You have installed HANA studio. You have installed ABAP Development Tool(aka ABAP in Eclipse - AiE) within HANA studio.


Solution
Important Disclaimer:
SAP only delivers code samples with this product which is not intended to be used in a productive environment but for testing purposes only. Any such use is at the customer’s sole risk.
1. How to enable HANA Text Analysis:
If you are using CRM 7.0 Ehp3 SP01 or CRM 7.0 Ehp3 SP02, please enable HANA Text Analysis on table CRMD_SOC_POST by creating Full-Text index on field 'CONTENT' with parameters:
  • Index Name: CRMVOICEOFCUST
  • Index Type: Full-Text Index
  • Indexed Columns: CONTENT
  • Index Generation Mode: Asynchronous
  • Sort: ASC
  • Language column: LANGUAGE
  • Language Detection: EN
  • Mime Type: Not defined
  • Fuzzy Search Index: Off
  • Phrase Index Ratio: 0.000000
  • Search Only: On
  • Fast Preprocess: Off
  • Configuration: EXTRACTION_CORE_VOICEOFCUSTOMER
  • Text Mining: Off
  • Text Analysis: On
You can ask your HANA DB administrator to create this Full-Text index according to the parameters above. Or you can create a report to do it at once. Please refer to the attached document HANA_TA_ENABLE.docx for sample code. Please adapt the code according to your need.
After HANA Text Analysis is successfully enabled, a HANA local DB table should be created automatically. The table name is '$TA_<Full-Text Index Name>, for example '$TA_CRMVOICEOFCUST'. It holds the text analysis result data.
If you are using CRM 7.0 Ehp3 SP03 or above, please enable HANA Text Analysis on table SOCIALDATA by executing report SMI_TAINDEX_ON_SOCIALPOSTTEXT. It will create full-text index on field SOCIALPOSTTEXT. The generated HANA local DB table is '$TA_INDEXVOICEOFCUST'.
2. How to calculate social post sentiment via HANA database procedure
Follow steps below:
2.1 Create a database procedure in HANA studio with language 'SQL Script' and activate it.
2.2 Generate procedure proxy in ABAP Development Tool with reference to the database procedure you created in step 2.1. Then activate it.
Therefore you can consume the procedure in your BAdI implementation by calling the procedure proxy. Please refer to the attachment HANA_PROCEDURE_SOCIALDATA.docx for sample code of procedure, which calculate sentiment for table SOCIALDATA. If you are going to calculate sentiment for table CRMD_SOC_POST, just replace the HANA Text Analysis result table '$TA_INDEXVOICEOFCUST' with the one you generate on CRMD_SOC_POST.
For how to implement a BAdI to consume the procedure, please refer to note 1832482.
[More Information]
For more information on HANA Text Analysis, please refer to SAP Help http://help.sap.com/hana_platform.
  • SAP HANA Text Analysis Language Reference Guide
  • SAP HANA Text Analysis Extraction Customization Guide
For more information on how to develop HANA procedure and how to call it from ABAP, please refer to SAP Help http://help.sap.com/hana_platform.
  • SAP HANA SQLScript Reference



Header Data

Released On 27.12.2013 02:40:03
Release Status Released for Customer
Component CRM-IC-SMC Social Media Cockpit in Interaction Center
Priority Recommendations / Additional Info
Category Consulting

No comments:

Post a Comment