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

check in selection screen

Former Member
0 Likes
573

Hello freinds,

I have to apply one check in selection screen.

means the difference between the date in selection screen should not be more than three month.

please suggest me how to do it.

Thanks,

Amar

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
548

Hi,

Use the function module SD_DATETIME_DIFFERENCE. This FM will give u the diff in days. Check if its more than 90. If it is then throw ur error message.

Thanks

Nayan

Hello freinds,

I have to apply one check in selection screen.

means the difference between the date in selection screen should not be more than three month.

please suggest me how to do it.

Thanks,

Amar

3 REPLIES 3
Read only

Former Member
0 Likes
549

Hi,

Use the function module SD_DATETIME_DIFFERENCE. This FM will give u the diff in days. Check if its more than 90. If it is then throw ur error message.

Thanks

Nayan

Read only

Former Member
0 Likes
548

use FM : HR_HK_DIFF_BT_2_DATES

to get the difference between two dates ...

At selection screen.

CALL FUNCTION 'HR_HK_DIFF_BT_2_DATES'

EXPORTING

date1 = v_date2

date2 = v_date1

OUTPUT_FORMAT = '04'

IMPORTING

  • YEARS =

MONTHS = v_months

  • DAYS =

  • EXCEPTIONS

  • INVALID_DATES_SPECIFIED = 1

  • OTHERS = 2

.

if v_months > 3.

message e000 with 'difference should not be more than three months' .

endif.

Read only

Former Member
0 Likes
548

Hi,

use the event AT SELECTION-SCREEN ON <w_date>

calculate the differece between two dates using the FM DAYS_BETWEEN_TWO_DATES and if the value is greater than 90 raise an error message.

Regards,

sriram