Skip to Content
author's profile photo Former Member
Former Member

How to copy key figure value from one location to other location

Dear all,

I have a problem when copy key figure value from one location to other location.

This is my scenario

I have a planning table with 2 key figure KF1 and KF2, 3 location K110, K210, 5210.

Key figure Location Value

KF1 K110 0

K210 100

5210 200

KF2 K110 0

K210 0

5210 0

Now, i want to copy key figure value from KF1 in location K210 and 5210 to key figure KF2 in location K110.

This is the result i want:

KF1 K110 0

K210 100

5210 200

KF2 K110 0

K210 0

5210 300

Please help me to solve this problem.

Thanks,

Thai.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Jul 09, 2012 at 11:12 AM

    Thai,

    Neither standard macro functions nor t.codes such as /sapapo/tscopy can meet such requirement. Since location characteristic value change is required, the drill down and then, copying the key figure values at right level become complicated.

    However, you can use BAdI based macro that allows you read all the characteristics with their values as well as the key figure values. Using ABAP, you can manage the calculations flexibly. Please check the following link for a SAP note on BAdI macro

    https://service.sap.com/sap/support/notes/1119651

    Thanks,
    Rajesh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 09, 2012 at 09:12 AM

    Hi Thai,

    Using macro to do the calculation would be able to fulfill your requirement or you want to use /SAPAPO/TSCUBE?

    Best Regards,

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Thai,

      As mentioned by Rajesh below, Badi Macro should be the most easy way to handle this request. However, if you want to avoid badi macro coding and this requirement is not required to be executed online in planning book, you might consider below structure:

      1) Extract KF from Planning Area into a InfoCube

      2) Via transformation to do calculation Or changes characteristic according to your business rule

      3) Using /SAPAPO/TSCUBE to load back the key figure

      This approach will be more easy for future trouble shooting, and more easy to understand the data flow/calculation. Hope this can help.

      Best Regards,

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.