SAP Function Modules

LC_GLT3_TO_EXTRACT_CONVERT SAP Function module







LC_GLT3_TO_EXTRACT_CONVERT is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name LC_GLT3_TO_EXTRACT_CONVERT into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: GLE2
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM LC_GLT3_TO_EXTRACT_CONVERT - LC GLT3 TO EXTRACT CONVERT





CALL FUNCTION 'LC_GLT3_TO_EXTRACT_CONVERT' "
  EXPORTING
    i_ryear_cons =              " fk00_ryear    Fiscal Year in Consolidation (LC)
    i_perid_cons =              " fk00_perid    Posting Period in Consolidation (LC)
*   i_periv_cons =              " fk00_periv
*   i_flg_cumul =               " fk00_flg      Accumulate Values
*   i_flg_zero_values =         " fk00_flg      Transfer Data Records with Zero Values
*   i_flg_spec_per =            " fk00_flg      Include Special Periods
*   i_flg_cwd_year_only = 'X'   " fk00_flg      Only Data Records from the Year Carried Forward From (Accumulated Values)
  IMPORTING
    e_periv_cons =              " fk00_periv    Fiscal Year Variant in Consolidation
  TABLES
    i_t_glt3 =                  " glt3          GLT3 Data to be Allocated a new ID
*   t_ska1 =                    " fk00_t_ska1   FI Account Master Data
*   t_t001 =                    " fk00_t_t001   Company Code Master Data
*   t_t004 =                    " fk00_t_t004   Chart of Accounts Master Data
*   t_tgsb =                    " fk00_t_tgsb   Business Area Master Data
    e_extract =                 " fk00_t_extract  Extract Dataset
  EXCEPTIONS
    NO_COMP_CODES = 1           "               Dataset does not Contain any Company Codes
    NO_KTOPL_ITCLG_ASSIGNMENT = 2  "            Missing Chart of Accounts/Consolidation Chart of Accounts Assignment
    INCOMPATIBLE_PERIODS = 3    "               Posting Periods are Incompatible
    PERID_CONS_INVALID = 4      "               Consolidation Posting Period is Invalid
    PERIOD_MAPPING_ERROR = 5    "               Error when Defining Periods (Individual Data Records)
    NO_DATA_RECORD_MAPPED = 6   "               Error when Defining Periods (all Datasets)
    .  "  LC_GLT3_TO_EXTRACT_CONVERT

ABAP code example for Function Module LC_GLT3_TO_EXTRACT_CONVERT





The ABAP code below is a full code listing to execute function module LC_GLT3_TO_EXTRACT_CONVERT including all data declarations. The code uses 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 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).

DATA:
ld_e_periv_cons  TYPE FK00_PERIV ,
it_i_t_glt3  TYPE STANDARD TABLE OF GLT3,"TABLES PARAM
wa_i_t_glt3  LIKE LINE OF it_i_t_glt3 ,
it_t_ska1  TYPE STANDARD TABLE OF FK00_T_SKA1,"TABLES PARAM
wa_t_ska1  LIKE LINE OF it_t_ska1 ,
it_t_t001  TYPE STANDARD TABLE OF FK00_T_T001,"TABLES PARAM
wa_t_t001  LIKE LINE OF it_t_t001 ,
it_t_t004  TYPE STANDARD TABLE OF FK00_T_T004,"TABLES PARAM
wa_t_t004  LIKE LINE OF it_t_t004 ,
it_t_tgsb  TYPE STANDARD TABLE OF FK00_T_TGSB,"TABLES PARAM
wa_t_tgsb  LIKE LINE OF it_t_tgsb ,
it_e_extract  TYPE STANDARD TABLE OF FK00_T_EXTRACT,"TABLES PARAM
wa_e_extract  LIKE LINE OF it_e_extract .

