FORM date_to_external CHANGING p_input TYPE sy-datum
p_output TYPE char10.
IF p_input+4(2) GE '13'.
p_input+0(4) = p_input+0(4) + 1."Increment Year
ENDIF.
CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
EXPORTING
date_internal = p_input
IMPORTING
date_external = p_output
EXCEPTIONS
date_internal_is_invalid = 1
OTHERS = 2.
IF sy-subrc <> 0.
p_output = p_input.
ENDIF.
ENDFORM. " DATE_TO_EXTERNAL
No comments:
Post a Comment