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

BAPI_CUSTOMER_GETDETAIL2 Read Customer Details

Reads customer master data: general data, address, company code data and bank, IBAN and SEPA details. It is used in reports and interfaces that need customer information without reading the master tables directly. Pass COMPANYCODE to get company code data and use the ALPHA conversion exit for the customer number.

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

Importing parameters

ParameterTypeDescriptionRequired
CUSTOMERNOBAPICUSTOMER_ID-CUSTOMERCustomer numberYes
COMPANYCODEBAPICUSTOMER_ID-COMP_CODECompany code—

Exporting parameters

ParameterTypeDescription
CUSTOMERADDRESSBAPICUSTOMER_04Customer address
CUSTOMERGENERALDETAILBAPICUSTOMER_KNA1General customer data (KNA1)
CUSTOMERCOMPANYDETAILBAPICUSTOMER_05Company code data
RETURNBAPIRET1Return messages

Tables parameters

ParameterTypeDescriptionRequired
CUSTOMERBANKDETAILBAPICUSTOMER_02Bank details—
CUSTOMERIBANDETAILBAPICUSTOMER_03IBAN details—
CUSTOMERSEPADETAILBAPICUSTOMER_06SEPA mandate details—

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_CUSTOMER_GETDETAIL2'
  EXPORTING
    customerno = lv_customerno
  IMPORTING
    customeraddress = lv_customeraddress
    customergeneraldetail = lv_customergeneraldetail
    customercompanydetail = lv_customercompanydetail
    return = lv_return
  TABLES
    customerbankdetail = lt_customerbankdetail
    customeribandetail = lt_customeribandetail
    customersepadetail = lt_customersepadetail.

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