FI BAPI RFC Used the same way in S/4HANA

BAPI_AR_ACC_GETKEYDATEBALANCE Customer Account Balance at Key Date

Calculates the balance of a customer account in a company code at a key date, optionally split by special G/L indicator. It is used by credit checks in external sales channels, customer portals and dunning tools. Pass the customer number with leading zeros and read the result from KEYBALANCE.

Function group
3007
Remote-enabled (RFC)
Yes
Type
BAPI

Importing parameters

ParameterTypeDescriptionRequired
COMPANYCODEBAPI3007_1-COMP_CODECompany codeYes
CUSTOMERBAPI3007_1-CUSTOMERCustomerYes
KEYDATEBAPI3007-KEY_DATEKey dateYes
BALANCESPGLIBAPI3007-BAL_SGLINDBalance per special G/L indicator—
NOTEDITEMSBAPI3007-NTDITMS_RQInclude noted items—

Exporting parameters

ParameterTypeDescription
RETURNBAPIRETURNReturn message

Tables parameters

ParameterTypeDescriptionRequired
KEYBALANCEBAPI3007_3Balance at key dateYes

Call template (ABAP)

A skeleton generated from the interface. It lists mandatory importing parameters, exporting parameters and tables; declare the variables with suitable types in your own program.

CALL FUNCTION 'BAPI_AR_ACC_GETKEYDATEBALANCE'
  EXPORTING
    companycode = lv_companycode
    customer = lv_customer
    keydate = lv_keydate
  IMPORTING
    return = lv_return
  TABLES
    keybalance = lt_keybalance.

Related tables

Can't find the report you need?

We also build anything that is not in the catalog. Describe it briefly and we will suggest the right solution.

Request a custom report