Skip to Content

APD Creation

(Analysis Process Designer) APD Creation: T-code: RSANWB


1.       To get the query data and store it in DSO.

2.       Populate the text  for field: Company code.

3.       Some field to be populated using routine.

  1. DataSource: data will come from query , text will be taken from text table ./wp-content/uploads/2013/04/query_clip01_202823.png/wp-content/uploads/2013/04/table_clip02_bmp_202825.png
  2. Transformation:

We will filter the data, so that we get only selected data. /wp-content/uploads/2013/04/filter_clip03_202829.png

Join the data coming from two data-sources. /wp-content/uploads/2013/04/join_clip04_202830.png

Use Aggregation. /wp-content/uploads/2013/04/aggreg_clip05_202831.png

some data field will be populated through routine. /wp-content/uploads/2013/04/routine_clip06_202832.png

Map the field assignment to data-target. /wp-content/uploads/2013/04/map_clip07_202833.png

3. Data target: Store the result-set in DSO.  /wp-content/uploads/2013/04/dso_clip08_202834.png

Step1: T-code:RSA1

Create DSO (ZTest02): direct update

With key-fields:


Company Code(0Comp_code),

Medium description(0TxtMD),


And data-fields:






Create a variant for your query using t-code RSRT.

APD screen: Create Data-source by drag-n-drop of the buttons available.

a.    a. Give the values in the properties of Query1.

a.    b. We will be populating Company code text from the text table(/BI0/TComp_code).Enter details

a.    c. Add a filter to query path. Select your fields and give values.

Give values in filter conditions:

Country: CL,GB

Company code: F007,E014

After completing the steps, your screen looks like:





a.       Join the data coming from two data-sources using Join button.

Connect them via the company code field.


Now, your screen will look like:


a.       Add Aggregation button to the path.

Select the char fields to the grouping fields section and key fields to the aggregation fields section.


a.       Add the Routine button to the path , select the source fields and target fields.

   We will populate two fields using routine. Add them in the target fields.

   We added KYF_001 and KYF_001_CURR. We are populating them as amt. 100 and currency as JPY.


Put the code:

FORM compute_data_transformation

     USING     it_source TYPE yt_source_fields

               ir_context TYPE REF TO if_rsan_rt_routine_context

     EXPORTING et_target TYPE yt_target_fields .

*——— Begin of transformation code —————————–

  DATA: ls_source TYPE y_source_fields,

        ls_target TYPE y_target_fields,

        w_curr type /BI0/OICFM_TR_CUR,

        w_amt type /BI0/OICFM_0021.

  LOOP AT it_source INTO ls_source.

          w_curr = ‘JPY’.

          w_amt = 100.

    MOVE-CORRESPONDING ls_source TO ls_target.

    ls_target-KYF_001_curr = w_curr.

    ls_target-KYF_001 = w_amt.

    APPEND ls_target TO et_target.

     clear: ls_source,ls_target,w_curr,w_amt.


*———- End of transformation code ——————————



Now your dataflow will look like:


a.   Finally, Add the data target DSO. Give DSO name,

map the field in field assignment icon.

Now your APD data- flow will look like:




Step 3: Test the APD: Save it and execute the APD.


3 records are transferred to DSO.

Step 4: Check the data in DSO: The text(TXTMD) is populated and two fields(CFM_0021,CFM_TR_CURR) are populated as per routine. And the other data is as per query.


Step 5: You can also schedule APD’s with process chains,


Enter  your APD name and create variant.




thanks& regards,


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