• No results found

SAP HANA Cloud Integration for data services Document Version: Integration Guide for SAP Sales and Operations Planning

N/A
N/A
Protected

Academic year: 2021

Share "SAP HANA Cloud Integration for data services Document Version: Integration Guide for SAP Sales and Operations Planning"

Copied!
20
0
0

Loading.... (view fulltext now)

Full text

(1)

SAP HANA Cloud Integration for data services

Document Version: 1.0.6 - 2014-05-14

(2)

Table of Contents

1 About the templates. . . 3

2 Sales and Operations Planning templates. . . 5

2.1 Master data templates. . . 5

2.2 Key figure templates. . . 5

2.3 General purpose templates. . . 7

3 Load data using master data and key figure tasks. . . .8

3.1 Change the target table in a data flow. . . 9

4 Load data using general purpose tasks. . . 10

5 Set global variables. . . 11

6 Preload scripts. . . .12

7 Global Variables. . . .13

7.1 Shared global variables. . . .13

7.2 Unique global variables. . . .15

(3)

1

About the templates

SAP HANA Cloud Integration templates for SAP Sales and Operations Planning provide predefined content which serves as the starting point for populating your Sales and Operations Planning (S&OP) application.

The templates are designed to meet the specific requirements for S&OP data and reduce the time needed to get up and running with the application.

Three types of templates are available in SAP HANA Cloud Integration: ● General purpose templates

● Master data templates ● Key figure templates

General purpose templates contain information required by S&OP to process the data after it is loaded. The general purpose templates, SOP_APO_Task and SOP_ECC_Task, contain global variables preload scripts and postload scripts. After using either of these templates to create a task, you add datastore information and your own data flows.

Tasks created from the master data and key figure templates contain the data flows, global variables, and scripts necessary to do the following:

● Extract data from SAP Applications sources (ERP and SCM/APO). ● Transform it as required for Sales and Operations Planning.

● Load the data to predefined target tables for the default model (SAPMODEL1) in the staging area of the SAP HANA application cloud.

Task elements

Each task contains the elements described in the following table:

Element Description

Source datastore and tables Connects SAP HANA Cloud Integration and the source data.

Target datastore and tables Connects SAP HANA Cloud Integration and the S&OP application target.

Data flow Defines the movement and transformation of data from source to

target.

Global variables Parameterize the task.

Preload script Initializes global variables required for task run.

Postload script Records the timestamp of the most recent run.

Integration Guide for SAP Sales and Operations Planning

(4)

Advantages to using templates

Because each S&OP implementation is unique, you will almost always need to customize the out-of-the-box tasks and data flows that you create from the S&OP templates. However, using the templates to create tasks and data flows as a starting point has the following advantages over creating tasks from scratch:

● Template tasks provide the framework and thus reduce the integration development time.

● Template tasks contain the global variables required to successfully load and process data into S&OP. ● Preload scripts are configured with default values for these global variables and provide a framework. This

eliminates the need to write preload scripts from scratch.

● Master data and key figure template data flows follow best practice design for optimal integration performance.

● Master data and key figure template data flows contain mappings from ERP and APO source systems which include joins and predefined filters.

● Master data and key figure template data flows contain predefined transformations of ERP and APO data.

Note

To learn about known issues when using SAP HANA Cloud Integration with SAP Sales and Operations Planning, see 1826078 .

(5)

2

Sales and Operations Planning templates

2.1

Master data templates

Tasks created from master data templates load data to staging tables.

Tasks created from master data templates must be run prior to tasks created from key figure templates. Information about master data tasks is summarized in the table below.

Load order Task name SAP Applica­ tions source

Source tables or ex­ tractors

S&OP target table

