Skip to Content
0
Former Member
Nov 25, 2009 at 09:36 AM

Customer Exit - Year To Date Average calculation

62 Views

Hi all,

I need some help writing a customer exit - I am not an ABAP expert but I hope someone can help me.

I need to create a Formula in my query which works out a 'Year to Date average' based on the number of months of the year which have already passed. This is based on the Financial year, so if the month is April, the main key figure is divided by 1, if it's May, it's divided by 2, and so on, until it's March and the key figure is divided by 12.

I need to create a Replacement Path variable to dynamically populate the number that the Key figure is divided by (1-12) based on the month entered by the user - so if the user enters March, the key figure is divided by 12 etc. I realise I will need a customer exit to do this, but this is where my knowledge is patchy!

Can someone advise me on the structure of the code, assuming the user populates the month using the 0calmonth variable? All I need is something along the lines of, if the month = April then the variable = 1 etc.

Hope this makes sense, and really appreciate your help,

Mischa

Edited by: Mischa Gulseven on Nov 25, 2009 10:36 AM

Edited by: Mischa Gulseven on Nov 25, 2009 10:37 AM

Edited by: Mischa Gulseven on Nov 25, 2009 10:37 AM

Edited by: Mischa Gulseven on Nov 25, 2009 10:37 AM