SAS Forecasting 4.1 For SAP APO: Reference Guide

Transcription

SAS Forecasting 4.1for SAP APOReference Guide

The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2012. SASForecasting 4.1 for SAP APO: Reference Guide. Cary, NC: SAS Institute Inc. SAS Forecasting 4.1 for SAP APO: Refernece Guide Copyright 2012, SAS Institute Inc., Cary, NC, USAAll 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, ortransmitted, in any form or by any means, electronic, mechanical, photocopying, or otherwise, withoutthe 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 termsestablished by the vendor at the time you acquire this publication.The scanning, uploading, and distribution of this book via the Internet or any other means without thepermission of the publisher is illegal and punishable by law. Please purchase only authorized electroniceditions and do not participate in or encourage electronic piracy of copyrighted materials. Your supportof others’ rights is appreciated.U.S. Government Restricted Rights Notice: Use, duplication, or disclosure of this software and relateddocumentation by the U.S. government is subject to the Agreement with SAS Institute and therestrictions 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, April 2012 SAS Publishing provides a complete selection of books and electronic products to help customers useSAS 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-800727-3228. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarksof 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.

iiiContentsChapter 1 Introduction to the SAS Forecasting for SAP APO 1Architecture Solution Topology 2Conceptual Persona 3Data Flow 4Chapter 2 Components of the SAS Forecasting for SAP APO 5SAP Menu for SAS Forecasting on SAP APO 5SAP Proxy Object & Logical Port on SAP APO 6SAS Forecasting Web Service on HPF Server 6Technical Objects created on SAP SCM System 6SAS Pull-down Menu 8SAP Business Add-in Implementation 9SAP Proxy 9SAP Function Modules 10Transparent tables 12Technical Objects created on SAS Server 23SAS Stored Process and Web Service 23SAS Macro Catalog 24

iv

1C H A P T E R1Introduction to the SAS Forecastingfor SAP APOArchitecture Solution Topology . 2Conceptual Persona . 3Data Flow . 4The SAS Forecasting for SAP APO offers a solution that leverages the best from SAPand SAS: Deep experience in analytics from SAS and from SAP, the integratedapplications and work flow that support business processes. The best of both SAP andSAS are joined together through our technology utilizing SOA methods and interfacesthat have been certified by SAP.The SAS Forecasting for SAP APO seamlessly integrates with SAP-APO-DP providingbusinesses with a balance of forecasting functionality and integration with theirplanning components. SAS Forecasting for SAP APO reads the history data from SAPLiveCache and writes the SAS Forecast back to SAP so that the results are displayed onthe SAP APO Interactive Demand Planning transaction.The SAS Forecasting for SAP APO performs three primary functions:1Forecast Options: Allows a user to create or modify a forecasting profile withparameters that are utilized by SAS High Performance Forecasting (HPF) whengenerating the statistical forecast.2Run Forecast: Allows users to initiate creation of a statistical forecast usingSAS. SAS Forecasting Web Service is triggered to initiate the Forecasting.History values are read from SAP APO using BAPI and the forecast resultsgenerated on the SAS Server are written back to SAP APO Live Cache so that theresults are visible by the user in the appropriate SAP Planning Book.3Reports: Allows users to view reports generated during the creation of thestatistical forecast (HTML format) or allows users to view or create custom reportsusing SAS Web Report Studio.

2Architecture Solution TopologyChapter 1Architecture Solution TopologyThe Solution Topology of SAS Forecasting for SAP APO is as given below.SAS Connects to SAP using both the methods SOA (Service Oriented Architecture)and RFC (Remote Function Call). Web Services: Initiates call to SAS from SAS Forecasting Add-in Menu Remote Function Calls (RFC): For reading data from SAP liveCache and writingforecast results into SAP liveCache

Introduction to the SAS Forecasting for SAP APOConceptual PersonaConceptual PersonaThe following personas are the users of the SAS Forecasting for SAP APO3