1 SOP_MD_Location­ Master ERP 0PLANT_ATTR T001W SOPMD_STAG_SM1LOCA­ TION 2 SOP_MD_Product­ Master ERP 0MATERIAL_ATTR MAKT SOPMD_STAG_SM1PROD UCT 3 SOP_MD_Location­ Prod ERP MBEW MARA MARC SOPMD_STAG_SM1LOCA­ TIONPRODUCT Must be loaded prior to key figure tasks SOP_MD_Customer­ Master ERP 0CUSTOMER_ATTR KNVP KNVH SOPMD_STAG_SM1CUS­ TOMER Must be loaded prior to key figure tasks

SOP_MD_Resource SCM /SAPAPO/RES_HEAD SOPMD_STAG_SM1RE­

SOURCE

2.2 Key figure templates

Tasks created from key figure templates load data to the SOPDD_STAGING_KFTAB_SM1BASE staging table. Key figure tasks require that associated master data is already loaded, processed and currently available in the S&OP application. If master data is not loaded into S&OP before key figure data, the key figure data will be loaded but will not be processed properly by S&OP. Information about key figure tasks is summarized in the table below.

Task name SAP Application source

Source tables/extrac­ tors/BAPI functions

S&OP key figure columns

SOP_KF_Actuals ERP 2LIS_12_VCITM_SOP SM1ACTUALSQTY

Integration Guide for SAP Sales and Operations Planning

(6)

Task name SAP Application source

Source tables/extrac­ tors/BAPI functions

S&OP key figure columns

VBRK VBRP

SM1ACTUALSREV

SOP_KF_Inventory ERP MARC

MARA MARD

SM1INITIALINVENTORYQTY SM1INVENTORYTARGETQTY

SOP_KF_OpenOrders ERP 2LIS_11_VAHDR

2LIS_11_VAITM 2LIS_11_VASTI SM1OPENORDERSQTY SM1OPENORDERSREV SOP_KF_SalesForecast­ Price

ERP 2LIS_13_VDITM SM1SALESFORECASTPRICE

SOP_KF_CapacityLimit SCM/APO /SAPAPO/RES_HEAD

9ACAPACITY

SM1CAPASUPPLY

SOP_KF_Consumption SCM/APO BAPI_LOCSRVAPS_GET­

LIST2

BAPI_PDSSRVAPS_GET­ LIST

SM1CAPACONSUMPTION*

SOP_KF_DemandPlanning SCM/APO 9ABPC_EXTRACT SM1DEMANDPLANNINGQTY

SOP_KF_StatisticalForecast SCM/APO 9ABPC_EXTRACT SM1SALESFORECASTQTY

Note

*SOP_KF_Consumption is implemented to extract from a sequence of BAPI function calls via a custom ABAP program. You can download the necessary ABAP program from SAP Note 1772288.

Related Information

SAP Note 1772288

(7)

2.3 General purpose templates

General purpose templates contain information required by S&OP to process the data after it is loaded. Unlike Master data or key figure templates, these templates do not specify the S&OP target table and source inputs (tables or extractors). Nor do they contain predefined data flows. The general purpose templates are SOP_APO_Task, SOP_ECC_Task, and SOP_File_Task.

SOP_APO_Task and SOP_ECC_Task use SAP application datastores as source system. While SOP_File_Task uses a file group datastore as source.

Integration Guide for SAP Sales and Operations Planning

(8)

3

Load data using master data and key

figure tasks

You load data to S&OP by running a group of tasks in a specific order.

Use the master data and key figure templates to create customized tasks to meet the requirements of your S&OP planning area model.

Defining the tasks

Define the necessary tasks as described in the following high-level steps:

1. Determine the table and column naming conventions used by your S&OP model. 2. Create tasks using the S&OP templates.

You can either create the tasks individually or create multiple tasks at once. If you do the latter, you must perform the Create Multiple Tasks action separately for SAP_APO and SAP_ECC.

3. Within each task, modify the data flows to specify the target tables and columns used in your planning area. Change the target table in a data flow by copying it to a new data flow.

4. For each task, review the default values of the global variables and make changes as needed. Global variables apply to all data flows within a task.

