Skip to Content


  Assume we have created a keyfigure based model in the target infoprovider, and would like to update / map the key figures based on the filters that are used in the DTPs. 

  Ideally it would be required to identify which DTP is loading the data, and accordingly we need to map or write routines for the specific key figures.

Business Example:

  Lets take a simple example of having two keyfigure viz.  Sales Price, and Sales Return.  And the Source DSO has two records one each for Sales with the amount 100USD, and one for the Sales Return 10USD (Account based model).

 These two records when loaded to the target DSO, they should map to the right keyfigures.

Source Records

Customer  Sale Type   Amount
 ABC  Sales  100
 ABC  Return  10


 Expected output

 Customer  Sale Price  Sale Return
 ABC  100  10

As per this scenario, we would have two DTPs that would load Sales and Returns separetely.  (One can think of similar situations as per their business challanges).

Implemenation Steps:

Step 1:  Map the Amount field from the source to Sale Price and Sale return keyfigures of the Target Infoprovider.

Step 2: Implement the following Code in the end routine.


As a result, the right keyfigure is mapped from the right DTP as per the filter specification.

Hope this explains the benefit, though the example was a pretty simple one.

Do give me your suggestions / tips to improve my subsequent blogs…


To report this post you need to login first.


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

  1. Former Member

    We are loading characteristics into a DSO according to a keyfield where the datasource has several records for each keyfield value with each record containing a different characteristic.  We want to enter these into a sigle record in the target DSO with each characteristic in a different field.

    What would the routine for this be?

    Thanks in advance.


    1. Former Member Post author
      Hi Andy,

         If I understand your question right, you want to fill the specific
      charecteristics based on a particular key field.  for instance, if
      keyfield is ‘A’ then charA = sourcefieldX, and if keyfield is ‘B’ then
      charB = sourcefieldX.  In this case, you have to map the source field
      to all the receiving target fields, and in the end routine, unmap the
      other fields to have a value of space.

        if keyfield = ‘A’.
           charA = sourcefieldX.
           charB = space.
        elseif keyfield = ‘B’.
           charA = space.
           charB = sourcefieldX.

      Hope this helps.


  2. Former Member

    Hi. nice blog. From the ABAP perspective, i would just like to add that it will consume less memory (and might be a bit faster) if you use a field-symbol to change the contents of the result_package internal table. Something like:endloop.


Leave a Reply