SAP Function Modules

FI_KDFTAB_ABARBEITEN SAP Function module







FI_KDFTAB_ABARBEITEN 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 FI_KDFTAB_ABARBEITEN into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM FI_KDFTAB_ABARBEITEN - FI KDFTAB ABARBEITEN





CALL FUNCTION 'FI_KDFTAB_ABARBEITEN' "
  EXPORTING
    i_funcl =                   " t020-funcl    _
    i_funcl =                   " t020-funcl    Function class of calling program(S = Cancel)
*   i_euro =                    "
  IMPORTING
    et_kdbtab =                 " glt0_t_kdbtab  Postings Required
  TABLES
    t_bkpf =                    " bkpf          _
    t_bkpf =                    " bkpf          --> Document headers created
    t_bseg =                    " bseg          _
    t_bseg =                    " bseg          --> Line items created
*   t_kdbtab =                  " ikdbtab       _
*   t_kdbtab =                  " ikdbtab       <-- Necessary postings
*   t_kdftab =                  " ikdftab       _
*   t_kdftab =                  " ikdftab       --> basis data for KDF determination
    t_krstab =                  " ikrstab       _
    t_krstab =                  " ikrstab       <-- actual exchange rates per CCode
    t_saltab =                  " isaltab       _
    t_saltab =                  " isaltab       --> balances of company codes
* CHANGING
*   ct_kdftab =                 " glt0_t_kdftab
  EXCEPTIONS
    FEHLER = 1                  "               _
    FEHLER = 1                  "               Any error message / because of background
    .  "  FI_KDFTAB_ABARBEITEN

ABAP code example for Function Module FI_KDFTAB_ABARBEITEN





The ABAP code below is a full code listing to execute function module FI_KDFTAB_ABARBEITEN 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_et_kdbtab  TYPE GLT0_T_KDBTAB ,
it_t_bkpf  TYPE STANDARD TABLE OF BKPF,"TABLES PARAM
wa_t_bkpf  LIKE LINE OF it_t_bkpf ,
it_t_bkpf  TYPE STANDARD TABLE OF BKPF,"TABLES PARAM
wa_t_bkpf  LIKE LINE OF it_t_bkpf ,
it_t_bseg  TYPE STANDARD TABLE OF BSEG,"TABLES PARAM
wa_t_bseg  LIKE LINE OF it_t_bseg ,
it_t_bseg  TYPE STANDARD TABLE OF BSEG,"TABLES PARAM
wa_t_bseg  LIKE LINE OF it_t_bseg ,
it_t_kdbtab  TYPE STANDARD TABLE OF IKDBTAB,"TABLES PARAM
wa_t_kdbtab  LIKE LINE OF it_t_kdbtab ,
it_t_kdbtab  TYPE STANDARD TABLE OF IKDBTAB,"TABLES PARAM
wa_t_kdbtab  LIKE LINE OF it_t_kdbtab ,
it_t_kdftab  TYPE STANDARD TABLE OF IKDFTAB,"TABLES PARAM
wa_t_kdftab  LIKE LINE OF it_t_kdftab ,
it_t_kdftab  TYPE STANDARD TABLE OF IKDFTAB,"TABLES PARAM
wa_t_kdftab  LIKE LINE OF it_t_kdftab ,
it_t_krstab  TYPE STANDARD TABLE OF IKRSTAB,"TABLES PARAM
wa_t_krstab  LIKE LINE OF it_t_krstab ,
it_t_krstab  TYPE STANDARD TABLE OF IKRSTAB,"TABLES PARAM
wa_t_krstab  LIKE LINE OF it_t_krstab ,
it_t_saltab  TYPE STANDARD TABLE OF ISALTAB,"TABLES PARAM
wa_t_saltab  LIKE LINE OF it_t_saltab ,
it_t_saltab  TYPE STANDARD TABLE OF ISALTAB,"TABLES PARAM
wa_t_saltab  LIKE LINE OF it_t_saltab .

DATA(ld_ct_kdftab) = 'Check type of data required'.

SELECT single FUNCL
FROM T020
INTO @DATA(ld_i_funcl).


SELECT single FUNCL
FROM T020
INTO @DATA(ld_i_funcl).

DATA(ld_i_euro) = 'some text here'.

"populate fields of struture and append to itab
append wa_t_bkpf to it_t_bkpf.

"populate fields of struture and append to itab
append wa_t_bkpf to it_t_bkpf.

"populate fields of struture and append to itab
append wa_t_bseg to it_t_bseg.

"populate fields of struture and append to itab
append wa_t_bseg to it_t_bseg.

"populate fields of struture and append to itab
append wa_t_kdbtab to it_t_kdbtab.

"populate fields of struture and append to itab
append wa_t_kdbtab to it_t_kdbtab.