Note

Certain global variables are used by the S&OP application to process the data after it is loaded. If the global variables are not included in the task, then data will be loaded, but S&OP cannot process it as expected. The required global variables are: $G_PLAN_AREA, $G_SCENARIO, $G_TIME_PROFILE and

$G_BATCH_COMMAND.

For details on the development workflow, see the Get Started tab of the SAP HANA Cloud Integration Help.

Task execution order

Load master data first and then load key figure data. This order is required to ensure proper processing of key figure data.

Run the tasks in the following order: 1. SOP_MD_LocationMaster 2. SOP_MD_ProductMaster 3. SOP_MD_LocationProd 4. SOP_MD_CustomerMaster 5. SOP_MD_Resource

6. All key figure tasks (run order does not matter)

(9)

Note

The order in which you run the SOP_MD_CustomerMaster and SOP_MD_Resource tasks does not matter, as long as they are run prior to the key figure tasks.

3.1

Change the target table in a data flow

Change the target table in a data flow by copying it to a new data flow.

Prerequisites

The table must already exist in the target datastore.

Context

To change the target table:

Procedure

1. From the Projects tab, select the task that contains the data flow you want to change and then click Edit. 2. From the Data Flows tab, select the data flow that loads to the target table you want to change and then click

Copy to New Target Table. 3. Enter a name for the new data flow.

4. Select a target table and click Copy Data Flow.

Results

The new data flow contains the same source information and transformations as the original data flow, but loads to the new target. Edit the mappings and column names or make other changes to meet your needs.

Integration Guide for SAP Sales and Operations Planning

(10)

4 Load data using general purpose tasks

You load data to S&OP by running one or more tasks. You can use the general purpose tasks as a starting point and define your own data flows from scratch.

To use the general purpose tasks, follow the workflow described in the Get Started tab of the SAP HANA Cloud Integration Help. Before running a task, ensure that you set the value of each of the required global variables as needed to meet your requirements and environment.

(11)

5

Set global variables

Global variables are symbolic placeholders. When a task runs, these placeholders are populated with values. This allows users flexibility of run-time values used in extractions.

Context

Note

Certain global variables are used by the S&OP application to process the data after it is loaded. If the global variables are not included in the task, then data will be loaded, but S&OP cannot process it as expected. The required global variables are: $G_PLAN_AREA, $G_SCENARIO, $G_TIME_PROFILE, and $G_BATCH_COMMAND.

Procedure

Depending on your requirements and environment, allow the default values or set values in one of the following locations:

Option Description

Run Now dialog box Use for testing.

From the Projects tab, select a task. From the Actions menu, select Run Now. Execution Properties tab of a

task

Use for loading data.

From the Projects tab, select a task. From the Actions menu, select Edit. Click the Execution Properties tab.

Preload script Use for testing and loading data. .

Integration Guide for SAP Sales and Operations Planning

(12)

6

Preload scripts

Each of the Sales and Operations Planning (S&OP) tasks includes a preload initialization script.

If you do not specify values for global variables (symbolic placeholders), during task execution the preload script populates the global variables with default values.

(13)

7

Global Variables

7.1

Shared global variables

Shared global variables are included in all Sales and Operations Planning (S&OP) data integration tasks. Most tasks contain additional unique global variables.

Global variables contain default values which are used if the value has not been changed. As needed, change the value of each global variable per your requirements and environment. Certain global variables are used by the S&OP application to process the data after it is loaded. The default value and information about each of the shared global variables is shown in the following tables:

Required by

S&OP Global variable name

Data type Default value for master data task

Default value for key figure data task

Description

Yes $G_PLAN_AREA varchar(50) ‘’ ‘SAPMODEL1’ The Planning

Area value is de­ fined in S&OP under Config­

uration Model

Planning Area Definition . The value must con­ tain only upper­ case alphanu­ meric characters and begin with a letter.

Spaces are not allowed.

