Current location - Recipe Complete Network - Catering franchise - How to get the year and month of SY-DATUM in select in abap?
How to get the year and month of SY-DATUM in select in abap?
Question 1. select how to take the year and month of sy-datum or other fields

move sy-datum+0(4) to YYYYYMM. This way, you can take the year and month and put it into a variable

select sy-datum+0(4) You can also do it this way, but it is recommended that you use a variable to save it first

Directly call the date function F4_DATE, pop-up dialog form or manually enter the complete date, and then intercept the first 4 digits of the date string, that is: YYYYMM, to get the year and month.

Another way is: do two input options, manually enter the year YYYYY and month MM can be, and finally the two fields will be spliced into a character YYYYMM, that is, get the year and month.