4Data FlowChapter 1Data FlowData Flow from SAP APO to SAS Forecasting happens as shown below.1SAP APO User triggers the SAS Forecasting via SAS Web Service from the Add-inmenu option, “Run Forecast”2SAS Web Service is implemented as a Stored Process on the SAS Server.3Stored Process executes the SAS Forecasting.aReads the SAS Forecasting options from the SAP Table /SAS/APOT FOPTSbRFC call is made to execute the BAPI, BAPI PBSRVAPS GETDETAIL2which extracts the historical time series datacThe above extracted data is given as an input dataset to the SAS HighPerformance Forecasting (HPF) ServerdSAS HPF Server will generate the HTML files based upon the Statisticalforecast generated.eForecasted results are written to the SAS DatasetsfRFC call is made to execute the BAPI,BAPI PBSRVAPS CHANGEKEYFIGVAL2 which writes back the statisticalforecast into the SAP APO Live Cache.

5C H A P T E R2Components of the SAS Forecastingfor SAP APOSAP Menu for SAS Forecasting on SAP APO . 5SAP Proxy Object & Logical Port on SAP APO . 6SAS Forecasting Web Service on HPF Server . 6Technical Objects created on SAP SCM System . 6SAS Pull-down Menu . 8SAP Business Add-in Implementation . 9SAP Proxy. 9SAP Function Modules . 10Transparent tables . 12Technical Objects created on SAS Server. 23SAS Stored Process and Web Service . 23SAS Macro Catalog . 24The components of SAS Forecasting for SAP APO are:SAP Menu for SAS Forecasting on SAP APO (under Demand Planningtransaction) SAP Proxy Object & Logical Port on SAP APO SAS Forecasting Web Service on HPF Server The SAS Forecasting Add-in triggers the HPF forecasting via the SAS Web service.Note: The above components are part of SAS Forecasting for SAP APO and apartfrom this product; the following products are required as part of Solution bundle to runSAS Forecasting from SAP APO. SAS BI Server 9.3 SAS Data Integration Server 9.3 SAS Forecast Server 4.1 SAS Data Surveyor for SAP 4.3 One SAS/ACCESS engine of choice SAS Enterprise Guide (unlimited users within scope limitation)SAP Menu for SAS Forecasting on SAP APOThe SAP Menu is the user interface is to trigger the SAS Forecasting Web Servicefrom the Pull down menu under APO Interactive Demand Planning Transaction. Thiscomponent is coded in SAP Standard Business Add-in (BAdI). This BAdI is used tomanage the SAS Forecasting profile. This menu also initiates the Reports generated byHPF Server and SAS Web Report Studi0.

6Technical Objects created on SAP SCM SystemChapter 2SAP Proxy Object & Logical Port on SAP APOThe SAP Proxy Object is used to consume the Web Service deployed on SAS HPFServer. This Proxy object is being called in the BAdI. Logical Port is defined for theProxy class which communicates with the SAS HPF Server on which the Web Servicehas been deployed.SAS Forecasting Web Service on HPF ServerThe SAS Forecasting Web Service extracts the Historical data using SAP StandardBAPI based on the parameters defined in the SAS Forecasting Profile in SAP APO. TheWeb Service transforms the SAP Historical data into time series format and writes backthe forecasted results into SAP LiveCache.Technical Objects created on SAP SCM SystemPlease find the list of technical objects created on SAP SCM System as part of SASForecasting for SAP APO Installation.S.No1TechnicalObject TypeDomainTechnical Object Name/SAS/APODOM FCST DATE INT2Domain/SAS/APODOM FCST DATE INT TX3Domain/SAS/APODOM FCST OPTIONS4Domain/SAS/APODOM FCST OPTIONS TX5Domain/SAS/APODOM FCST PERIODSSAS Forecasting Add-on for SAP - Forecasting OptionsTextSAS Forecasting Periods6Domain/SAS/APODOM FCST REPOSSAS Forecasting Add-on for SAP - Forecast Repository7Domain/SAS/APODOM FCST SAS MACRO8Domain/SAS/APODOM HPF CRITERIONSAS Forecasting Add-on for SAP - Forecast MacroNameSAS Forecasting Add-on for SAP - HPF Criterion9Domain/SAS/APODOM HPF CRITERION TX10Domain/SAS/APODOM HPFDIAG PRNT11Domain/SAS/APODOM HPFDIAG PRNT TX12Domain/SAS/APODOM HPFENG PLOT OPT13Domain/SAS/APODOM HPFENG PLOT OPT TX14Domain/SAS/APODOM HPFENG PRNT OPT15Domain/SAS/APODOM HPFENG PRNT OPT TX16Domain/SAS/APODOM SASURLSAS Forecasting Add-on for SAP - SAS BI WebservicesURL17Data Element/SAS/APODE FCST DATE INTSAS Forecasting Add-on for SAP - Forecasting DateIntervalTechnical Object DescriptionSAS Forecasting Add-on for SAP - Forecasting DateIntervalSAS Forecasting Add-on for SAP - Date IntervalDescriptionSAS Forecasting Add-on for SAP - Forecasting OptionsSAS Forecasting Add-on for SAP - HPF CriterionDescriptionSAS Forecasting Add-on for SAP - HPF Diagnose PrintOptionsSAS Forecasting Add-on for SAP - HPF Diag PrintOptions TextSAS Forecasting Add-on for SAP - HPF Engine PlotOptionsSAS Forecasting Add-on for SAP - HPF Engine PlotOptionsTextSAS Forecasting Add-on for SAP - HPF Engine PrintOptionSAS Forecasting Add-on for SAP - HPF Engine PrntOptionsText

