Skip to Content
0
Former Member
Apr 07, 2013 at 08:18 AM

FM 'END_TIME_DETERMINE' not working

71 Views

Hello Experts,

I am developing a report in CRM, where I am using function module 'END_TIME_DETERMINE' to add or subtracts days.

call function 'END_TIME_DETERMINE'
exporting
duration = 2
unit = 'D'
factory_calendar = 'IN'
importing
end_date = final_Date
end_time = final_time
changing
start_date = sy-datum
start_time = sy-uzeit
exceptions
factory_calendar_not_found = 1
date_out_of_calendar_range = 2
date_not_valid = 3
unit_conversion_error = 4
si_unit_missing = 5
parameters_no_valid = 6
others = 7
.

When I pass duration = 0, I am getting sy-sybrc = 0.

but when I pass duration = 2 or any other value, then returning sy-subrc = 4.

When I execute the same case i.e. duration other than 0, in SE37, it is working perfectly.

Please help.

Regards,

Nikhil