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

BAPI_AR_ACC_GETSTATEMENT Customer Account Statement for a Period

Returns all line items posted to a customer account in a company code within a date range. Typical uses are customer portals, account statement printouts and collection tools. Pass the customer number with leading zeros and set NOTEDITEMS if noted items such as down payment requests are needed.

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

Importing parameters

ParameterTypeDescriptionRequired
COMPANYCODEBAPI3007_1-COMP_CODECompany codeYes
CUSTOMERBAPI3007_1-CUSTOMERCustomerYes
DATE_FROMBAPI3007-FROM_DATEDate fromYes
DATE_TOBAPI3007-TO_DATEDate toYes
NOTEDITEMSBAPI3007-NTDITMS_RQInclude noted items—

Exporting parameters

ParameterTypeDescription
RETURNBAPIRETURNReturn message

Tables parameters

ParameterTypeDescriptionRequired
LINEITEMSBAPI3007_2Line itemsYes

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_GETSTATEMENT'
  EXPORTING
    companycode = lv_companycode
    customer = lv_customer
    date_from = lv_date_from
    date_to = lv_date_to
  IMPORTING
    return = lv_return
  TABLES
    lineitems = lt_lineitems.

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