SAP Function Modules

FILL_BNKA_FIELDS_SAMPLE SAP Function module







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

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


Pattern for FM FILL_BNKA_FIELDS_SAMPLE - FILL BNKA FIELDS SAMPLE





CALL FUNCTION 'FILL_BNKA_FIELDS_SAMPLE' "
  EXPORTING
    i_banks =                   " bnka-banks    Bank Country
    i_vers =                    " t005bu-vers   File Format
    i_xpc =                     " rf02b-bankxfpr  Indicator: Presentation Server Active
    i_max_rec =                 " rfpdo_bf-max_rec  Maximum Number of Records
*   i_keytype = '1'             " t005-bnkey
  IMPORTING
    cnt_sreadto =               " rf02b-counter  Number of: Imported Records
    e_optimized =               " xfeld
  TABLES
    itab_bnka =                 " bnka          BNKA Fields From File
    tab_file =                  " rlgrap        File Path
    .  "  FILL_BNKA_FIELDS_SAMPLE

ABAP code example for Function Module FILL_BNKA_FIELDS_SAMPLE





The ABAP code below is a full code listing to execute function module FILL_BNKA_FIELDS_SAMPLE 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_cnt_sreadto  TYPE RF02B-COUNTER ,
ld_e_optimized  TYPE XFELD ,
it_itab_bnka  TYPE STANDARD TABLE OF BNKA,"TABLES PARAM
wa_itab_bnka  LIKE LINE OF it_itab_bnka ,
it_tab_file  TYPE STANDARD TABLE OF RLGRAP,"TABLES PARAM
wa_tab_file  LIKE LINE OF it_tab_file .


SELECT single BANKS
FROM BNKA
INTO @DATA(ld_i_banks).


SELECT single VERS
FROM T005BU
INTO @DATA(ld_i_vers).


DATA(ld_i_xpc) = some text here

DATA(ld_i_max_rec) = Check type of data required

SELECT single BNKEY
FROM T005
INTO @DATA(ld_i_keytype).


"populate fields of struture and append to itab
append wa_itab_bnka to it_itab_bnka.

"populate fields of struture and append to itab
append wa_tab_file to it_tab_file. . CALL FUNCTION 'FILL_BNKA_FIELDS_SAMPLE' EXPORTING i_banks = ld_i_banks i_vers = ld_i_vers i_xpc = ld_i_xpc i_max_rec = ld_i_max_rec * i_keytype = ld_i_keytype IMPORTING cnt_sreadto = ld_cnt_sreadto e_optimized = ld_e_optimized TABLES itab_bnka = it_itab_bnka tab_file = it_tab_file . " FILL_BNKA_FIELDS_SAMPLE
IF SY-SUBRC EQ 0. "All OK 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_cnt_sreadto  TYPE RF02B-COUNTER ,
ld_i_banks  TYPE BNKA-BANKS ,
it_itab_bnka  TYPE STANDARD TABLE OF BNKA ,
wa_itab_bnka  LIKE LINE OF it_itab_bnka,
ld_e_optimized  TYPE XFELD ,
ld_i_vers  TYPE T005BU-VERS ,
it_tab_file  TYPE STANDARD TABLE OF RLGRAP ,
wa_tab_file  LIKE LINE OF it_tab_file,
ld_i_xpc  TYPE RF02B-BANKXFPR ,
ld_i_max_rec  TYPE RFPDO_BF-MAX_REC ,
ld_i_keytype  TYPE T005-BNKEY .


SELECT single BANKS
FROM BNKA
INTO ld_i_banks.


"populate fields of struture and append to itab
append wa_itab_bnka to it_itab_bnka.

SELECT single VERS
FROM T005BU
INTO ld_i_vers.


"populate fields of struture and append to itab
append wa_tab_file to it_tab_file.

ld_i_xpc = some text here

ld_i_max_rec = Check type of data required

SELECT single BNKEY
FROM T005
INTO ld_i_keytype.

SAP Documentation for FM FILL_BNKA_FIELDS_SAMPLE


General task list.















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