Skip to Content
Scenario: Send the output of a query to a table

Solution:

We have n number of ways to send the output of a query to a table. I would like to demonstrate the use of APD to achieve this scenario.

Step 1: Identify the Query and the fields to be send
The Fields selected is:
1: 0CALDAY
2: 0COMP_CODE
3: 0QUANTITY

image

Step 2: Create a Transactional ODS with the Fields in the Query
Key Fields:
0CALDAY
0COMP_CODE
Data Fields:
0QUANTITY

image

Step 3: Go to Analysis Process Designer (Tcode — RSANWB)

Step 4: Create.  Select Generic Application from the list

image

Step 5: Drag the Query object from the Data Sources to the design area.  Double click and assign the query which has to be used.

image

Step 6: Drag the Filter object from the Transformations to the design area

Step 7: Drag the ODS object from Data Targets.  Double click and assign the Transactional ODS created to store the Query Output.

image

Step 8: link the objects. Select the query object and draw an arrow line towards the filter object. From the filter object draw a second arrow line towards the target ODS.

image

Step 9: Double click on the second line drawn from filter towards the ODS. This will open a window which shows the field assignment options

Step 10: Click on each field methods and select the respective fields from the query. Do this for all the fields in the mapping assignments.

image

image

Step 11: Save the Application. Give the technical name for the Application.

Step 12: Activate. Now the APD is ready to execute. Right click on the APD created under the generic group and select Execute.

image

Step 13: Verify the ODS for Data.

Reference: help.sap.com Analysis Process Designer

To report this post you need to login first.

8 Comments

You must be Logged on to comment or reply to a post.

  1. Witalij Rudnicki
    APD is really a promising tool. I had a chance to develop solution using APD to calculate one characteristic that would not be possible to be done using update rule.

    Although used primarly ABAP routine onject in APD 🙂

    Regards,
       Vitaliy

    (0) 
  2. ram l
    Hi Happytony,

    In APD process, is it mandatory to have any tranformation process else we can have data source (query) and data target (Transactional ODS).

    Thanks,

    Regards

    ram

    (0) 
    1. Happy Tony Post author
      Hi Ram,

      The transformations are not mandatory.This give additional flexibility to select the fields required from the query.

      Regards
      Happy Tony

      (0) 
  3. Shreekant W. Shiralkar
    It is a very interesting and visual blog on the APD and I liked that it is made out easy to appreciate. I would like to add that APD could serve as a work-around in some cases, However its purpose is much larger than serving work around. It essentially compliments SAP-BW with a High value “Data Mining” capability.
    Thanks
    Shreekant
    (0) 
  4. Eric Nascimento Soares
    Hi, I have made an APD just like your example. My problem is when I execute it, the key figures in result shows only ZEROs.
    My query executes in BEx like this :
    0CUSTOMER    S2VALUE
    0123445      100.00
    3455333      123.00
    3467342      200.00

    But the result in the APD is :
    0CUSTOMER    S2VALUE
    0123445      0.00
    3455333      0.00
    3467342      0.00

    The execution reports no error. Do you have any idea?

    Thank You.

    (0) 
    1. Happy Tony Post author
      Hi,

      I strongly feel that you have not mapped the correct KF value to the ODS KF. While Mapping check you map the value and Unit to the corresponding fields of the ODS.

      Happy Tony

      (0) 
  5. takai t
    Hi

    Writing to flat file is similar writing to DSO. But how to provide the name for the file. I dont want to hardcode the file name there. what if I have to have a file with name with date and time and user name in the file name?

    (0) 
  6. Hasba Younes
    Hi Nice Blog,

    i have a question concerning the Source as query.
    i have defined a query with variables and wanted to select it an APD but i’m getting an error that this query is not defined.
    what should i take note of if i’m using the Query as a source? this query reads data from MultiCube.

    thanks,

    BR,

    Younes

    (0) 

Leave a Reply