Components of the SAS Forecasting for SAP APOTechnical Objects created on SAP SCM System7S.No18TechnicalObject TypeData ElementTechnical Object Name/SAS/APODE FCST DATE INT TX19Data Element/SAS/APODE FCST OPTIONS20Data Element/SAS/APODE FCST OPTIONS TX21Data Element/SAS/APODE FCST PERIODSSAS Forecasting Add-on for SAP - Forecasting OptionsTextSAS Forecasting Periods22Data Element/SAS/APODE FCST REPOSSAS Forecasting Add-on for SAP - Forecast Repository23Data Element/SAS/APODE FCST SAS MACRO24Data Element/SAS/APODE HPF CRITERIONSAS Forecasting Add-on for SAP - Forecast MacroNameSAS Forecasting Add-on for SAP - HPF Criterion25Data Element/SAS/APODE HPF CRITERION TX26Data Element/SAS/APODE HPFDIAG PRNT27Data Element/SAS/APODE HPFDIAG PRNT TX28Data Element/SAS/APODE HPFENG PLOT OPT29Data Element/SAS/APODE HPFENG PLOT OPT TX30Data Element/SAS/APODE HPFENG PRNT OPT31Data Element/SAS/APODE HPFENG PRNT OPT TX32Data Element/SAS/APODE SASURLSAS Forecasting Add-on for SAP - SAS BI WebservicesURL33Search Help/SAS/APOSH DATAVIEWSAS Add-on for SAP APO - Search Help for Data View34Search Help/SAS/APOSH DATEINTERVAL35Search Help/SAS/APOSH FCST OPTIONS36Search Help/SAS/APOSH FCST PROFILESAS Add-on for SAP APO - Search Help for DateIntervalSAS Add-on for SAP APO - Search Help for ForecastingOptsSAS Add-on for SAP APO - Search Help for ForecastingProfile37Search Help/SAS/APOSH FCSTLEVEL38Search Help/SAS/APOSH HISTCHAR39Search Help/SAS/APOSH HPFCRITERION40Search Help/SAS/APOSH HPFDIAGPRINT41Search Help/SAS/APOSH PLANNINGBOOK42Search Help/SAS/APOSH PLOT OPTIONS43Search Help/SAS/APOSH PRNT OPTIONSSAS Add-on for SAP APO - Search Help for HPF EngPrint Opts44Search Help/SAS/APOSH SEL PROFILESAS Add-on for SAP APO - Search Help for TransparentTableTransparentTable/SAS/APOT CRITERSAS Forecasting Add-on for SAP - Forecasting Criterion/SAS/APOT FCHECKSAS Forecasting Add-on for SAP - Forecasting OptionscheckSAS Forecasting Add-on for SAP - Forecasting DateIntervalSAS Forecasting Add-on for SAP - Forecasting ProfileOptions464748/SAS/APOT FDATE/SAS/APOT FOPTSTechnical Object DescriptionSAS Forecasting Add-on for SAP - Date IntervalDescriptionSAS Forecasting Add-on for SAP - Forecasting OptionsSAS Forecasting Add-on for SAP - HPF CriterionDescriptiSAS Forecasting Add-on for SAP - HPF Diagnose PrintOptionsSAS Forecasting Add-on for SAP - HPF Diag PrintOptions TextSAS Forecasting Add-on for SAP - HPF Engine PlotOptionsSAS Forecasting Add-on for SAP - HPF Engine PlotOptions TextSAS Forecasting Add-on for SAP - HPF Engine PrintOptionSAS Forecasting Add-on for SAP - HPF Engine PrntOptions TextSAS Add-on for SAP APO - Search Help for ForecastingLevelSAS Add-on for SAP APO - Search Help for HistoryCharacterisSAS Add-on for SAP APO - Search Help for HPFCriterionSAS Add-on for SAP APO - Search Help for HPF DiagPrint OptsSAS Add-on for SAP APO - Search Help for PlanningBookSAS Add-on for SAP APO - Search Help for Plot Options

