SAP Function Modules

DATE_IN_FUTURE SAP Function module

DATE_IN_FUTUREis a standard SAP function module available within R/3 SAPsystems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import/export parameters, exceptions etc as well as any documentation contributions specific to the object. See here to view full function module documentation and code listing, simply by entering the name DATE_IN_FUTURE into the relevant SAP transaction such as SE37 or SE80.

Contribute (Add Comments)
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name DATE_IN_FUTURE or its description.

Associated Function Group: BCAT
Released Date: Not Released
    anzahl_tage =               "               Number days that are added/subtracted
    import_datum =              " rm06b-eeind   Date to which NUMBER_DAYS is added
    export_datum_ext_format =   "               Determined date in external format (according to users)
    export_datum_int_format =   " sy-datum      Determined date in the internal format (YYYYMMDD)
    .  "  DATE_IN_FUTURE

ABAP code example for DATE_IN_FUTURE Function Module

The ABAP code below is a full code listing to execute function module DATE_IN_FUTURE including all data declarations. The code uses the latest IN-LINE DATA DECLARATION SYNTAX but I have included an ABAP code snipet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).
ld_export_datum_ext_format TYPE STRING,
ld_export_datum_int_format TYPE SY-DATUM.

DATA(ld_anzahl_tage) = 'some text here'.

DATA(ld_import_datum). = 'some text here'. CALL FUNCTION 'DATE_IN_FUTURE' EXPORTING anzahl_tage = ld_anzahl_tage import_datum = ld_import_datum IMPORTING export_datum_ext_format = ld_export_datum_ext_format export_datum_int_format = ld_export_datum_int_format . " DATE_IN_FUTURE

ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
ld_export_datum_ext_format TYPE STRING ,
ld_anzahl_tage TYPE STRING ,
ld_export_datum_int_format TYPE SY-DATUM ,
ld_import_datum TYPE RM06B-EEIND .

ld_anzahl_tage = 'some text here'.

ld_import_datum. = 'some text here'.