Convert month value of a date to text
The following ABAP code gets the month value of a particular date (YYYYMMDD) and converts it to its text value. I know its a very crude way of doing it but it does the job and having the ABAP code below provides a quick and easy way to copy and paste it into your SAP program.
DATA: gd_datetext TYPE string. CASE sy-datum+4(2). WHEN '01'. gd_datetext = 'January'. WHEN '02'. gd_datetext = 'February'. WHEN '03'. gd_datetext = 'March'. WHEN '04'. gd_datetext = 'April'. WHEN '05'. gd_datetext = 'May'. WHEN '06'. gd_datetext = 'June'. WHEN '07'. gd_datetext = 'July'. WHEN '08'. gd_datetext = 'August'. WHEN '09'. gd_datetext = 'September'. WHEN '10'. gd_datetext = 'October'. WHEN '11'. gd_datetext = 'November'. WHEN '12'. gd_datetext = 'December'. ENDCASE. concatenate sy-datum(2) gd_datetext sy-datum+2(2) into gd_datetext separated by space.
Related Articles
Add n number of working days to date (allow result to be a non working day)
Add n number of working days to date
Formatting SAP date field using ABAP into any format such as DDMMYYY, MM/DD/YYYY, DD-MMM-YY...
Formatting a date field
Check if date periods overlap
Add n number of working days to date
Add n number of working days to date
Add n number of working days to date using SAP personal work schedule
Add n number of working days to date (using personal work schedule)