Customer-Defined Value Lists in SAP NetWeaver Decision Service Management

Similar documents
SAP BusinessObjects Business Intelligence 4 Innovation and Implementation

SAP BW on HANA & HANA Smart Data Access Setup

SAP Landscape Transformation (SLT) Replication Server User Guide

Set Up Hortonworks Hadoop with SQL Anywhere

Open Items Analytics Dashboard System Configuration

SAP PartnerEdge Program: Opportunities for SAP-Authorized Resellers

Extend the SAP FIORI app HCM Timesheet Approval

How-to guide: Monitoring of standalone Hosts. This guide explains how you can enable monitoring for standalone hosts in SAP Solution Manager

Memory Management simplifications in ABAP Kernel 7.4*

How to Implement a SAP HANA Database Procedure and consume it from an ABAP Program Step-by-Step Tutorial

Agentry and SMP Metadata Performance Testing Guidelines for executing performance testing with Agentry and SAP Mobile Platform Metadata based

Using SAP Crystal Reports with SAP Sybase SQL Anywhere

Sybase ASE Linux Installation Guide Installation and getting started guide for SAP Sybase ASE on Linux

LVS Troubleshooting Common issues and solutions

Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration. : SAP Labs India Pvt.Ltd

SAP Sybase Adaptive Server Enterprise Shrinking a Database for Storage Optimization 2013

How to Extend a Fiori Application: Purchase Order Approval

How To... Master Data Governance for Material: Create Custom Print forms. Applicable Releases: MDG 7

LHI Leasing Simplifying and Automating the IT Landscape with SAP Software. SAP Customer Success Story Financial Services Provider LHI Leasing

BW Source System: Troubleshooting Guide

SAP Solution Manager - Content Transfer This document provides information on architectural and design questions, such as which SAP Solution Manager

Installing and Configuring the HANA Cloud Connector for On-premise OData Access

Create and run apps on HANA Cloud in SAP Web IDE

How To... Master Data Governance for Material: Maintenance for multiple Materials in one Change Request. Applicable Releases: all

Nine Reasons Why SAP Rapid Deployment Solutions Can Make Your Life Easier Get Where You Want to Be, One Step at a Time

Creating a Fiori Starter Application for sales order tracking

Consumption of OData Services of Open Items Analytics Dashboard using SAP Predictive Analysis

Compare & Adjust How to Guide for Compare & Adjust in SAP Solution Manager Application Lifecycle Management

SAP CRM Service Manager 3.1 Mobile App Extended Feature List An extended list of all the features included in the default delivery of the SAP CRM

Implementing an Enterprise Information Management Strategy An Approach That Mitigates Risk and Drives Down Costs

SAP Security Recommendations December Secure Software Development at SAP Embedding Security in the Product Innovation Lifecycle Version 1.

SAP BUSINESS PLANNING AND CONSOLIDATION 10.0, VERSION FOR SAP NETWEAVER, POWERED BY SAP HANA STARTER KIT FOR USGAAP

Active Quality Management

SAP White Paper Enterprise Information Management

How to... Master Data Governance for Material: Use the Data Import Framework for Material. Applicable Releases: EhP6, MDG 6.1, MDG 7.

Additional Guide to Implementing the SAP CRM Service Management rapiddeployment

Setting up Single Sign-On (SSO) with SAP HANA and SAP BusinessObjects XI 4.0

Cloud Single Sign-On and On-Premise Identity Federation with SAP NetWeaver Cloud White Paper

SAP BusinessObjects Dashboarding Strategy and Statement of Direction

Using Database Performance Warehouse to Monitor Microsoft SQL Server Report Content

SAP Business One OnDemand. SAP Business One OnDemand Solution Overview

Design Thinking for. Requirements Analysis

Five Strategies Small and Medium Enterprises Can Use to Successfully Implement High Value Business Mobility

SAP Thought Leadership Paper Engineering, Construction, and Operations. Beyond Enterprise Resource Planning Construction in the ipad Age

Certification Guide Network Connectivity for SAP on Premise and Cloud Solutions Integration

Guide to the SAP Extended Business Program

What's New in SAP BusinessObjects XI 3.1 Service Pack 5

Document and Data Retention Compliance Understanding and Addressing the Costs, Risks, and Legal Pitfalls

HANA Input Parameters with Multi-Values to Filter Calculation Views

