Announcement:
wanna exchange links? contact me at sapchatroom@gmail.com.
Posted by
Admin at
Question from apicaud on Jul 3 at 9:08 AM Hello, I use the bapi BAPI_CUSTOMER_CHANGEFROMDATA1 to change the fax and phone number The code is : CALL FUNCTION 'BAPI_CUSTOMER_GETDETAIL1' EXPORTING customerno = l_code_client pi_salesorg = l_salesorg pi_distr_chan = l_vtweg pi_division = l_spart IMPORTING pe_personaldata = l_st_personaldata pe_personaldata_new = l_st_personaldatanew return = g_return1. IF g_return1-type = 'E'. <fs_adresse>-type_erreur = 'E'. <fs_adresse>-message_erreur = g_return1-message. CONTINUE. ENDIF. l_st_personaldata-currency = l_waers. IF <fs_adresse>-num_tel IS NOT INITIAL. l_st_personaldatax-tel1_numbr = 'X'. TRANSLATE <fs_adresse>-num_tel USING l_changetel. l_st_personaldata-tel1_numbr = <fs_adresse>-num_tel. ENDIF. IF <fs_adresse>-num_fax IS NOT INITIAL. l_st_personaldatax-fax_number = 'X'. TRANSLATE <fs_adresse>-num_fax USING l_changetel. l_st_personaldata-fax_number = <fs_adresse>-num_fax. l_courriel = l_st_personaldata-e_mail. TRANSLATE l_courriel TO LOWER CASE. SEARCH l_courriel FOR '@fax'. IF sy-subrc = 0 OR l_st_personaldata-e_mail IS INITIAL. CONDENSE <fs_adresse>-num_fax NO-GAPS. CONCATENATE <fs_adresse>-num_fax c_fax_suffix INTO l_st_personaldata-e_mail. l_st_personaldatax-e_mail = 'X'. ENDIF. ENDIF. CALL FUNCTION 'BAPI_CUSTOMER_CHANGEFROMDATA1' EXPORTING pi_personaldata = l_st_personaldata pi_personaldatax = l_st_personaldatax pi_salesorg = l_salesorg pi_distr_chan = l_vtweg pi_division = l_spart customerno = l_code_client IMPORTING return = g_return1. The BAPI update the customer but the final resul is not correct. Name1, Name2 and sort1 are also modified. Why ? When I tried the same bapi why companydata, I have other issues. Have you and idea to update only fax and phone number of a customer. For email, we change directly in adr6 table. Regards, Antoine | Reply to this email to post your response. __.____._ | _.____.__ |