cancel
Showing results for 
Search instead for 
Did you mean: 

To calculate next month in a customer exit Variable

Former Member
0 Kudos

I need to derive the next month.

If the user enters 02-08-2010. Then in anothr variable if user enters 6 I should get 02-01-2011. Is there any functional module to derive next month based on the numeric value.

Anil

Accepted Solutions (0)

Answers (2)

Answers (2)

vasanth_gutta
Explorer
0 Kudos

Hi Anil,

Here I understand of what your query is; user enters a date to a variable, lets call v1 and no of months to another variable v2, where it should retrieve the data for; future date = entered date v1 + v2 no of months?

If it is the case:

there is a function module that you can manipulate in user exit. below is the procedure of how to achieve this;

- create variable v1 for date available for user input,

- create variable v2 for no of months available for user input,

- create variable v3 for result date on user exit and not available for user input.

- go to cmod and follow the below exit code for v3 variable.

istep 2.

when variable v3.

data: tempdate type datum, noofmonths type i.

tempdate = v1.

noofmonths = v2.

call function 'SALP_CALC_DATE'

exporting

in_rectype = 'M'

in_nbr_dwxmqy = noofmonths

in_date = tempdate

importing

out_date = result.

The above code will result the variable value as v1+v2 months.

I have done this before.

Please let me know if anything specific.

Former Member
0 Kudos

For function module RP_CALC_DATE_IN_INTERVAL in ECC is there a similar function module in BI.

Anil

Former Member
0 Kudos

Hi Anil,

Here the user input is dynamic

To achieve this either you have to use an Exit variable or a BADI.

Regards,

Rahul