Hi All
I am trying to create a vendor contact upload program but I am having trouble with the BAPI I have. It seems like it works for update but I want to create a new contact.
BAPI_ADDRESSCONTPART_GETDETAIL and BAPI_ADDRESSCONTPART_CHANGE is complaining because I haven't filled out the importing parameter obj_id_p which requires the partner number (which obviously doesn't exist yet)
Does anyone know of the correct BAPI to use to insert new contacts for Vendor? Am I using this BAPI wrong?
I receive this error:
E AM 165
Specify person object type and key
COde:
ls_bapi_ct-objtype_p = 'BUS1006001'.
ls_bapi_ct-objkey_p = t_vend-parnr.
ls_bapi_ct-objtype_c = 'LFA1'.
ls_bapi_ct-objkey_c = t_vend-lifnr.
ls_bapi_ct-context = '5'.
CALL FUNCTION 'BAPI_ADDRESSCONTPART_CHANGE'
EXPORTING
obj_type_p = ls_bapi_ct-objtype_p
obj_id_p = ls_bapi_ct-objkey_p
obj_type_c = ls_bapi_ct-objtype_c
obj_id_c = ls_bapi_ct-objkey_c
obj_id_ext = ' '
context = ls_bapi_ct-context
accept_error = ' '
IMPORTING
address_number = ls_bapi_ct-addr_no
person_number = ls_bapi_ct-pers_no
TABLES
bapiad3vl = t_bapiad3vl
* bapiadtel = t_bapiadtel
* bapiadfax = t_bapiadfax
bapiadsmtp = t_bapiadsmtp
* bapiaduri = t_bapiaduri
bapicomrem = t_bapicomrem
bapiad3vl_x = tx_bapiad3vlx
* bapiadtel_x = tx_bapiadtelx
* bapiadfax_x = tx_bapiadfaxx
bapiadsmt_x = tx_bapiadsmtx
* bapiaduri_x = tx_bapiadurix
bapicomre_x = tx_bapicomrex
return = t_ret.