Training.sap.com User Guide

Streamlined Planning and Consolidation for Finance Teams in Any Organization

Data Governance. Data Governance, Data Architecture, and Metadata Essentials Enabling Data Reuse Across the Enterprise

SAP Work Manager 6.0 Mobile App Extended Feature List

Setting up Single Sign-On (SSO) with SAP HANA and SAP BusinessObjects XI 4.0

Information Design Tool User Guide SAP BusinessObjects Business Intelligence platform 4.0 Feature Pack 3

Fiori Frequently Asked Technical Questions

TM111. ERP Integration for Order Management (Shipper Specific) COURSE OUTLINE. Course Version: 15 Course Duration: 2 Day(s)

SAP PartnerEdge Program Guide for Language Services Partners

H2G Install SAP Web IDE locally for trial (Mac version)

Crystal Reports Server Embedded 2008 with Service Pack 7 for Windows Supported Platforms

Backup Strategy for Oracle

Quick Guide to the SAP Customer Relationship Management Rapid- Deployment Solution (based on EhP1) Demo/Evaluation Appliance

ForFarmers: SAP Business Communications Management for Call Center Workload Distribution

HR400 SAP ERP HCM Payroll Configuration

SAPFIN. Overview of SAP ERP Financials COURSE OUTLINE. Course Version: 15 Course Duration: 2 Day(s)

SAP Sourcing OnDemand Wave 8 Solution Guide

How To Install The Sap Business Explorer 7.X 2.X (Sap) On A Windows 7.30 Computer (Windows 7)

AP Integration with BRFplus VERSION V APRIL SAP AG

How-To Guide SAP Cloud for Customer Document Version: How to Configure SAP HCI basic authentication for SAP Cloud for Customer

SAP Briefing Brochure. Solutions. October 2010

AC200. Basics of Customizing for Financial Accounting: General Ledger, Accounts Receivable, Accounts Payable COURSE OUTLINE

Setting up the Environment for Creating or Extending SAP Fiori Apps

SAP Thought Leadership SAP Customer Relationship Management. Strengthen the Brand and Improve

Optimized Shift Planning and Scheduling Creating Shifts and Aligning Resources to Match the Forecasted Workload

CRM WebClient UI & Netweaver Enterprise Portal Integration

SAP BusinessObjects Edge BI, Standard Package Preferred Business Intelligence Choice for Growing Companies

SAP DSM/BRFPlus System Architecture Considerations

SAP HANA. SAP HANA Performance Efficient Speed and Scale-Out for Real-Time Business Intelligence

SAP ERP EMPLOYEE INTERACTION CENTER

Reducing Operational Risk with SAP Management of Change

An Overview of the SAP Business One Cloud Landscape. SAP Business One Cloud Landscape Workshop

Within Budget and on Time

Quick Guide EDI/IDoc Interfacing to SAP ECC from External System

SAP NetWeaver Decision Service Management in SAP CRM for Utilities

Sizing and Deployment of the SAP Business One Cloud Landscape. SAP Business One Cloud Landscape Workshop

SAP Operational Process Intelligence Security Guide

Integrating Easy Document Management System in SAP DMS

SAP BusinessObjects Enterprise Software Inventory Tool User's Guide

Getting Started with Scope and Effort Analyzer (SEA) ALM Solution Management, AGS, SAP AG

Made to Fit Your Needs. SAP Solution Overview SAP Solutions for Small Businesses and Midsize Companies

How to Implement Mash Up to Show ECC Screen in SAP Cloud for Customer

SAP Solutions. Delivering Financial Excellence with SAP Solutions

Customization of SAP Sales Manager 2.5

How-To Guide SAP Cloud for Customer Document Version: How to replicate marketing attributes from SAP CRM to SAP Cloud for Customer

Add Value and Enable Student Success with Online Training on SAP Software

Finding the Leak Access Logging for Sensitive Data. SAP Product Management Security

SAP White Paper Enterprise Mobility. Best Practices for a Mobility Center of Excellence Keeping Pace with Mobile Technology

ABAP Custom Code Security

Demand Planning. SAP Business ByDesign

SAP ERP E-Commerce and SAP CRM Web Channel Enablement versions available on the market

Transcription:

Carsten Ziegler, Chief Product Owner SAP NetWeaver Decision Service Management, SAP AG Customer-Defined Value Lists in SAP NetWeaver Decision Service Management September 2013

