SAP FM_GET_DATES_FROM_PERIOD Function Module for









FM_GET_DATES_FROM_PERIOD is a standard fm get dates from period SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 fm get dates from period FM, simply by entering the name FM_GET_DATES_FROM_PERIOD into the relevant SAP transaction such as SE37 or SE38.

Function Group: FMSV
Program Name: SAPLFMSV
Main Program: SAPLFMSV
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function FM_GET_DATES_FROM_PERIOD 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 'FM_GET_DATES_FROM_PERIOD'"
EXPORTING
* IP_APPLC = ' ' "
IP_FIKRS = "Financial Management Area
IP_GJAHR = "Fiscal Year
IP_POPER = "Period

IMPORTING
OP_DATAB = "
OP_DATBIS = "

EXCEPTIONS
ERROR_OCCURRED = 1 NO_FIKRS_FOUND = 2 NO_PERIV_FOUND = 3
.



IMPORTING Parameters details for FM_GET_DATES_FROM_PERIOD

IP_APPLC -

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IP_FIKRS - Financial Management Area

Data type: FM01-FIKRS
Optional: No
Call by Reference: No ( called with pass by value option)

IP_GJAHR - Fiscal Year

Data type: BPJA-GJAHR
Optional: No
Call by Reference: No ( called with pass by value option)

IP_POPER - Period

Data type: T009B-POPER
Optional: No
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for FM_GET_DATES_FROM_PERIOD

OP_DATAB -

Data type: FMFINCODE-DATAB
Optional: No
Call by Reference: No ( called with pass by value option)

OP_DATBIS -

Data type: FMFINCODE-DATBIS
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

ERROR_OCCURRED -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_FIKRS_FOUND - Errors have occurred

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_PERIV_FOUND -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for FM_GET_DATES_FROM_PERIOD 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_ip_applc  TYPE STRING, "   SPACE
lv_op_datab  TYPE FMFINCODE-DATAB, "   
lv_error_occurred  TYPE FMFINCODE, "   
lv_ip_fikrs  TYPE FM01-FIKRS, "   
lv_op_datbis  TYPE FMFINCODE-DATBIS, "   
lv_no_fikrs_found  TYPE FMFINCODE, "   
lv_ip_gjahr  TYPE BPJA-GJAHR, "   
lv_no_periv_found  TYPE BPJA, "   
lv_ip_poper  TYPE T009B-POPER. "   

  CALL FUNCTION 'FM_GET_DATES_FROM_PERIOD'  "
    EXPORTING
         IP_APPLC = lv_ip_applc
         IP_FIKRS = lv_ip_fikrs
         IP_GJAHR = lv_ip_gjahr
         IP_POPER = lv_ip_poper
    IMPORTING
         OP_DATAB = lv_op_datab
         OP_DATBIS = lv_op_datbis
    EXCEPTIONS
        ERROR_OCCURRED = 1
        NO_FIKRS_FOUND = 2
        NO_PERIV_FOUND = 3
. " FM_GET_DATES_FROM_PERIOD




ABAP code using 7.40 inline data declarations to call FM FM_GET_DATES_FROM_PERIOD

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.

DATA(ld_ip_applc) = ' '.
 
"SELECT single DATAB FROM FMFINCODE INTO @DATA(ld_op_datab).
 
 
"SELECT single FIKRS FROM FM01 INTO @DATA(ld_ip_fikrs).
 
"SELECT single DATBIS FROM FMFINCODE INTO @DATA(ld_op_datbis).
 
 
"SELECT single GJAHR FROM BPJA INTO @DATA(ld_ip_gjahr).
 
 
"SELECT single POPER FROM T009B INTO @DATA(ld_ip_poper).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!