Skip to Content
author's profile photo
Former Member

Copy key figues without the characteristic values

Hi Everyone

I need some help /advice to copy key figues without charateristic values. Sounds easy, well I thought so...

My customer wants to plan certain key figures against a “reference employee”, for example chargeable hours.

• This reference employee, and therefore all other employees will belong to an employee group (and several other characteristics – just try to keep it simple).

• The employee group will not be a attribute of the employee, as this could change sevaral times during the year. One employee could belong therefore belong to multiple employee groups during one year.

• All key figures will be planned against a fiscal period.

As a start we would plan one of the key figures of the reference employee and then copy it to all other employees in that profit centre.

At this stage we can assume that there will already be some plan data against the same /and or another key figures for the “target” employees. This means that there will already a be a plan record with an “existing” employee group for that employee in the cube.

For example.

Existing records:

Employee Employee Group Period Standard Hours Chargeable Hours

B101 B 1 100 200

B101 B 2 0 0

B101 B 3 0 0

Now we would plan the “reference” employee:

Employee Employee Group Period Standard Hours Chargeable Hours

A100 A 1 80 0

A100 A 2 80 0

A100 A 3 - 12 100 0

When I now want to copy the chargeable hours from the reference employee to the target employees to for all periods (1-12), the following happens:

Employee Employee Group Period Standard Hours Chargeable Hours

Original B101 B 1 100 200

Reverse B101 B 1 0 200-

New B101 A 1 0 80

New B101 A 2 0 80

New B101 A 3 - 12 0 100

What we would like to achieve is the following:

• Copy key figures without having to copy the “related” characteristics

• Create new records for the other periods using same employee group as the existing record.

Employee Employee Group Period Standard Hours Chargeable Hours

Original B101 B 1 100 200

Delta B101 B 1 0 -120

New B101 B 2 0 80

New B101 B 3 - 12 0 100

I have tried sevaral versions of Fox formulas and the standard copy function, but they all give the same results:

For example:



ZP = TMVL(ZP, 1).

  • Find reference values



*Copy to all employees









Now for the question: Can I copy key figures values without the existing characteristic values, AND , update the new record with charateristic values from a existing record which are not attributes? And if yes, how can I do it.

Many thanks in advance


Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • author's profile photo
    Former Member
    Sep 27, 2005 at 10:08 AM

    Hi Wendy,

    The reason why you are not able to use the Copy function is because there is no common characteristic value based on which the copy function can be performed in your case, as you are trying to copy employee A* data to employee B* data but the system does not know that A1 is to be copied to B1 and so on and so forth.

    If in the reference data you had B instead of A

    Employee Employee Group Period Standard Hours Chargeable Hours

    B100 B 1 80 0

    B100 B 2 80 0

    B100 B 3 - 12 100 0

    then you would be able to use the copy data function to get the desired result.

    hope I understood your problem correctly.



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Anurag

      Thanks for your reply.

      The reference employee could be assigned to a different employee group as the target employees for a part of the year..hence the issue. I hope I have explain it a bit better in my previous update...



      Message was edited by: Wendy Du Toit

  • Sep 27, 2005 at 02:16 PM

    Hi Wendy,

    It seems you have at least 2 options:

    First of all solve the problem of copying first - forget the DO loop for a period, you can add this later.


    Plan only on employee level - hence remove employee group from the level, and derive it on planning area from the attribute.

    Then all you have to worry about is how to copy from reference employee to another employees by your foreach formula (relevant employee group for target employees would be derived and shouldn't be in fields to be changed in your FOX)


    Put "Employee group" in fields to be changed in your FOX - you can do it the following way:

    after reading you ref data and before "copying to target empl" add lines with ATRV statement reading employee group from target employee attribute,

    next assign read attribute value to target employee group value,

    ... continue your FOX with copying

    I hope it helps,



    Add comment
    10|10000 characters needed characters exceeded

    • Hello Wendy,

      I am not sure whether I fully understood your problem - this is what I think it is:

      You have data records containing employee, employee group and period. You have a time dependent relationship between employee and employee group like this:

      period employee emp. group

      1 B101 B

      2 B101 B...

      7 B101 C

      8 B101 C...

      and you want to enter data for a sample employee (having some employee group) that should be copied to the actual employees:

      emp. emp. group period value

      A101 A 1 80

      A101 A 2 100

      Now if you already have existing records for some employees when copying they should be adapted:

      emp. period value

      B101 B 1 200 (old record)

      B101 B 1 -120 (new delta)

      You have two options to reach this goal:

      1. Do your copy function on a planning level that contains employee only (no employee group) and use a derivation to fill in the employee group. You cannot use a derivation type attribute together with time dependent attributes as the time reference to be used is in the data record and not the system time or some key data.

      You can either create some reference data (like in the table above) that contains the proper relationship for the single periods and use a characteristic relationship of type reference data (use employee and period as the source characteristics and emp group as the target). Or you can create a derivation type user exit. Again use employee and period as sources and emp. group as target. You can define the rules for the derivation either in a InfoCube (in a table like above) or in a time dependent attribute - you just have to make sure that in the exit you grab the right data/read the attribute with say the first day of each period as key date (e.g. use FM UPC_CHA_VALUES_GET and fill the field I_Dateto to the first day of the current period).

      2. You can use a do loop pretty much like you did but use the ATRVT instead of ATRV. ATRVT gives you time dependent attributes of a characteristic. You loop over the records (do or foreach loop) and for each record you get the period, determine the key data (e.g. first day) and read the time dependent attribute (this is quite similar to what you would do in the exit in case 1).

      I hope this should solve the problem, if not then tell us...



  • Oct 04, 2005 at 01:23 AM

    Hi Wendy,

    ok, here's my point of view on this. If I get it right, all you need is standard delete and copy functions and one line of FOX:

    Step 1:

    Type: Delete

    Condition: Employee = B101 (and others)

    Step 2:

    Type: Formula

    Fields to be changed: KF

    Fields for conditions: Employee

    Parameter group:

    Condition: Employee = A

    Formula: {chargable hours} = {standard hours}.

    Step 3:

    Type: Copy to several target objects

    Fields to be changed: Employee, Employee group

    Fields for conditions: KF

    Parameter group:

    - Overwrite values

    - Condition/Old values: KF = chargable hours, Employee = A100, Emp.Group = A

    - New values: Employee = B101, Emp.Group = A (list all other employees here that you want to copy to)

    Step 4:

    Type: Delete

    Fields for conditions: Employee, KF

    Parameter group:

    Employee = A, KF = chargable hours

    If you enter the hours for your reference employee directly on "chargable hours", you can simplify the sequence and remove steps 2 and 4.

    Optionally, you can make everything more dynamic by using (exit) variables instead of hardcoding values.



    SAP NetWeaver RIG

    Add comment
    10|10000 characters needed characters exceeded