8Technical Objects created on SAP SCM SystemS.No49TechnicalObject TypeTransparentTableChapter 2Technical Object Name/SAS/APOT FPLOTTechnical Object DescriptionSAS Forecasting Add-on for SAP - Forecasting EnginePlot Ops50TransparentTable/SAS/APOT FPRINTSAS Forecasting Add-on for SAP - Forecasting EnginePrnt Ops51TransparentTable/SAS/APOT HPFDPSAS Forecasting Add-on for SAP - Forecasting Diag PrntOps52Package/SAS/APO ADDONSAS Forecasting Add-on for SAP53Class Interface/SAS/CL IM APO ADDON BADIImp. class for BAdI imp. /SAS/APO ADDON BADI54Proxy Name/SAS/CO APOFORECASTV1PORT TYPEapoforecastv1PortType55Message Class/SAS/APO ADDONMessage Class for SAS Add-on56/SAS/APO ADDON BADIBAdI Implementation for SAS Add-on for APO57BAdIImplementationFunction Module/SAS/APOFM CALL OPTIONS SCREENSAS Add-on for APO - Forecasting Options Screen58Function Module/SAS/APOSHE HPFCRITERIONSearch Help Exit for SAS Forecast CriterionPlease find all the components created for SAS Forecasting Add-in on SAP SCMsystem using the Object Navigator Transaction (Tcode: SE80) as shown below. All thetechnical objects are created under the package “/SAS/APO ADDON”SAS Pull-down MenuSAS Forecasting Add-in for SAP provides you a pull down for initiating the SASForecasting. This menu is available under the SAP APO Interactive Demand PlanningTransaction.

Components of the SAS Forecasting for SAP APOTechnical Objects created on SAP SCM System9As SAS Forecasting Add-in for SAP is using a User Exit, by default the SAS menuitems appears as part of the menu “Additional Function” under the main menu “Edit”.The SAS pull down menu also can appear after the “Settings” menu in the InteractiveDemand Planning Transaction if the additional SAP transport is installed.The above menu has been implemented in SAP SCM system as part of the classicBAdI “/SAPAPO/SDP INTERACT”. SAP Menu Enhancement is possible within thisBAdI.SAP Business Add-in ImplementationClassic BAdI “/SAPAPO/SDP INTERACT” has been implemented so as to add thepull down menu to the Interactive Demand Planning screen.Method “USER FCODES CALCULATIONS” is used to program the Menufunctionality and to trigger the SAS Forecasting Webservice.SAP ProxyAs part of this solution, a client proxy “/SAS/CO APOFORECAST NEWPORT TY” isimplemented in the SAP SCM system. This client proxy is being triggered in the SASpull down menu and this proxy initiates the SAS Forecasting Web Service.

10 Technical Objects created on SAP SCM SystemChapter 2SAP Function ModulesSAS Forecasting Profile management functionality is implemented under the“Options” in the SAS Pull down menu. Function Module“/SAS/APOFM CALL OPS TAB SCREEN” is used to manage the Forecasting profilefunctionality

Components of the SAS Forecasting for SAP APOTechnical Objects created on SAP SCM System 11

12 Technical Objects created on SAP SCM SystemChapter 2Transparent tablesDuring the implementation of SAS Forecasting for SAP APO, the only componentswhich might require some changes to suit the customer requirement are the transparenttables.Please find the details of the transparent tables and their usage.1/SAS/APOT CRITER: This table contains the Forecasting Criterion used bySAS Forecasting Engine. This table provides the search help for the field“Criterion” in the Options Screen.

