This blog is a part of SAP BW/4HANA Development blog series. The Analysis Process Designer is a commonly used Classic BW Object that was extensively used for a lot of things like:
- Query Extracts to file
- BPC Extracts to Physical cubes
- Query Extracts to Info providers
- Data Mining and clustering
- Sometimes used for pushing data back to CRM systems from BW
The APD architecture uses the BW OLAP engine to process the Query results and then uses the data set from the query for further processing. The APD is also allowed for process chain scheduling which made it very convenient for data manipulation and processing in day to day loads.
In BW4/HANA, there is no BW OLAP processor, this makes the APD obsolete and the need to migrate APDs to something new.

In this blog, we are going to be looking at the options available to migrate APDs to BW4/HANA specifically where we use APDs as Query Extracts for Infoproviders and Extracts.

Option 1:
For Writing Query results to persist in BW4HANA, we can use query as source of DTP and load the data to the Advance Data Store Object
Option 2:
For Writing Query results externally or to a file, we can use open hub destination
In our example, we will see how to write query results to Advance Data Store Object.

In BW 7.3, An APD is created to load results of employee pay details query to the headcount DSO (Direct Update) and this must be converted into HANA Optimized object when migrating into BW4HANA since conventional objects are not supported in BW4HANA anymore. As there is no direct tool available to convert APD, we must create the flow manually from scratch.
Here is how to achieve it in BW4HANA
From BW 7.3 version, Query can be used as source object and to use query as source, it should be enabled as info provider in Runtime properties of the query

Create Transformation and DTP with query as source object


Now the same data flow is ready in BW4HANA.

To schedule this data flow using process chain, Normal DTP step is enough whereas APD requires ABAP program (RSAN_PROCESS_EXECUTE) to execute.
It is recommended to have the ADSO with direct update type as data target for snapshot analysis.
In Following Cases Query cannot be used as info provider
- The query is input-ready or has input-ready required variables
- The query contains non-cumulative key figures.
- The query has more than one structure.
- The Info Provider is a Transient Provider or an aggregation level.
Option 3: Use the query as a calculation view to include it into the data flow
In BW/4HANA the queries are consumed as calculation views. In this case, the source query for the APD can be used as a calculation view and then used in the data flow in multiple ways.
One option could be to use the calculation view as an Open ODS view in the data flow and consume the same within a composite provider.
You could also consume the query as an ODP enabled datasource but that would be the same as using the query as a datasource detailed above.
Know more about Visual BI Solutions SAP BW Services offerings here.