07-01-2016 10:17 AM
Hi !
I want to delete BPCONTACT using BAPI but i was a problem in the first BAPI which i called :
BAPI BAPI_BPCONTACT_DELETE :
CALL FUNCTION 'BAPI_BPCONTACT_DELETE'
EXPORTING
SENDER = LV_SYS
* TESTRUN = 'X'
TABLES
SALESACTIVITYID = LT_DATA
RETURN = LT_RETURN
EXCEPTIONS
OTHERS = 1.
LT_DATA :
SYS OBJTYP DOC_NUMBER
1 T68CLNT100 BCONTACT 2346794736
2 T68CLNT100 BCONTACT 2346794722
After execution the table LT_RETURN is empty. I don't know why !
LT_DATA-DOC_NUMBER existing in talbe VBKA. When i put a non-existing LT_DATA-DOC_NUMBER LT_RETURN is still empty.
Can you help me ? Thanks you !
07-01-2016 4:31 PM
Problem solved !
After debug session on BAPI i find a weird thing :
There is a control on the LT_DATA - OBJECTTYPE fields where it must be equal to a constant.
The constants is gc_this_objecttype declared on L1037TOP.
Value is BUS1037.
So i just make ls_data-OBJECTTYPE = 'BUS1037' on my loop before call BAPI and it's works !
Then you should call BAPI_BPCONTACT_SAVEFROMMEMOR, BAPI_TRANSACTION_COMMIT.
control on each entry on LT_DATA-OBJECTTYPE equal a constants
07-01-2016 4:31 PM
Problem solved !
After debug session on BAPI i find a weird thing :
There is a control on the LT_DATA - OBJECTTYPE fields where it must be equal to a constant.
The constants is gc_this_objecttype declared on L1037TOP.
Value is BUS1037.
So i just make ls_data-OBJECTTYPE = 'BUS1037' on my loop before call BAPI and it's works !
Then you should call BAPI_BPCONTACT_SAVEFROMMEMOR, BAPI_TRANSACTION_COMMIT.
control on each entry on LT_DATA-OBJECTTYPE equal a constants
09-15-2020 7:58 PM
Can I use this function module to delete Vendor contact person?
If yes, where should I pass the vendor number and corresponding contact person number(KNVK-PARNR)?.