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
| Parameter | Type | Description | Required |
|---|---|---|---|
| CUSTOMERNO | BAPICUSTOMER_ID-CUSTOMER | Customer number | Yes |
| COMPANYCODE | BAPICUSTOMER_ID-COMP_CODE | Company code | — |
Exporting parameters
| Parameter | Type | Description |
|---|---|---|
| CUSTOMERADDRESS | BAPICUSTOMER_04 | Customer address |
| CUSTOMERGENERALDETAIL | BAPICUSTOMER_KNA1 | General customer data (KNA1) |
| CUSTOMERCOMPANYDETAIL | BAPICUSTOMER_05 | Company code data |
| RETURN | BAPIRET1 | Return messages |
Tables parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| CUSTOMERBANKDETAIL | BAPICUSTOMER_02 | Bank details | — |
| CUSTOMERIBANDETAIL | BAPICUSTOMER_03 | IBAN details | — |
| CUSTOMERSEPADETAIL | BAPICUSTOMER_06 | SEPA 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.