Adding/subtracting a month to/from a date in SAP ABAP can be done with the FM MONTH_PLUS_DETERMINE. Operations with months are not so frequent, but just as useful. For example, calculate the end date of a contract that expires in half a year. In order to subtract the desired number of months, we simply pass a negative number to the months parameter.
Function module MONTH_PLUS_DETERMINE example:
"for example, lv_datum_old = '20230814'.
CALL FUNCTION 'MONTH_PLUS_DETERMINE'
EXPORTING
months = '-1'
olddate = lv_datum_old
IMPORTING
newdate = lv_datum.
" as a result lv_datum = '20230714'.

Main settings:
- months – number of months. (months=6)
- olddate – start date before action (olddate = 04/18/2022)
- newdate – result after action(newdate = 10/18/2022)
All function method MONTH_PLUS_DETERMINE signature with types:

In what task did you use this FM? Do you know an alternative to this Functional module? Write in the comments!