‎2007 Feb 05 10:53 PM
I am using BAPI_CUSTOMER_CHANGEFROMDATA1 to change only Transportation Zone. I get msg 826 "Contact Person Address Different from company address" for some customers.
I am sending: lastname, city, post code, country, langu, region, kunnr, sls org, trans. zone, currency, and g_opt_personaldatax-transpzone = 'X'.
Can someone inform me on how to avoid this error.
Your help is greatly appreciated.
Kind Regards,
Jason
Message was edited by:
Jason DeLuca
‎2007 Feb 06 9:20 PM
Hi,
Check out the following documentation weather you have taken care of the below mentioned points or not?
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.
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 (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.
Ashvender