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

How many days of an absence belong to a period

stefan_hntemann
Explorer
611

Hello,

example: An absence lasts from 20.11.2016 until 13.01.2018.

Is there any FM that shows, how many days of this absence belong to period 02/2017

or how many days belong to year 2017 ??

Grateful for hints ... Stefan

2 REPLIES 2
Read only

amy_king
Active Contributor
0 Kudos
467

Hi Stefan,

Interesting question! I'm not aware of an existing function module or class method that will give you this directly. One option is to call function J_1B_GET_DATE_RANGE_DDA for each range of dates to get a list of the individual dates in each range. Then compare the two lists to see what their intersection is.

Cheers,

Amy

Read only

former_member284740
Participant
0 Kudos
467

Most basic calculation would be to subtract the dates: 20180113 - 20161120

That should give you the total days between those 2 dates.