SD
BAPI
RFC
Used the same way in S/4HANA
BAPI_CUSTOMER_CREATEFROMDATA1 Create Customer from Reference (Online Store)
Creates a customer by copying a reference customer and sales area and adding personal or company data; SAP designed it for online store scenarios. It suits simple B2C registrations rather than full customer master migrations. In S/4HANA customers are maintained as business partners, so prefer the business partner APIs there; check RETURN and commit afterwards.
- Function group
- V02D
- Remote-enabled (RFC)
- Yes
- Type
- BAPI
Importing parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| PI_PERSONALDATA | BAPIKNA101_1 | Personal data of the customer | Yes |
| PI_OPT_PERSONALDATA | BAPIKNA105 | Optional personal data | — |
| PI_COMPANYDATA | BAPIKNA106 | Company (organization) data | — |
| PI_OPT_COMPANYDATA | BAPIKNA105 | Optional company data | — |
| PI_CONSUMEREN | BAPIKNA107-CONSUMER_FLAG | Consumer flag | — |
| PI_COPYREFERENCE | BAPIKNA102 | Reference customer and sales area to copy from | Yes |
| PI_CREDIT_CONTROL_FLAG | BAPIKNA108-X_FLAG | Credit control flag | — |
Exporting parameters
| Parameter | Type | Description |
|---|---|---|
| CUSTOMERNO | BAPIKNA103-CUSTOMER | Customer number created |
| RETURN | BAPIRETURN1 | Return messages |
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_CREATEFROMDATA1'
EXPORTING
pi_personaldata = lv_pi_personaldata
pi_copyreference = lv_pi_copyreference
IMPORTING
customerno = lv_customerno
return = lv_return.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.