Академический Документы
Профессиональный Документы
Культура Документы
Applies to:
SAP Netweaver BW. For more information, visit the Data Warehousing homepage.
Summary
In certain business requirement, the users might want the output of the query with formatting changes to be published to a destination Server. And in most cases they might want the fields to be aligned in a particular format which cannot be done using the standard Query Designer. For example if they wanted to see Key figures between characteristics without changing the report layout. This article will be a step by step guide on how to automate such a process. Author: Santosh Durai
Author Bio
Santosh is working as a SAP Netweaver BW consultant for Hewlett-Packard New Zealand. He has an experience of around 5 years in SAP.
Table of Contents
Introduction ......................................................................................................................................................... 3 Process Flow ...................................................................................................................................................... 3 Use of APD ..................................................................................................................................................... 4 Creating APD Flow.......................................................................................................................................... 4 Testing APD .................................................................................................................................................... 5 Executing APD ................................................................................................................................................ 5 Checking the contents of Transactional ODS ................................................................................................. 6 Restrictions on APD ........................................................................................................................................ 6 Overcoming the restriction of Selection Screen .............................................................................................. 6 Formatting Query Output .................................................................................................................................... 8 Process Chain Flow ............................................................................................................................................ 9 Restriction on Info-spoke ................................................................................................................................ 9 Overcoming Restriction on info spokes .......................................................................................................... 9 Periodic Automation .......................................................................................................................................... 10 Adhoc Automation: ........................................................................................................................................... 10 Related Content ................................................................................................................................................ 11 Disclaimer and Liability Notice .......................................................................................................................... 12
Introduction
In certain business requirement, the users might want the output of the query with formatting changes to be published to a destination Server. And in most cases they might want the fields to be aligned in a particular format which cannot be done using the standard Query Designer. For example if they wanted to see Key figures between characteristics without changing the report layout. This article will be a step by step guide on how to automate such a process in the below scenarios. 1.) Periodic Automation: Periodic intervals in which the query would be called, the output of the query would be formatted according to the requirement and then sent to the Application Server. 2.) Ad-hoc Automation: At Ad-hoc basis if the user wants to see the output sent to the application server, they just need to execute a transaction code which would in turn trigger the query; the output of the query would be formatted according to the requirement and then sent to the Application Server
Process Flow
1 Transaction Code
2 Process Chain
2.1 Start 3 APD FLOW 1. Start 3.1 Trigger Query 2.2 Call APD Flow 3.2 Load data from Query output to Transaction ODS
APD Flow
Use of APD APD is used here to transfer the Query output contents to Transaction ODS. Since we cannot link a Query directly to a Standard ODS, we have to use Transaction ODS first to get the contents of the query and then load data to the Standard ODS. Then by using an Info spoke we can get the content of the Standard ODS and send it to an Application Server path. Note: Info-spoke cannot send the content of a Transactional ODS to a target destination address. Creating APD Flow T-Code for APD: RSANWB Use the Data source Use Query to read data to add the Query 9030. Use the Data Target Write data in Transaction ODS Object to get the Query output data transformed t o the Transactional ODS.
In the query properties select the variant which can be used to give the selection variable inputs to the query.
Create the transaction ODS only with those fields that has to be included in the CSV/Flat file and map those field in the Transformation in APD.
Testing APD Execute the APD and test the data in the Transactional ODS to see if the query output data has been captured in the ODS contents. Executing APD
Checking the contents of Transactional ODS Go to properties and select Display Data
Restrictions on APD The query would not pop up any Selection Screen if it is executed through APD. If the Selection Screen has any Mandatory Variables, the APD would return with error. If the query has any hidden Key figures which is used in other Key figures, the other key figures will not have values populated in the Transaction ODS. Overcoming the restriction of Selection Screen Variants can be created for the Selection Screen Variables and then used in the Query Element of the APD. In this way the variant would populate the Selection Screen inputs for the Query. Once after the Variant has been defined, if the user requires changing the selection screen variant values, the variant has to be reconfigured. The below would describe how to change the Variant values.
Pre Requisite: The same variant that used in the Query properties while defining APD must be used for
saving the new selection values For Example lets take the example of Report 9030 whose input selections have to be changed and the variant that is used in APD is YVAR_9030. Execute Report 9030 in BEx Analyser
Enter all the Selection Screen Values and click the Save as Variant button. It is important to enter all mandatory values. 1. Store Selection Variables in Variant YVAR_9030
Enter the Variant Name as YVAR_9030 always. Enter a description. Click the Save button. A dialog box asking to overwrite variant YVAR_9030 will pop up. Please click yes every time.
The fields on the Right window would appear in the CSV /Flat file. The fields on the left window would be hidden. The Right window can be used to align the order in which the fields need to appear in the output file.
Restriction on Info-spoke Info-spoke cannot be used to send data to Local system (Desktop or any path in the local system) Overcoming Restriction on info spokes In such scenarios write an ABAP Program using the function Module GUI_DOWNLOAD to get data from the Active ODS table of the Standard ODS and send the content to the Local System.
Periodic Automation
In the Start Variant scheduling option in process chain, make the Selection to Periodic.
Adhoc Automation:
Create a Program which uses the Standard Function Module API_CHAIN_START, to call the Process Chain. A transaction code can be created to call this program. Whenever the transaction code is executed the program would trigger the process chain and in turn the APD and the Query.
Related Content
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/156ab490-0201-0010-1181-894491f2baf6 http://help.sap.com/saphelp_nw04/helpdata/en/49/7e960481916448b20134d471d36a6b/content.htm For more information, visit the Data Warehousing homepage