Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

how to create contact person with BAPI_ADDRCONTPART_SAVEREPLICA

Former Member
0 Kudos

Dears,

when using BAPI BAPI_ADDRCONTPART_SAVEREPLICA to create contact person,it exports the PERSON_NUMBER and ADDRESS_NUMBER, but no record found in table KNVK for customer or vendor .

The parameters is as below,

CALL FUNCTION 'BAPI_ADDRCONTPART_SAVEREPLICA'

EXPORTING

obj_type_p = 'BUS1006001'

obj_id_p = <personal number>

obj_type_c = 'KNA1'

obj_id_c = <customer>

obj_id_ext = SPACE

context = '0005'

.......

also no return message and sy-subrc =0.

what maybe the error? and any other method to create contact person ?

Ths .

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello,

Have you called the FM BAPI_TRANSACTION_COMMIT immediately after your bapi call. Also use the CALL FUNCTION 'BUFFER_REFRESH_ALL'. before calling your BAPI.

If this doesnot work, you can create the contract person by using 'SCAT' create transaction recording of the transaction 'MK01' and create a BDC program call that SCAT test recording in normal ABAP report.

If ypou need any further help pls revert.

Regards,

A.Singh

5 REPLIES 5

Former Member
0 Kudos

Hello,

Have you called the FM BAPI_TRANSACTION_COMMIT immediately after your bapi call. Also use the CALL FUNCTION 'BUFFER_REFRESH_ALL'. before calling your BAPI.

If this doesnot work, you can create the contract person by using 'SCAT' create transaction recording of the transaction 'MK01' and create a BDC program call that SCAT test recording in normal ABAP report.

If ypou need any further help pls revert.

Regards,

A.Singh

0 Kudos

DEAR,

after test by my colleague, after creating contact person by BAPI_ADDRCONTPART_SAVEREPLICA , then he should input the parter and name into BI structure bknvk when he use bi fm to create customer, then the contact person will be associated with the customer.

But i use BI fm 'VENDOR_BDCDATA' to create vendor, there is no such structure to do so. so no contact person associated with the vendor, but the contact person has been created and just not associated with this vendor in table KNVK.

are there any other methods to do such things to associate contact person with my vendor after call BI FM 'VENDOR_BDCDATA' ?

BR.

bruno_esperanca
Contributor
0 Kudos

Please check the following class to create/edit a vendor contact:

Best,

Bruno

0 Kudos

Is it really needed to reopen several many year old discussions to advertise your new blog?

0 Kudos

Hi Jürgen,

Is it really needed to be "condescending"?

When I was searching a way to achieve this, all I found was these "dead-end" threads.

My objective is to make sure if someone is searching for the same thing I was, they can find a decent solution.

When you search in google, it doesn't really discriminate between old or new.

But have it your way, I won't do it again.

Thanks.

Best regards,

Bruno