APD Application Server
-
Upload
mushtaq-quraishi-mohammed -
Category
Documents
-
view
231 -
download
0
Transcript of APD Application Server
-
7/28/2019 APD Application Server
1/12
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC- boc.sap.com | UAC- uac.sap.com
2010 SAP AG 1
Automation of PublishingFormatted Query Output toDestination Server
Applies to:
SAP Netweaver BW. For more information, visit theData Warehousing homepage.
Summary
In certain business requirement, the users might want the output of the query with formatting changes to bepublished to a destination Server. And in most cases they might want the fields to be aligned in a particularformat which cannot be done using the standard Query Designer. For example if they wanted to see Keyfigures 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
Company: Hewlett-Packard NZ
Created on: 8 October, 2010
Author Bio
Santosh is working as a SAP Netweaver BW consultant for Hewlett-Packard New Zealand. He has anexperience of around 5 years in SAP.
https://www.sdn.sap.com/irj/sdn/nw-bi?rid=/webcontent/uuid/5009d499-ed39-2a10-bb8b-ed7248399540https://www.sdn.sap.com/irj/sdn/nw-bi?rid=/webcontent/uuid/5009d499-ed39-2a10-bb8b-ed7248399540https://www.sdn.sap.com/irj/sdn/nw-bi?rid=/webcontent/uuid/5009d499-ed39-2a10-bb8b-ed7248399540https://www.sdn.sap.com/irj/sdn/nw-bi?rid=/webcontent/uuid/5009d499-ed39-2a10-bb8b-ed7248399540 -
7/28/2019 APD Application Server
2/12
Automation of Publishing Formatted Query Output to Destination Server
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC- boc.sap.com | UAC- uac.sap.com
2010 SAP AG 2
Table of Contents
Introduction ......................................................................................................................................................... 3Process Flow ...................................................................................................................................................... 3
Use of APD ..................................................................................................................................................... 4Creating APD Flow .......................................................................................................................................... 4Testing APD .................................................................................................................................................... 5Executing APD ................................................................................................................................................ 5Checking the contents of Transactional ODS ................................................................................................. 6 Restrictions on APD ........................................................................................................................................ 6Overcoming the restriction of Selection Screen .............................................................................................. 6
Formatting Query Output .................................................................................................................................... 8Process Chain Flow ............................................................................................................................................ 9
Restriction on Info-spoke ................................................................................................................................ 9Overcoming Restriction on info spokes .......................................................................................................... 9
Periodic Automation .......................................................................................................................................... 10Adhoc Automation: ........................................................................................................................................... 10Related Content ................................................................................................................................................ 11Disclaimer and Liability Notice .......................................................................................................................... 12
-
7/28/2019 APD Application Server
3/12
Automation of Publishing Formatted Query Output to Destination Server
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC- boc.sap.com | UAC- uac.sap.com
2010 SAP AG 3
Introduction
In certain business requirement, the users might want the output of the query with formatting changes to bepublished to a destination Server. And in most cases they might want the fields to be aligned in a particularformat which cannot be done using the standard Query Designer. For example if they wanted to see Keyfigures 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 formattedaccording 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 toexecute a transaction code which would in turn trigger the query; the output of the query would beformatted according to the requirement and then sent to the Application Server
Process Flow
2.2 Call APD Flow
2.3. Loading Data fromTransaction ODS toStandard ODS
2.4 Info spoke
2 Process Chain
1. Start
2.1 Start
3.1 Trigger Query
3.2 Load data fromQuery output toTransaction ODS
3 APD FLOW
1 Transaction Code
-
7/28/2019 APD Application Server
4/12
Automation of Publishing Formatted Query Output to Destination Server
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC- boc.sap.com | UAC- uac.sap.com
2010 SAP AG 4
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 thecontents 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 ApplicationServer 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 to theTransactional ODS.
In the query properties select the variant which can be used to give the selection variable inputs to the query.
-
7/28/2019 APD Application Server
5/12
Automation of Publishing Formatted Query Output to Destination Server
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC- boc.sap.com | UAC- uac.sap.com
2010 SAP AG 5
Create the transaction ODS only with those fields that has to be included in the CSV/Flat file and map thosefield 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 beencaptured in the ODS contents.
Executing APD
-
7/28/2019 APD Application Server
6/12
Automation of Publishing Formatted Query Output to Destination Server
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC- boc.sap.com | UAC- uac.sap.com
2010 SAP AG 6
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 forsaving the new selection values
For Example lets take the example of Report 9030 whose input selections have to be changed and thevariant that is used in APD is YVAR_9030.
Execute Report 9030 in BEx Analyser
-
7/28/2019 APD Application Server
7/12
Automation of Publishing Formatted Query Output to Destination Server
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC- boc.sap.com | UAC- uac.sap.com
2010 SAP AG 7
Enter all the Selection Screen Values and click the Save as Variant button. It is important to enter allmandatory values.1. Store Selection Variables in Variant YVAR_9030
Enter the Variant Name asYVAR_9030always. Enter a description. Click the Save button.
A dialog box asking to overwrite variant YVAR_9030 will pop up. Please click yes every time.
-
7/28/2019 APD Application Server
8/12
Automation of Publishing Formatted Query Output to Destination Server
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC- boc.sap.com | UAC- uac.sap.com
2010 SAP AG 8
Formatting Query Output
The update rules present between the Transaction ODS and the Standard ODS can be used to do anyformatting changes. (Start and Update routine)
The alignment of the CSV file can be changed in the info spokes Info object definition tab.
The fields on the Right window would appear in the CSV /Flat file. The fields on the left window would behidden.
The Right window can be used to align the order in which the fields need to appear in the output file.
-
7/28/2019 APD Application Server
9/12
Automation of Publishing Formatted Query Output to Destination Server
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC- boc.sap.com | UAC- uac.sap.com
2010 SAP AG 9
Process Chain Flow
The process chain would first trigger the APD, which would in turn populate value to Transaction ODS fromthe Query output.Since we cannot use Transaction ODS to send data to the Application Server, we have to load data from theTransaction ODS to the Standard ODS.Later an Info spoke can be used to get the content of the Standard ODS and push the data as a flat file tothe Application server.
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 fromthe Active ODS table of the Standard ODS and send the content to the Local System.
-
7/28/2019 APD Application Server
10/12
Automation of Publishing Formatted Query Output to Destination Server
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC- boc.sap.com | UAC- uac.sap.com
2010 SAP AG 10
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 ProcessChain. 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 APDand the Query.
-
7/28/2019 APD Application Server
11/12
Automation of Publishing Formatted Query Output to Destination Server
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC- boc.sap.com | UAC- uac.sap.com
2010 SAP AG 11
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 theData Warehousing homepage
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/156ab490-0201-0010-1181-894491f2baf6https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/156ab490-0201-0010-1181-894491f2baf6http://help.sap.com/saphelp_nw04/helpdata/en/49/7e960481916448b20134d471d36a6b/content.htmhttp://help.sap.com/saphelp_nw04/helpdata/en/49/7e960481916448b20134d471d36a6b/content.htmhttps://www.sdn.sap.com/irj/sdn/nw-bi?rid=/webcontent/uuid/5009d499-ed39-2a10-bb8b-ed7248399540https://www.sdn.sap.com/irj/sdn/nw-bi?rid=/webcontent/uuid/5009d499-ed39-2a10-bb8b-ed7248399540https://www.sdn.sap.com/irj/sdn/nw-bi?rid=/webcontent/uuid/5009d499-ed39-2a10-bb8b-ed7248399540https://www.sdn.sap.com/irj/sdn/nw-bi?rid=/webcontent/uuid/5009d499-ed39-2a10-bb8b-ed7248399540http://help.sap.com/saphelp_nw04/helpdata/en/49/7e960481916448b20134d471d36a6b/content.htmhttps://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/156ab490-0201-0010-1181-894491f2baf6 -
7/28/2019 APD Application Server
12/12
Automation of Publishing Formatted Query Output to Destination Server
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC- boc.sap.com | UAC- uac.sap.com
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is notsupported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document,and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article orcode sample, including any liability resulting from incompatibility between the content within this document and the materials andservices offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of thisdocument.