Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

To get the days any Function Modules

Former Member
0 Likes
806

Hi all

I want to get the no.of days if I will pass months.

for examples if I pass 18 months, it has to calculate how many days for 18 months calculation starts from the date which I give. for example if I give 02.05.2007 as date and no.of months 18, it has to give either no.of days or date after adding 18 months.

is there any function modules to get above result or any method is there in the SAP.

Awaiting for your reply

Regards

Praveen

Hi all

I want to get the no.of days if I will pass months.

for examples if I pass 18 months, it has to calculate how many days for 18 months calculation starts from the date which I give. for example if I give 02.05.2007 as date and no.of months 18, it has to give either no.of days or date after adding 18 months.

is there any function modules to get above result or any method is there in the SAP.

Awaiting for your reply

Regards

Praveen

6 REPLIES 6
Read only

Former Member
0 Likes
788

try this fm

HR_SGPBS_YRS_MTHS_DAYS-->no of days

to add dates

'RP_CALC_DATE_IN_INTERVAL'

Regards

Prabhu

Read only

Former Member
0 Likes
788
CALL FUNCTION 'RE_ADD_MONTH_TO_DATE'      
           EXPORTING
                months  = 1
                olddate = olddate
           IMPORTING
                newdate = newdate         
    EXCEPTIONS
                OTHERS  = 0.
Read only

MohanChauhan
Product and Topic Expert
Product and Topic Expert
0 Likes
788

Hi,

Use FM 'HR_PSD_DATES_ADD_MONTHS'

Regards,

Mohan

Read only

Former Member
0 Likes
788

Hi,

Look at the below thread

Regards

Sudheer

Read only

Former Member
0 Likes
788

Hi,

Just check this if it helps you:

parameters: p_date1 like sy-datum,

p_date2 like sy-datum.

data: diff_days(10) type c.

diff_days = p_date2 - p_date1.

write:/ diff_days,'days'.

Regards,

Varun.

Read only

Former Member
0 Likes
788

HI Praveen,

why u not check out this link i think this will help you to sort out all your requirements.

http://www.geocities.com/victorav15/sapr3/abapfun.html

Please award graciously if found useful.