Professional Documents
Culture Documents
APDs and Open Hubs - Sending SAP BW Data To 3rd Party PDF
APDs and Open Hubs - Sending SAP BW Data To 3rd Party PDF
Applies to:
NetWeaver SAP BW 7.0. For more information, visit the EDW homepage.
Summary
rd
There are occasions when we need to send data to 3 party systems such as Teradata or Datastage from
SAP BW system.
To achieve this, SAP has provided Open Hubs wherein we can define the containers to store data, i.e., either
rd
a flat file or a database table, and facilitate the extraction of data to 3 party systems through these systems.
rd
In addition to this, certain requirements mandate sending status details along with the actual data to 3 party
systems. One such scenario is described here along with the solution devised.
Author Bio
Debanshu Mukherjee is working as Lead SAP BW Consultant with IBM India Pvt Ltd. and (c) He has
around 6 yrs of rich experience in BW implementation, development and rollout projects.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 1
APDs and Open hubs Sending SAP BW Data to 3rd Party
Table of Contents
Introduction ......................................................................................................................................................... 3
Requirement: ...................................................................................................................................................... 3
Solution: .............................................................................................................................................................. 4
Step by Step Solution: ........................................................................................................................................ 4
Step 1: Create Z info-objects for direct update DSO. ..................................................................................... 4
Step 2: Create a direct update DSO which will act as the target for APD. ..................................................... 6
Step 3: Create APD......................................................................................................................................... 6
Step 4: Create an OHD for storing data for the latest DTP run. ................................................................... 10
Step 5: Create the Transformation and DTP from the Direct Update DSO to the Status OHD. ................... 10
Step 6: Test by Executing the APD and Checking Data. .............................................................................. 11
Related Content ................................................................................................................................................ 15
Disclaimer and Liability Notice .......................................................................................................................... 16
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 2
APDs and Open hubs Sending SAP BW Data to 3rd Party
Introduction
rd
There are occasions when we need to send data to 3 party systems such as Teradata or Datastage from
SAP BW system.
To achieve this, SAP has provided Open Hubs wherein we can define the container to store data, i.e., either
rd
a flat file or a database table, store data in these containers and facilitate the extraction of data to 3 party
systems through these systems.
rd
In addition to this, certain requirements mandate sending status details to 3 party systems along with the
actual data.
One such scenario is described here along with the solution devised:
Requirement:
Facilitating the status details for the latest load into the Master data Open Hub for Profit Center.
In other words, we have an Open Hub defined, ZPFT_CTR, to send the profit center master data from SAP
rd
BW to 3 party.
rd
Now 3 party also requires SAP BW to send the latest load details such as:
1. Request ID for the latest DTP run which extracts data from SAP BW target and stores it into the
Open Hub.
2. The no of records extracted with the latest run.
3. Calday
4. OHD Name
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 3
APDs and Open hubs Sending SAP BW Data to 3rd Party
Solution:
To cater to the above requirement, we can use a combination of APD and Open Hub.
APD: The Analysis Process Designer is a graphical tool for modeling multilevel "Analyses
Processes". It is an interactive modeling (drag & drop) workbench for multilevel Data Analysis
Processes
APD: This APD will take the standard SAP view for DTP, RSBKREQUEST_V, as source and store data in a
direct update DSO (APDs only support direct update DSO) or Flat file.
Note: We could also use table RSBKREQUEST for DTP details but not all fields in this table are linked to data elements
which is a mandate for using this as a source in APD.
Thereafter we can send data from the direct update DSO or flat file to another Open Hub which will store the
rd
status information for the 3 party.
Therefore in essence, we need to create the following objects in BW:
1. Z info-objects for direct update DSO.
2. Direct update DSO
3. APD
4. Open Hub for status details
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 4
APDs and Open hubs Sending SAP BW Data to 3rd Party
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 5
APDs and Open hubs Sending SAP BW Data to 3rd Party
Step 2: Create a direct update DSO which will act as the target for APD.
We need to create a direct update DSO with the Z info-objects created.
DSO: ZPFCT3PR
Key field: ZDTPREQID (As this would be unique with every load)
Data fields: ZOHDNAME, 0CALDAY, ZOHRCDTRS
2. We will drag and drop the Read Data from Database table icon to the right panel.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 6
APDs and Open hubs Sending SAP BW Data to 3rd Party
4. Now we need to inform the APD as to which DTP requests it has to pick.
For that we need to drag a filter, connect it with the DTP View RSBKREQUEST_V and provide
details (right click -> properties)
While providing details for this filter, we need to transfer the field, TGT Name of data target for
DTP, from the list of fields to the selection and provide value as ZPFT_CTR.
Actually what this is doing is that it is selecting only those records from the RSBKREQUEST_V
view where the target is the profit center open hub. In essence the DTP which is feeding the Open
Hub for actual profit center master data.
5. Now we need to select the latest run details for the DTP. To achieve this we will be sorting the
data which is picked after the filter restriction:
For that we need to drag the sort data icon, connect it with the OHD Name filter and provide
details (right click -> properties)
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 7
APDs and Open hubs Sending SAP BW Data to 3rd Party
While providing details for this sort, we need to transfer the field, REQUID Request ID for DTP,
from the list of fields to the selection and check the box for the descending option.
This will bring the latest DTP run record on the top.
6. Now we need to write drag the ABAP Routine icon, connect it with the sort and write a small
routine which will extract only the top row from the table.
Before providing the details for the routing, drag the DSO icon, provide details and connect it with
the routine, this will ensure that both source and target structure for the routine are connected to
it.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 8
APDs and Open hubs Sending SAP BW Data to 3rd Party
ABAP Code:
Please see the ABAP code at the end.
7. Now assign the target info-objects to the source fields in the transformations from routine to the
DSO
8. Now the APD is ready to be activated. Save and Activate the APD:
While saving please provide the technical name and description:
Tech Name: Z_APD_MSRT_DAYA_3RD_PRTY
Description: Profit Center (Attribute) Load details for EDW
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 9
APDs and Open hubs Sending SAP BW Data to 3rd Party
Step 4: Create an OHD for storing data for the latest DTP run.
This OHD will extract data from the direct update DSO ZPFCT3PR. Select database table as destination
type.
Step 5: Create the Transformation and DTP from the Direct Update DSO to the Status OHD.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 10
APDs and Open hubs Sending SAP BW Data to 3rd Party
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 11
APDs and Open hubs Sending SAP BW Data to 3rd Party
Lets trigger the APD and check the data in the OHD
Now execute the DTP from the direct update DSO ZPFCT3PR to the Open Hub ZPFCT3PR
rd
Now 3 party can access these details.
These details can be used for reconciliation purposes such as comparing no of records extracted from the
main OHD and no of records extracted from this status OHD.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 12
APDs and Open hubs Sending SAP BW Data to 3rd Party
*TYPES: ...
IF sy-subrc = 0.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 13
APDs and Open hubs Sending SAP BW Data to 3rd Party
I_TIMESTAMP = v_tim_stamp
IMPORTING
E_DAT = v_dat.
IF sy-subrc = 0.
ls_target-TSTMP_FINISH = v_dat.
ENDIF.
APPEND ls_target TO et_target.
clear : ls_source,
ls_target.
ENDIF.
ENDIF.
*---------- End of transformation code ------------------------------
ENDFORM.
** End of custom code:
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 14
APDs and Open hubs Sending SAP BW Data to 3rd Party
Related Content
Analysis Process Designer (Apd) Step By Step - Business Intelligence
SAP HELP Analysis Process Designer
A Simple Guide to Using Analysis Process Designer
Analysis Process Designer (APD): Part - 1
Analysis Process Designer (APD): Part - 2
For more information, visit the EDW homepage.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 15
APDs and Open hubs Sending SAP BW Data to 3rd Party
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 16