I am working on a new function module where on the selection screen i have the period type ( allowed values are 'D','W','M' for day,week and month).
And have one more input for date_period(it will allow integer upto 999).
My requirement is to calculate a date based on the period_type and date_period.
For example, if the period_type is 'M' (monthly) and date_period is 10, then the date should be current date + 10 months.
if the period_type is 'W' (weekly) and date_period is 10, then the date should be current date + 10 weeks.
And the same with 'D'.
Please note that i am working in APO environment. There is a FM module in ECC 'RP_CALC_DATE_IN_INTERVAL' which mostly matches my requirement but its not available in APO.
Any help would be appriciated.