Dear all,
Firstly the FM' BAPI_BUPR_CONTP_ADDR_CHANGE' is right. It can be used to change the tel ,email address and so on. For example, in order to change the CP relationship Email, it need to set Parameter as follows:
Import: BUSINESSPARTNER,CONTACTPERSON.
Table:BAPIADSMTP,BAPIADSMT_X
In the parameter 'BAPIADSMTP': field 'STD_NO'\'E_MAIL'\'HOME_FLAG'\'CONSNUMBER' are requested, the parameter 'BAPIADSMT_X' is the same.
The right steps as follows:
(1)
* Get current detail
call function 'BAPI_BUPR_CONTP_ADDR_GETDETAIL'
exporting
businesspartner = f_businesspartner
contactperson = f_contactperson
tables
bapiadsmtp = it_bapiadsmtp.
(2)Change it_bapiadsmtp-e_mail = 'newemail' and set the corresponding value 'X' in parameter 'it_bapiadsmt_x'.
(3) call function 'BAPI_BUPR_CONTP_ADDR_CHANGE'
exporting
businesspartner = f_businesspartner
contactperson = f_contactperson
tables
bapiadsmtp = it_bapiadsmtp
bapiadsmt_x = it_bapiadsmt_x
return = it_return.
Best regards,
Xu.
ChengDu,China.