TABLE OF CONTENTS WHERE THE VALUES COME FROM... 4 Database / Data Dictionary... 5 Value lists... 5 Exit class... 5 LIMITATIONS... 7 SOLUTION... 8 END NOTE... 11 2

SAP NetWeaver Decision Service Management (DSM) embeds and extends Business Rule Framework plus (BRFplus) for the creation of business rules. With DSM those business rules can be used to implement decision services that can be deployed, this means transferred, to managed systems for local execution. DSM allows also access to data from managed systems during rules modeling for best integration with the ABAP stack and ABAP-based applications on the local system or on remote systems. DSM provides access to master data or configuration data on any managed system in the customer landscape, which has the following advantages: Avoiding the need to replicate any data Perfect integration with business applications Reduction of modeling errors (only existing data is used) VALUE LISTS IN THE UI Values from the ABAP backend are dynamically retrieved and used for validation of business rules such as decision tables. In decision tables a gap analysis is also performed based on the backend data to make sure all possible value combinations are covered by the decision table. Most visible is the use in the value help in the user interface. Figure 1: Value list used in value help In the data object properties, it is possible to define the check behavior. Values that do not exist in the value list may be used, or they may result in warnings or errors. 3

Figure 2: Additional element properties WHERE THE VALUES COME FROM There can be three sources for possible values: 1. Database / Data Dictionary 2. Value lists 3. Exit class When values are found they are shown on the respective tab in data object maintenance. Figure 3: Value list in element UI 4

Database / Data Dictionary Values are taken from the data dictionary or the database when a data object is bound to a data element in the data dictionary. Figure 4: Element binding Additionally, the data element needs to use a domain that has a value table or a list of values (Value Range tab). DSM inspects the data element and the domain as well as the value table when available. DSM further analyzes the value table for an assigned text table that is used to find descriptions for the values. All of the metadata is defined in the data dictionary. Value lists Data objects that are not bound to a data element in the data dictionary allow the creation of value lists directly in the data object user interface. Figure 5: Domain values in element UI Exit class It is possible to dynamically create value lists with help of a code exit for any data object. Therefore, an exit class needs to be defined on application level and the respective methods need to be implemented, namely CLASS_CONSTRUCTOR and IF_FDT_APPLICATION_SETTINGS~GET_ELEMENT_VALUES. 5

Figure 6: Application exit class In the class constructor, only one line of code is necessary to activate the element values exit if_fdt_application_settings~gv_get_element_values = abap_true. In the exit method IF_FDT_APPLICATION_SETTINGS~GET_ELEMENT_VALUES, any logic can be implemented to build a value list. The method provides several parameters: IV_ID IV_TIMESTAMP ITR_VALUE ITR_TEXT IV_LANGU IO_SELECTION ET_VALUE EV_NO_CHECKLIST EV_APPLICABLE ID of the data object for which values are retrieved Optional timestamp, usually values are independent of time and the parameter is not required Optional ABAP range table with selection conditions for the values Optional ABAP range table with selection conditions for the value texts Language to be used for the value texts Optional internal parameter List of values with texts Indicates that no value list does exist Indicates that the exit class applies for creation of the value list The following code can be used as a generic pattern to implement the method. DATA ls_value LIKE LINE OF et_value. CLEAR: ev_no_checklist, ev_applicable, et_value. ">>> only for a specific object CHECK iv_id EQ '005056A501951EE38A9D598B62FF4E26'. ">>> put your data retrieval code here DELETE et_value WHERE value NOT IN itr_value. DELETE et_value WHERE text NOT IN itr_text. ev_no_checklist = abap_false. ev_applicable = abap_true. 6

LIMITATIONS Value lists are created for single fields. Problems may occur when a data object is bound to a data element with reference to a value table that contains additional keys. A good example of this problem is the data element REGIO with value table T005S and text table T005U. Figure 7: Database table T005S Figure 8: Database table T005U 7

