SAP Technology: Uploading the Federal Reserve E-Payments Routing File into SAP

/SAP Technology: Uploading the Federal Reserve E-Payments Routing File into SAP

SAP Technology: Uploading the Federal Reserve E-Payments Routing File into SAP

By |2018-12-29T20:10:20-04:00October 30th, 2013|SAP|0 Comments
  • Clear Software SAP Technology

Enterprises running SAP frequently need to update bank routing numbers in FI-BL to ensure their customers and vendors are using valid bank accounts.  Traditionally, this could be done in transaction BAUP if the file were formatted as a Thompson Electronic Payment File.  However, many SAP clients receive periodic routing number files directly from the Federal Reserve or a licensed vendor.  The file format from the Federal Reserve is quite different.  Rather than creating a custom program, you can still use transaction BAUP by following these steps:

  1. Ensure that you have read and understand the latest file layout from the Federal Reserve’s website (http://www.fededirectory.frb.org/format_ACH.cfm).
  2. Copy function module FILL_BNKA_FIELDS_US1 to a custom function module called ZFILL_BNKA_FIELDS_USF.
  3. Delete the code in ZFILL_BNKA_FIELDS_USF and replace with the following:FUNCTION ZFILL_BNKA_FIELDS_USF.
    *”———————————————————————-
    *”*”Local Interface:
    *”  IMPORTING
    *”     VALUE(I_BANKS) LIKE  BNKA-BANKS
    *”     VALUE(I_VERS) LIKE  T005BU-VERS
    *”     VALUE(I_XPC) LIKE  RF02B-BANKXFPR
    *”     VALUE(I_MAX_REC) LIKE  RFPDO_BF-MAX_REC
    *”  EXPORTING
    *”     VALUE(CNT_SREADTO) LIKE  RF02B-COUNTER
    *”  TABLES
    *”      ITAB_BNKA STRUCTURE  BNKA
    *”      TAB_FILE STRUCTURE  RLGRAP
    *”———————————————————————-
    DATA: LS_BNKA TYPE BNKA,
    LS_BNKA_NEW TYPE BNKA,
    BEGIN OF file_all OCCURS 0, “DEFINE AN OPEN CONTAINER TO PLACE THE RAW DATA
    all(1851) TYPE c,
    END OF file_all,
    BEGIN OF FED_STRUCTURE OCCURS 0, “DEFINE THE FEDERAL RESERVE STRUCTURE
    ROUTING_NUMBER TYPE C LENGTH 9,
    OFFICE_CODE TYPE C LENGTH 1, “THERE IS NOWHERE TO PUT THIS IN BNKA
    SERVICING_FRB_NUMBER TYPE C LENGTH 9,
    RECORD_TYPE_CODE TYPE C LENGTH 1, “THERE IS NOWHERE TO PUT THIS IN BNKA
    CHANGE_DATE TYPE C LENGTH 6, “THERE IS NOWHERE TO PUT THIS IN BNKA
    NEW_ROUTING_NUMBER TYPE C LENGTH 9,
    CUSTOMER_NAME TYPE C LENGTH 36,
    ADDRESS TYPE C LENGTH 36,
    CITY TYPE C LENGTH 20,
    STATE_CODE TYPE C LENGTH 2,
    ZIPCODE TYPE C LENGTH 5,
    ZIPCODE_EXTENSION TYPE C LENGTH 4,
    TELEPHONE_AREA_CODE TYPE C LENGTH 3,
    TELEPHONE_PREFIX_NUMBER TYPE C LENGTH 3,
    TELEPHONE_SUFFIX_NUMBER TYPE C LENGTH 4,
    INSTITUTION_STATUS_CODE TYPE C LENGTH 1, “THERE IS NOWHERE TO PUT THIS IN BNKA
    DATA_VIEW_CODE TYPE C LENGTH 1, “THERE IS NOWHERE TO PUT THIS IN BNKA
    FILLER TYPE C LENGTH 5,
    END OF FED_STRUCTURE.
    CALL FUNCTION ‘UPLOAD_FILES’ “********* Upload datafile *****************************
    EXPORTING
    i_filetype = ‘ASC’
    i_xpc      = i_xpc
    TABLES
    file_all   = file_all
    tab_file   = tab_file
    EXCEPTIONS
    error_file = 1
    OTHERS     = 2.
    IF sy–subrc <> 0.
    MESSAGE ID sy–msgid TYPE sy–msgty NUMBER sy–msgno WITH sy–msgv1 sy–msgv2 sy–msgv3 sy–msgv4.
    ENDIF.
    FED_STRUCTURE[] = file_all[].
    SORT FED_STRUCTURE BY ROUTING_NUMBER.
    LOOP AT FED_STRUCTURE.
    CLEAR: LS_BNKA, LS_BNKA_NEW.
    CNT_SREADTO = CNT_SREADTO + 1. “counter of total records
    IF i_max_rec NE 99999 AND CNT_SREADTO GT i_max_rec. “Exit loop if number of record greater than MAX_REC
    CNT_SREADTO = CNT_SREADTO – 1.
    EXIT.
    ENDIF.
    READ TABLE ITAB_BNKA WITH KEY BANKL =FED_STRUCTURE–ROUTING_NUMBER. “* Just one bank with the same Routing Number
    CHECK SY–SUBRC NE 0.
    LS_BNKA–BANKL = FED_STRUCTURE–ROUTING_NUMBER.
    LS_BNKA–BNKLZ = FED_STRUCTURE–SERVICING_FRB_NUMBER.
    LS_BNKA–BANKA = FED_STRUCTURE–CUSTOMER_NAME.
    LS_BNKA–STRAS = FED_STRUCTURE–ADDRESS.
    CONCATENATE FED_STRUCTURE–ZIPCODE FED_STRUCTURE–CITY INTOLS_BNKA–ORT01 SEPARATED BY SPACE.
    LS_BNKA–PROVZ = FED_STRUCTURE–STATE_CODE.
    IF FED_STRUCTURE-NEW_ROUTING_NUMBER <> ‘000000000’. “IF THE CURRENT ROUTING NUMBER IS BEING CHANGED TO A NEW ROUTING NUMBER
    *      LS_BNKA-LOEVM = ‘X’. “SET THE DELETION INDICATOR FOR THE CURRENT ROUTING NUMBER
    MOVE-CORRESPONDING LS_BNKA TO LS_BNKA_NEW.
    LS_BNKA_NEW–BANKL = FED_STRUCTURE–NEW_ROUTING_NUMBER.
    APPEND LS_BNKA_NEW TO ITAB_BNKA.
    ENDIF.
    APPEND LS_BNKA TO ITAB_BNKA.
    ENDLOOP.
    ENDFUNCTION.

  4. In the IMG (transaction SPRO), navigate to Cross-Application Components > Bank Directory > Bank Directory Data Transfer > Define File Formats for         Country-Specific Bank Directories add the following entry:
    Untitled.png

Now you can select this file format in transaction BAUP and load the Federal Reserve file with no issues.

About the Author:

Avatar
I have always been passionate about fixing broken business processes and cleaning up the mess left by enterprise software. It honestly bothers me to see companies spending hundreds of millions of dollars on IT projects, which motivated me to start Clear Software. Prior to founding Clear, I was a Senior Manager at Deloitte, where my teams implemented SAP at some of the largest organizations in the world.

Leave A Comment

This website uses cookies and third party services. Please review our privacy policy for additional information. Do you consent? Yes