on 01-18-2010 3:26 PM
Is there any function module to delete contact persons (table knvk)? We have been unsuccessful with SD_CUSTOMER_MAINTAIN_ALL which seems to only implement updates and deletes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The "answer" seems to be to use SD_CUSTOMER_MAINTAIN_ALL but to just accept that it doesn't actually delete the contact. Instead the contact is removed from the customer. In technical terms KNVK-KUNNR is cleared and the contact remains in the system but not attached to any customer.
**********************************************************************
DATA: lt_xknvk TYPE fknvk_tab,
lt_yknvk TYPE fknvk_tab,
ls_fknvk TYPE fknvk,
ls_kna1 TYPE kna1.
**********************************************************************
DATA contact TYPE parnr VALUE '0000123456'.
" Old Data
SELECT SINGLE * FROM knvk INTO CORRESPONDING FIELDS OF ls_fknvk WHERE parnr = contact.
APPEND ls_fknvk TO lt_yknvk.
SELECT SINGLE * FROM kna1 INTO ls_kna1 WHERE kunnr = ls_fknvk-kunnr.
" New Data
ls_fknvk-kz = 'D'. " Delete
APPEND ls_fknvk TO lt_xknvk.
CALL FUNCTION 'SD_CUSTOMER_MAINTAIN_ALL'
EXPORTING
pi_postflag = 'X'
TABLES
t_xknvk = lt_xknvk
t_yknvk = lt_yknvk
EXCEPTIONS
OTHERS = 1.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I'm afraid you are right.
No function module seems existing to delete properly a contact person.
BUT I strongly advise against direct deletion of KNVK records.
KNVK is related to several complex address tables. Moreover, contact persons could be present as partner function in master data tables or transactional data.
This is surely one of the worst action you can do.
There are several ways to achieve such deletion.
1/ batchinput ==> XD02, in the overview screen, select the contact person with ok-code /06, then delete it with ok-code /14
2/ delete it via DEBMAS idoc. segment E1KNVKM with MSGFN field = 003
3/ Starting with release ECC 2005, class CMD_EI_API can be used to delete or maintain customers. This includes deletion of contact persons.
Hope this helped
Best regards
Alain
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alain,
I've a related question on deletion of the contacts. In case the contact is deleted from XD02, would the CMD_EI_API class trigger the methods to synchronize and delete the business partners from BUT000, BUT050/51/52 and CVI_CUST_CT_LINK tables?
Would really appreciate your input on CVI.
Thank you,
Vishal Parikh
Hi,
I guess there is no FM or BAPI for thsi purpose.
although below process is not advisable, but you can delete the entry from table directly in debug mode, provided proper access to you. Pls contact ur tech folks for deleting, they might have the access.
BR,
Krishna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
10 | |
6 | |
5 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.