The values in the BLAND column that is typed with REGIO are not unique. In other words, there are multiple regions with value 01 and only the value in LAND 1 (=country) makes the value unique. LAND1 (Country) BLAND (Region) BEZEI (Description) AR 01 Buenos Aires BE 01 Antwerp BG 01 Burgas DE 01 Schleswig-Holstein In the dynamically generated value help in a decision table or text rule the country information is not available or not unique. In a decision table there may be a country column but cells may have enumeration values such as DE (Germany); FR (France); ES (Spain) or range options such as not equals, starts with and so on. Therefore it is not clear what exactly is meant when value 01 is used in the region column of the decision table. SOLUTION The solution to such problems is combining the values of two (or more) fields into one and the provisioning of values with the value help exit. The caller can combine two or more fields before evaluating of the decision service. But a formula expression as part of the decision service can also do the job. First, a data object with an appropriate length is needed to take the concatenated value. Figure 9: New data object to combine country and region The concatenation takes place with a formula, returning the value in the COUNTRY_REGION data object. 8

Figure 10: Formula to concatenate country and region Either the data object or the formula can now be used in rules or expressions such as decision tables. Note that you can use an expression as a calculated column in a decision table, for example, the formula that concatenates country and region. The formula result will then be compared with the table cell value, such as starts with DE for all regions in Germany. Next, an exit class that implements the class-constructor method (see above) and the element values exit needs to be created. METHOD if_fdt_application_settings~get_element_values. DATA: ls_value lv_rfcdest lt_t005t lt_t005s lt_t005u LIKE LINE OF et_value, TYPE rfcdest, TYPE STANDARD TABLE OF t005t, TYPE STANDARD TABLE OF t005s, TYPE STANDARD TABLE OF t005u. FIELD-SYMBOLS: <ls_t005s> TYPE t005s, <ls_t005t> TYPE t005t, <ls_t005u> TYPE t005u. CLEAR: ev_no_checklist, ev_applicable, et_value. ">>> only for specific object CHECK iv_id EQ '005056A501951EE38A9D598B62FF4E26'. * in remote scenarios data has to be retireved from other system lv_rfcdest = cl_fdt_dsm=>get_destination_for_object( iv_id ). IF lv_rfcdest IS INITIAL OR lv_rfcdest EQ 'NONE'. * select from local tables SELECT * FROM: t005s INTO TABLE lt_t005s, t005u INTO TABLE lt_t005u WHERE spras EQ iv_langu, t005t INTO TABLE lt_t005t WHERE spras EQ iv_langu. LOOP AT lt_t005s ASSIGNING <ls_t005s>. ls_value-value = <ls_t005s>-land1 && `/` && <ls_t005s>-bland. UNASSIGN: <ls_t005u>, <ls_t005t>. READ TABLE lt_t005u ASSIGNING <ls_t005u> WITH KEY land1 = <ls_t005s>-land1 bland = <ls_t005s>-bland. READ TABLE lt_t005t ASSIGNING <ls_t005t> WITH KEY land1 = <ls_t005s>-land1. CLEAR ls_value-text. IF <ls_t005t> IS ASSIGNED. "country description is available ls_value-text = <ls_t005t>-landx50. ENDIF. IF <ls_t005u> IS ASSIGNED. "region description is available 9

ls_value-text = ls_value-text && `/` && <ls_t005u>-bezei. ENDIF. INSERT ls_value INTO TABLE et_value. ENDLOOP. ELSE. * TODO: call your remote function module here ENDIF. DELETE et_value WHERE: value NOT IN itr_value, text NOT IN itr_text. ev_no_checklist = abap_false. ev_applicable = abap_true. ENDMETHOD. The result is a custom value list optimized for the specific use case. Now range options such as starts with can also be used and the selection of the state is possible because each value is unique. Figure 11: Value list with concatenated country and region values 10

END NOTE SAP NetWeaver AS ABAP in version 7.40 with Support Package 5 as well as SAP NetWeaver Decision Service Management 1.0 Support Package 2 were used for this document. The examples also work in a very similar way on other versions of the software. You can find more information about SAP NetWeaver Decision Service Management in SAP Community Network: http://scn.sap.com/docs/doc-29158 11

www.sap.com 2013 SAP AG. All rights reserved. SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer, StreamWork, SAP HANA, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries. Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects Software Ltd. Business Objects is an SAP company. Sybase and Adaptive Server, ianywhere, Sybase 365, SQL Anywhere, and other Sybase products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Sybase Inc. Sybase is an SAP company. Crossgate, m@gic EDDY, B2B 360, and B2B 360 Services are registered trademarks of Crossgate AG in Germany and other countries. Crossgate is an SAP company. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.