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

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
CUSTOMERNO BAPIKNA103-CUSTOMER C 10 Customer Number of the Customer to Be Changed
PI_COMPANYDATA BAPIKNA106 u 841 X Customer Company Data
PI_COMPANYDATAX BAPIKNA106X u 33 X X Customer Company Data Structure
PI_DISTR_CHAN BAPIKNA102-DISTR_CHAN C 2 X Distribution Channel
PI_DIVISION BAPIKNA102-DIVISION C 2 X Division
PI_OPT_COMPANYDATA BAPIKNA105 u 50 X Optional Customer Company Data
PI_OPT_COMPANYDATAX BAPIKNA105X u 8 X X Optional Customer Company Data Structure
PI_OPT_PERSONALDATA BAPIKNA105 u 50 X Optional Customer Personal Data
PI_OPT_PERSONALDATAX BAPIKNA105X u 8 X X Optional Customer Personal Data Structure
PI_PERSONALDATA BAPIKNA101_1 u 803 Customer Personal Data
PI_PERSONALDATAX BAPIKNA101_1X u 30 X Customer Personal Data Structure
PI_SALESORG BAPIKNA102-SALESORG C 4 Sales Organization

Paramètre Reférence Type Long. Description
RETURN BAPIRETURN1 u 470 Return Value

Functionality
This method of the "Customer" business object can be used to change thepersonal or company data of a customer that exists in mySAP ERP.
Only one filled structure (personal OR company data) can be passed on tothe 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 bea 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 thecompany address accordingly, and create identical personal and contactperson addresses.
If a personal address exists that is different (*) to the companyaddress, then this is regarded as an error. In this case, the BAPIshould receive the company address as well (see case (ii) below).
If only a company address exists with a contact person address andwithout a personal address, this BAPI can only be used to change thecustomer 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 companyaddress in one or more of the following fields: Language, Street, Housenumber, Region, Town, Postal code, Country, Telephone number, Faxnumber, E-mail.
Note: for customer data created before Release 4.5A, a company addressis different from the contact partner address if the first name,surname, or title of the contact partner of the 2nd entry differs fromthe 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 recognizedas 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) ischanged in the BAPI.
Otherwise, the same change mechanisms are valid for changing the companycustomers 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 methodfor creating a customer (siehe BAPI_CUSTOMER_CREATEFROMDATA1).
The authorization requirements for using this BAPI are the same as thosefor BAPI BAPI_CUSTOMER_CREATEFROMDATA1, whereby here, the authorization isneeded for the change activity.
The sales organization is a required field.
The number of mySAP ERP customer has to be changed must be transferredto the BAPI.
Only fields (personal/company and optional personal/company data)flagged with X (see import structurePI_PERSONALDATAX are transferred to the database.

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

Description
Return value for errors

Value range
TYPE = "E" CODE For the error codes, see documentation on the return1 structure ofBAPI BAPI_CUSTOMER_CREATEFROMDATA1 . The error codes "F2889", "F2890",and "F2891" described there cannot occur here as a return value. Thefollowing error messages exist:
TYPE = "E" CODE = "F2875" Internal error: Customer not recognized inthe company code master record
TYPE = "E" CODE = "F2888" Internal error: Customer does not exist inthe master record
TYPE = "E" CODE = "F2826" Different contact person address, changes arenot permitted
For errors that occur during CAM see the following documentation:
ADDR_GET_COMPLETE
ADDR_CONVERT_COMPLETE_3_TO_2
ADDR_PERSONAL_GET_COMPLETE

Description
Import parameter customer number. Number of the customer to be changedin the mySAP ERP system.

Description
Import parameter for a customer's company data.
Note: (i) If this import parameter is filled with data, the importstructure for the person data cannot be filled.
In this case, the user exit (WWCC1001) for IAC Online Store transfersno person address data.

Description
Corrsponding check boxes (X fields) for an existing customer's companyaddress data that is to be changed. Only those fields marked "X" aretransferred.

Description
Import parameter distribution channel of customer

Description
Import parameter division for the customer

Description
Optional import parameter for a customer's optional company addressdata.
Note: If this import parameter is filled with data, the import structurfor the optional person data cannot be filled.

Description
Corresponding check boxes (X fields) for an existing customer'soptional company address data that is to be changed. Only those fieldsmarked with an "X" are transferred.

Description
Optional import parameter for optional personal data of an existingcustomer.
Note: If this import parameter is filled with data, then do not fillthe import parameter for the optional company address data.

Description
Corresponding checkbox (X fields) for the optional personal data to bechanged for an existing customer. Only the fields marked with 'X' areupdated.
Example:
The reconciliation account for a customer (BAPIKNA105-CONTROL_ACCOUNT)is to be changed via the BAPI. Only if a capital X is entered via theX-structure for the corresponding field (BAPIKNA105-CONTROL_ACCOUNT)will the the new reconciliation account be written to the database.
This structure was created to allow upwards compatability for a"Change"BAPI.

Default

Description
Import parameter for the personal date to be changed for a customer
Note: (i) When this import parameter is filled with data, then theimport structure for the company address data must not be filled. Inthis case, no company address data is transmitted by the user exit(WWCC1001) to the IAC Online Store).
(ii) For reasons of compatibility, the field "ONLY_CHANGE_COMADDRESS"controls whether only the company address for the customer is to bechanged. In Release 4.6A we do not recommend the use of this field.Instead, you should work with the structure for the company address.

Description
Corresponding checkbox (X fields) for the optional personal data to bechanged for an existing customer. Only the fields marked with 'X' areupdated.
Example:
The name fo a customer (BAPIKNA101_1-LASTNAME) is to be changed via theBAPI. Only if a capital X is entered via the X-structure for thecorresponding field (BAPIKNA101_1-LASTNAME) will the the newreconciliation account be written to the database.
This structure was created to allow upwards compatability for a"Change"BAPI.

Default

Description
Import parameter sales organization of customer