SAP PERIOD_AND_DATE_INPUT Function Module for NOTRANSL: Eingabekonvertierung für ein Datum mit Periode
PERIOD_AND_DATE_INPUT is a standard period and date input SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Eingabekonvertierung für ein Datum mit Periode processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for period and date input FM, simply by entering the name PERIOD_AND_DATE_INPUT into the relevant SAP transaction such as SE37 or SE38.
Function Group: BORRT
Program Name: SAPLBORRT
Main Program: SAPLBORRT
Appliation area: *
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function PERIOD_AND_DATE_INPUT pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'PERIOD_AND_DATE_INPUT'"NOTRANSL: Eingabekonvertierung für ein Datum mit Periode.
EXPORTING
* DIALOG_DATE_IS_IN_THE_PAST = 'X' "Checkbox
EXTERNAL_DATE = "Schedule line date
* EXTERNAL_PERIOD = ' ' "External date type
* INTERNAL_PERIOD = ' ' "Date type (day, week, month, interval)
* I_PERIV = "Fiscal Year Variant
* I_WERKS = "Plant
* I_MRPPP = "PPC planning calendar
IMPORTING
INTERNAL_DATE = "ABAP System Field: Current Date of Application Server
INTERNAL_PERIOD = "Date type (day, week, month, interval)
EXCEPTIONS
DATE_INVALID = 1 NO_DATA = 2 PERIOD_INVALID = 3
IMPORTING Parameters details for PERIOD_AND_DATE_INPUT
DIALOG_DATE_IS_IN_THE_PAST - Checkbox
Data type: XFELDDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXTERNAL_DATE - Schedule line date
Data type: RVDAT-EXTDATUMOptional: No
Call by Reference: No ( called with pass by value option)
EXTERNAL_PERIOD - External date type
Data type: TPRG-PRGBZDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
INTERNAL_PERIOD - Date type (day, week, month, interval)
Data type: TPRG-PRGRSDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_PERIV - Fiscal Year Variant
Data type: MT61D-PERIVOptional: Yes
Call by Reference: No ( called with pass by value option)
I_WERKS - Plant
Data type: T439I-WERKSOptional: Yes
Call by Reference: No ( called with pass by value option)
I_MRPPP - PPC planning calendar
Data type: T439I-MRPPPOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for PERIOD_AND_DATE_INPUT
INTERNAL_DATE - ABAP System Field: Current Date of Application Server
Data type: SYST-DATUMOptional: No
Call by Reference: No ( called with pass by value option)
INTERNAL_PERIOD - Date type (day, week, month, interval)
Data type: TPRG-PRGRSOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
DATE_INVALID - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_DATA - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PERIOD_INVALID - Invalid Period
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for PERIOD_AND_DATE_INPUT Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.DATA: | ||||
lv_date_invalid | TYPE STRING, " | |||
lv_internal_date | TYPE SYST-DATUM, " | |||
lv_dialog_date_is_in_the_past | TYPE XFELD, " 'X' | |||
lv_no_data | TYPE XFELD, " | |||
lv_external_date | TYPE RVDAT-EXTDATUM, " | |||
lv_internal_period | TYPE TPRG-PRGRS, " | |||
lv_period_invalid | TYPE TPRG, " | |||
lv_external_period | TYPE TPRG-PRGBZ, " SPACE | |||
lv_internal_period | TYPE TPRG-PRGRS, " SPACE | |||
lv_i_periv | TYPE MT61D-PERIV, " | |||
lv_i_werks | TYPE T439I-WERKS, " | |||
lv_i_mrppp | TYPE T439I-MRPPP. " |
  CALL FUNCTION 'PERIOD_AND_DATE_INPUT' "NOTRANSL: Eingabekonvertierung für ein Datum mit Periode |
EXPORTING | ||
DIALOG_DATE_IS_IN_THE_PAST | = lv_dialog_date_is_in_the_past | |
EXTERNAL_DATE | = lv_external_date | |
EXTERNAL_PERIOD | = lv_external_period | |
INTERNAL_PERIOD | = lv_internal_period | |
I_PERIV | = lv_i_periv | |
I_WERKS | = lv_i_werks | |
I_MRPPP | = lv_i_mrppp | |
IMPORTING | ||
INTERNAL_DATE | = lv_internal_date | |
INTERNAL_PERIOD | = lv_internal_period | |
EXCEPTIONS | ||
DATE_INVALID = 1 | ||
NO_DATA = 2 | ||
PERIOD_INVALID = 3 | ||
. " PERIOD_AND_DATE_INPUT |
ABAP code using 7.40 inline data declarations to call FM PERIOD_AND_DATE_INPUT
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8."SELECT single DATUM FROM SYST INTO @DATA(ld_internal_date). | ||||
DATA(ld_dialog_date_is_in_the_past) | = 'X'. | |||
"SELECT single EXTDATUM FROM RVDAT INTO @DATA(ld_external_date). | ||||
"SELECT single PRGRS FROM TPRG INTO @DATA(ld_internal_period). | ||||
"SELECT single PRGBZ FROM TPRG INTO @DATA(ld_external_period). | ||||
DATA(ld_external_period) | = ' '. | |||
"SELECT single PRGRS FROM TPRG INTO @DATA(ld_internal_period). | ||||
DATA(ld_internal_period) | = ' '. | |||
"SELECT single PERIV FROM MT61D INTO @DATA(ld_i_periv). | ||||
"SELECT single WERKS FROM T439I INTO @DATA(ld_i_werks). | ||||
"SELECT single MRPPP FROM T439I INTO @DATA(ld_i_mrppp). | ||||
Search for further information about these or an SAP related objects