Components of the SAS Forecasting for SAP APOTechnical Objects created on SAP SCM System 13This table has the following columns and the records in this table can be maintainedusing SM30 transaction.

14 Technical Objects created on SAP SCM System2Chapter 2/SAS/APOT FCHECK: This table contains the Check options used by SASForecasting Engine. This table provides the search help for the fields “UCM”,“ARIMAX”, “Run Diagnosis” and “Override Options” in the Options Screen.This table has the following columns and the records in this table can be maintainedusing SM30 transaction.

Components of the SAS Forecasting for SAP APO3Technical Objects created on SAP SCM System 15/SAS/APOT FDATE: This table contains the Date Interval options used by SASForecasting Engine. This table provides the search help for the fields “HistoryStart Date” and “History Start Date” in the Options Screen.

16 Technical Objects created on SAP SCM SystemChapter 2This table has the following columns and the records in this table can be maintainedusing SM30 transaction.

Components of the SAS Forecasting for SAP APO4Technical Objects created on SAP SCM System 17/SAS/APOT FOPTS: This table contains the SAS Forecasting Profileparameters used by SAS Forecasting Engine. This table stores all the parametersentered on the Options Screen. Only one profile can be active at any point of time.

18 Technical Objects created on SAP SCM SystemChapter 2Search help for the Forecasting Profile field on the Options screen will list down theexisting profiles created in the system as shown below.This table has the following columns and the records in this table can be maintainedusing SM30 transaction.

Components of the SAS Forecasting for SAP APO5Technical Objects created on SAP SCM System 19/SAS/APOT FPLOT: This table contains the Plot options to be used by SASForecasting Engine for plotting the forecasting results. This table provides thesearch help for the field“HPFENGINE Plot Options “on the Options Screen.This table has the following columns and the records in this table can be maintainedusing SM30 transaction.

20 Technical Objects created on SAP SCM System6Chapter 2/SAS/APOT FPRINT: This table contains the Print options to be used by SASForecasting Engine for printing the forecasting results. This table provides thesearch help for the field“HPFENGINE Print Options “on the Options Screen.

Components of the SAS Forecasting for SAP APOTechnical Objects created on SAP SCM System 21This table has the following columns and the records in this table can be maintainedusing SM30 transaction.

22 Technical Objects created on SAP SCM System7Chapter 2/SAS/APOT HPFDP: This table contains the Print options to be used by SASForecasting Diagnosis Engine for printing the diagnosis results. This tableprovides the search help for the field “HPFDIAG Print Options “on the OptionsScreen.This table has the following columns and the records in this table can be maintainedusing SM30 transaction.

Components of the SAS Forecasting for SAP APOTechnical Objects created on SAS Server 23Technical Objects created on SAS ServerPlease find the list of technical objects created on SAS Server as part of SASForecasting for SAP APO Installation.SAS Stored Process and Web ServiceFollowing Stored Processes are created dusing installation of SAS Forecasting forSAP APO: APOFORECAST, READ FROM APO, and WRITE TO APO. These StoredProcess executes the SAS code which calls the appropriate macros for generating thestatistical forecasting from SAS HPF server.

24 Technical Objects created on SAS ServerChapter 2As shown above, APOFORECAST, READ FROM APO and WRITE TO APO StoredProcess are deployed as Web service so they can be invoked from SAP system.SAS Macro CatalogSAS Macros are used in the Stored Process to generate the Forecasting results fromthe SAP Data and they are provided to the customer in the form of Catalog. The locationof the Macro catalog is as below: SASHome \SASFoundation\9.3\forcstsapmva\cmacros

For a Web download or e-book: . Technical Objects created on SAP SCM System 6 SAS Pull-down Menu 8 SAP Business Add-in Implementation 9 SAP Proxy 9 SAP Function Modules 10 Transparent tables 12 Technical Objects created on SAS Server 23 SAS Stored Process and Web Service 23 SAS Macro Catalog 24 . iv. 1 . 1. Introduction to the SAS Forecasting for SAP APO . Architecture Solution Topology .