cancel
Showing results for 
Search instead for 
Did you mean: 

Macro to calculate values in different column

Former Member
0 Kudos

Hi All,

I want to write a macro in SNP based on following situation we are facing:

Req.min.shelf life = 10 days (maintained in product master)

Expected Wastage Qty = 500 KG calculated on 17th Oct 2012 ( based on demand situation & std macro)

Additional KF = Expected Wastage Qty but this should populate values based on req.min shelf life days on 7th Oct 2012 ( 17th Oct - 10 days)

Additional KF (7th Oct 2012) = 500

Regards,

Raj

Accepted Solutions (1)

Accepted Solutions (1)

rajkj
Active Contributor
0 Kudos

Hi Raj,

You can use the macro function TIMESHIFT_BACKWARDS.

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 look 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.

SAP example:

Thanks,

Rajesh

Former Member
0 Kudos

Thanks a lot Rajesh. This was really helpful.

Regards,

Raj

Answers (0)