Yes $G_SCENARIO varchar(50) ‘’ ‘’ Indicates the

base scenario.

Yes $G_TIME_PRO­

FILE

int -1 -1 The Time Profile

ID value is de­ fined in S&OP under Config­ uration Model Planning Area Definition . Yes $G_BATCH_CO MMAND varchar(50) 'INSERT_UP­ DATE' 'INSERT_UP­ DATE' Defines how S&OP processes the data loaded

Integration Guide for SAP Sales and Operations Planning

(14)

Required by

S&OP Global variable name

Data type Default value for master data task

Default value for key figure data task

Description

in the batch exe­ cution. Recog­ nized values are 'INSERT_UP­ DATE' and 'DE­ LETE'.

INSERT_UP­ DATE updates or adds new data to S&OP.

DELETE removes the specified re­ cords from S&OP.

No $G_LOAD_DATE datetime Sysdate() Sysdate() The load date of

the task.

No $G_DE­

FAULT_TEXT

varchar(1) ‘?’ ‘?’ Default text for

dimension de­ fault rows, for­ eign keys, and primary keys. Also used as a default for miss­ ing descriptions.

No $G_DE­

FAULT_DATE

Datetime ‘1900.01.01’ ‘1900.01.01’ Default date for

dimension de­ fault rows, for­ eign keys, and primary keys. Also used as a default for miss­ ing dates.

(15)

7.2 Unique global variables

All Sales and Operations Planning (S&OP) data integration tasks contain shared global variables. Additionally, most tasks contain global variables which are unique to that task.

Global variables contain default values which are used if the value has not been changed. As needed, change the value of each global variable per your requirements and environment. The default value and information about each of the unique global variables is shown in the following tables.

Actuals (SOP_KF_Actuals)

Global variable name Data type Default value Description

$G_INITIAL_OR_DELTA varchar(7) 'INITIAL' Identifies whether the task

is a first (initial) load or a delta load. Legal values are 'INITIAL' or 'DELTA'.

$G_DELTA_DAYS INTEGER 730 or 30 Defines the number of

days of data to extract. Default for INITIAL load is 730 days (or 2 yrs). De­ fault for DELTA load is 30 days. To change this value, update the preload script.

$G_SDATE DATETIME Calculated in preload

script

"Starting date for Actuals extraction. This is auto­ matically calculated in the preload script as: <To­ day's Date> -

$G_DELTA_DAYS"

Consumption (SOP_KF_Consumption)

Global variable Name Data type Default value Description

$G_LOGICAL_SYSTEM varchar(255) ‘APOCLNT800’ Logical System value re­

quired to call BAPI func­ tions (BAPI_LOCSR­ VAPS_GETLIST2 and BAPI_PDSSRVAPS_GET­

Integration Guide for SAP Sales and Operations Planning

(16)

Global variable Name Data type Default value Description

LIST). Task will return no data if this value is not cor­ rect. Enter the correct log­ ical system name for your SAP Applications system. For example,

‘SYSCLNT001’.

Customer Master (SOP_MD_CustomerMaster)

Global variable name Data type Default value Description

$G_PARVW varchar(255) 'AG' Use the value defined by

your Business Partner. Al­ lows you to extract cus­ tomer data for a single value of KNVP.PARVW. The default value used in the template is ‘AG’ for Sold-to party.

General Purpose Template (SOP_File_Task)

Global Variable Name Data Type Default Value Description

$G_FILE_NAME varchar(100) 'C:\Directory' Can be used to specify the

file directory that is loaded into S&OP. Set this value in the preload script.

$G_FILE_DIRECTORY varchar(100) 'FileName.csv' Can be used to specify the

file directory that is loaded into S&OP. Set this value in the preload script.

(17)

Inventory (SOP_KF_Inventory)

Global variable name Data type Default value Description

$G_MONTHS_FORECAST int 18 Number of months the

current inventory will be forecast. For example, 0 is the current month, 18 is 18 months in the future.

