form schedule
using
iv_start_date type d
iv_factorty_calendar type wfcid
iv_length type i
changing ev_end_date type d.
data lv_factory_date type facdate.
clear ev_end_date.
call function 'DATE_CONVERT_TO_FACTORYDATE'
exporting
date = iv_start_date
factory_calendar_id = iv_factorty_calendar
importing
factorydate = lv_factory_date
exceptions
calendar_buffer_not_loadable = 1
correct_option_invalid = 2
date_after_range = 3
date_before_range = 4
date_invalid = 5
factory_calendar_not_found = 6
others = 7.
if sy-subrc <> 0.
write / 'Exception'.
ev_end_date = iv_start_date + iv_length.
return.
endif.
add iv_length to lv_factory_date.
call function 'FACTORYDATE_CONVERT_TO_DATE'
exporting
factorydate = lv_factory_date
factory_calendar_id = iv_factorty_calendar
importing
date = ev_end_date
exceptions
calendar_buffer_not_loadable = 1
factorydate_after_range = 2
factorydate_before_range = 3
factorydate_invalid = 4
factory_calendar_id_missing = 5
factory_calendar_not_found = 6
others = 7.
if sy-subrc <> 0.
write / 'Exception'.
ev_end_date = iv_start_date + iv_length.
endif.
endform.
Subscribe to:
Post Comments (Atom)
SAP ABAP: Determine Timezone for Plant
DATA: lt_tzone TYPE STANDARD TABLE OF tznzone WITH DEFAULT KEY, l_tzone TYPE tznzone. " get time zone for plant ...
-
Sometimes the backend doesn't return the selected rows of an SALV. For my case get_metadata( ) was the solution: go_salv-> get_met...
-
GUIDs or UUIDs can be created with the class cl_system_uuid . try . data (lv_uuid) = cl_system_uuid => if_system_uuid_static...
-
AA PR-AUF(E) Prozessauftrag (eröffnet) AB PR-AUF(F) Prozessauftrag (freigegeben) AC FE...
No comments:
Post a Comment