RFA Type: Finance General Ledger

The Remote Function Adapter type “Finance General Ledger” enables you to post a general ledger entry to SAP ERP or SAP S/4HANA. Every record is mapped to one entry containing a debit posting and a credit posting. If an RFC destination is defined at environment level, the entries are posted in that system.

For FI-GL integration scenarios with SAP ERP or SAP S/4HANA, this function enables the posting of general ledger documents from SAP Profitability and Performance Management. It uses the BAPI BAPI_ACC_DOCUMENT_POST.

Procedure

Preparation

Consider the following points before you configure the RFA type “Finance General Ledger”:
  1. Database Connection

    Specify the database connection “DBCON” at environment level.

  2. RFC Destination

    The RFC destination can be configured either at environment level or at function level by assigning a value or field for the component control-rfcdest.

  3. Input Function

    If you want to post general ledger items to SAP ERP or SAP S/4HANA, the remote function requires an input function that maps the fields from the input function to the components on the Rules tab.

    The input function can be a Model Table, Model View, or the result of another function, provided it contains the necessary fields.

Configuration

Configure the RFA function as follows:
  1. In edit mode, choose the Add button.

  2. The function window appears. Make entries in the required fields:
    • Function
    • Description
    • Function Type = “Remote Function Adapter”
  3. If necessary, make entries in the optional fields:
    • Event Handling
    • Processing Type
    • Partitioning
  4. Choose Ok and save your changes.

  5. In edit mode, enter the following function details:
    1. Remote Function Adapter Type = “Finance General Ledger”
    2. RFC Destination: If this is not set, the system uses the RFC destination defined in the Advanced tab of the environment. If you want to replicate the master data from a remote system, you can define the RFC destination here. If there are no RFC destinations assigned the system uses the local client and system.
    3. On the Input tab, specify the input function.
  6. On the Rules tab, set the following mapping:

    Component Name Function Type Is Mandatory Field
    header-obj_key Reference Key FI-GL X ZE_OBJKEY
    header-comp_code Company Code FI-GL X ZE_FGLC
    header-doc_date Document Date in Document FI-GL X ZE_PODAT
    header-doc_type Document Type FI-GL X 'SA'
    header-header_txt Document Header Text FI-GL   COST ALLOCATION - FIGL'
    header-pstng_date Posting Date in the Document FI-GL X ZE_PODAT
    header-username User Name FI-GL X SY-UNAME
    accountgl[ 1 ]-gl_account General Ledger Account (Debit) FI-GL X ZE_FGLC
    accountgl[ 1 ]-item_text Item Text (Debit) FI-GL   ZE_ITMTXT
    accountgl[ 1 ]-costcenter Cost Center (Debit) FI-GL   ZE_COSCENT
    accountgl[ 2 ]-gl_account General Ledger Account (Credit) FI-GL X ZE_FGLC
    accountgl[ 2 ]-item_text Item Text (Credit) FI-GL   ZE_ITMTXT
    accountgl[ 2 ]-costcenter Cost Center (Credit) FI-GL   ZE_SCNTR
    amount[ 1 ]-currency Currency Key (Debit) FI-GL X ZE_CUKY
    amount[ 1 ]-amt_doccur Amount in Document Currency (Debit) FI-GL X ZE_DEBITAMT
    amount[ 2 ]-currency Currency Key (Credit) FI-GL X ZE_CUKY
    amount[ 2 ]-amt_doccur Amount in Document Currency (Credit) FI-GL X ZE_CREDITAMT
  7. Once you have completed the mapping, choose Activate.

  8. Choose Run.

    The result is the same as the input and the configuration entered on the Rules tab. All of the mapped records are posted to the SAP S/4HANA system.

    The document number is then entered in the Object Key field.

  9. Check if the entries have been posted successfully:
    1. Open the target system by launching the transaction FBL3N in the remote system or in the SAP Easy Access menu, under Start of the navigation pathAccounting Next navigation step Financial Accounting Next navigation step General Ledger Next navigation step Document Next navigation step DisplayEnd of the navigation path.

    2. Enter the following details:
      • Document Number
      • Company Code
      • Fiscal Year
    3. Choose Continue.

    4. The document is displayed in the SAP S/4HANA system.