SAP GET_PERIOD_TEXTS Function Module for









GET_PERIOD_TEXTS is a standard get period texts 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 get period texts FM, simply by entering the name GET_PERIOD_TEXTS into the relevant SAP transaction such as SE37 or SE38.

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



Function GET_PERIOD_TEXTS 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 'GET_PERIOD_TEXTS'"
EXPORTING
* I_BUKRS = ' ' "
I_POPER = "
* I_PERIV = ' ' "
* I_BDATJ = '0000' "
* I_SPRAS = SY-LANGU "

IMPORTING
E_KTEXT = "
E_LTEXT = "
E_T009C = "

EXCEPTIONS
BUKRS_NOT_FOUND = 1 NO_TEXTS = 2 VARIANT_NOT_DEFINED = 3 VARIANT_NOT_FOUND = 4 VERSION_NOT_YEAR_DEPENDENT = 5 PERIOD_VERSION_YEAR_DEPENDENT = 6
.



IMPORTING Parameters details for GET_PERIOD_TEXTS

I_BUKRS -

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

I_POPER -

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

I_PERIV -

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

I_BDATJ -

Data type: T009C-BDATJ
Default: '0000'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_SPRAS -

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

EXPORTING Parameters details for GET_PERIOD_TEXTS

E_KTEXT -

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

E_LTEXT -

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

E_T009C -

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

EXCEPTIONS details

BUKRS_NOT_FOUND -

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

NO_TEXTS -

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

VARIANT_NOT_DEFINED -

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

VARIANT_NOT_FOUND -

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

VERSION_NOT_YEAR_DEPENDENT -

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

PERIOD_VERSION_YEAR_DEPENDENT -

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

Copy and paste ABAP code example for GET_PERIOD_TEXTS 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_e_ktext  TYPE T009C-KTEXT, "   
lv_i_bukrs  TYPE T001-BUKRS, "   SPACE
lv_bukrs_not_found  TYPE T001, "   
lv_e_ltext  TYPE T009C-LTEXT, "   
lv_i_poper  TYPE T009B-POPER, "   
lv_no_texts  TYPE T009B, "   
lv_e_t009c  TYPE T009C, "   
lv_i_periv  TYPE T009-PERIV, "   SPACE
lv_variant_not_defined  TYPE T009, "   
lv_i_bdatj  TYPE T009C-BDATJ, "   '0000'
lv_variant_not_found  TYPE T009C, "   
lv_i_spras  TYPE SY-LANGU, "   SY-LANGU
lv_version_not_year_dependent  TYPE SY, "   
lv_period_version_year_dependent  TYPE SY. "   

  CALL FUNCTION 'GET_PERIOD_TEXTS'  "
    EXPORTING
         I_BUKRS = lv_i_bukrs
         I_POPER = lv_i_poper
         I_PERIV = lv_i_periv
         I_BDATJ = lv_i_bdatj
         I_SPRAS = lv_i_spras
    IMPORTING
         E_KTEXT = lv_e_ktext
         E_LTEXT = lv_e_ltext
         E_T009C = lv_e_t009c
    EXCEPTIONS
        BUKRS_NOT_FOUND = 1
        NO_TEXTS = 2
        VARIANT_NOT_DEFINED = 3
        VARIANT_NOT_FOUND = 4
        VERSION_NOT_YEAR_DEPENDENT = 5
        PERIOD_VERSION_YEAR_DEPENDENT = 6
. " GET_PERIOD_TEXTS




ABAP code using 7.40 inline data declarations to call FM GET_PERIOD_TEXTS

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 KTEXT FROM T009C INTO @DATA(ld_e_ktext).
 
"SELECT single BUKRS FROM T001 INTO @DATA(ld_i_bukrs).
DATA(ld_i_bukrs) = ' '.
 
 
"SELECT single LTEXT FROM T009C INTO @DATA(ld_e_ltext).
 
"SELECT single POPER FROM T009B INTO @DATA(ld_i_poper).
 
 
 
"SELECT single PERIV FROM T009 INTO @DATA(ld_i_periv).
DATA(ld_i_periv) = ' '.
 
 
"SELECT single BDATJ FROM T009C INTO @DATA(ld_i_bdatj).
DATA(ld_i_bdatj) = '0000'.
 
 
"SELECT single LANGU FROM SY INTO @DATA(ld_i_spras).
DATA(ld_i_spras) = SY-LANGU.
 
 
 


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!