DATA(ld_i_ryear_cons) = 'Check type of data required'.
DATA(ld_i_perid_cons) = 'Check type of data required'.
DATA(ld_i_periv_cons) = 'Check type of data required'.
DATA(ld_i_flg_cumul) = 'Check type of data required'.
DATA(ld_i_flg_zero_values) = 'Check type of data required'.
DATA(ld_i_flg_spec_per) = 'Check type of data required'.
DATA(ld_i_flg_cwd_year_only) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_t_glt3 to it_i_t_glt3.

"populate fields of struture and append to itab
append wa_t_ska1 to it_t_ska1.

"populate fields of struture and append to itab
append wa_t_t001 to it_t_t001.

"populate fields of struture and append to itab
append wa_t_t004 to it_t_t004.

"populate fields of struture and append to itab
append wa_t_tgsb to it_t_tgsb.

"populate fields of struture and append to itab
append wa_e_extract to it_e_extract. . CALL FUNCTION 'LC_GLT3_TO_EXTRACT_CONVERT' EXPORTING i_ryear_cons = ld_i_ryear_cons i_perid_cons = ld_i_perid_cons * i_periv_cons = ld_i_periv_cons * i_flg_cumul = ld_i_flg_cumul * i_flg_zero_values = ld_i_flg_zero_values * i_flg_spec_per = ld_i_flg_spec_per * i_flg_cwd_year_only = ld_i_flg_cwd_year_only IMPORTING e_periv_cons = ld_e_periv_cons TABLES i_t_glt3 = it_i_t_glt3 * t_ska1 = it_t_ska1 * t_t001 = it_t_t001 * t_t004 = it_t_t004 * t_tgsb = it_t_tgsb e_extract = it_e_extract EXCEPTIONS NO_COMP_CODES = 1 NO_KTOPL_ITCLG_ASSIGNMENT = 2 INCOMPATIBLE_PERIODS = 3 PERID_CONS_INVALID = 4 PERIOD_MAPPING_ERROR = 5 NO_DATA_RECORD_MAPPED = 6 . " LC_GLT3_TO_EXTRACT_CONVERT
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ENDIF.







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.

DATA:
ld_e_periv_cons  TYPE FK00_PERIV ,
ld_i_ryear_cons  TYPE FK00_RYEAR ,
it_i_t_glt3  TYPE STANDARD TABLE OF GLT3 ,
wa_i_t_glt3  LIKE LINE OF it_i_t_glt3,
ld_i_perid_cons  TYPE FK00_PERID ,
it_t_ska1  TYPE STANDARD TABLE OF FK00_T_SKA1 ,
wa_t_ska1  LIKE LINE OF it_t_ska1,
ld_i_periv_cons  TYPE FK00_PERIV ,
it_t_t001  TYPE STANDARD TABLE OF FK00_T_T001 ,
wa_t_t001  LIKE LINE OF it_t_t001,
ld_i_flg_cumul  TYPE FK00_FLG ,
it_t_t004  TYPE STANDARD TABLE OF FK00_T_T004 ,
wa_t_t004  LIKE LINE OF it_t_t004,
ld_i_flg_zero_values  TYPE FK00_FLG ,
it_t_tgsb  TYPE STANDARD TABLE OF FK00_T_TGSB ,
wa_t_tgsb  LIKE LINE OF it_t_tgsb,
ld_i_flg_spec_per  TYPE FK00_FLG ,
it_e_extract  TYPE STANDARD TABLE OF FK00_T_EXTRACT ,
wa_e_extract  LIKE LINE OF it_e_extract,
ld_i_flg_cwd_year_only  TYPE FK00_FLG .

ld_i_ryear_cons = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_t_glt3 to it_i_t_glt3.
ld_i_perid_cons = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_ska1 to it_t_ska1.
ld_i_periv_cons = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_t001 to it_t_t001.
ld_i_flg_cumul = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_t004 to it_t_t004.
ld_i_flg_zero_values = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_tgsb to it_t_tgsb.
ld_i_flg_spec_per = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_e_extract to it_e_extract.
ld_i_flg_cwd_year_only = 'Check type of data required'.

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 LC_GLT3_TO_EXTRACT_CONVERT or its description.