SAP Function Modules

CALL_FBRA SAP Function module







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

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


Pattern for FM CALL_FBRA - CALL FBRA





CALL FUNCTION 'CALL_FBRA' "
  EXPORTING
    i_bukrs =                   " rf05r-bukrs   Company Code
    i_augbl =                   " rf05r-augbl   Clearing Document Number
    i_gjahr =                   " rf05r-gjahr   Fiscal Year
*   i_xsimu = SPACE             " boole-boole
*   i_xerlk = 'X'               " boole-boole
*   i_augdt = '00000000'        " bseg-augdt    Clearing Date
*   i_stodt = '00000000'        " bkpf-stodt
*   i_stomo =                   " bkpf-monat
*   i_rfzei =                   " bseg-rfzei    Payment Card Item
*   i_update = 'S'              "
*   i_mode = 'N'                "
*   i_no_auth = SPACE           "
  IMPORTING
    e_xstor =                   " c
* TABLES
*   t_accnt =                   " rf05r_acct
  EXCEPTIONS
    NOT_POSSIBLE = 1            "
    .  "  CALL_FBRA

ABAP code example for Function Module CALL_FBRA





The ABAP code below is a full code listing to execute function module CALL_FBRA 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_xstor  TYPE C ,
it_t_accnt  TYPE STANDARD TABLE OF RF05R_ACCT,"TABLES PARAM
wa_t_accnt  LIKE LINE OF it_t_accnt .


DATA(ld_i_bukrs) = some text here

DATA(ld_i_augbl) = some text here

DATA(ld_i_gjahr) = Check type of data required

DATA(ld_i_xsimu) = some text here

DATA(ld_i_xerlk) = some text here

SELECT single AUGDT
FROM BSEG
INTO @DATA(ld_i_augdt).


SELECT single STODT
FROM BKPF
INTO @DATA(ld_i_stodt).


SELECT single MONAT
FROM BKPF
INTO @DATA(ld_i_stomo).


SELECT single RFZEI
FROM BSEG
INTO @DATA(ld_i_rfzei).

DATA(ld_i_update) = 'some text here'.
DATA(ld_i_mode) = 'some text here'.
DATA(ld_i_no_auth) = 'some text here'.

"populate fields of struture and append to itab
append wa_t_accnt to it_t_accnt. . CALL FUNCTION 'CALL_FBRA' EXPORTING i_bukrs = ld_i_bukrs i_augbl = ld_i_augbl i_gjahr = ld_i_gjahr * i_xsimu = ld_i_xsimu * i_xerlk = ld_i_xerlk * i_augdt = ld_i_augdt * i_stodt = ld_i_stodt * i_stomo = ld_i_stomo * i_rfzei = ld_i_rfzei * i_update = ld_i_update * i_mode = ld_i_mode * i_no_auth = ld_i_no_auth IMPORTING e_xstor = ld_e_xstor * TABLES * t_accnt = it_t_accnt EXCEPTIONS NOT_POSSIBLE = 1 . " CALL_FBRA
IF SY-SUBRC EQ 0. "All OK 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_e_xstor  TYPE C ,
ld_i_bukrs  TYPE RF05R-BUKRS ,
it_t_accnt  TYPE STANDARD TABLE OF RF05R_ACCT ,
wa_t_accnt  LIKE LINE OF it_t_accnt,
ld_i_augbl  TYPE RF05R-AUGBL ,
ld_i_gjahr  TYPE RF05R-GJAHR ,
ld_i_xsimu  TYPE BOOLE-BOOLE ,
ld_i_xerlk  TYPE BOOLE-BOOLE ,
ld_i_augdt  TYPE BSEG-AUGDT ,
ld_i_stodt  TYPE BKPF-STODT ,
ld_i_stomo  TYPE BKPF-MONAT ,
ld_i_rfzei  TYPE BSEG-RFZEI ,
ld_i_update  TYPE STRING ,
ld_i_mode  TYPE STRING ,
ld_i_no_auth  TYPE STRING .


ld_i_bukrs = some text here

"populate fields of struture and append to itab
append wa_t_accnt to it_t_accnt.

ld_i_augbl = some text here

ld_i_gjahr = Check type of data required

ld_i_xsimu = some text here

ld_i_xerlk = some text here

SELECT single AUGDT
FROM BSEG
INTO ld_i_augdt.


SELECT single STODT
FROM BKPF
INTO ld_i_stodt.


SELECT single MONAT
FROM BKPF
INTO ld_i_stomo.


SELECT single RFZEI
FROM BSEG
INTO ld_i_rfzei.

ld_i_update = 'some text here'.
ld_i_mode = 'some text here'.
ld_i_no_auth = 'some text here'.

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