$G_MATERIAL_TYPE_1 varchar(4) ‘ROH' Extracts inventory data

from MARA.MTART for the specified material type.

$G_MATERIAL_TYPE _2 varchar(4) ‘HALB'

$G_MATERIAL_TYPE _3 varchar(4) ‘FERT'

$G_MATERIAL_TYPE _4 varchar(4) ‘HIBE'

$G_MATERIAL_TYPE _5 varchar(4) ‘FHMI'

Location Master (SOP_MD_LocationMaster)

Global variable name Data type Default value Description

$G_NODETYPE1 varchar(3) ‘DC’ Extracts location data for

the supply chain network from the specified nodes.

$G_NODETYPE2 varchar(3) ‘B’

$G_NODETYPE3 varchar(3) No default value

$G_NODETYPE4 varchar(3) No default value

$G_NODETYPE5 varchar(3) No default value

Location Product Master (SOP_MD_LocationProd)

Global variable name Data type Default value Description

$G_MATERIAL_TYPE_1 varchar(4) ‘ROH' Extracts inventory data

from MARA.MTART for the specified material type.

$G_MATERIAL_TYPE _2 varchar(4) ‘HALB'

$G_MATERIAL_TYPE _3 varchar(4) ‘FERT'

Integration Guide for SAP Sales and Operations Planning

(18)

Global variable name Data type Default value Description

$G_MATERIAL_TYPE _4 varchar(4) ‘HIBE'

$G_MATERIAL_TYPE _5 varchar(4) ‘FHMI'

Product Master (SOP_MD_ProductMaster)

Global variable name Data type Default value Description

$G_MATERIAL_TYPE_1 varchar(4) ‘ROH' Extracts inventory data

from MARA.MTART for the specified material type.

$G_MATERIAL_TYPE_2 varchar(4) ‘HALB'

$G_MATERIAL_TYPE_3 varchar(4) ‘FERT'

$G_MATERIAL_TYPE_4 varchar(4) ‘HIBE'

$G_MATERIAL_TYPE_5 varchar(4) ‘FHMI'

Sales Forecast Price (SOP_KF_SalesForecastPrice)

Global variable name Data type Default value Description

$G_DAYS_FORECAST int 183 Number of days that the

initial forecast values are based on.

Default is 6 months (or 365/2).

$G_MONTHS_FORECAST int 18 Number of months cur­

rent sales price will be forecast. For example, 0 is the current month only, 18 is 18 months in the future.

(19)

Integration Guide for SAP Sales and Operations Planning

(20)

www.sap.com/contactsap

© 2014 SAP AG or an SAP affiliate company. All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice.

Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. National product specifications may vary. 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.

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

References

Related documents

Integrated Development Environment: SAP HANA Studio and SAP HANA Cloud Platform Tools for Java. Command Line for scripting and continuous integration support: SAP HANA Client and

Cloud Options On-Premise SAP HANA deployed as a traditional on- premise appliance SAP HANA Appliance Enterprise-class SAP HANA managed cloud offering SAP HANA

Shared global variables are included in all Sales and Operations Planning (S&amp;OP) data integration tasks.. Most tasks contain additional unique

All contacts for all accounts in SAP CRM to which the groupware user (CRM business partner) is assigned with at least one of these relationship categories are synchronized to

1 Integration using SAP iFlows (Prepackaged Integration Content) with SAP HANA Cloud Integration and/or SAP NetWeaver Process Integration (PI). Enable mobile sales force to access,

This type of business rules is used to forward the business data from SAP Logistics Business Network, global track and trace option to SAP Cloud Platform Integration. When the

Intelligent business operations: Integration with SAP Business Process Management software and the SAP HANA® platform helps SAP PowerDesigner streamline the planning, design,

Use the Upgrade Master Guide for an overview of the upgrade paths, the upgrade of the involved software units and scenarios from a technical perspective.. The Upgrade Master Guide is