Share |

DATE_TO_DAY sap function module


The below code shows how function module DATE_TO_DAY is used to calculate the day of the week a particular date is ('Monday', 'Friday', 'Sat.' etc).

Calculate day of week

  DATA: ld_day TYPE c.

  CALL FUNCTION 'DATE_TO_DAY'
       EXPORTING
            date    = sy-datum
       IMPORTING
            weekday = ld_day.