DATA : lv_start_date TYPE sy-datum,
lv_end_date TYPE sy-datum.
DATA : lv_sep1(3),lv_sep2(3),lv_sep3(3).
DATA : lv_day(2),lv_month(2),lv_year(4).
SEARCH gs_final-end_date FOR lv_sep1.
IF sy-subrc = 0.
SPLIT gs_final-end_date AT '.' INTO lv_day lv_month lv_year.
IF strlen( lv_day ) = 1.
CONCATENATE '0' lv_day INTO lv_day.
ENDIF.
IF strlen( lv_month ) = 1.
CONCATENATE '0' lv_month INTO lv_month.
ENDIF.
ENDIF.
SEARCH gs_final-start_date FOR lv_sep2.
IF sy-subrc = 0.
SPLIT gs_final-start_date AT '-' INTO lv_day lv_month lv_year.
ENDIF.
SEARCH gs_final-end_date FOR lv_sep3.
IF sy-subrc = 0.
SPLIT gs_final-start_date AT '/' INTO lv_day lv_month lv_year.
ENDIF.
CONCATENATE lv_year lv_month lv_day INTO gs_final-start_date.
MOVE gs_final-start_date TO lv_start_date.
No comments:
Post a Comment