Ansicht
Dokumentation

BAPI_CUSTOMER_CHANGEFROMDATA1 - Only for ONLINE Store!!! Check Personal Data of a Customer

BAPI_CUSTOMER_CHANGEFROMDATA1 - Only for ONLINE Store!!! Check Personal Data of a Customer

Addresses (Business Address Services)   ABAP Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

This method of the "Customer" business object can be used to change the personal or company data of a customer that exists in mySAP ERP.
Only one filled structure (personal OR company data) can be passed on to the BAPI.

(i) One person should be changed as a customer:
In this case, the customer is entered as a person (company address = address of contact person = personal address). The customer can then be a consumer (see import parameter PI_CONSUMEREN for the BAPIs: and BAPI_CUSTOMER_CREATEFROMDATA1).
(a) The customer is not a consumer:
If "only" a company address exists, this BAPI is used to change the company address accordingly, and create identical personal and contact person addresses.
If a personal address exists that is different (*) to the company address, then this is regarded as an error. In this case, the BAPI should receive the company address as well (see case (ii) below).
If only a company address exists with a contact person address and without a personal address, this BAPI can only be used to change the customer if a company address is also transferred to the BAPI ("ONLY_CHANGE_COMADDRESS" = 'X').
A different address is understood to be the following:
The personal or contact person address is different to the company address in one or more of the following fields: Language, Street, House number, Region, Town, Postal code, Country, Telephone number, Fax number, E-mail.
Note: for customer data created before Release 4.5A, a company address is different from the contact partner address if the first name, surname, or title of the contact partner of the 2nd entry differs from the 1st entry of the name field or title of the company address.

(b) The customer is not a consumer:
If only a company address exists in this case, then this is recognized as an error.
Otherwise, the same functions apply as for case (i) (a) above.

(ii) A company should be changed as a customer:
In this case, only the corresponding address data (PI_COMPANYDATA) is changed in the BAPI.
Otherwise, the same change mechanisms are valid for changing the company customers as for the personal customers.
In all three cases (personal customer, consumer, or company customer) the following is valid:
All customer address data is determined from Central Address Management (CAM).
The personal/comp. data needed is the same as that needed for the method for creating a customer (siehe BAPI_CUSTOMER_CREATEFROMDATA1).
The authorization requirements for using this BAPI are the same as those for BAPI BAPI_CUSTOMER_CREATEFROMDATA1, whereby here, the authorization is needed for the change activity.
The sales organization is a required field.
The number of mySAP ERP customer has to be changed must be transferred to the BAPI.
Only fields (personal/company and optional personal/company data) flagged with X (see import structure PI_PERSONALDATAX are transferred to the database.

Example

Notes

Messages are returned in parameter RETURN. The return values and their meaning can be found in the parameter documentation.

Further information





Parameters

CUSTOMERNO
PI_COMPANYDATA
PI_COMPANYDATAX
PI_DISTR_CHAN
PI_DIVISION
PI_OPT_COMPANYDATA
PI_OPT_COMPANYDATAX
PI_OPT_PERSONALDATA
PI_OPT_PERSONALDATAX
PI_PERSONALDATA
PI_PERSONALDATAX
PI_SALESORG
RETURN

Exceptions

Function Group

V02D

General Data in Customer Master   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.

Length: 5170 Date: 20240523 Time: 101550     sap01-206 ( 75 ms )