# BAPI_AP_ACC_GETSTATEMENT — Vendor Account Statement for a Period

> Returns all line items posted to a vendor account in a company code within a date range. It is used for vendor portals, statement printouts and reconciliation interfaces. Pass the vendor number with leading zeros and set NOTEDITEMS only if noted items should also be returned.

- Modules: FI
- Type: BAPI
- Function group: 3008
- Remote-enabled (RFC): Yes
- S/4HANA status: Used the same way in S/4HANA
- URL: https://nekuhub.com/en/functions/bapi-ap-acc-getstatement/

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| COMPANYCODE | BAPI3008_1-COMP_CODE | Company code | Yes |
| VENDOR | BAPI3008_1-VENDOR | Vendor | Yes |
| DATE_FROM | BAPI3008-FROM_DATE | Date from | Yes |
| DATE_TO | BAPI3008-TO_DATE | Date to | Yes |
| NOTEDITEMS | BAPI3008-NTDITMS_RQ | Include noted items | - |

## Exporting parameters

| Parameter | Type | Description |
|---|---|---|
| RETURN | BAPIRETURN | Return message |

## Tables parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| LINEITEMS | BAPI3008_2 | Line items | Yes |

## Call template (ABAP)

```abap
CALL FUNCTION 'BAPI_AP_ACC_GETSTATEMENT'
  EXPORTING
    companycode = lv_companycode
    vendor = lv_vendor
    date_from = lv_date_from
    date_to = lv_date_to
  IMPORTING
    return = lv_return
  TABLES
    lineitems = lt_lineitems.
```

## Related tables

BSAK, BSIK

