Application Development 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: 

SUBSTRACTION OF DATE

former_member1284402
Participant
0 Kudos

hello evrybdy,

i have a problem regarding date substraction, actually i have two date field in selection-screen and

first field is mandatory but second is optional, so my requirement is that if user dont give the date in second field then it must take the date before one month but problem is that how wud i subtract the date for different moths like days are of 28, 29, 30, and 31?

regards saurabh.

1 ACCEPTED SOLUTION

former_member193382
Active Contributor
0 Kudos

Hi,

Check out this FM.

HR_HK_DIFF_BT_2_DATES

Also see this link if its useful to you.

[https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/timedifferencebetweentwodatesinhoursorminutes].

Regards,

Raj

1 REPLY 1

former_member193382
Active Contributor
0 Kudos

Hi,

Check out this FM.

HR_HK_DIFF_BT_2_DATES

Also see this link if its useful to you.

[https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/timedifferencebetweentwodatesinhoursorminutes].

Regards,

Raj