cancel
Showing results for 
Search instead for 
Did you mean: 

macro copy future bucket qty to N-1 from key figure

former_member309586
Participant
0 Kudos

Hi Gurus,

We are planning to write a macro.

Can any one can help me in copying the qty of N to N-1?

We have 1 Key figure values where we wanted the values of N to move to N-1 bucket.

Thanks in advance

Regards,

Rajesh

Accepted Solutions (1)

Accepted Solutions (1)

satish_waghmare3
Active Contributor
0 Kudos

Hello Rajesh.

Please refer below sample example in 9AEXAMPLES View( MacroExamples) macrobook using /sapapo/advm.

Here is link to SAP Help which has details on this function or other functions.

Date Functions - Planning Area Administration - SAP Library

Hope this will help.

Thank you

Satish Waghmare

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

You could use the macro function TIMESHIFT_BACKWARDS()

From SAP Help:

TIMESHIFT_BACKWARDS( X1 ; ... ; Xn ; Y1 ; ... ; Yn ) shifts the values of time series X1 through Xn backward in time by the number of periods given in time series Y1 through Yn.

Example:

The time series looks like this: X 10 20 30 40 50 Y 1 2 1 3 1. The result looks like this: 30 40 30 - 50 -

The value 10 is shifted back one period in time, the value 20 is shifted back two periods in time, and so on.

former_member309586
Participant
0 Kudos

Thanks for the response