SAS Service Parts Optimization Adapter 4.2 for SAP: User's Guide
Transcript of SAS Service Parts Optimization Adapter 4.2 for SAP: User's Guide
SAS® Service Parts Optimization Adapter 4.2 for SAPUser’s Guide
TW12708_color_title.indd 1 10/25/2010 1:32:07 PM
The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2010. SAS® Service Parts Optimization Adapter 4.2 for SAP: User's Guide. Cary, NC: SAS Institute Inc.
SAS® Service Parts Optimization Adapter 4.2 for SAP: User's Guide
Copyright © 2010, SAS Institute Inc., Cary, NC, USA
All rights reserved. Produced in the United States of America.
For a hard-copy book: No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, or otherwise, without the prior written permission of the publisher, SAS Institute Inc.
For a Web download or e-book: Your use of this publication shall be governed by the terms established by the vendor at the time you acquire this publication.
U.S. Government Restricted Rights Notice: Use, duplication, or disclosure of this software and related documentation by the U.S. government is subject to the Agreement with SAS Institute and the restrictions set forth in FAR 52.227-19, Commercial Computer Software-Restricted Rights (June 1987).
SAS Institute Inc., SAS Campus Drive, Cary, North Carolina 27513.
1st electronic book, November 2010
SAS® Publishing provides a complete selection of books and electronic products to help customers use SAS software to its fullest potential. For more information about our e-books, e-learning products, CDs, and hard-copy books, visit the SAS Publishing Web site at support.sas.com/publishing or call 1-800-727-3228.
SAS® and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.
Other brand and product names are registered trademarks or trademarks of their respective companies.
Contents
Chapter 1 Introduction to SAS Service Parts Optimization Adapter for SAP 1 Overview 1
Data Flow Architecture 1 Benefits 3 Configuration and Administration 3 Components 3
Job Organization and Names 4 Accessibility 5 SAS Service Parts Optimization Adapter for SAP Provisions 5
Chapter 2 Preparing to Import the SAS Service Parts Optimization Adapter for SAP 7 Customizing for the Installation Environment 7
Configuring SAS/ACCESS Interface to R/3 Software 7 Installation Prerequisites 7 Preparing to Import SAS Service Parts Optimization Adapter for SAP 8 Defining the Environment 8
Define a User 8 Define an SAP Library and SAP Server 11 Test the SAP Connection 18
Chapter 3 Installation and Customization of SAS Service Parts Optimization Adapter for SAP 21 Installing the Jobs and Metadata 21 Customizing the SAS Environment 21 Customization for Internationalization (I18N) 22
Deploying the Jobs and Tables Metadata 24
Chapter 4 Customizing SAS Data Integration Studio Jobs and Programs 29 Customizing Jobs and Programs 29 Customize the preprocglobal.sas Program 29 File Location 30 SAP System Parameters 31
Data Source 31 SAP Language Codes 31 SAP Material Management and Sales and Distribution-related settings 33 Default Values for Service Parts Optimization SDL Tables 34
Time Period Dimension Parameters 34 Fiscal Year Variant 34 Extraction Starting Date 35
iv Contents
Common Extraction Parameters 35
E-mail Contact for Error Reports 35 Additional Customizations 35
Chapter 5 Extraction Jobs 37 Extraction Jobs 37 Job Group: E0001 Extract Master Data Tables 38
spoadpt_E0001000_Extract_BOM_Header_and_Detail_Tables 38 spoadpt_E0001010_Extract_Customer_Master_Tables 38 spoadpt_E0001020_Extract_MRP_Controller_Table 38 spoadpt_E0001030_Extract_Material_Master_detail_Tables 39
spoadpt_E0001040_Extract_Condition_Record_Tables 39 spoadpt_E0001050_Extract_Org_&_Geographic_location_Tables 40 spoadpt_E0001060_Extract_SAP_Misc_Reference_Tables 40 spoadpt_E0001070_Extract_SAP_Material_related_Ref_Tables 41
spoadpt_E0001080_Extract_Route_details 41 spoadpt_E0001090_Extract_Mode_of_Shipment_Tables 41 Job Group: E0002 Extract Transaction Data Tables 42 spoadpt_E0002000_Initial_Extract_Material_Docs_MKPF_MSEG 42
spoadpt_E0002005_Merge_Material_Documents_MKPF_MSEG 42 spoadpt_E0002010_Delta_Extract_Material_Documents_MKPF_MSEG 43 spoadpt_E0002020_Extract_Vendor_Master_and_Delivery_Tables 43 spoadpt_E0002030_Extract_Material_Info_Records 44
spoadpt_E0002040_Extract_Purchasing_Info_Record_Tables 44 spoadpt_E0002050_Extract_Cust_Order_and_PO_Tables 45 Job Group: E0003 Extract Misc Data Tables 45 spoadpt_E0003000_Extract_SAP_Fiscal_Period_Tables 45
spoadpt_E0003010_Formats_from_Financial_Period_T_Tables 46 spoadpt_E0003020_Extract_SAP_lookup_details_Tables 46
Chapter 6 Transformation Jobs 47 Overview 47 Job Group: T0001 Transform Master Data 48 spoadpt_T0001000_Transform_INTER_PERIOD_TYPE 48
spoadpt_T0001010_Transform_Financial_Period_Info_from_SAP 48 spoadpt_T0001020_Transform_FinYear_Begin_and_End_Dates 48 spoadpt_T0001030_Transform_Time_Hierarchy 49 spoadpt_T0001040_Transform_STAGE_TIME_PERIOD 49
spoadpt_T0001050_Transform_STAGE_LOOKUP_MASTER 49 spoadpt_T0001060_Transform_STAGE_LOOKUP_DETAIL 50 spoadpt_T0001070_Transform_INTER_PLANT_CC_CURRENCY 51 spoadpt_T0001080_Transform_STAGE_LOCATION 52
spoadpt_T0001090_Transform_STAGE_EMPLOYEE 52
spoadpt_T0001100_Transform_STAGE_ORGANIZATION 52 spoadpt_T0001110_Transform_STAGE_ITEM 52 spoadpt_T0001120_Transform_STAGE_ITEM_CATEGORY 53
spoadpt_T0001130_Transform_STAGE_BOM 53 spoadpt_T0001140_Transform_STAGE_CUSTOMER 53 spoadpt_T0001150_Transform_STAGE_FACILITY 53 spoadpt_T0001160_Transform_STAGE_ITEM_PRICE 54
spoadpt_T0001170_Transform_STAGE_VENDOR 54 spoadpt_T0001180_Transform_STAGE_ROUTE_TYPE_REF 54 Job Group: T0002 Transform Transaction Data 55 spoadpt_T0002000_Transform_STAGE_CUSTOMER_ORDER 55
spoadpt_T0002010_Transform_STAGE_FACILITY_X_ITEM 55 spoadpt_T0002020_Transform_STAGE_PURCHASE_ORDER 55 spoadpt_T0002030_Transform_STAGE_ROUTE 56 spoadpt_T0002040_Transform_STAGE_VENDOR_FACILITY_ITEM 56
spoadpt_T0002050_Transform_STAGE_DISPATCH 56 spoadpt_T0002060_Transform_STAGE_FACILITY_ITEM_DEMAND 57 spoadpt_T0002070_Transform_STAGE_FACILITY_ITEM_INVENTORY 57 spoadpt_T0002080_Transform_STAGE_PIPELINE_INVENTORY 57
spoadpt_T0002090_Transform_STAGE_RECEIPTS 58 spoadpt_T0002100_Transform_STAGE_ROUTE_X_ITEM 58 spoadpt_T0002110_Transform_STAGE_BACK_ORDER_SUMMARY 58
Chapter 7 Load Jobs 59 Load Jobs 60
Load Job Group: L0000 Initialization 60 spoadpt_L0000_Create_non_SAP_Tables 60 Load Job Group: L0001 Load Group 1 SDL Tables 60 spoadpt_L0001010_Load_SDL_ITEM_CATEGORY 60
spoadpt_L0001020_Load_SDL_ROUTE_TYPE_REF 61 spoadpt_L0001030_Load_SDL_LOOKUP_MASTER 61 spoadpt_L0001040_Load_SDL_LOCATION 61 Load Job Group: L0002 Load Group 2 SDL Tables 61
spoadpt_L0002010_Load_INTER_EMPLOYEE 61 spoadpt_L0002020_Load_INTER_ORGANIZATION 62 spoadpt_L0002030_Load_SDL_EMPLOYEE 62 spoadpt_L0002040_Load_SDL_ORGANIZATION 62
spoadpt_L0002050_Load_SDL_ITEM 63 spoadpt_L0002060_Load_SDL_LOOKUP_DETAIL 63 Load Job Group: L0003 Load Group 3 SDL Tables 63 spoadpt_L0003010_Load_SDL_BOM 63
spoadpt_L0003020_Load_SDL_CUSTOMER 64 spoadpt_L0003030_Load_SDL_FACILITY 64 spoadpt_L0003040_Load_SDL_ITEM_PRICE 64 spoadpt_L0003050_Load_SDL_VENDOR 65
Load Job Group: L0004 Load Group 4 SDL Tables 65 spoadpt_L0004010_Load_SDL_CUSTOMER_ORDER 65
vi Contents
spoadpt_L0004020_Load_SDL_FACILITY_X_ITEM 65
spoadpt_L0004030_Load_SDL_PURCHASE_ORDER 66 spoadpt_L0004040_Load_SDL_ROUTE 66 spoadpt_L0004050_Load_SDL_TIME_PERIOD 67 spoadpt_L0004060_Load_SDL_VENDOR_FACILITY_ITEM 67
Load Job Group: L0005 Load Group 5 SDL Tables 67 spoadpt_L0005010_Load_SDL_BACK_ORDER_SUMMARY 67 spoadpt_L0005020_Load_SDL_DISPATCH 68 spoadpt_L0005030_Load_SDL_FACILITY_ITEM_DEMAND 68
spoadpt_L0005040_Load_SDL_FACILITY_ITEM_INVENTORY 69 spoadpt_L0005050_Load_SDL_PIPELINE_INVENTORY 69 spoadpt_L0005060_Load_SDL_RECEIPTS 70 spoadpt_L0005070_Load_SDL_ROUTE_X_ITEM 70
Loading Tables with Non SAP Data 70 FORECAST_GROUP 71 Network_Model 72 Item_Substitute 73
ITEM_SUCCESSION 74 Route and Route_X_Item 74 FACILITY_ITEM_IND_VARIABLE 75 NETWORK_X_ROUTE 76
FACILITY_ITEM_X_NETWORK 77 FORECAST_GROUP_ITEM_DETAIL 78
Chapter 8 Load Columns with Non SAP Data 79 Load Columns 79 Integrating Data 82
Method 1: Use One Physical Location for SAP Solution Data Layer Libraries 82 Method 2: Use Multiple Sources 83 Customizing the Validation Steps in the Load Data Mart Jobs 83
Appendix 1 Tables Extracted from SAP 85 SAP Tables 85
Appendix 2 Service Parts Optimization 4.3 Extract, Transform, and Load Jobs 89 Prerequisite to Running Service Parts Optimization 4.3 Extract, Transform, and Load (ETL) Jobs 89 Platform Support Matrix 91
1 Introduction to SAS Service Parts Optimization Adapter for SAP
Overview ........................................................................................................................................................ 1 Data Flow Architecture ................................................................................................................................. 1 Benefits .......................................................................................................................................................... 3 Configuration and Administration ............................................................................................................... 3 Components.................................................................................................................................................... 3 Job Organization and Names ....................................................................................................................... 4 Accessibility ................................................................................................................................................... 5 SAS Service Parts Optimization Adapter for SAP Provisions...................................................................... 5
Overview The SAS Service Parts Optimization Adapter for SAP is a collection of ETL jobs that load data from standard SAP tables into standard SAS tables in the Service Parts Optimization Solution Data Layer (SDL). These ETL jobs are built on the SAS Data Surveyor and communicate with any SAP R/3 system.
The SAS Service Parts Optimization Adapter for SAP performs two primary functions: It uses the SAS Data Surveyor for SAP software to extract SAP tables. These
extractions include transparent table extracts, Business Application Programming Interface (BAPI) calls, and calls to remote-enabled Advanced Business Application Programming (ABAP) functions that SAS provides.
It takes the raw data that is extracted from SAP and transforms it into the structure that is required to load the data into tables that populate SAS Service Parts Optimization. This transformation logic encapsulates business rules of both SAP and SAS solutions.
Based on the requirements of your source SAP system and your business needs, you can customize the collection of ETL jobs that make up the SAS Service Parts Optimization Adapter for SAP. The architecture of SAS Data Integration Studio and SAS Data Integration Server solutions provides the environment for these ETL jobs. As a result, you can use SAS Data Integration Studio to view and edit your ETL jobs as needed.
Data Flow Architecture The SAS Service Parts Optimization Adapter for SAP facilitates the beginning of a data flow that moves data from an SAP source system into a format that businesses manage and use with SAS Service Parts Optimization solution.
Source data from various systems must flow through a series of extraction, transformation, and loading steps to convert into a usable format for SAS Service Parts Optimization Solution Data Layer. The figure below details the basic architecture of this
C H A P T E R
2 Data Flow Architecture Chapter 1
data flow. The SAS Service Parts Optimization Adapter for SAP acts in the first step of the model.
Figure 1.1 Data Flow Architecture: SAP to SAS Service Parts Optimization Solution Data Layer (SDL)
1 The SAS Service Parts Optimization Adapter for SAP extracts and transforms the SAP source data into a staging area. The staging area is the first target after the data is extracted from an operational system. This staging area is a repository for raw data that is extracted from an operational system and prepared for transformation and loading to the SAS Service Parts Optimization Solution Data Layer.
2 Once source data is loaded into the staging area, it is ready for ETL processing that loads it into the SDL. The following actions occur during this ETL process:
• The data is validated. • Surrogate keys are created that identify the data and replace operational
system IDs. • The date-and-time stamps are processed. These reflect data validity if
differences in dimensional information arise.
The transformed data is stored in the SDL, a “denormalized” relational data model that provides storage flexibility. The SDL is a specific detail data model that represents a standard business function and supports the SAS Service Parts Optimization data mart. Some of the data that the SDL captures includes current and historical information such as temporal data (event data that occurs at a
Introduction to SAS Service Parts Optimization Adapter for SAP Components 3
particular date and time such as an account inquiry) and non-temporal data (non-event data such as a customer or a Vendor).
3 Once data is cleansed, validated, and stored in the SDL, it is ready for transforming and loading to a data mart model.
Benefits The SAS Service Parts Optimization Adapter for SAP enables the Service Parts Optimization to turn SAP data into business intelligence that is manageable on an enterprise scale. By automating and streamlining parts of the data conversion from SAP to SAS, the adapter decreases the time it takes to retrieve business intelligence from source data. Primarily, it reduces the time needed to set up SAP ETL by 80% or more. This efficiency reduces your dependence on SAP resources to help you understand how SAP works.
Configuration and Administration The SAS Service Parts Optimization Adapter for SAP is configured and managed using the Solution Deployment Wizard and SAS Data Integration Studio.
The Solution Deployment Wizard enables you to specify the adapter configurations that are required for your unique business environment. You can use this tool to specify parameters during initial installation or import.
After you have configured the SAS Service Parts Optimization Adapter for SAP, you can use SAS Data Integration Studio to manage and customize the adapter.
Components The Solution Deployment Wizard enables you to manage and configure the various components of SAS Service Parts Optimization Adapter for SAP. This enables you to import the SAS Service Parts Optimization Adapter for SAP environment into SAS Data Integration Studio. These are the various components: SAS Data Integration Studio jobs
extract SAP tables into a partial mirror image of the SAP tables. These jobs mirror only the necessary tables and in many cases transfer only the required data rows and columns. This limited transfer places a smaller load on the SAP operational system. The extractions are typically run as SAP batch processes that do not use complex logic so that the jobs can run in a short time during off-peak SAP system load.
transformation jobs create intermediate tables or populate tables in the SAP staging area model.
table metadata include the standard tables needed by the SAS Service Parts Optimization Solution. In addition, intermediate tables are defined to enable flexibility in customizing the jobs to fit local requirements.
4 Accessibility Chapter 1
new SAS Data Integration Studio transformations work in the default jobs or new jobs if necessary. Additional transformations are also available.
SAS code files are installed on the SAS application server. These open source files are automatically copied to a location where they can be modified if necessary.
SAS macros include simple macros that are provided as open source code, and complex macros that are provided without source code so that SAS can maintain them easily.
SAS libraries provide storage for administration and data tables.
Job Organization and Names The SAS Service Parts Optimization Adapter for SAP is a collection of ETL jobs that extract, transform, and load data from standard SAP tables into standard SAS tables. These jobs are organized into the following three groups: extraction jobs transformation jobs load jobs
To help identify job functions and streamline the extraction process, extraction job names begin with the letter E and transformation job names begin with T. This naming structure enables all extractions to occur without waiting for follow-on transformation jobs to complete. As a result, extractions can complete in a shorter time period.
Extraction jobs and transformation jobs are also grouped into several SAS Data Integration Studio job groups. Once grouped, each job name in a job group begins with the same initial letter and number. This enables quick navigation in the Custom tab of SAS Data Integration Studio.
To help identify the job functions of the group, the group names begin with a structure that is similar to the job names. The extraction job groups begin with the letter E followed by a number. The transformation job groups start with T followed by a number.
The numbering of transformation jobs within each group generally implies the order of execution unless a specific job is not dependent on another. As a result, the specific numbers assigned to jobs within a group allow for new jobs to be inserted numerically between existing jobs if necessary.
Unlike transformation jobs, the extraction jobs generally do not depend on each other. Exceptions to this rule are those jobs that extract new or changed data and must run after the job that did the initial extract.
Introduction to SAS Service Parts Optimization Adapter for SAP SAS Service Parts Optimization Adapter for SAP Provisions 5
Accessibility The SAS Service Parts Optimization Adapter for SAP does not have a stand-alone graphical user interface (GUI). It is configured and managed using features of SAS Data Integration Studio and SAS Management Console.
SAS Data Integration Studio and SAS Management Console include accessibility and compatibility features that improve their usability for users with disabilities. These features are related to accessibility standards for electronic information technology that were adopted by the U.S. Government under Section 508 of the U.S. Rehabilitation Act of 1973, as amended.
For more information about specific accessibility features of SAS Data Integration Studio and SAS Management Console, refer to their respective documentation available at http://support.sas.com.
SAS is committed to improving the accessibility and usability of our products. If you have questions or concerns about the accessibility of SAS products, send an e-mail to [email protected].
SAS Service Parts Optimization Adapter for SAP Provisions The SAS Service Parts Optimization Adaptor for SAP supports the solution 4.2 and 4.3. In order to support the Service Parts Optimization 4.3, the user needs to run the Service Parts Optimization 4.3 Extract, Transform, and Load Jobs. (Refer to Appendix 2: Prerequisite to Running the Service Parts Optimization 4.3 Extract, Transform, and Load Jobs
The SAS Service Parts Optimization Adaptor for SAP supports the following platforms:
.)
WIN (Windows 32 bit on x86) WX6 (Windows 64 bit on x86) S64 (Solaris on SPARC) R64 (AIX on PowerPC) H61 (HP/UX on Itanium)
Refer to the “Platform Support Matrix Diagram in Appendix 2” to determine the supported client and server platform combinations.
The current adaptor supports the following SAP version: SAP - ECC 5.0 SAP - ECC 6.0 (ERP 6.0) (SAP Kernel 710)
6 SAS Service Parts Optimization Adapter for SAP Provisions Chapter 1
2 Preparing to Import the SAS Service Parts Optimization Adapter for SAP
Customizing for the Installation Environment ............................................................................................. 7 Configuring SAS/ACCESS Interface to R/3 Software ................................................................................ 7 Installation Prerequisites .............................................................................................................................. 7 Preparing to Import SAS Service Parts Optimization Adapter for SAP ...................................................... 8 Defining the Environment ............................................................................................................................. 8
Define a User .......................................................................................................................................... 8 Define an SAP Library and SAP Server .............................................................................................. 11 Test the SAP Connection ...................................................................................................................... 18
Customizing for the Installation Environment The SAS Service Parts Optimization Adapter for SAP requires customization to work in a unique install site. When customizing the SAS Service Parts Optimization Adapter for SAP for your site, you must configure the SAS/ACCESS interface to R/3 software and configure the SAS Data Surveyor for SAP R/3. Then customize the SAS Service Parts Optimization Adapter for SAP for the assigned libraries in your installation environment.
Configuring SAS/ACCESS Interface to R/3 Software The SAS Service Parts Optimization Adapter for SAP uses the SAS/ACCESS interface to R/3 software. Extensive installation setup is necessary. For detailed installation instructions and configuration information, refer to the Installation Instructions for SAS/ACCESS Interface to R/3, included in the SAS software.
Installation Prerequisites As part of the installation of SAS Service Parts Optimization Adapter for SAP, you should first install the required SAS software listed below. For more information, refer to the installation instructions of the specific product.
the third maintenance release for SAS 9.2 and later SAS Data Surveyor for SAP 4.3 (includes SAS/ACCESS to R/3)
If the customer is already using the second maintenance release for SAS 9.2, then SAS Platform should be updated from the second maintenance to the third maintenance before starting the installation of SAS Service Parts Optimization Adapter for SAP.
C H A P T E R
8 Defining the Environment Chapter 2
Preparing to Import SAS Service Parts Optimization Adapter for SAP Before you import the SAS Service Parts Optimization Adapter for SAP, you must prepare your system environment by completing the following tasks: Define user and SAP login details in SAS Management Console in a foundation
repository. Define an SAP library and SAP server in SAS Management Console in a custom
repository. Test and verify the resulting connection in SAS Data Integration Studio.
These tasks are required to ensure that the SAS Service Parts Optimization Adapter for SAP works properly when it is imported. The remaining sections in this chapter provide instructions on how to complete the required tasks.
Defining the Environment
Define a User To define a user for the SAS Service Parts Optimization Adapter for SAP:
1 Open SAS Management Console. Select the Foundation in the Repository field to connect to the metadata server at the foundation level. You must have administrator access to complete this task.
SAS Management Console
Preparing to Import the SAS Service Parts Optimization Adapter for SAP Defining the Environment 9
2 Right-click User Manager in the tree on the left of the SAS Management Console window, and then select NewGroup.
SAS Management Console – User Manager
3 The New Group Properties dialog box appears. Enter SAPUsers in the Name field.
New Group Properties
10 Defining the Environment Chapter 2
4 In the Members tab, select SAS Demo User in the Available Identities box. Click the single arrow pointing to the Current Members box. SAS Demo User moves to the Current Members box.
SAPUsers Properties – Members
5 In the Accounts tab, click New.
SAPUsers Properties – Accounts
Preparing to Import the SAS Service Parts Optimization Adapter for SAP Defining the Environment 11
6 The Edit Login Properties dialog box appears.
Edit Login Properties
7 Provide the necessary login information:
a User ID for the SAP server. b Password for the SAP server. c Select SAPAuth from the Authentication Domain menu. If this option is
not already available on the menu, click New, enter SAPAuth as the name of the new authentication domain, and then enter a short description. Click OK to save the new authentication domain.
d Click OK to save the login properties. e Click OK to save the user definitions.
Define an SAP Library and SAP Server To define an SAP library and SAP server:
1 Open SAS Management Console. In the Repository field, select Foundation, or select a repository that is solely dependent on the Foundation repository, to connect to the metadata server at the foundation level.
2 Right-click Server Manager and select New Server. The New Server Wizard opens.
12 Defining the Environment Chapter 2
3 Select SAP Server from the Enterprise Applications Servers folder. Click Next to name the new SAP library.
New Server Wizard
4 Enter a name and description for the server. Click Next to enter information about your SAP software. Enter the version numbers for your SAP software. These values are optional. Click Next to enter connection properties.
Enterprise Applications Servers – SAP Server
Preparing to Import the SAS Service Parts Optimization Adapter for SAP Defining the Environment 13
5 Select SAPAuth from the Authentication Domain menu. Specify SAP client and SAP language. Select the connection type that corresponds to a normal SAP GUI connection for your system.
New Server Wizard – Connection Properties
6 Click Options for your selection, and then enter the Application Server Host and the System Number. Click OK.
Application Server Options
14 Defining the Environment Chapter 2
7 Scroll down the New Server Wizard page to access the Advanced Options. If you have defined batch servers or processes, you might need to specify some of the advanced options that are available. Click OK.
Advanced Options
8 Click Next in the New Server Wizard to display a summary of your new specifications. Review the information and click Finish, saving the new SAP server, and return to main screen of SAS Management Console.
New Server Wizard – Summary of Specifications
9 Expand Data Library Manager in the tree on the left of the SAS Management Console window.
10 Right-click Libraries and select New Library. The New Library Wizard opens.
Preparing to Import the SAS Service Parts Optimization Adapter for SAP Defining the Environment 15
11 Select SAP Library from the Enterprise Applications Libraries folder. Click Next to name the new SAP library.
New Library Wizard
12 Enter a name and description for the SAP library. Click Next to specify library properties.
New Library Wizard – New SAP Library
16 Defining the Environment Chapter 2
13 Select the required SAS server.
New Library Wizard – Server Selection
14 Enter SAPEng in the Libref field. SAPEng is the default value that the imported metadata uses, and the user can give any name complying with SAS Libref standards. Click Next to select a database server.
Libref
Preparing to Import the SAS Service Parts Optimization Adapter for SAP Defining the Environment 17
15 In the Database Server field, select a database server that contains parameters that connect to the SAP server. If an appropriate database server is not available in the menu, complete the steps 1 to 15 to create one. Click Next to review the library parameters.
Database Server
16 Click Finish to save.
Library Properties
18 Defining the Environment Chapter 2
Test the SAP Connection 1 Open SAS Management Console. Open the connection profile for the user. Select
ToolsExtract From R3.
SAS Management Console
2 The SAP R/3 Metadata Extract dialog box appears. In the Configured SAP Server field, select the name of the SAP server that you defined in SAS Management Console. Click Test SAP Server Connection.
SAP Server
Preparing to Import the SAS Service Parts Optimization Adapter for SAP Defining the Environment 19
3 If the connection is successful, then the following message appears:
Note: If the connection is not successful, the SAS log indicates a problem. For example, RFC server errors might indicate that the RFC server is not running, or an invalid user ID might indicate that the password is incorrect. For more information about troubleshooting connection problems, see the SAS/ACCESS Interface to R/3 installation documentation that is included in your installation package.
4 Click Yes to view the SAS log. The View SAS Log dialog box displays the LIBNAME statement that is generated with the specified parameters. Click OK to exit the SAS log.
SAS Log
5 Click Cancel to exit the Source Designer.
20 Defining the Environment Chapter 2
3 Installation and Customization of SAS Service Parts Optimization Adapter for SAP
Installing the Jobs and Metadata ............................................................................................................... 21 Customizing the SAS Environment ............................................................................................................ 21 Customization for Internationalization (I18N) ........................................................................................... 22 Deploying the Jobs and Tables Metadata ................................................................................................... 24
Installing the Jobs and Metadata Installation of ETL jobs and related metadata for the SAS Service Parts Optimization Adapter for SAP can be done by using the Solution Deployment Wizard. The Solution Deployment Wizard is a part of your software order.
Customizing the SAS Environment To customize the SAS Service Parts Optimization Adapter for SAP to fit into your SAS environment, you must change the configuration of the SAS environment. As the configuration of SAS Service Parts Optimization Adapter for SAP is not handled by the Solution Deployment Wizard, certain physical folders need to be created under the SAS Application Server Configuration folder.
1 Create the following folder structure on the machine where SAS Service Parts Optimization Adapter for SAP is installed. The default path for this folder structure in the Windows environment is: C:\SAS\Config\Lev1\SASApp\Data.
Folder Structure
C H A P T E R
22 Customization for Internationalization (I18N) Chapter 3
2 Modify the sasv9.cfg file to configure the adapter install and data path.
Add the following code to the config file. -SET ADPTSPOINSTALL "C:\Program Files\SAS\SASServicePartsOptimizationAdapterSAP\4.2\CustomSASCode" -SET ADPTSPODATA "C:\SAS\Config\Lev1\SASApp\Data\ServicePartsOptimizationAdapterSAP"
Note: The above paths are default paths in the Windows environment, and you need to apply the above changes appropriately as per your host and install location at your site.
3 Grant full permissions to the Install folder named “CustomSASCode” as the deployment will write custom SAS code into this folder. If you have not given full permissions to the folder and proceed with the deployment, then you will receive an error while importing the adapter jobs. Hence, granting full permissions to the Install folder is mandatory.
Customization for Internationalization (I18N) To configure the Adapter in an internationalization environment:
1 Configure SAS Unicode Server if your SAP system is a Unicode system. SAP data is on Unicode pages and hence you need to use the appropriate trans-coding while extracting the SAP data with the Data Surveyor. Configure the SAS environment to point to the SAS Unicode Server.
Installation and Customization of SAS Service Parts Optimization Adapter for SAP Customization for Internationalization (I18N) 23
Modify the SASV9.CFG file to access the SAS Unicode Server. The default path of the SASV9.CFG is C:\Program Files\SAS\SASFoundation\9.2.
SASV9.CFG
Change the code snippet below in the SASV9.CFG file to replace “en” with “u8” -CONFIG "C:\Program Files\SAS\SASFoundation\9.2\nls\u8\SASV9.CFG"
2 Restart the SAS Services after the code changes are complete. Change the above SASV9.CFG file to point to the appropriate encoding based on your encoding requirement.
Note: The above example is for the Windows environment, and you need to apply the above changes appropriately as per the host at your site. For more information about SAS Unicode Server, see the technical paper, “Processing Multilingual Data with the SAS 9.2 Unicode Server” (available at: http://support.sas.com/resources/papers/92unicodesrvr.pdf).
Note: Since the SAS Service Parts Optimization Adapter for SAP is packaged with the predefined SAP metadata that is suitable for both Unicode and non-Unicode systems, you might see warning messages that are related to the base and data length discrepancy in the adapter jobs, depending on which encoding option you use.
24 Deploying the Jobs and Tables Metadata Chapter 3
Example: If you are running the Adapter jobs in WLATIN1 encoding, then you will get warning messages as shown below. However, these warning messages are not shown if you are using Unicode encoding or any other double-byte encoding like euc-cn. These warning messages do not have any impact on the data extraction or loading. These messages are for information purposes only and can be ignored.
Warnings
Deploying the Jobs and Tables Metadata After the installation of the SAS Service Parts Optimization Adapter is complete, deploying the jobs and tables metadata for the SAS Service Parts Optimization Adapter for SAP is a manual process.
To deploy metadata objects (in this case, jobs and tables) for the SAS Service Parts Optimization Adapter for SAP, you can use the standard metadata import and export features of SAS Data Integration Studio.
The components for the SAS Service Parts Optimization Adapter for SAP are stored as package files. A package file is available in the install location. The standard install location in the Windows environment for storing the package file is C:\Program Files\SAS\SASServicePartsOptimizationAdapterSAP\4.2\SASPackages.
Note: The above install location is platform dependent, and it can be changed as needed.
Installation and Customization of SAS Service Parts Optimization Adapter for SAP Deploying the Jobs and Tables Metadata 25
To deploy tables and jobs:
1 Open SAS Data Integration Studio with the connection profile for the user. In the metadata profile, select the project that you defined when you added the SAP server and SAP library in the previous chapter. The SAS Service Parts Optimization Adapter for SAP is imported to the project that you select in this step.
2 To import tables and jobs, right-click Products in the SAS folders tree, and then click Import. The Import Wizard appears.
SAS Data Integration Studio – Products
3 The Import Wizard appears. Click Browse, and then open the SASPackages folder, which is in the Install folder that was created at the time of installation. Select the package SASSPOAdapterforSAP_DIS_ProductFolders.spk. Under Import Options, select All Objects, and then click Next. Retain the default options and continue.
26 Deploying the Jobs and Tables Metadata Chapter 3
Import SAS Packages
4 The objects to be imported are displayed.
Objects to Import
5 Click Next to continue. A summary of values is displayed.
Installation and Customization of SAS Service Parts Optimization Adapter for SAP Deploying the Jobs and Tables Metadata 27
Summary
6 Review the summary, and then click Next. A progress indicator is displayed.
Importing Objects
7 Once the import is finished, the Import Wizard displays a completion message. If the import process fails, click View Log, check for messages, and take appropriate action.
28 Deploying the Jobs and Tables Metadata Chapter 3
Import Complete
Note: Use the process described in the above steps to deploy Folders, Data Sources, and Jobs.
Here is the sequence for importing the packages:
1 SASSPOAdapterforSAP_DIS_ProductFolders.spk
2 SASSPOAdapterforSAP_DIS_AppFolders.spk
3 SASSPOAdapterforSAP_DIS_Tables.spk
4 SASSPOAdapterforSAP_DIS_Extraction_Jobs.spk
5 SASSPOAdapterforSAP_DIS_Transformation_Jobs.spk
6 SASSPOAdapterforSAP_DIS_Load_Jobs.spk
Note: For importing the second package only, right-click on the System folder in the SAS folders tree, and then click Import. For other packages, right-click on the Products folder in the SAS folders tree, and then click Import.
The environment for data extraction and transformation from SAP is now installed. You can further customize your SAS Data Integration Studio environment as needed.
Note: Ensure that the Application Server is set to SASApp while importing tables and jobs packages.
4 Customizing SAS Data Integration Studio Jobs and Programs
Customizing Jobs and Programs ................................................................................................................ 29 Customize the preprocglobal.sas Program .................................................................................................. 29
File Location ......................................................................................................................................... 30 SAP System Parameters .............................................................................................................................. 31
Data Source .......................................................................................................................................... 31 SAP Language Codes ........................................................................................................................... 31 SAP Material Management and Sales and Distribution-related settings .......................................... 33 Default Values for Service Parts Optimization SDL Tables ............................................................... 34
Time Period Dimension Parameters ........................................................................................................... 34 Fiscal Year Variant .............................................................................................................................. 34 Extraction Starting Date ...................................................................................................................... 35
Common Extraction Parameters ................................................................................................................. 35 E-mail Contact for Error Reports ........................................................................................................ 35 Additional Customizations .................................................................................................................. 35
Customizing Jobs and Programs To customize the SAS Service Parts Optimization Adapter for SAP to fit into your unique SAP environment, you must review and change a few jobs in SAS Data Integration Studio, including several SAS programs within these jobs.
Although many of the jobs and programs do not require changes, you must review each one to ensure the results that you want. This section provides information about each job and program that requires your review and changes. It describes each job in SAS Data Integration Studio, and explains whether the job or program requires changes to work successfully.
Customize the preprocglobal.sas Program SAS Service Parts Optimization Adapter for SAP jobs use several global macro variables that are initialized in the SAS program preprocparms12.sas, which is subsequently called preprocglobal.sas in the program. This program serves as the preprocessing step in each job.
Make appropriate changes in the following section of the program to suit your environment. libname spoamacr 'C:\Program Files\SAS\SASFoundation\9.2\spoadaptsap\cmacros'; options MSTORED SASMSTORE= spoamacr;
Use this section of the program given above to change the path to the Adapter macro catalog as per your host requirement.
C H A P T E R
30 SAP System Parameters Chapter 4
Note: Be sure to make a backup copy of the program before changing it.
The following section describes each part of the preprocparms12.sas program and explains the parts of the program that you must change for your environment.
File Location The preprocparms12.sas program is in the Install directory located where you specified in the Solution Deployment Wizard during Installation.
The preprocparms12.sas program file is called by the preprocglobal.sas program. The preprocglobal.sas program must be edited to fit the local environment.
/*************************************************************************/ /* Copyright (c) 2010 by SAS Institute Inc., Cary, NC 27513, USA */ /* */ /* Name : preprocglobal.sas */ /* PRODUCT : SAS Service Parts Optimization Adapter for SAP */ /* */ /*************************************************************************/ /* Global Preprocessing */ /*proc display c=sashelp.adptspo.startup.scl batch; run; */ options mstored mrecall; filename macro '!ADPTSPOINSTALL'; options sasautos = (macro sasautos ); libname spoamacr 'C:\Program Files\SAS\SASFoundation\9.2\spoadaptsap\cmacros'; options MSTORED SASMSTORE=spoamacr; libname formats '!ADPTSPODATA\Formats'; %include "!ADPTSPOINSTALL\CustomCode\preprocparms12.sas"; %include "!ADPTSPOINSTALL\CustomCode\preprocparms13.sas"; options fmtsearch = (fmtsearch formats.fmt&lang formats.fmt&_ktopl.&lang); /* * End of preprocglobal.sas */
After you open preprocparms12.sas, you will see the banner for the SAS program file. The banner must be edited to fit the local environment.
Customizing SAS Data Integration Studio Jobs and Programs SAP System Parameters 31
SAP System Parameters
Data Source After the banner, the next section of preprocparms12.sas designates the data source location. %let source_system_id=800; * 3 char ID to tell DDS where info * is coming from. It could be SAP, * or client number - or SAP sysid - anything * that uniquely represents the current * ETL ;
The macro variable SOURCE_SYSTEM_ID is a three-character ID that tells the SAS Service Parts Optimization Data Layer where the data is coming from. The value can be anything that uniquely represents the current ETL environment, such as SAP, the SAP client number, or the SAP system ID.
This variable populates the SOURCE_SYSTEM_CD column that occurs in multiple SDL tables. If data originates from multiple SAP systems, multiple extracts are necessary, with each extract having its own preprocparms12.sas file and unique value set for the variable SOURCE_SYSTEM_ID.
SAP Language Codes Use the SAP language codes section of the program to designate the language that SAP uses. %let spras = 'E'; * single-char SAP language with quotes; %let lang = E; * language without quotes; * set valid SAS language value to be used in the * solution data mart ; %let sas_lang_for_sdm='en';
Set the macro variables SPRAS and LANG to the single-character language code that corresponds to the main language that SAP uses. This is also the language that the program uses to maintain text. Versions, enclosed or not enclosed in quotation marks, exist for easy inclusion in the code and understanding of the code.
32 SAP System Parameters Chapter 4
Use the following language code table to determine the valid language value for your local environment.
Table 3.1 Language Codes for preprocparms12.sas
Code Language Code Language
0 Serbian I Italian
1 Chinese J Japanese
2 Thai K Danish
3 Korean L Polish
4 Romanian M Chinese (Traditional)
5 Slovenian N Dutch
6 Croatian O Norwegian
7 Malaysian P Portuguese
8 Ukrainian Q Slovakian
9 Estonian R Russian
A Arabic S Spanish
B Hebrew T Turkish
C Czech U Finnish
D German V Swedish
E English W Bulgarian
F French X Lithuanian
G Greek Y Latvian
H Hungarian Z Customer Reserve
Customizing SAS Data Integration Studio Jobs and Programs SAP System Parameters 33
SAP Material Management and Sales and Distribution-related settings Use the SAP Material Management (MM) and Sales and Distribution (SD) Parameters section of the program to set certain extraction parameters. * Set the Sales order types from SD Module to be extracted into SPO. * This parameter define the order types in the SPO Customer Order table; %let wanted_order_types='ZOR','TA','SO','ZRUS','ZRO'; * Set the purchase order types from MM Module to be extracted into SPO. * This parameter define the order types in the SPO Purchase Order table; %let wanted_po_types='NB','UB'; * Set the Sales order types from SD Module, which are treated as either * Standard or Regular Order. This parameter is used to define the * regular order flag in the SPO Customer Order table; %let regular_order_types='ZOR','TA'; * Set the Sales order types from SD Module, which are treated as either * Rush or Express Order. This parameter is used to define the * rush order flag in the SPO Customer Order table; %let rush_order_types='ZRO','SO','ZRUS'; * Set the purchase order types from MM Module, which are treated as stock * transport orders(STO). This parameter mark few flags related to * Stock Transport Orders in SPO tables; %let sto_types='UB'; * Set the following parameter to 'Y' if you wish to filter the items with * zero quantities. In SAP, zero quantities are valid and hence the ETL * Jobs extracts all the items, including the items that have zero quantity. * This parameter should be marked so as to filter such items in SPO tables; %let filter_zero_qty='Y';
34 Time Period Dimension Parameters Chapter 4
Default Values for Service Parts Optimization SDL Tables Use the following default values as per SAS Service Parts Optimization requirements. These values will be populated as default values in certain columns. * set valid SAS language value to be used in the solution data mart ; %let default_lang='en'; * set the default currency for SPO solution; %let default_curr='USD'; * Set the default values for certain columns in the SPO Tables; %let def_repair_item_fg=N; %let def_assembly_fg=N; %let def_item_grp_cd=DEFAULT; %let def_mrp_controller_id=DEFAULT; %let def_item_category_id=DEFAULT;
Time Period Dimension Parameters
Fiscal Year Variant SAP enables companies to have multiple fiscal year variants, although most companies use only one variant. If your organization uses multiple variants, you must include the variant name in period IDs and descriptions to avoid ambiguity. For best results, use clear period IDs and descriptions that do not include the variant information.
The macro variable use_fiscal_yr_variant_in_time can control behavior based on the following two values:
The value N causes the variant not to be used. The value Y forces the variant information into the period IDs and descriptions.
* The use_fiscal_yr_variant_in_time macro variable determines whether the * fiscal variant name is used in the time dimension ID and descriptions. * In most cases, only one fiscal variant is used, and the default is * therefore N ; %let use_fiscal_yr_variant_in_time=N;
Customizing SAS Data Integration Studio Jobs and Programs Common Extraction Parameters 35
Extraction Starting Date You can use the macro variables START and STARTFINYEAR to set the starting date for the extraction of financial transactions. These values help reduce the amount of data that is extracted in the initial load by not extracting financial transactions with dates before the specified date. * Set the number of years into the future the time dimension should cover ; %let time_dim_future_yrs=20; * If the financial year starts in January then use value 1, February then use 2, and so on ; %let finyear_startmonth=1; * The following macro variables determine from which date financial * transactions should be extracted from SAP. This is IMPORTANT when * initializing the data during the initial load phase. In subsequent extracts, * only new or changed data is extracted; %let _start = 01JAN2000; * Start date - First extraction to * take transactions after this date; %let _startfinyear = 2000;
Set the extraction variables based on your environment. The FINYEAR_STARTMONTH value is the number of the month in which the
financial year starts. January is represented by 1, February by 2, and so on. The _START value is the first day of your organization’s financial year. This value
must be in SAS DATE9 format. The _STARTFINYEAR value is your organization’s financial year. For example, if
your organization’s financial year for 2005 begins on 01 December 2004, then you must set the _STARTFINYEAR value to 2005. Choose a value that reflects the year after which detailed transaction data is to be extracted from SAP.
Common Extraction Parameters
E-mail Contact for Error Reports The e-mail contact for the error reports section of the preprocparms12.sas file includes the e-mail address of the contact who receives error notifications for any extractions or transformation flows that use a publish-to-e-mail transformation. The initial value is obtained from the parameters that are supplied in the import steps. *---Email contact for error reports---*; %let [email protected];
Additional Customizations This section of the preprocparms12.sas file enables you to add customizations to other data areas. You can add these customizations to a new SAS program that can be called by an INCLUDE statement.
36 Common Extraction Parameters Chapter 4
5 Extraction Jobs
Extraction Jobs ............................................................................................................................................ 37 Job Group: E0001 Extract Master Data Tables .......................................................................................... 38
spoadpt_E0001000_Extract_BOM_Header_and_Detail_Tables ......................................................... 38 spoadpt_E0001010_Extract_Customer_Master_Tables ...................................................................... 38 spoadpt_E0001020_Extract_MRP_Controller_Table .......................................................................... 38 spoadpt_E0001030_Extract_Material_Master_detail_Tables ............................................................. 39 spoadpt_E0001040_Extract_Condition_Record_Tables ...................................................................... 39 spoadpt_E0001050_Extract_Org_&_Geographic_location_Tables ..................................................... 40 spoadpt_E0001060_Extract_SAP_Misc_Reference_Tables ................................................................. 40 spoadpt_E0001070_Extract_SAP_Material_related_Ref_Tables ........................................................ 41 spoadpt_E0001080_Extract_Route_details ......................................................................................... 41 spoadpt_E0001090_Extract_Mode_of_Shipment_Tables .................................................................... 41
Job Group: E0002 Extract Transaction Data Tables ................................................................................. 42 spoadpt_E0002000_Initial_Extract_Material_Docs_MKPF_MSEG .................................................. 42
Additional Notes ........................................................................................................................... 42 spoadpt_E0002005_Merge_Material_Documents_MKPF_MSEG ...................................................... 42 spoadpt_E0002010_Delta_Extract_Material_Documents_MKPF_MSEG .......................................... 43
Additional Notes ........................................................................................................................... 43 spoadpt_E0002020_Extract_Vendor_Master_and_Delivery_Tables ................................................... 43 spoadpt_E0002030_Extract_Material_Info_Records .......................................................................... 44 spoadpt_E0002040_Extract_Purchasing_Info_Record_Tables ........................................................... 44 spoadpt_E0002050_Extract_Cust_Order_and_PO_Tables ................................................................. 45
Job Group: E0003 Extract Misc Data Tables.............................................................................................. 45 spoadpt_E0003000_Extract_SAP_Fiscal_Period_Tables .................................................................... 45 spoadpt_E0003010_Formats_from_Financial_Period_T_Tables ....................................................... 46 spoadpt_E0003020_Extract_SAP_lookup_details_Tables .................................................................. 46
Extraction Jobs The SAS Service Parts Optimization Adapter for SAP uses several extraction jobs to extract data from SAP R/3. Here are the four essential types of extractions that the adapter uses: simple complete extractions
extract and load all rows of a table from the SAP server into a SAS mirror table. Rerunning these extractions re-extracts the entire table and automatically retrieves all new information.
simple partial extractions extract and load a subset of SAP tables (not all rows and not all columns) into a partial mirror table. Rerunning these extractions re-extracts the same logical parts of the table and automatically gets all new information that is relevant.
change data capture extractions extract and load data that was added or changed in SAP since the previous extraction. These extractions are subsequent loads that are used after an initial load is completed by a simple complete extract or a partial extract. The change
C H A P T E R
38 Job Group: E0001 Extract Master Data Tables Chapter 5
data capture extractions are important for large transaction tables. Their complexity is not needed for small amounts of data.
extractions done via SAP remote-callable functions serve as the easiest way to extract SAP data in some cases.
Job Group: E0001 Extract Master Data Tables
spoadpt_E0001000_Extract_BOM_Header_and_Detail_Tables This job extracts tables for BOM HEADER, detail, and material to BOM link tables. The individual extractions are independent of each other.
This job uses the following input tables from the SAP server: STKO STPO MAST
This job creates the following output: R3mirror. STKO R3mirror. STPO R3mirror.MAST
spoadpt_E0001010_Extract_Customer_Master_Tables This job extracts tables used for generating the SDL CUSTOMER table. The individual extractions are independent of each other.
This job uses the following input tables from the SAP server: KNVV KNA1 KNB1
This job creates the following output: R3Mirror.KNVV R3Mirror.KNA1 R3Mirror.KNB1
spoadpt_E0001020_Extract_MRP_Controller_Table This job extracts SAP tables for the MRP CONTROLLER table.
This job uses the following input tables from the SAP server: T024D
This job creates the following output: R3Mirror.T024D
Extraction Jobs Job Group: E0001 Extract Master Data Tables 39
spoadpt_E0001030_Extract_Material_Master_detail_Tables This job extracts MATERIAL MASTER SAP tables that have all the details corresponding to the material. In SAP, the MATERIAL MASTER details are stored in multiple tables.
For each table, a mirrored SAS table is created in the library R3Mirror.
This job uses the following input tables from the SAP server: MBEW MVKE T141T MARA MAKT MARD T141 TMABC MARC TMABCT
This job creates the following output: R3Mirror.MBEW R3Mirror.MVKE R3Mirror.T141T R3Mirror.MARA R3Mirror.MAKT R3Mirror.MARD R3Mirror. T141 R3Mirror. TMABC R3Mirror. MARC R3Mirror.TMABCT
spoadpt_E0001040_Extract_Condition_Record_Tables This job extracts SAP condition record tables that are used in generating ITEM_SUBSTITUTE, ITEM_PRICE tables. For each table, a mirrored SAS table is created in the library R3Mirror.
This job uses the following input tables from the SAP server: KOTD001 KONW KONM KONDD KONH KONP
40 Job Group: E0001 Extract Master Data Tables Chapter 5
This job creates the following output: R3Mirror.KOTD001 R3Mirror.KONW R3Mirror.KONM R3Mirror.KONDD R3Mirror.KONH R3Mirror.KONP
spoadpt_E0001050_Extract_Org_&_Geographic_location_Tables This job extracts general SAP tables that store country, state, and city details. SAP tables related to organization entities such as company code, plant, purchase organization, valuation, and so on, are also extracted in this job. For each table, a mirrored SAS table is created in the library R3mirror. The individual extractions are independent of each other.
This job uses the following input tables: T005U T001 T024E T005H T001K T005T T001W
This job creates the following output: R3Mirror.T005U R3Mirror.T001 R3Mirror.T024E R3Mirror.T005H R3Mirror.T001K R3Mirror.T005T R3Mirror.T001W
spoadpt_E0001060_Extract_SAP_Misc_Reference_Tables This job extracts SAP reference tables (general) that are used as lookup values in SAS Service Parts Optimization. For each table, a mirrored SAS table is created in the library R3mirror.
This job uses the following input tables from the SAP server: T023T T006A T134T T006 TVTYT TCURC TCURT
Extraction Jobs Job Group: E0002 Extract Transaction Data Tables 41
This job creates the following output: R3Mirror.T023T R3Mirror.T006A R3Mirror.T134T R3Mirror.T006 R3Mirror.TVTYT R3Mirror.TCURC R3Mirror.TCURT
spoadpt_E0001070_Extract_SAP_Material_related_Ref_Tables This job extracts SAP reference tables (material specific), which are used as lookup values in SAS Service Parts Optimization. For each table, a mirrored SAS table is created in the library R3Mirror.
This job uses the following input tables from the SAP server: T023 TVTY T134
This job creates the following output: R3Mirror.T023 R3Mirror.TVTY R3Mirror.T134
spoadpt_E0001080_Extract_Route_details This job extracts SAP tables that are required for ROUTE tables in SAS Service Parts Optimization. For each table, a mirrored SAS table is created in the library R3Mirror.
This job uses the following input tables from the SAP server: TVRO EKPV
This job creates the following output: R3Mirror.TVRO R3Mirror.EKPV
spoadpt_E0001090_Extract_Mode_of_Shipment_Tables This job extracts SAP tables that are used to populate the ROUTE_TYPE_REF table. For each table, a mirrored SAS table is created in the library R3Mirror.
This job uses the following input tables from the SAP server: T173 T173T
This job creates the following output: R3Mirror.T173 R3Mirror.T173T
42 Job Group: E0002 Extract Transaction Data Tables Chapter 5
Job Group: E0002 Extract Transaction Data Tables
spoadpt_E0002000_Initial_Extract_Material_Docs_MKPF_MSEG This job uses the following input tables from the SAP server: MKPF MSEG
This job creates the following output: R3Mirror.MKPF R3Mirror.MSEG
Additional Notes This job extracts all data from the SAP tables MKPF and MSEG. As part of job execution, the SAS macro %ADPT_UPDATE_MKPF_DELTA is run to update the delta control date record for the MKPF table.
This job is designed to run for the initial data extraction only. However, this job can be run if there is a need to refresh data. For subsequent data extraction, you need to run the job E0002010.
The data extraction in this job is based on the macro variable &_STARTFINYEAR.
This job group works in two stages: The first stage extracts data from SAP to SAS data sets. This stage extracts all
data from the MSEG table, but extracts partial data from the MKPF table. From the MKPF table, only those records are extracted whose fiscal year (GJAHR) value is not less than the value specified in the macro variable &_STARTFINYEAR.
The second stage, being implemented in the job E0002005, merges the two resulting SAS data sets extracted from the job E0002000.
spoadpt_E0002005_Merge_Material_Documents_MKPF_MSEG This job merges the material document data extracted from SAP.
This job uses the following input tables from the SAP server: MKPF MSEG
This job creates the following output: SPOInter.Inter_Material_Documents
Extraction Jobs Job Group: E0002 Extract Transaction Data Tables 43
spoadpt_E0002010_Delta_Extract_Material_Documents_MKPF_MSEG This job extracts material documents from SAP. These tables are used to generate inventory tables in SAS Service Parts Optimization. For each table, a mirrored SAS table is created in the library R3Mirror.
This job uses the following input tables from the SAP server: MKPF MSEG
This job creates the following output: R3Mirror.MKPF R3Mirror.MSEG
Additional Notes This job is designed to extract only changed data since the last extraction. As the MKPF and MSEG tables have huge volume of data, extracting complete data from these tables is time consuming. Extracting complete data also uses significant amount of SAP R/3 and network resources.
Hence, it is suggested to use this job for frequent data extraction.
This job executes the SAS macro %ADPT_DELTACTL2 to get the latest delta control date record for the MKPF table. The delta control date is stored in a SAS data set named DELTACONTROL, in the Admin library. This date helps the job to identify changed records.
This job uses this date to subset the data extraction. It updates the latest extract date in a post processing step. The macro %ADPT_DELTACTL updates the table DELTACONTROL in the Admin Library after every data extraction.
This job also includes the code “spoadpt_e0002010_update_mkpf_delta_control_date.sas” which in turn calls the macro %ADPT_UPDATE_MKPF_DELTA to update delta control date record for MKPF table.
You can use the macro variable &OVERLAP to specify a value of overlap days. This variable subtracts the specified number of days from the last extract date, and thus, increases the amount of data extracted.
spoadpt_E0002020_Extract_Vendor_Master_and_Delivery_Tables This job extracts VENDOR master tables and delivery documents from SAP. For each table, a mirrored SAS table is created in the library R3Mirror.
This job uses the following input tables from the SAP server: LIPS WYT3 LIKP LFA1 LFM1
44 Job Group: E0002 Extract Transaction Data Tables Chapter 5
This job creates the following output: R3Mirror.LIPS R3Mirror.WYT3 R3Mirror.LIKP R3Mirror.LFA1 R3Mirror.LFM1
spoadpt_E0002030_Extract_Material_Info_Records This job extracts the MATERIAL_INFO_RECORDS from SAP that are used in getting VENDOR_FACILITY_ITEM table. For each table, a mirrored SAS table is created in the library R3Mirror.
This job uses the following input tables from the SAP server: A017 A018
This job creates the following output: R3Mirror.A017 R3Mirror.A018
spoadpt_E0002040_Extract_Purchasing_Info_Record_Tables This job extracts purchasing info record details from SAP. These tables are used to populate the vendor-related tables in SAP. For each table, a mirrored SAS table is created in the library R3mirror.
This job uses the following input tables from the SAP server: EINA EINE EQUP EKET EQUK
This job creates the following output: R3Mirror.EINA R3Mirror.EINE R3Mirror.EQUK R3Mirror.EKET R3Mirror.EQUP
Extraction Jobs Job Group: E0003 Extract Misc Data Tables 45
spoadpt_E0002050_Extract_Cust_Order_and_PO_Tables This job extracts the SALES_ORDER and PURCHASE_ORDER tables from SAP. For each table, a mirrored SAS table is created in the library R3Mirror.
This job uses the following input tables from the SAP server: VBAP EKKO VBAK VBEP EKPO VBFA VBUP VBUK
This job creates the following output: R3Mirror.VBAP R3Mirror.EKKO R3Mirror.VBAK R3Mirror.VBEP R3Mirror.EKPO R3Mirror.VBFA R3Mirror.VBUP R3Mirror.VBUK
Job Group: E0003 Extract Misc Data Tables
spoadpt_E0003000_Extract_SAP_Fiscal_Period_Tables This job extracts general and SAP financial tables from SAP that are used to generate TIME_PERIOD tables. For each table, a mirror SAS table is created in the R3Mirror library. Individual extractions are independent of each other.
This job uses the following input tables from the SAP server: T009 T009B T009C T009T
This job creates the following output: R3Mirror.T009 R3Mirror.T009B R3Mirror.T009C R3Mirror.T009T
46 Job Group: E0003 Extract Misc Data Tables Chapter 5
spoadpt_E0003010_Formats_from_Financial_Period_T_Tables This job creates formats from the tables that are extracted in the E0003000 job. Run this job immediately after the E0003000 job, so that the formats are as current as the tables on which they are based.
This job uses the following input: R3Mirror.T009C – Period names &LANG (set in the preprocessing step)
This job creates the following output: $PERIOD_DESCRIPTION converts concatenated Fiscal Year Variant (PERIV) and
Posting Period (POPER) to Period Name Long Text (LTEXT) $PERIOD_NAME output converts concatenated Fiscal Year Variant (PERIV) and
Posting Period (POPER) to Period Name Short Text (KTEXT)
spoadpt_E0003020_Extract_SAP_lookup_details_Tables This job extracts general tables from SAP that are used to generate STAGE_LOOKUP_DETAIL table.
This job uses the following input tables from the SAP server: TVAKT T161 TVAK TNTPB T151T T416 - BOM T002 T151 T002T TNTP T416T T161T
This job creates the following output: R3Mirror.TVAKT R3Mirror.T161 R3Mirror.TVAK R3Mirror.TNTPB R3Mirror.T151T R3Mirror.T416 - BOM R3Mirror.T002 R3Mirror.T151 R3Mirror.T002T R3Mirror.TNTP R3Mirror.T416T R3Mirror.T161T
6 Transformation Jobs
Overview ...................................................................................................................................................... 47 Job Group: T0001 Transform Master Data ................................................................................................ 48
spoadpt_T0001000_Transform_INTER_PERIOD_TYPE .................................................................. 48 spoadpt_T0001010_Transform_Financial_Period_Info_from_SAP ................................................... 48 spoadpt_T0001020_Transform_FinYear_Begin_and_End_Dates ...................................................... 48 spoadpt_T0001030_Transform_Time_Hierarchy ................................................................................ 49 spoadpt_T0001040_Transform_STAGE_TIME_PERIOD .................................................................. 49 spoadpt_T0001050_Transform_STAGE_LOOKUP_MASTER........................................................... 49 spoadpt_T0001060_Transform_STAGE_LOOKUP_DETAIL ............................................................ 50 spoadpt_T0001070_Transform_INTER_PLANT_CC_CURRENCY .................................................. 51 spoadpt_T0001080_Transform_STAGE_LOCATION ........................................................................ 52 spoadpt_T0001090_Transform_STAGE_EMPLOYEE ....................................................................... 52 spoadpt_T0001100_Transform_STAGE_ORGANIZATION............................................................... 52 spoadpt_T0001110_Transform_STAGE_ITEM .................................................................................. 52 spoadpt_T0001120_Transform_STAGE_ITEM_CATEGORY ............................................................ 53 spoadpt_T0001130_Transform_STAGE_BOM ................................................................................... 53 spoadpt_T0001140_Transform_STAGE_CUSTOMER ...................................................................... 53 spoadpt_T0001150_Transform_STAGE_FACILITY .......................................................................... 53 spoadpt_T0001160_Transform_STAGE_ITEM_PRICE ..................................................................... 54 spoadpt_T0001170_Transform_STAGE_VENDOR ............................................................................ 54 spoadpt_T0001180_Transform_STAGE_ROUTE_TYPE_REF .......................................................... 54
Job Group: T0002 Transform Transaction Data ........................................................................................ 55 spoadpt_T0002000_Transform_STAGE_CUSTOMER_ORDER ....................................................... 55 spoadpt_T0002010_Transform_STAGE_FACILITY_X_ITEM........................................................... 55 spoadpt_T0002020_Transform_STAGE_PURCHASE_ORDER ........................................................ 55 spoadpt_T0002030_Transform_STAGE_ROUTE ............................................................................... 56 spoadpt_T0002040_Transform_STAGE_VENDOR_FACILITY_ITEM ............................................. 56 spoadpt_T0002050_Transform_STAGE_DISPATCH ........................................................................ 56 spoadpt_T0002060_Transform_STAGE_FACILITY_ITEM_DEMAND ............................................ 57 spoadpt_T0002070_Transform_STAGE_FACILITY_ITEM_INVENTORY....................................... 57 spoadpt_T0002080_Transform_STAGE_PIPELINE_INVENTORY .................................................. 57 spoadpt_T0002090_Transform_STAGE_RECEIPTS ......................................................................... 58 spoadpt_T0002100_Transform_STAGE_ROUTE_X_ITEM ............................................................... 58 spoadpt_T0002110_Transform_STAGE_BACK_ORDER_SUMMARY ............................................. 58
Overview The SAS Service Parts Optimization Adapter for SAP uses several jobs that transform data from the SAP R/3 extracted data into the staging area structure. This chapter provides an overview of these jobs.
C H A P T E R
48 Job Group: T0001 Transform Master Data Chapter 6
Job Group: T0001 Transform Master Data
spoadpt_T0001000_Transform_INTER_PERIOD_TYPE This job loads the INTER_PERIOD_TYPE table from a SAS table. There is a user-written code used in this job so as to facilitate the customer to add any special period if required.
For adding additional time period types, you can modify the source code in spoadpt_t0001000_add_sap_special_periods.sas accordingly.
This job uses the following input: User-written SAS code spoadpt_t0001000_add_sap_special_periods.sas
This job creates the SPOInter.Inter_PERIOD_TYPE table as output.
spoadpt_T0001010_Transform_Financial_Period_Info_from_SAP This job transforms SAP R/3 financial period tables into fiscal year periods by company. It handles financial years that are calendar years and non-calendar years. Typically, you need to use only one type.
This job uses the following input: R3Mirror.T001 R3Mirror.T009 R3Mirror.T009B &_KTOPL(set in the preprocessing step)
This job creates the following output: Inter.Fiscal_Year_Periods_with_dates
This job uses the following user-written code: spoadpt_t0001010_add_real_calendar_data.sas spoadpt_t0001010_fiscal_year_non_cal.sas
The above user-written codes are provided so as to create the TIME_PERIOD dimension as per the customizations in the SAP system.
spoadpt_T0001020_Transform_FinYear_Begin_and_End_Dates This job creates a table that has the start and end dates for each financial year.
This job uses the following input: Inter.Fiscal_Year_Periods_with_dates (created in the T0001010 job).
This job creates the following output: Inter.FinYear_Start_and_End_dates.
The format $FISCAL_START_MTH converts the concatenation of financial year (FINANCIAL_YEAR) and time period association type code (TIME_PERIOD_ASSOC_TYPE_CD) to financial year start (FIN_YEAR_START_DT). The format is stored in the Library.formats catalog.
Transformation Jobs Job Group: T0001 Transform Master Data 49
The user-written code spoadpt_t0001020_determine_fy_begin_end_dates.sas uses the INTER.FISCAL_YEAR_PERIODS_WITH_DATES table to determine the start date and end date for each financial year that is within each combination of time period association type, financial year, and time period ID.
spoadpt_T0001030_Transform_Time_Hierarchy This job adds top (root) level ALL, year level, and quarter level to the time dimension.
This job uses the following inputs: Inter.FinYear_Start_and_End_dates Inter.Fiscal_Year_Periods_with_dates
This job creates the following outputs: Inter.FinYear_Quarters Inter.Fiscal_Year_Periods_with_parents Inter.Time_period_dimension
This job uses the $COMPANY_TO_FY_VARIANT.
This job uses the user-written code spoadpt_t0001030_add_time_hierarchy_layers.sas.
spoadpt_T0001040_Transform_STAGE_TIME_PERIOD This job loads the main time period dimension tables.
This job uses the input Inter_Time_period_dimension (created in the T0001030 job).
This job creates the following outputs: Stage.TIME_PERIOD_ASSOC Stage.TIME_PERIOD
spoadpt_T0001050_Transform_STAGE_LOOKUP_MASTER This job loads the main LOOKUP_MASTER table. This job uses the user-written code
spoadpt_t0001050_add_stage_lookupmaster.sas
This job creates the following output: SPO_STAGE.LOOKUP_MASTER
If you want to add additional values or modify the standard values in the LOOKUP_MASTER table, modify the given user-written code.
50 Job Group: T0001 Transform Master Data Chapter 6
spoadpt_T0001060_Transform_STAGE_LOOKUP_DETAIL This job generates the STAGE_LOOKUP_DETAIL table from the R3Mirror tables extracted from SAP.
This job uses the following input tables: R3Mirror.T023 R3Mirror.T023T R3Mirror.T134 R3Mirror.T134T R3Mirror.T141 R3Mirror.T141T R3Mirror.T006 R3Mirror.T006A R3Mirror.TMABC R3Mirror.TMABCT R3Mirror.TCURC R3Mirror.TCURT R3Mirror.T416 R3Mirror.T416T R3Mirror.T151 R3Mirror.T151T R3Mirror.T161 R3Mirror.T161T R3Mirror.TVAK R3Mirror.TVAKT R3Mirror.TVTY R3Mirror.TVTYT R3Mirror.T002 R3Mirror.T002T R3Mirror.T009 R3Mirror.T009T Inter - PERIOD TYPE
Transformation Jobs Job Group: T0001 Transform Master Data 51
This job also uses the following user-written codes spoadpt_t0001060_add_item_status_fromR3.sas spoadpt_t0001060_add_itemgroup_type.sas spoadpt_t0001060_add_itemtype.sas spoadpt_t0001060_add_default_type_details.sas spoadpt_t0001060_add_stockprofile_facility_x_item.sas spoadpt_t0001060_add_Uom_facility_x_item.sas spoadpt_T0001060_add_currency_type_details.sas spoadpt_t0001060_add_bom_status.sas spoadpt_t0001060_add_customer_type.sas spoadpt_t0001060_add_order_type.sas spoadpt_t0001060_add_order_type_from_sales.sas spoadpt_t0001060_add_material_package_type.sas spoadpt_t0001060_add_Language_code_Details.sas spoadpt_t0001060_add_timeperiod_assoc_type.sas spoadpt_t0001060_add_timeperiod_type.sas
This job creates the following output: SPO_STAGE.LOOKUP_DETAIL
If you want to add additional values or modify the standard values in the LOOKUP_DETAIL table, modify the respective user-written codes.
spoadpt_T0001070_Transform_INTER_PLANT_CC_CURRENCY This job loads the intermediate table that shows the relationship between PLANT, COMPANY_CODE, and CURRENCY.
This job uses the following inputs: R3Mirror.T001 R3Mirror.T001K R3Mirror.T001W
This job creates the following output: Inter.Inter_Plant_CC_Currency
SAP does not have a direct relation between the plant and company codes. They are indirectly related through the valuation area. Hence, this job creates an intermediate table that shows the relationship between plant, company code, and the corresponding currency. This intermediate table is used in many subsequent jobs.
52 Job Group: T0001 Transform Master Data Chapter 6
spoadpt_T0001080_Transform_STAGE_LOCATION This job loads the stage table LOCATION. This table is loaded from SAP tables that store country, state, and city details.
This job uses the following inputs: R3Mirror.T005H R3Mirror.T005T R3Mirror.T005U
This job creates the following output: SPO_STAGE.LOCATION
This stage table is filled with all the countries, states, cities, and the corresponding combinations from the SAP tables.
spoadpt_T0001090_Transform_STAGE_EMPLOYEE This job loads the stage table EMPLOYEE. This table is loaded from SAP table that stores MRP Controller information.
This job uses the following inputs: R3Mirror.T024D Inter.Inter_Plant_CC_Currency
This job creates the following output: SPO_STAGE.EMPLOYEE
spoadpt_T0001100_Transform_STAGE_ORGANIZATION This job loads the stage table ORGANIZATION. This table is loaded from SAP table that stores company code information.
This job uses the following input: R3Mirror.T001
This job creates the following output: SPO_STAGE.ORGANIZATION
This stage table is populated with only one level of organizational hierarchy.
spoadpt_T0001110_Transform_STAGE_ITEM This job loads the stage table ITEM. This table is loaded from SAP MATERIAL MASTER tables.
This job uses the following inputs: R3Mirror.MARA R3Mirror.MAKT R3Mirror.MARC R3Mirror.MVKE
Transformation Jobs Job Group: T0001 Transform Master Data 53
This job uses the user-written code spoadpt_t0001110_Add_flagto_material.sas
This job creates the following output: SPO_STAGE.ITEM
spoadpt_T0001120_Transform_STAGE_ITEM_CATEGORY This job loads the stage table ITEM_CATEGORY. This table is loaded from SAP PRODUCT HIERARCHY tables.
This job calls the BAPI (Business API) “BAPI_MATERIAL_GET_PRODUCTHIER” to extract the product hierarchy into a tabular form.
This job also uses the user-written code spoadpt_t0001120_populate_highest_node.sas
This job creates the following output: SPO_STAGE.ITEM_CATEGORY
spoadpt_T0001130_Transform_STAGE_BOM This job loads the stage table BOM. This table is loaded from SAP BOM tables.
This job uses the following inputs: R3Mirror.STKO R3Mirror.STPO R3Mirror.MAST
This job creates the following output: SPO_STAGE.ITEM_BOM
spoadpt_T0001140_Transform_STAGE_CUSTOMER This job loads the stage table CUSTOMER. This table is loaded from SAP CUSTOMER MASTER tables.
This job uses the following inputs: R3Mirror.KNA1 R3Mirror.KNVV R3Mirror.KNB1
This job creates the following output: SPO_STAGE.CUSTOMER
spoadpt_T0001150_Transform_STAGE_FACILITY This job loads the stage table FACILITY. This table is loaded from the SAP CUSTOMER MASTER tables.
This job uses the following inputs: R3Mirror.T001W R3Mirror.T001K
This job creates the following output: SPO_STAGE.FACILITY
54 Job Group: T0002 Transform Transaction Data Chapter 6
spoadpt_T0001160_Transform_STAGE_ITEM_PRICE This job loads the stage table ITEM_PRICE. This table is loaded from SAP MASTER VALUATION tables.
This job uses the following inputs: R3Mirror.T001 R3Mirror.T001K R3Mirror.MBEW
This job creates the following output: SPO_STAGE.ITEM_PRICE
spoadpt_T0001170_Transform_STAGE_VENDOR This job loads the stage table ITEM_VENDOR. This table is loaded from the SAP VENDOR Master tables.
This job uses the following inputs: R3Mirror.LFA1 R3Mirror.LFM1 R3Mirror.WYT3 R3Mirror.T024E
This job creates the following output: SPO_STAGE.VENDOR
spoadpt_T0001180_Transform_STAGE_ROUTE_TYPE_REF This job loads the stage table ROUTE_TYPE_REF. This table is loaded from SAP ROUTE – SHIPPING MODE tables.
This job uses the following inputs: R3Mirror.T173 R3Mirror.T173T
This job creates the following output: SPO_STAGE.ROUTE_TYPE_REF
Transformation Jobs Job Group: T0002 Transform Transaction Data 55
Job Group: T0002 Transform Transaction Data
spoadpt_T0002000_Transform_STAGE_CUSTOMER_ORDER This job loads the stage table CUSTOMER_ORDER. This table is loaded from SAP table that stores sales order and stock transfer order details.
This job uses the following inputs: R3Mirror.VBAK R3Mirror.VBAP R3Mirror.VBEP R3Mirror.EKKO R3Mirror.EKPO R3Mirror.EKET
This job creates the following output: SPO_STAGE.CUSTOMER_ORDER This stage table is populated with sales order as well as stock transfer orders
(purchase orders) from SAP tables.
spoadpt_T0002010_Transform_STAGE_FACILITY_X_ITEM This job loads the stage table FACILITY_X_ITEM. This table is loaded from SAP table that stores plant data for material.
This job uses the following inputs: R3Mirror.MARC R3Mirror.TMABCT SPOInter.Inter_plant_CC_Currency
This job creates the following output: SPO_STAGE.FACILITY_X_ITEM This stage table is populated with the plant-specific data for the Material Master.
spoadpt_T0002020_Transform_STAGE_PURCHASE_ORDER This job loads the stage table PURCHASE_ORDER. This table is loaded from SAP table that stores purchase order details.
This job uses the following inputs: R3Mirror.EKKO R3Mirror.EKPO R3Mirror.EKET
This job creates the following output: SPO_STAGE.PURCHASE_ORDER
56 Job Group: T0002 Transform Transaction Data Chapter 6
spoadpt_T0002030_Transform_STAGE_ROUTE This job loads the stage table ROUTE. As SAP does not store the route details in the format required by SAS Service Parts Optimization, the stage table is derived from the purchase order table.
This job uses the following inputs: R3Mirror.EKKO R3Mirror.EKPO R3Mirror.EKPV R3Mirror.TVRO
This job creates the following output: SPO_STAGE.ROUTE
spoadpt_T0002040_Transform_STAGE_VENDOR_FACILITY_ITEM This job loads the stage table VENDOR_FACILITY_ITEM. As SAP does not store the material details with reference to plant and vendor as required for SAS Service Parts Optimization, the stage table is derived from the material and purchase info record tables.
This job uses the following inputs: R3Mirror.A017 R3Mirror.A018 R3Mirror.EINA R3Mirror.EINE R3Mirror.KONM R3Mirror.KONP R3Mirror.KONW
This job creates the following output: SPO_STAGE.VENDOR_FACILITY_ITEM
spoadpt_T0002050_Transform_STAGE_DISPATCH This job loads the stage table DISPATCH. This stage table is populated from the SAP Tables that store delivery documents.
This job uses the following inputs: R3Mirror.LIKP R3Mirror.LIPS
This job creates the following output: SPO_STAGE.DISPATCH
Transformation Jobs Job Group: T0002 Transform Transaction Data 57
spoadpt_T0002060_Transform_STAGE_FACILITY_ITEM_DEMAND This job loads the stage table FACILITY_ITEM_DEMAND. This stage table stores the orders per material per plant and it is populated from the SAP tables that store sales orders and purchase orders.
This job uses the following inputs: SPOInter.Inter_STO SPOInter.Inter_sales_order SPO_Stage.TIME_PERIOD
This job creates the following output: SPO_STAGE.FACILITY_ITEM_DEMAND
spoadpt_T0002070_Transform_STAGE_FACILITY_ITEM_INVENTORY This job loads the stage table FACILITY_ITEM_INVENTORY. This stage table stores the stock per material per plant at a given period of time and it is populated from the SAP tables that store material documents.
This job uses the following inputs: R3Mirror.MKPF R3Mirror.MSEG R3Mirror.MARD SPO_STAGE.TIME_PERIOD
This job creates the following output: SPO_STAGE.FACILITY_ITEM_INVENTORY
spoadpt_T0002080_Transform_STAGE_PIPELINE_INVENTORY This job loads the stage table PIPELINE_INVENTORY. This stage table stores the stock in pipeline (Transit) at a given period of time and it is populated from the SAP tables that store material documents.
This job uses the following inputs: R3Mirror.MKPF R3Mirror.MSEG SPO_STAGE.TIME_PERIOD
This job creates the following output: SPO_STAGE.PIPELINE_INVENTORY
58 Job Group: T0002 Transform Transaction Data Chapter 6
spoadpt_T0002090_Transform_STAGE_RECEIPTS This job loads the stage table RECEIPTS. This stage table stores the receipt details for the purchase orders raised and it is populated from the SAP tables that store material documents & purchase order tables.
This job uses the following inputs: R3Mirror.MKPF R3Mirror.MSEG R3Mirror.EKKO
This job creates the following output: SPO_STAGE.RECEIPTS
spoadpt_T0002100_Transform_STAGE_ROUTE_X_ITEM This job loads the stage table ROUTE_X_ITEM. As SAP does not store the route item details in the format required by SAS Service Parts Optimization, the stage table is derived from the purchase order table.
This job uses the following input: SPOInter.route_from_po
This job creates the following output: SPO_STAGE.ROUTE_X_ITEM
spoadpt_T0002110_Transform_STAGE_BACK_ORDER_SUMMARY This job loads the stage table ROUTE_X_ITEM. As SAP does not store the route item details in the format required by SAS Service Parts Optimization, the stage table is derived from the purchase order table.
This job uses the following inputs: R3Mirror.VBUK R3Mirror.VBUP R3Mirror.LIPS
This job creates the following output: SPO_STAGE.BACK_ORDER_SUMMARY
7 Load Jobs
Load Jobs ..................................................................................................................................................... 60 Load Job Group: L0000 Initialization ........................................................................................................ 60
spoadpt_L0000_Create_non_SAP_Tables ........................................................................................... 60 Load Job Group: L0001 Load Group 1 SDL Tables ................................................................................... 60
spoadpt_L0001010_Load_SDL_ITEM_CATEGORY .......................................................................... 60 spoadpt_L0001020_Load_SDL_ROUTE_TYPE_REF ........................................................................ 61 spoadpt_L0001030_Load_SDL_LOOKUP_MASTER ......................................................................... 61 spoadpt_L0001040_Load_SDL_LOCATION ...................................................................................... 61
Load Job Group: L0002 Load Group 2 SDL Tables ................................................................................... 61 spoadpt_L0002010_Load_INTER_EMPLOYEE ................................................................................. 61 spoadpt_L0002020_Load_INTER_ORGANIZATION ........................................................................ 62 spoadpt_L0002030_Load_SDL_EMPLOYEE ..................................................................................... 62 spoadpt_L0002040_Load_SDL_ORGANIZATION ............................................................................. 62 spoadpt_L0002050_Load_SDL_ITEM ................................................................................................ 63 spoadpt_L0002060_Load_SDL_LOOKUP_DETAIL ........................................................................... 63
Load Job Group: L0003 Load Group 3 SDL Tables ................................................................................... 63 spoadpt_L0003010_Load_SDL_BOM ................................................................................................. 63 spoadpt_L0003020_Load_SDL_CUSTOMER ..................................................................................... 64 spoadpt_L0003030_Load_SDL_FACILITY ......................................................................................... 64 spoadpt_L0003040_Load_SDL_ITEM_PRICE ................................................................................... 64 spoadpt_L0003050_Load_SDL_VENDOR .......................................................................................... 65
Load Job Group: L0004 Load Group 4 SDL Tables ................................................................................... 65 spoadpt_L0004010_Load_SDL_CUSTOMER_ORDER ...................................................................... 65 spoadpt_L0004020_Load_SDL_FACILITY_X_ITEM ......................................................................... 65 spoadpt_L0004030_Load_SDL_PURCHASE_ORDER ...................................................................... 66 spoadpt_L0004040_Load_SDL_ROUTE ............................................................................................. 66 spoadpt_L0004050_Load_SDL_TIME_PERIOD ................................................................................ 67 spoadpt_L0004060_Load_SDL_VENDOR_FACILITY_ITEM ........................................................... 67
Load Job Group: L0005 Load Group 5 SDL Tables ................................................................................... 67 spoadpt_L0005010_Load_SDL_BACK_ORDER_SUMMARY ............................................................ 67 spoadpt_L0005020_Load_SDL_DISPATCH ....................................................................................... 68 spoadpt_L0005030_Load_SDL_FACILITY_ITEM_DEMAND........................................................... 68 spoadpt_L0005040_Load_SDL_FACILITY_ITEM_INVENTORY ..................................................... 69 spoadpt_L0005050_Load_SDL_PIPELINE_INVENTORY ................................................................ 69 spoadpt_L0005060_Load_SDL_RECEIPTS ....................................................................................... 70 spoadpt_L0005070_Load_SDL_ROUTE_X_ITEM ............................................................................. 70
Loading Tables with Non SAP Data ........................................................................................................... 70 FORECAST_GROUP ........................................................................................................................... 71
spoadpt_L0006010_Load_SDL_ FORECAST_GROUP .............................................................. 72 Network_Model .................................................................................................................................... 72
spoadpt_L0006020_Load_SDL_NETWORK_MODEL ................................................................ 73 Item_Substitute .................................................................................................................................... 73
spoadpt_L0006030_Load_SDL_ITEM_SUBSTITUTE ............................................................... 73 ITEM_SUCCESSION .......................................................................................................................... 74
spoadpt_L0006040_Load_SDL_ITEM_SUCCESSION .............................................................. 74 Route and Route_X_Item ..................................................................................................................... 74 FACILITY_ITEM_IND_VARIABLE ................................................................................................... 75
spoadpt_L0006050_Load_SDL_FACILITY_ITEM_IND_VARIABLE ........................................ 75 NETWORK_X_ROUTE ........................................................................................................................ 76
spoadpt_L0006060_Load_SDL_NETWORK_X_ROUTE ............................................................ 76 spoadpt_L0006070_Load_SDL_FACILITY_ITEM_X_NETWORK ............................................ 77
FORECAST_GROUP_ITEM_DETAIL ............................................................................................... 78 spoadpt_L0006080_Load_SDL_FORECAST_GROUP_ITEM_DETAIL .................................... 78
C H A P T E R
60 Load Job Group: L0001 Load Group 1 SDL Tables Chapter 7
Load Jobs The SAS Service Parts Optimization Adapter for SAP uses several jobs that load the SDL data from the staging tables mentioned in the previous chapter. The SDL load jobs are grouped in accordance with the loading wave sequence to maintain the integrity between the SDL tables. The subsequent sections provide an overview of these jobs.
Load Job Group: L0000 Initialization
spoadpt_L0000_Create_non_SAP_Tables The stage tables created in this job are not available in SAP and hence this initialization job is provided to create physical structure of these stage tables in the Stage library.
At the implementation site, the implementation consultant needs to generate these stage tables as per customer requirement.
This job creates the following output: SPO_Stage.FORECAST_GROUP SPO_Stage.NETWORK_MODEL SPO_Stage.ITEM_SUBSTITUTE SPO_Stage.ITEM_SUCCESSION SPO_Stage.FACILITY_ITEM_IND_VARIABLE SPO_Stage.FORECAST_GROUP_ITEM_DETAIL SPO_Stage.Network_X_Route
Load Job Group: L0001 Load Group 1 SDL Tables
spoadpt_L0001010_Load_SDL_ITEM_CATEGORY This job loads the ITEM_CATEGORY SDL table. The ITEM CATEGORY and HIERARCHICAL retained keys are generated with the help of SCD TYPE 2 transform and an intermediate temporary table is created in the SPOINTER library.
This job uses the following input: SPO_Stage.ITEM_CATEGORY
This job creates the following output: SPOSDL.ITEM_CATEGORY
Load Jobs Load Job Group: L0002 Load Group 2 SDL Tables 61
spoadpt_L0001020_Load_SDL_ROUTE_TYPE_REF This job loads the ROUTE_TYPE_REF SDL table. ROUTE_TYPE_NO is generated with the help of SCD TYPE 2 transform and an intermediate temporary table is created in the SPOINTER library.
This job uses the following input: SPO_Stage.ROUTE_TYPE_REF
This job creates the following output: SPOSDL.ROUTE_TYPE_REF
spoadpt_L0001030_Load_SDL_LOOKUP_MASTER This job loads the LOOKUP_MASTER SDL table. PROCESSED_DTTM is calculated, and the load update or insert load strategy is used to populate this table.
This job uses the following input: SPO_Stage.LOOKUP_MASTER
This job creates the following output: SPOSDL.LOOKUP_MASTER
spoadpt_L0001040_Load_SDL_LOCATION This job loads the LOCATION SDL table. The LOCATION and HIERARCHICAL retained keys are generated with the help of SCD TYPE 2 transform and an intermediate temporary table is created in the SPOINTER library.
This job uses the following input: SPO_Stage.LOCATION
This job creates the following output: SPOSDL.LOCATION SPOError.LOCATION_LKUP_EXC
Load Job Group: L0002 Load Group 2 SDL Tables
spoadpt_L0002010_Load_INTER_EMPLOYEE This job is required, as EMPLOYEE and ORGANIZATION SDL tables have interrelated information (organization and employee), and it is necessary to keep this Inter_EMPLOYEE Temporary table loaded in the SPOINTER library. The appropriate location retained key is populated from the LOCATION SDL table by looking up LOCATION_ID of the stage table. If the lookup value is not found, then the record is added to the Exception table EMPLOYEE_SCR_EXC in the SPOINTER library.
This job uses the following input: SPO_Stage.EMPLOYEE SPODSL.LOCATION
62 Load Job Group: L0002 Load Group 2 SDL Tables Chapter 7
This job creates the following outputs: SPOInter.Inter_EMPLOYEE SPOError.INTER_EMPLOYEE_LKUP_EXC
spoadpt_L0002020_Load_INTER_ORGANIZATION This job is required, as EMPLOYEE and ORGANIZATION SDL tables have interrelated information (organization and employee), and it is necessary to maintain this Inter_ORGANIZATION Temporary table loaded in the SPOINTER library. The appropriate location retained key is populated from the LOCATION SDL table by looking up LOCATION_ID of the stage table. If the lookup value is not found, then the record is added to the Exception table ORGANIZATION_SCR_EXC in the SPOINTER library.
This job uses the following input: SPO_Stage.ORGANIZATION SPODSL.LOCATION
This job creates the following outputs: SPOInter.Inter_ORGANIZATION SPOError. INTER_ORGANIZATION_LKUP_EXC
spoadpt_L0002030_Load_SDL_EMPLOYEE This job loads the EMPLOYEE SDL table. The appropriate organization retained key is populated from the Inter_ORGANIZATION SPOINTER table by looking up ORG_ID of the employee SPOINTER table. If the lookup value is not found, then the record is added to the Exception table EMPLOYEE_EXC in the SPOINTER library. EMPLOYEE retained key is generated with the help of the SCD TYPE 2 transform.
This job uses the following input: SPOInter.Inter_EMPLOYEE SPOInter.Inter_ORGANIZATION
This job creates the following outputs: SPOSDL.EMPLOYEE SPOError.EMPLOYEE_LKUP_EXC
spoadpt_L0002040_Load_SDL_ORGANIZATION This job loads the ORGANIZATION SDL table. The appropriate EMPLOYEE retained key is populated from the SPOSDL EMPLOYEE table by looking up EMPLOYEE_ID of the ORGANIZATION SPOINTER table. If the lookup value is not found then the record is added to the Exception table ORGANIZATION_EXC in the SPOINTER library. ORGANIZATION and HIERARCHICAL retained keys are generated with the help of SCD TYPE 2 and lookup transforms.
This job uses the following input: SPOInter.Inter_ORGANIZATION SPOInter.Inter_EMPLOYEE
Load Jobs Load Job Group: L0003 Load Group 3 SDL Tables 63
This job creates the following outputs: SPOSDL.ORGANIZATION SPOError.ORGANIZATION_LKUP_EXC
spoadpt_L0002050_Load_SDL_ITEM This job loads the ITEM SDL table. ITEM retained key is generated with the help of the SCD TYPE 2 transform, and an intermediate temporary table is created in the SPOINTER library. The appropriate ITEM_CATEGORY retained key is populated from the ITEM_CATEGORY SDL table by looking up ITEM_CATEGORY_ID of the stage table. If the lookup value is not found, then the record is added to the Exception table ITEM_SCR_EXC in the SPOINTER library.
This job uses the following input: SPO_Stage.ITEM SPOInter.Inter_ITEM_CATEGORY
This job creates the following outputs: SPOSDL.ITEM SPOError.ITEM_LKUP_EXC
spoadpt_L0002060_Load_SDL_LOOKUP_DETAIL This job loads the LOOKUP_DETAIL SDL table. PROCESSED_DTTM is calculated with the help of the SCD TYPE 2 transform.
This job uses the following input: SPO_Stage.LOOKUP_DETAIL
This job creates the following output: SPOSDL.LOOKUP_DETAIL
Load Job Group: L0003 Load Group 3 SDL Tables
spoadpt_L0003010_Load_SDL_BOM This job loads the BOM SDL table. ITEM retained key is generated with the help of the SCD TYPE 2 transform, and an intermediate temporary table is created in the SPOINTER library. The appropriate PARENT_ITEM and CHILD_ITEM retained keys are populated from the ITEM SDL table by looking up PARENT_ITEM_ID and CHILD_ITEM_ID of the BOM stage table. If the lookup value is not found, then the record is added to the Exception table BOM_EXC in the SPOINTER library.
This job uses the following input: SPO_Stage.BOM SPOSDL.ITEM
This job creates the following outputs: SPOSDL.BOM SPOError.BOM_LKUP_EXC
64 Load Job Group: L0003 Load Group 3 SDL Tables Chapter 7
spoadpt_L0003020_Load_SDL_CUSTOMER This job loads the CUSTOMER SDL table. The appropriate ORGANIZATION retained key is populated from the Inter_ORGANIZATION SPOINTER table by looking up ORG_ID of the CUSTOMER SPOINTER table. If the lookup value is not found, then the record is added to the Exception table CUSTOMER_EXC in the SPOINTER library. CUSTOMER retained key is generated with the help of the SCD TYPE 2 transform.
This job uses the following input: SPO_Stage.CUSTOMER SPOInter.Inter_ORGANIZATION
This job creates the following outputs: SPOSDL.CUSTOMER SPOError.CUSTOMER_LKUP_EXC
spoadpt_L0003030_Load_SDL_FACILITY This job loads the FACILITY SDL table. FACILITY retained key is generated with the help of the SCD TYPE 2 transform. The appropriate LOCATION and ORGANIZATION retained key are populated from the LOCATION SDL and Inter_ORGANIZATION SPOINTER table by looking up LOCATION_ID and ORGANIZATION_ID of the FACILITY stage table respectively. If the lookup value is not found, then the record is added to the Exception table FACILITY_EXC in the SPOINTER library.
This job uses the following input: SPO_Stage.FACILITY SPOInter.Inter_ORGANIZATION SPODSL.LOCATION
This job creates the following output: SPOSDL.FACILITY SPOError.FACILITY_LKUP_EXC
spoadpt_L0003040_Load_SDL_ITEM_PRICE This job loads the ITEM_PRICE SDL table. ITEM_PRICE retained key is generated with the help of the SCD TYPE 2 transform, and an intermediate temporary table is created in the SPOINTER library. The appropriate ITEM retained key is populated from the ITEM SDL table by looking up ITEM_ID of the ITEM_PRICE stage table. If the lookup value is not found, then the record is added to the Exception table ITEM_PRICE_SCR_EXC in the SPOINTER library.
This job uses the following input: SPO_Stage.ITEM_PRICE SPODSL.ITEM
This job creates the following outputs: SPOSDL.ITEM_PRICE SPOError.ITEM_PRICE_LKUP_EXC
Load Jobs Load Job Group: L0004 Load Group 4 SDL Tables 65
spoadpt_L0003050_Load_SDL_VENDOR This job loads the VENDOR SDL table. The appropriate ORGANIZATION retained key is populated from the Inter_ORGANIZATION SPOINTER table by looking up ORG_ID of the VENDOR stage table. If the lookup value is not found, then the record is added to the Exception table VENDOR_EXC in the SPOINTER library. VENDOR retained key is generated with the help of the SCD TYPE 2 transform.
This job uses the following input: SPO_Stage.VENDOR SPOInter.Inter_ORGANIZATION
This job creates the following output: SPOSDL.VENDOR SPOError.VENDOR_LKUP_EXC
Load Job Group: L0004 Load Group 4 SDL Tables
spoadpt_L0004010_Load_SDL_CUSTOMER_ORDER This job loads the CUSTOMER_ORDER SDL table. The appropriate ITEM and FACILITY retained keys are populated from the ITEM and FACILITY SDL tables by looking up ITEM_ID and FACILITY_ID of the CUSTOMER_ORDER stage table respectively. If the lookup values are not found, then the records are added to the Exception table CUTOMER_ORDER_TO_EXC in the SPOINTER library. CUSTOMER_ORDER retained key is generated with the help of the Surrogate Key Generator transform.
This job uses the following input: SPO_Stage.CUSTOMER_ORDER SPODSL.ITEM SPOSDL.FACILITY
This job creates the following output: SPOSDL.CUSTOMER_ORDER SPOError.CUSTOMER_ORDER_LKUP_EXC1 SPOError.CUSTOMER_ORDER_LKUP_EXC2
spoadpt_L0004020_Load_SDL_FACILITY_X_ITEM This job loads the FACILITY_X_ITEM SDL table. PROCESSED_DTTM is calculated with the help of SCD TYPE 2 transform. The appropriate ITEM, FACILITY, and EMPLOYEE retained key are populated from the ITEM, FACILITY, and EMPLOYEE SDL table by looking up ITEM_ID, FACILITY_ID, and EMPLOYEE_ID of the FACILITY_X_ITEM stage table respectively. If the lookup value is not found, then the record is added to the Exception table FACILITY_X_ITEM_EXC in the SPOINTER library.
66 Load Job Group: L0004 Load Group 4 SDL Tables Chapter 7
This job uses the following input: SPO_Stage.FACILITY_X_ITEM SPODSL.ITEM SPOSDL.FACILITY SPOSDL.EMPLOYEE
This job creates the following output: SPOSDL.FACILITY_X_ITEM SPOError.FACILITY_X_ITEM_LKUP_EXC
spoadpt_L0004030_Load_SDL_PURCHASE_ORDER This job loads the PURCHASE_ORDER SDL table. The appropriate ITEM, FACILITY, and VENDOR retained keys are populated from the ITEM, FACILITY, and VENDOR SDL tables by looking up ITEM_ID, FACILITY_ID, and VENDOR_ID of the PURCHASE_ORDER stage table respectively. If the lookup values are not found, then the records are added to the Exception tables PURCHASE_ORDER_LKUP_EXC1 and PURCHASE_ORDER_LKUP_EXC1 in the SPOError library. PURCHASE_ORDER retained key is generated with the help of the Surrogate Key Generator transform.
This job uses the following input: SPO_Stage.PURCHASE_ORDER SPODSL.ITEM SPOSDL.FACILITY SPOSDL.VENDOR
This job creates the following output: SPOSDL.PURCHASE_ORDER SPOError.PURCHASE_ORDER_LKUP_EXC1 SPOError.PURCHASE_ORDER_LKUP_EXC2
spoadpt_L0004040_Load_SDL_ROUTE This job loads the ROUTE SDL table. Route retained key is generated with the help of the SCD TYPE 2 transform, and an intermediate temporary table is created in the SPOINTER library. The appropriate SHIPPED_FROM_FACILITY, DELIVERED_TO_FACILITY retained keys are populated from the FACILITY SDL table. The column ROUTE_TYPE_NO is populated from the SPOInter_ROUTE_TYPE_REF table by looking up the columns SHIPPED_FROM_FACILITY_ID, DELIVERED_TO_FACILITY_ID, and ROUTE_TYPE_ID of the stage table respectively. If the lookup value is not found, then the record is added to the Exception table ROUTE_SCR_EXC in the SPOError library.
This job uses the following input: SPO_Stage.ROUTE SPOSDL.FACILITY SPOInter.Inter_ROUTE_TYPE_REF
This job creates the following output: SPOSDL.ROUTE SPOError.ROUTE_LKUP_EXC
Load Jobs Load Job Group: L0005 Load Group 5 SDL Tables 67
spoadpt_L0004050_Load_SDL_TIME_PERIOD This job loads the TIME_PERIOD SPOINTER table. TIME_PERIOD retained key is generated with the help of the SCD TYPE 2 transform. This table is loaded on a temporary basis to load the further SDL tables where TIME_PERIOD_RK is required.
This job uses the following input: SPO_Stage.TIME_PERIOD
This job creates the following output: SPOSDL.TIME_PERIOD
spoadpt_L0004060_Load_SDL_VENDOR_FACILITY_ITEM This job loads the VENDOR_FACILITY_ITEM SDL table. The appropriate ITEM, FACILITY, and VENDOR retained keys are populated from the ITEM, FACILITY, and VENDOR SDL tables by looking up the columns ITEM_ID, VENDOR_ID, and FACILITY_ID of the VENDOR_FACILITY_ITEM stage table respectively. If the lookup values are not found, then the records are added to the Exception table VENDOR_FACILITY_EXC in the SPOINTER library.
This job uses the following input: SPO_Stage.VENDOR_FACILITY_ITEM SPODSL.ITEM SPOSDL.FACILITY SPOSDL.VENDOR
This job creates the following output: SPOSDL.VENDOR_FACILITY_ITEM SPOError.VENDOR_FACILITY_ITEM_LKUP_EXC
Load Job Group: L0005 Load Group 5 SDL Tables
spoadpt_L0005010_Load_SDL_BACK_ORDER_SUMMARY This job loads the BACK_ORDER_SUMMARY SDL table. The appropriate ITEM, FACILITY, CUSTOMER, and TIME_PERIOD retained keys are populated from the ITEM, FACILITY, CUSTOMER, and Inter_TIME_PERIOD tables by looking up the columns ITEM_ID, FACILITY_ID, CUSTOMER_ID, and TIME_PERIOD_ID of the STAGE BACK_ORDER_SUMMARY table respectively. If the lookup values are not found, then the records are added to the Exception table BACK_ORDER_SUMMARY_EXC in the SPOINTER library. BACK_ORDER_SUMMARY_ERR is also maintained for TIME_PERIOD_RK.
This job uses the following input: SPO_Stage.BACK_ORDER_SUMMARY SPODSL.ITEM SPOSDL.FACILITY SPOSDL.CUSTOMER SPOSDL.TIME_PERIOD
68 Load Job Group: L0005 Load Group 5 SDL Tables Chapter 7
This job creates the following output: SPOSDL.BACK_ORDER_SUMMARY SPOError.BACK_ORDER_SUMMARY_EXC
spoadpt_L0005020_Load_SDL_DISPATCH This job loads the DISPATCH SDL table. The appropriate ITEM and CUSTOMER_ORDER retained keys are populated from the ITEM and CUSTOMER_ORDER SDL tables by looking up the columns ITEM_ID and CUSTOMER_ORDER_ID of the DISPATCH stage table respectively. If the lookup values are not found, then the records are added to the Exception table DISPATCH_EXC in the SPOINTER library. DISPATCH retained key is generated with the help of the Surrogate Key Generator transform.
This job uses the following input: SPO_Stage.DISPATCH SPOSDL.CUSTOMER SPODSL.ITEM
This job creates the following output: SPOSDL.DISPATCH SPOError.DISPATCH_LKUP_EXC
spoadpt_L0005030_Load_SDL_FACILITY_ITEM_DEMAND This job loads the FACILITY_ITEM_DEMAND SDL table. FACILITY_ITEM_DEMAND retained key is generated with the help of the Surrogate Key Generator transform, and an intermediate temporary table is created in SPOINTER library. The appropriate FACILITY, TO_FACILITY retained key are populated from the FACILITY SDL table and ITEM, CUSTOMER, TIME_PERIOD retained key are populated from ITEM SDL, CUSTOMER SDL and Inter_TIME_PERIOD SPOINTER table by looking up the columns FACILITY_ID, TO_FACILITY_ID, ITEM_ID, CUSTOMER_ID, and DATE of the FACILITY_ITEM_DEMAND stage table respectively. If the lookup value is not found, then the record is added to the Exception table FACILITY_ITEM_DEMAND_SCR_EXC in the SPOINTER library.
This job uses the following input: SPO_Stage.FACILITY_ITEM_DEMAND SPODSL.ITEM SPOSDL.FACILITY SPOSDL.CUSTOMER SPOSDL.TIME_PERIOD
This job creates the following output: SPOSDL.FACILITY_ITEM_DEMAND SPOError.FACILITY_ITEM_DEMAND_LKUP_EXC
Load Jobs Load Job Group: L0005 Load Group 5 SDL Tables 69
spoadpt_L0005040_Load_SDL_FACILITY_ITEM_INVENTORY This job loads FACILITY_ITEM_INVENTORY SDL table. The appropriate ITEM, FACILITY, and TIME_PERIOD retained keys are populated from the ITEM, FACILITY SDL table and Inter_TIME_PERIOD SPOINTER tables by looking up the columns ITEM_ID, FACILITY_ID, and DATE of FACILITY_ITEM_INVENTORY stage table respectively. If the lookup value is not found, then the record is added to the Exception table FACILITY_ITEM_INVENTORY_EXC in the SPOINTER library.
This job uses the following input: SPO_Stage.FACILITY_ITEM_INVENTORY SPODSL.ITEM SPOSDL.FACILITY SPOSDL.TIME_PERIOD
This job creates the following output: SPOSDL.FACILITY_ITEM_INVENTORY SPOError. FACILITY_ITEM_INVENTORY_LKUP_EXC
spoadpt_L0005050_Load_SDL_PIPELINE_INVENTORY This job loads the PIPELINE_INVENTORY SDL table. PIPELINE_INVENTORY retained key is generated with the help of SCD TYPE 2 transform and an intermediate temporary table is created in SPOINTER library. The appropriate FROM_FACILITY, FACILITY retained keys are populated from the FACILITY SDL table. The ITEM, VENDOR, and TIME_PERIOD retained keys are populated from ITEM SDL, VENDOR, Inter_TIME_PERIOD SPOINTER tables by looking up the columns FROM_FACILITY_ID, FACILITY_ID, ITEM_ID, VENDOR_ID, and DATE of the PIPELINE_INVENTORY stage table respectively. If the lookup value is not found then the record is added to the Exception table PIPELINE_INVENTORY_SCR_EXC in the SPOINTER library.
This job uses the following input: SPO_STAGE.PIPELINE_INVENTORY SPODSL.ITEM SPOSDL.TIME_PERIOD SPOSDL.FACILITY SPOSDL.VENDOR
This job creates the following output: SPOSDL.PIPELINE_INVENTORY SPOError. PIPELINE_INVENTORY_LKUP_EXC
70 Loading Tables with Non SAP Data Chapter 7
spoadpt_L0005060_Load_SDL_RECEIPTS This job loads the RECEIPTS_SDL table. The appropriate ITEM and PURCHASE_ORDER retained keys are populated from the ITEM and PURCHASE_ORDER SDL tables by looking up the columns ITEM_ID and PURCHASE_ORDER_ID of the RECEIPTS stage table respectively. If the lookup values are not found then the records are added to the Exception table RECEIPTS_EXC in the SPOINTER library. RECEIPTS retained key is generated with the help of the Surrogate Key Generator transform.
This job uses the following input: SPO_STAGE.RECEIPTS SPODSL.ITEM SPODSL.PURCHASE_ORDER
This job creates the following output: SPOSDL.RECEIPTS SPOError.RECEIPTS_LKUP_EXC
spoadpt_L0005070_Load_SDL_ROUTE_X_ITEM This job loads the ROUTE_X_ITEM SDL table. The appropriate ITEM retained key is populated from the ITEM SDL table by looking up ITEM_ID of the ROUTE_X_ITEM stage table. If the lookup value is not found then the record is added to the Exception table ROUTE_X_ITEM_EXC in the SPOINTER library. ROUTE retained key is generated with the help of SCD TYPE 2 and a temporary table Inter_ROUTE_X_ITEM is created in the SPOINTER Library.
This job uses the following input: SPO_STAGE. ROUTE_X_ITEM SPODSL.ITEM
This job creates the following output: SPOSDL.ROUTE_X_ITEM SPOError. ROUTE__X_ITEM_LKUP_EXC
Loading Tables with Non SAP Data Some of the SDL tables required by the SAS Service Parts Optimization solution might not be available in SAP. Hence, certain tables need to be manually generated at the implementation site. The following section describes these tables.
Load Jobs Loading Tables with Non SAP Data 71
FORECAST_GROUP The forecast group details cannot be provided by SAP, so the customer has to manually enter this information into Microsoft Excel. Therefore, the customer should enter the data in the following Microsoft Excel format, which is similar to FORECAST_GROUP Table Stage structure:
Column Name Data Type Length Label
FORECAST_GROUP_CD Character 10 Forecast Group
LANGUAGE_CD Character 10 Language
GROUP_NM Character 40 Group Name
GROUP_DESC Character 255 Group Description
TIME_HIERARCHY_LEVEL_NO Numeric 8 Time Hierarchy Level Number
TIME_HIERARCHY_LEVEL_DESC Character 255 Time Hierarchy Level Description
FORECAST_HORIZON_NO Numeric 8 Forecast Horizon Number
MAX_CLUSTERS_NO Numeric 8 Maximum number of clusters to be created
FCST_SERIES_NO Numeric 8 Number of forecast series that will be stored in the database
FCST_SERIES_DISP_NO Numeric 8
Number of best forecast series based on MSE to be displayed for user selection
OUTLIER_MAVG_PERIOD Numeric 8 Moving average period for detecting outliers
OUTLIER_COEFFICIENT_NO Numeric 8 Coefficient for detecting outliers
ADJUST_FCST_FLG Character 1 Adjust Forecast Flag
BASS_MODEL_HIST_PERIOD Numeric 8
Minimum number of period’s history required for fitting Bass model
EFFECTIVE_FROM_DTTM Numeric 8 Effective From Datetime
EFFECTIVE_TO_DTTM Numeric 8 Effective To Datetime
The above data should be loaded in the STAGE FORECAST_GROUP table. This can be done in following two ways: through a SAS window through SAS code
To load the data through a SAS window:
1. Create a table in Microsoft Excel with the above column names and add the data as required.
2. Import the data with the help of the Import option available in the File tab.
3. The library provided should be SPO_Stage. However, if the import has already been completed in the Work library, then copy the data sets into the SPO_Stage library.
72 Loading Tables with Non SAP Data Chapter 7
To load the data through SAS code, use the following SAS code:
PROC IMPORT OUT= SPO_Stage.table_name DATAFILE= "filepath\excel_name.xlsx";
RUN;
This script also creates SAS data set from the Microsoft Excel data at the required location.
Note: Except for GROUP_NM, GROUP_DESC, TIME_HIERARCHY_LEVEL_DESC, EFFECTIVE_FROM_DTTM, and EFFECTIVE_TO_DTTM, all fields are mandatory.
Once this information is provided by the customer in the staging table, Staging to SDL job is provided to load the SDL FORECAST_GROUP.
spoadpt_L0006010_Load_SDL_ FORECAST_GROUP This job loads the FORECAST_GROUP SDL table. VALID_FROM and VALID_TO are generated with the help of the SCD TYPE 2 transform.
This job uses the following input: SPO_Stage.FORECAST_GROUP
This job creates the following output: SPOSDL.FORECAST_GROUP
Network_Model This table contains information that cannot be provided by SAP. Therefore, the customer should enter the data in the following Microsoft Excel format, which is similar to the NETWORK_MODEL Table Stage structure:
Column Name Data Type Length Label
NETWORK_MODEL_ID Character 32 Network Model Identifier
NETWORK_MODEL_NM Character 40 Network Model Name
BASE_PERIOD_FLG Character 1 Base Period Indicator
LAST_CHANGE_DATE_TIME Numeric 8 Last Changed Date Time
SOURCE_SYSTEM_CD Character 10 Source System
NETWORK_START_DTTM Numeric 8 Network Start Datetime
NETWORK_CLOSE_DTTM Numeric 8 Network Close Datetime
IRP_HORIZON_NO Numeric 8 IRP Horizon Number
The process to load the data to SAS data sets is explained here.
Note: NETWORK_MODEL_NM and NETWORK_MODEL_ID should be unique. The Base Period Flag should be recognizable as compared to the global parameter present in the control table and is a mandatory column.
Load Jobs Loading Tables with Non SAP Data 73
spoadpt_L0006020_Load_SDL_NETWORK_MODEL This job loads the NETWORK_MODEL SDL table. NETWORK_MODEL_RK is generated with the help of the SCD TYPE 2 transform and an intermediate temporary table is created in the SPOINTER library.
This job uses the following input: SPO_Stage.NETWORK_MODEL
This job creates the following output: SPOSDL.NETWORK_MODEL
Item_Substitute Along with network, the exact relation of item and its substitute is not available in SAP. Therefore, the customer should enter the data in the following Microsoft Excel format, which is similar to ITEM_SUBSTITUTE Table Stage structure:
Column Name Data Type Length Label
ITEM_SUBSTITUTE_ID Character 32 Item Substitute. Retained Surrogate Key For Item
ITEM_ID Character 32 Retained Surrogate Key For Item
NETWORK_MODEL_ID Character 32 Retained Surrogate Key For Network Model
PRIORITY_LEVEL_NO Numeric 8 Priority Level Number
EFFECTIVE_FROM_DTTM Numeric 8 Effective From Datetime
EFFECTIVE_TO_DTTM Numeric 8 Effective To Datetime
The process to load the data to SAS data sets is explained here.
Note: Combination of ITEM_SUBSTITUTE_ID, ITEM_ID, and NETWORK_MODEL_ID should be unique.
spoadpt_L0006030_Load_SDL_ITEM_SUBSTITUTE This job loads the ITEM_SUBSTITUTE SDL table. NETWORK_MODEL_RK, ITEM_RK, and ITEM_SUBSTITUTE_RK will be populated from the respective intermediate or stage tables by looking up their ID columns.
This job uses the following input: SPO_Stage.ITEM_SUBSTITUTE SPOInter.Inter_NETWORK_MODEL SPODSL.ITEM
This job creates the following output: SPOSDL.ITEM_SUBSTITUTE
74 Loading Tables with Non SAP Data Chapter 7
ITEM_SUCCESSION Along with network, the exact relation of item and its succession is not available in SAP. Therefore, the customer should enter the data in the following Microsoft Excel format, which is similar to Item Succession Table Stage structure:
Column Name Data Type Length Label
NETWORK_MODEL_ID Character 32 Retained Surrogate Key For Network Model
ITEM_ID Character 32 Retained Surrogate Key For Item
NEXT_ITEM_ID Character 32 Next Item. Retained Surrogate Key For Item
INVENTORY_EXISTS_FLG Character 1 Inventory Exists Indicator
EFFECTIVE_FROM_DTTM Numeric 8 Effective From Datetime
EFFECTIVE_TO_DTTM Numeric 8 Effective To Datetime
The process to load the data to SAS data sets is explained here.
Note: Combination of NEXT_ITEM_ID, ITEM_ID, and NETWORK_MODEL_ID should be unique.
spoadpt_L0006040_Load_SDL_ITEM_SUCCESSION This job loads the ITEM_SUCCESSION SDL table. NETWORK_MODEL_RK, ITEM_RK, and NEXT_ITEM_RK will be populated from the respective intermediate or stage tables by looking up their ID columns.
This job uses the following input: SPO_Stage.ITEM_SUCCESSION SPOInter.Inter_NETWORK_MODEL SPODSL.ITEM
This job creates the following output: SPOSDL.ITEM_SUCCESSION
Route and Route_X_Item If the customer wants to load any extra route information, then the stage tables STAGE ROUTE and STAGE ROUTE_X_ITEM will be updated accordingly. Once new route information is added to the stage tables, the jobs spoadpt_L0004040_Load_SDL_ROUTE and spoadpt_L0005060_Load_SDL_ROUTE_X_ITEM should be run to reflect the changes.
Load Jobs Loading Tables with Non SAP Data 75
FACILITY_ITEM_IND_VARIABLE As the independent variable values are customer-related information, these are not available in SAP. Therefore, the customer should enter the data in the following Microsoft Excel format, which is similar to FACILITY_ITEM_IND_VARIABLE Table Stage structure:
Column Name Data Type Length Label
FACILITY_ID Character 32 Retained Surrogate Key For Facility
ITEM_ID Character 32 Retained Surrogate Key For Item
DATE Character 32 Retained Surrogate Key For Time Period
IND_VAR1 Numeric 8 Mean Time Between Failure Value
IND_VAR2 Numeric 8 Service Call Value
IND_VAR3 Numeric 8 Item Price Value
IND_VAR4 Numeric 8 Item Price Discount Value
IND_VAR5 Numeric 8 Total Installed Parent Product Value
START_DT Numeric 8 Start Date In The Given Period
The process to load the data to SAS data sets is explained here.
Note: Combination of FACILITY_ID, ITEM_ID, and DATE should be unique.
spoadpt_L0006050_Load_SDL_FACILITY_ITEM_IND_VARIABLE This job loads the FACILITY_ITEM_IND_VARIABLE SDL table. FACILITY_ID and ITEM_ID columns along with the date column are looked up in the SDL tables to get their respective retained keys.
This job uses the following input: SPO_Stage.FACILITY_ITEM_IND_VARIABLE SPODSL.FACILITY SPODSL.ITEM SPODSL.TIME_PERIOD
This job creates the following output: SPOSDL.FACILITY_ITEM_IND_VARIABLE
76 Loading Tables with Non SAP Data Chapter 7
NETWORK_X_ROUTE Along with network, the exact relation of network and route are not available in SAP. Therefore, the customer should enter the data in the following Microsoft Excel format, which is similar to NETWORK_X_ROUTE Table Stage structure:
Column Name Data Type Length Label
NETWORK_MODEL_ID Character 32 Network Model ID. Retained Surrogate Key For Network
SHIPPED_FROM_FACILITY_ID Character 32 Shipped From Facility. Retained Surrogate Key For Facility
DELIVERED_TO_FACILITY_ID Character 32 Delivery To Facility. Retained Surrogate Key For Facility
PRIMARY_ROUTE_FLG Character 1 Primary Route Indicator
TRANSPORT_LEG_FLG Character 1 Transport Leg Indicator
The process to load the data to SAS data sets is mentioned here. Once this information is provided by the customer in the staging table, staging to SDL job is provided to load the SDL NETWORK_X_ROUTE.
Note: Combination of NETWORK_MODEL_ID, SHIPPED_FROM_FACILITY_ID, and DELIVERED_TO_FACILITY_ID should be unique. PRIMARY_ROUTE_FLG is required.
spoadpt_L0006060_Load_SDL_NETWORK_X_ROUTE This job loads the NETWORK_X_ROUTE SDL table. NETWORK_MODEL_RK and ROUTE_RK will be populated from the respective intermediate or stage tables by looking up their ID columns.
This job uses the following input: SPO_Stage.NETWORK_X_ROUTE SPO_Inter.Inter_ROUTE SPODSL.FACILITY
This job creates the following output:
SPOSDL.NETWORK_X_ROUTE
Load Jobs Loading Tables with Non SAP Data 77
FACILITY_ITEM_X_NETWORK Along with network, the exact relation of network and facility item is not available in SAP. Hence, this table is loaded with the help of other SDL tables. Though mandatory columns are populated in this table, there are some necessary Flag columns that cannot be directly populated from the source. The customer needs to manually enter this data in the SAS data sets directly.
spoadpt_L0006070_Load_SDL_FACILITY_ITEM_X_NETWORK This job loads the FACILITY_ITEM_X_NETWORK SDL table. As there is no direct relation available with the network and Item-Facility pair, these are derived from the other SDL tables.
This job uses the following input:
SPOSDL.ROUTE SPOSDL.ROUTE_X_ITEM SPOSDL.NETWORK_X_ROUTE
This job creates the following output: SPOSDL.FACILITY_ITEM_X_NETWORK
The following columns are not directly available in the SDL either. Therefore, these need to be updated manually by the customer: PRIMARY_NETWORK_FLG - mandatory FACILITY_ITEM_NETWORK_VALID_FLG - mandatory EFFECTIVE_TO_DTTM EFFECTIVE_FROM_DTTM
78 Loading Tables with Non SAP Data Chapter 7
FORECAST_GROUP_ITEM_DETAIL Along with the Forecast Group, the exact relation of the codes with the item and facility are not available in SAP. Therefore, the customer should enter the data in the following Microsoft Excel format, which is similar to FORECAST_GROUP_ITEM_DETAIL Stage structure:
Column Name Data Type Length Label
FORECAST_GROUP_CD Character 10 Forecast Group
FACILITY_ID Character 32 Retained Surrogate Key For Facility
ITEM_ID Character 32 Retained Surrogate Key For Item
The process to load the data to SAS data sets is explained here.
Note: FORECAST_GROUP_CD, FACILITY_ID, and ITEM_ID should be unique. Once this information is provided by the customer in the staging table, Staging to SDL job is provided to load the STAGE FORECAST_GROUP_ITEM_DETAIL.
spoadpt_L0006080_Load_SDL_FORECAST_GROUP_ITEM_DETAIL This job loads the FORECAST_GROUP_ITEM_DETAIL SDL table. ITEM_RK and FACILITY_RK will be populated from the respective intermediate or stage tables by looking up their ID columns.
This job uses the following input: SPO_Stage.FORECAST_GROUP_ITEM_DETAIL SPODSL.ITEM SPODSL.FACILITY
This job creates the following output: SPOSDL.FORECAST_GROUP_ITEM_DETAIL SPOError.FORECAST_GROUP_ITEM_DETAIL_LKUP_
8 Load Columns with Non SAP Data
Load Columns .............................................................................................................................................. 79
Load Columns The following columns are not populated by SAP but are mandatory in Service Parts Optimization 4.2. These should be populated during implementation in the stage tables so that the load tables are correctly populated by the SDL jobs.
Table Name Column Name Comment
ITEM REPAIRED_ITEM_ID
Items change their ID if they are refurbished or repaired. For a new (unrepaired) item, this column represents the ID of the equivalent repaired part. Hence, during implementation, the correct ID should be updated in the stage table.
ITEM REPAIRED_ITEM_FLG
If an item can be resold after repair, it has a repaired item flag. If not present in SAP, then during implementation, the correct flag should be updated in the stage table. Value should be Y or N.
FACILITY FACILITY_TYPE_CD
Currently, SAP has only two values for this field: A - Store B - Distribution Center SAS Service Parts Optimization requires valid data for this field, as the description of this field is displayed in the UI. If any more values are present for the code, then during implementation the correct values should be updated in the stage table, and the same description should be updated in the lookup table.
FACILITY_X_ITEM USE_REPAIRED_ITEM_FLG
This column contains a flag that indicates whether the repaired item is used or not for that facility-item combination. As SAP won't have this data, this column should be updated in the stage table. Value should Y or N.
FACILITY_X_ITEM HOLDING_COST_PCT
The cost is calculated as per unit holding cost of an item and is expressed as the percentage of an item cost, if the item is kept for a year. If SAP doesn't have this data, then the same should be updated in the stage table for that item-facility combination. Should be a positive number in
C H A P T E R
80 Load Columns Chapter 8
Table Name Column Name Comment
percentage format.
FACILITY_X_ITEM POLICY_TYPE_CD
This column contains a code that indicates the policy type for the facility and item pair. For example: • SS – Min-max policy • BS - Base stock policy. During implementation, the correct values should be updated in the stage table, and the same description should be updated in the lookup table.
FACILITY_X_ITEM PBR_NO
This column contains the periods before replenishment (PBR) number - an input for MIRP. This should be updated in accordance with the requirement in the stage table for that item-facility combination. (This can be missing; Service Parts Optimization handles those also.)
FACILITY_X_ITEM INTERNAL_EXTERNAL_NODE FLG
This column contains the internal external node flag that indicates whether the node supplies demand directly to the end-customers, internal facilities, or both. The possible values are: • I - Internal • E - End Customer • B - Both. Node means item and facility combination. Hence, during implementation, this should be updated in a stage table in accordance with the customer network.
FACILITY_X_ITEM KITTING_POINT_FLG
This column contains a kitting point flag that indicates whether the item bundle is bundled at this facility or not. This should be updated in accordance with the requirement in the stage table for that item-facility combination. Value should Y or N.
FACILITY_X_ITEM PENALTY_COST_PCT
This column stores the penalty cost percentage for delayed supply of one unit item at the particular facility, for the base period. This should be updated in accordance with the requirement in the stage table for that item-facility combination. Should be positive number in percentage format.
ROUTE_X_ITEM LEAD_TM_NO
This column contains the lead time (in days) that is needed for transporting an item to a facility. If SAP can't populate this, then during implementation, this data should be updated with correct days (positive integer) for that route-item combination.
ROUTE_X_ITEM LEAD_TM_MIN_NO
This column contains the minimum lead time (in days) for transporting an item to a facility. If SAP can't populate this, then during implementations, this data can be updated with correct days (positive integer) for that route-item combination. If data is not present, then it is optional to populate this field or can be same as LEAD_TM_NO.
Load Columns with Non SAP Data Load Columns 81
Table Name Column Name Comment
ROUTE_X_ITEM LEAD_TM_MAX_NO
This column contains the maximum lead time (in days) for transporting an item to a facility. If SAP can't populate this, then during implementations, this data can be updated with correct days (positive integer) for that route-item combination. If data is not present, then it is optional to populate this field or can be same as LEAD_TM_NO.
ROUTE_X_ITEM PIPELINE_COST_AMT
This column contains the transportation cost of one item in transit from the supplying facility to the receiving facility in one base period. During implementation, this data should be updated with correct amount (positive integer) for that route-item combination.
ROUTE_X_ITEM ROUTE_ITEM_VALID_FLG
This column contains a flag that indicates whether the route item is valid or not. Hence, the valid values (Y or N) should be updated in the stage table during implementation.
FACILITY_X_ITEM BATCH_SIZE_QTY
This column stores the batch size quantity, that is, the fixed order size constraint for each facility and item pair. During implementation, this data should be updated with correct quantity for that facility-item combination in the stage table.
FACILITY_X_ITEM PBR_NO
This column contains the periods before replenishment (PBR) number. During implementation, this data should be updated with the correct number (positive integer) for that facility-item combination in the stage table.
ITEM ASSEMBLY_FLG
This column stores the assembly indicator flag that indicates whether the item is an assembly or not. The possible values are: • Y - Assembly item • N - Not assembly item. During implementation, the correct flag should be updated in the item stage table.
VENDOR_FACILITY_ITEM LEAD_TM_NO
This column contains the lead time (in days) required for transporting an item to a facility. It is optional to populate this field in Service Parts Optimization 4.2 but mandatory for Service Parts Optimization 4.3.During implementation, the value of days (positive integer) should be updated in the stage table for that vendor-facility combination.
VENDOR_FACILITY_ITEM LEAD_TM_MIN_NO
This column contains the minimum lead time (in days) for transporting an item to a facility. It is optional to populate this field in Service Parts Optimization 4.2 but mandatory for Service Parts Optimization 4.3.During implementation, the value of days (positive integer) should be updated in the stage table for that vendor-facility
82 Integrating Data Chapter 8
Table Name Column Name Comment
combination. If data is not present, then it is optional to populate this field or can be same as LEAD_TM_NO.
VENDOR_FACILITY_ITEM LEAD_TM_MAX_NO
This column contains the maximum lead time (in days) for transporting an item to a facility. It is optional to populate this field in Service Parts Optimization 4.2 but mandatory for Service Parts Optimization 4.3.During implementation, the value of days (positive integer) should be updated in the stage table for that vendor-facility combination. If data is not present, then it is optional to populate this field or can be same as LEAD_TM_NO.
FACILITY_X_ITEM FACILITY_ITEM_VALID_FLG
This column contains a flag that indicates whether the facility and item pair is valid. If SAP doesn’t populate this, then the possible values Y or N should be manually updated in the stage table during implementation.
Integrating Data The SAS Service Parts Optimization Adapter for SAP loads solution data layer tables for the SAS Service Parts Optimization solution. The SAS Service Parts Optimization Adapter for SAP creates tables that must be incorporated into the overall solution data architecture. These solution data layer tables that are created as output have the same names and structure as the input tables of the jobs in the SAS Service Parts Optimization solution. After you run the SAS Service Parts Optimization Adapter for SAP jobs, you can run the SAS Service Parts Optimization data mart jobs that use the adapter’s output tables as input.
There are two basic ways to integrate the SAP solution data layer tables into SAS Service Parts Optimization data mart jobs.
1 Use one physical location for SAP solution data layer libraries.
2 Use multiple sources.
Method 1: Use One Physical Location for SAP Solution Data Layer Libraries To use one physical location for the SAP Solution Data Layer libraries, you must define the STAGESAP and STAGESDL libraries to represent the same physical location.
Note: This method might not be applicable if the data that needs to be loaded comes from various sources such as multiple SAP systems and other operational sources. In this case, consider Method 2.
Load Columns with Non SAP Data Customizing the Validation Steps in the Load Data Mart Jobs 83
Method 2: Use Multiple Sources To accommodate multiple data sources, you can build additional jobs that combine the multiple data sources into a new library in the STAGESDL structure. These new jobs might consist of a simple step that appends all the data from the various input sources.
In the case that a simple append of data from different sources does not produce the required results, you must resolve the issue with site-specific code that replaces or augments the append step.
Customizing the Validation Steps in the Load Data Mart Jobs The table above details actions that might be required for successful data loading to the Service Parts Optimization Data Mart for your site. This table provides a general guide, but it is possible that it does not provide an all-inclusive list for your specific site. This table might not provide all of the actions required for your specific site. Each individual SAP site provides some data by default and some data by customization within the SAS Service Parts Optimization Adapter for SAP jobs that create or bring in data from additional tables.
Note: The SAS Service Parts Optimization Adapter for SAP creates stage tables where relevant data is available in SAP. You must create alternative jobs to populate other tables if they are required.
Note: The table above includes only the jobs that typically require modification. The table does not include a comprehensive list of all available jobs.
84 Customizing the Validation Steps in the Load Data Mart Jobs Chapter 8
1 Tables Extracted from SAP
SAP Tables ................................................................................................................................................... 85
SAP Tables The following are the tables extracted from SAP.
Table Name Description A017 Material Info Record (Plant-Specific) A018 Material Info Record EINA Purchasing Info Record: General Data EINE Purchasing Info Record: Purchasing Org Data EKET Scheduling Agreement Schedule Lines EKKO Purchasing Document Header EKPO Purchasing Document Item EKPV Shipping Data for Stock Transfer of Purchase Doc EQUK Quota File: Header EQUP Quota File: Item KNA1 General Data in Customer Master KNB1 Customer Master (Company Code) KNVV Customer Master Sales Data KONDD Material Substitution - Data Division KONH Conditions (Header) KONM Conditions (1-Dimensional Quantity Scale) KONP Conditions (Item) KNOW Conditions (1-Dimensional Value Scale) KOTD001 Conditions: Substitution-Sample Structure LFA1 Vendor Master (General Section) LFM1 Vendor Master Record Purchasing Org Data LIKP SD Document: Delivery Header Data LIPS SD Document: Delivery Item Data MAKT Material Descriptions MARA General Material Data MARC Plant Data for Material
A P P E N D I X
86 SAP Tables Appendix 1
Table Name Description MARD Storage Location Data for Material MAST Material to BOM Link MBEW Material Valuation MKPF Header: Material Document MSEG Document Segment: Material MVKE Sales Data for Material STKO BOM Header STOP BOM Item T001 Company Codes T001K Valuation Area T001W Plants_Branches T002 Language Keys (Component BC-I18) T002T Language Key Texts T005H City: Texts T005T Country Names T005U Taxes: Region Key: Texts T006 Units of Measurement T006A Assign Internal to Language-Dependent Unit T009 Fiscal Year Variants T009B Fiscal Year Variant Periods T009C Period Names T009T Fiscal Year Variant Names T023 Material Groups T023T Material Group Descriptions T024D MRP Controllers T024E Purchasing Organizations T134 Material Types T134T Material Type Descriptions T141 Material Status from Materials Management T141T Text of Material Status from MM_PP View T151 Customers: Customer Groups T151T Customers: Customer Groups: Texts T161 Purchasing Document Types T161T Texts for Purchasing Document Types T173 Mode of Transport for Each Shipping Type T173T Mode of Transport by Shipping Type: Texts T416 BOM Usage - Item Statuses T416T BOM Usage Texts TCURC Currency Codes TCURT Currency Code Names
Tables Extracted from SAP SAP Tables 87
Table Name Description TMABC Values for the ABC Indicator for Materials TMABCT Texts for ABC Indicator for Materials TNTP International Article Number (EAN) TNTPB Descriptions of EAN Categories TVAK Sales Document Types TVAKT Sales Document Types: Texts TVRO Routes TVTY Packaging Material Types TVTYT Packaging Material Types: Descriptions VBAK Sales Document: Header Data VBAP Sales Document: Item Data VBEP Sales Document: Schedule Line Data VBFA Sales Document: Flow VBUK Sales Document: Header Status and Admin Data VBUP Sales Document: Item Status WYT3 Partner Functions
88 SAP Tables Appendix 1
2 Service Parts Optimization 4.3 Extract, Transform, and Load Jobs
Prerequisite to Running Service Parts Optimization 4.3 Extract, Transform, and Load (ETL) Jobs ....... 89 Platform Support Matrix ............................................................................................................................. 91
Prerequisite to Running Service Parts Optimization 4.3 Extract, Transform, and Load (ETL) Jobs
To run the Service Parts Optimization 4.3 ETL jobs on the data that is extracted from the SAP using the SAP Adapter, the user is required to ensure that the following tables are present in the Service Parts Optimization 4.3 data mart:
1 The data set SDL.Facility_Item_ind_Variable in the Service Parts Optimization 4.3 data mart is slightly different from the Service Parts Optimization 4.2 data mart. This table shows the additional columns in the Service Parts Optimization 4.3 data mart:
Column Name Data Type Length Label
IND_VAR6 Numeric 8 As per user requirement
IND_VAR7 Numeric 8 As per user requirement
IND_VAR8 Numeric 8 As per user requirement
IND_VAR9 Numeric 8 As per user requirement
IND_VAR10 Numeric 8 As per user requirement
2 The data set SDL.Forecast_group_item_detail in the Service Parts Optimization 4.3 data mart is slightly different from the Service Parts Optimization 4.2 data mart. This table shows an additional column in the Service Parts Optimization 4.3 data mart:
Column Name Data Type Length Label
FORECAST_SUBGROUP_CD Character 10 Forecast Subgroup code
A P P E N D I X
90 Prerequisite to Running Service Parts Optimization 4.3 Extract, Transform, and Load (ETL) Jobs Appendix 2
3 The data set “SDL.Forecast_subgroup” is not present in the Service Parts Optimization 4.2 data mart but is part of the Service Parts Optimization 4.3 data mart:
Column Name Data Type Length Label DESCRIPTION VARCHAR 255 This column stores the
description of the Forecast Subgroup.
FORECAST_SUBGROUP_CD VARCHAR 10 This column stores a unique key for a Forecast Subgroup.
PROCESSED_DTTM DATE This column stores the date-and-time stamp details of when the record was loaded in the warehouse. In the case of updates that do not version the row, such as error correction and data patching, the column records the date-and-time stamp for the update.
VALID_FROM_DTTM DATE This column contains the date-and-time stamp details for the period from when this record is effective in the warehouse. The time value is set to the period when the record is loaded into the warehouse. The time value must be rounded to full seconds. This column is a versioning instrument. Only one record is valid at any given time. If the value for the time is not available, set it to 00:00:00:00.
VALID_TO_DTTM DATE This column contains the date-and-time stamp details for the period until this record is effective in the warehouse. The time value is set to one second before the time for the period the next record with the same key is effective. The time value must be rounded to full seconds. If the value for the time is not available, set it to 23:59:59:00.
Service Parts Optimization 4.3 Extract, Transform, and Load Jobs Platform Support Matrix 91
Platform Support Matrix The Platform Support Matrix defines the supported client and server platform combinations as below:
92 Platform Support Matrix Appendix 2
Your Turn
We welcome your feedback.
• If you have comments about this book, please send them to [email protected]. Include the full title and page numbers (if applicable).
• If you have comments about the software, please send them to [email protected].
support.sas.com/saspress
support.sas.com/documentation
support.sas.com/spn
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Other brand and product names are trademarks of their respective companies. © 2010 SAS Institute Inc. All rights reserved. 56836US.0510
SAS® PreSSSAS Press titles deliver expert advice from SAS® users worldwide. Written by experienced SAS professionals, SAS Press books deliver real-world insights on a broad range of topics for all skill levels.
SAS® DocumentAtion We produce a full range of primary documentation:• Online help built into the software • Tutorials integrated into the product • Reference documentation delivered in HTML and PDF formats—free on the Web • Hard-copy books
SAS® PubliShing newSSubscribe to SAS Publishing News to receive up-to-date information via e-mail about all new SAS titles, product news, special offers and promotions, and Web site features.
SociAl meDiA: Join the conVerSAtion!Connect with SAS Publishing through social media. Visit our Web site for links to our pages on Facebook, Twitter, and LinkedIn. Learn about our blogs, author podcasts, and RSS feeds, too.
SAS Publishing provides you with a wide range of resources to help you develop your SAS software expertise. Visit us online at support.sas.com/bookstore.
SAS® Publishing Delivers!
support.sas.com/socialmedia