"populate fields of struture and append to itab
append wa_t_kdftab to it_t_kdftab.

"populate fields of struture and append to itab
append wa_t_kdftab to it_t_kdftab.

"populate fields of struture and append to itab
append wa_t_krstab to it_t_krstab.

"populate fields of struture and append to itab
append wa_t_krstab to it_t_krstab.

"populate fields of struture and append to itab
append wa_t_saltab to it_t_saltab.

"populate fields of struture and append to itab
append wa_t_saltab to it_t_saltab. . CALL FUNCTION 'FI_KDFTAB_ABARBEITEN' EXPORTING i_funcl = ld_i_funcl i_funcl = ld_i_funcl * i_euro = ld_i_euro IMPORTING et_kdbtab = ld_et_kdbtab TABLES t_bkpf = it_t_bkpf t_bkpf = it_t_bkpf t_bseg = it_t_bseg t_bseg = it_t_bseg * t_kdbtab = it_t_kdbtab * t_kdbtab = it_t_kdbtab * t_kdftab = it_t_kdftab * t_kdftab = it_t_kdftab t_krstab = it_t_krstab t_krstab = it_t_krstab t_saltab = it_t_saltab t_saltab = it_t_saltab * CHANGING * ct_kdftab = ld_ct_kdftab EXCEPTIONS FEHLER = 1 FEHLER = 1 . " FI_KDFTAB_ABARBEITEN
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 1. "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_ct_kdftab  TYPE GLT0_T_KDFTAB ,
ld_et_kdbtab  TYPE GLT0_T_KDBTAB ,
ld_i_funcl  TYPE T020-FUNCL ,
ld_i_funcl  TYPE T020-FUNCL ,
it_t_bkpf  TYPE STANDARD TABLE OF BKPF ,
wa_t_bkpf  LIKE LINE OF it_t_bkpf,
it_t_bkpf  TYPE STANDARD TABLE OF BKPF ,
wa_t_bkpf  LIKE LINE OF it_t_bkpf,
ld_i_euro  TYPE STRING ,
it_t_bseg  TYPE STANDARD TABLE OF BSEG ,
wa_t_bseg  LIKE LINE OF it_t_bseg,
it_t_bseg  TYPE STANDARD TABLE OF BSEG ,
wa_t_bseg  LIKE LINE OF it_t_bseg,
it_t_kdbtab  TYPE STANDARD TABLE OF IKDBTAB ,
wa_t_kdbtab  LIKE LINE OF it_t_kdbtab,
it_t_kdbtab  TYPE STANDARD TABLE OF IKDBTAB ,
wa_t_kdbtab  LIKE LINE OF it_t_kdbtab,
it_t_kdftab  TYPE STANDARD TABLE OF IKDFTAB ,
wa_t_kdftab  LIKE LINE OF it_t_kdftab,
it_t_kdftab  TYPE STANDARD TABLE OF IKDFTAB ,
wa_t_kdftab  LIKE LINE OF it_t_kdftab,
it_t_krstab  TYPE STANDARD TABLE OF IKRSTAB ,
wa_t_krstab  LIKE LINE OF it_t_krstab,
it_t_krstab  TYPE STANDARD TABLE OF IKRSTAB ,
wa_t_krstab  LIKE LINE OF it_t_krstab,
it_t_saltab  TYPE STANDARD TABLE OF ISALTAB ,
wa_t_saltab  LIKE LINE OF it_t_saltab,
it_t_saltab  TYPE STANDARD TABLE OF ISALTAB ,
wa_t_saltab  LIKE LINE OF it_t_saltab.

ld_ct_kdftab = 'Check type of data required'.

SELECT single FUNCL
FROM T020
INTO ld_i_funcl.


SELECT single FUNCL
FROM T020
INTO ld_i_funcl.


"populate fields of struture and append to itab
append wa_t_bkpf to it_t_bkpf.

"populate fields of struture and append to itab
append wa_t_bkpf to it_t_bkpf.
ld_i_euro = 'some text here'.

"populate fields of struture and append to itab
append wa_t_bseg to it_t_bseg.

"populate fields of struture and append to itab
append wa_t_bseg to it_t_bseg.

"populate fields of struture and append to itab
append wa_t_kdbtab to it_t_kdbtab.

"populate fields of struture and append to itab
append wa_t_kdbtab to it_t_kdbtab.

"populate fields of struture and append to itab
append wa_t_kdftab to it_t_kdftab.

"populate fields of struture and append to itab
append wa_t_kdftab to it_t_kdftab.

"populate fields of struture and append to itab
append wa_t_krstab to it_t_krstab.

"populate fields of struture and append to itab
append wa_t_krstab to it_t_krstab.

"populate fields of struture and append to itab
append wa_t_saltab to it_t_saltab.

"populate fields of struture and append to itab
append wa_t_saltab to it_t_saltab.

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