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 delete the data from KNVP without using the delete statement

Former Member
0 Kudos

Hello friends,

I have a requirement that I have to delete the data from KNVP table without using any delete statement. For it I have to use the Standard BAPI or any standard program.

Can you please tell me the name of the standard program or BAPI to delete the data .

Thanks in Advance

Kuldeep

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos

Look at <a href="http://sap.ittoolbox.com/groups/technical-functional/sap-dev/knvp-customer-master-901376">KNVP Customer Master</a>

Regards

10 REPLIES 10

raymond_giuseppi
Active Contributor
0 Kudos

Look at <a href="http://sap.ittoolbox.com/groups/technical-functional/sap-dev/knvp-customer-master-901376">KNVP Customer Master</a>

Regards

0 Kudos

Hello Raymond,

Can we use this function to delete the data?

Kuldeep

0 Kudos

With KZ = 'D' for delete

But that is not an actual BAPI (in fact it's an update task FM) problem is that BAPI_CUSTOMER_CHANGEFROMDATA does not have parameter for partners.

Maybe SD_CUSTOMER_MAINTAIN_ALL is a better FM than the first i found.

Regards

0 Kudos

Hi Raymond,

As I see the function "Customer_update" but it is not having the parameter KZ . so is it the same name of the functional module that you tell me if not please give the exact name.

Secondly, I want to delete the data only from KNVP table that should not be effect in any other table. Please reply me soon.

Thanks and regards,

Kuldeep Verma

0 Kudos

The field is present in each of the table parameter structure. (U-update, D-delete, etc.)

Don't fill I_KNA1-KUNNR and KNA1 wont be updated, don't fill KZ field in each structure you don't want to be updated (table or single parameters)

Regards

0 Kudos

Hello Raymond,

I have use the function 'CUSTOMER_UPDATE' in which I only gives the data in T_XKNVP table only but still the data is not get deleting. Please see the code below.

=============================================================

REPORT ZK_TEST2 .

.

data :

I_KNA1 LIKE KNA1,

I_KNB1 LIKE KNB1,

I_KNVV LIKE KNVV,

I_YKNA1 LIKE KNA1,

I_YKNB1 LIKE KNB1.

Data :

T_XKNAS LIKE FKNAS occurs 0,

T_XKNB5 LIKE FKNB5 occurs 0,

T_XKNBK LIKE FKNBK occurs 0,

T_XKNVA LIKE FKNVA occurs 0,

T_XKNVD LIKE FKNVD occurs 0,

T_XKNVI LIKE FKNVI occurs 0,

T_XKNVK LIKE FKNVK occurs 0,

T_XKNVL LIKE FKNVL occurs 0,

T_XKNVP LIKE FKNVP occurs 0 with header line,

T_XKNVS LIKE FKNVS occurs 0,

T_XKNEX LIKE FKNEX occurs 0,

T_XKNZA LIKE FKNZA occurs 0,

T_YKNAS LIKE FKNAS occurs 0,

T_YKNB5 LIKE FKNB5 occurs 0,

T_YKNBK LIKE FKNBK occurs 0,

T_YKNVA LIKE FKNVA occurs 0,

T_YKNVD LIKE FKNVD occurs 0,

T_YKNVI LIKE FKNVI occurs 0,

T_YKNVK LIKE FKNVK occurs 0,

T_YKNVL LIKE FKNVL occurs 0,

T_YKNVP LIKE FKNVP occurs 0 with header line,

T_YKNVS LIKE FKNVS occurs 0,

T_YKNEX LIKE FKNEX occurs 0,

T_YKNZA LIKE FKNZA occurs 0.

T_XKNVP-KUNNR = '7000002648' .

*T_XKNVP-VKORG = '0001' .

*T_XKNVP-VTWEG = '01' .

*T_XKNVP-SPART = '01' .

T_XKNVP-KZ = 'D' .

append T_XKNVP to T_XKNVP.

CALL FUNCTION 'CUSTOMER_UPDATE'

EXPORTING

I_KNA1 = I_KNA1

I_KNB1 = I_KNB1

I_KNVV = I_KNVV

I_YKNA1 = I_YKNA1

I_YKNB1 = I_YKNB1

TABLES

T_XKNAS = T_XKNAS

T_XKNB5 = T_XKNB5

T_XKNBK = T_XKNBK

T_XKNVA = T_XKNVA

T_XKNVD = T_XKNVD

T_XKNVI = T_XKNVI

T_XKNVK = T_XKNVK

T_XKNVL = T_XKNVL

T_XKNVP = T_XKNVP

T_XKNVS = T_XKNVS

T_XKNEX = T_XKNEX

T_XKNZA = T_XKNZA

T_YKNAS = T_YKNAS

T_YKNB5 = T_YKNB5

T_YKNBK = T_YKNBK

T_YKNVA = T_YKNVA

T_YKNVD = T_YKNVD

T_YKNVI = T_YKNVI

T_YKNVK = T_YKNVK

T_YKNVL = T_YKNVL

T_YKNVP = T_YKNVP

T_YKNVS = T_YKNVS

T_YKNEX = T_YKNEX

T_YKNZA = T_YKNZA

.

=============================================================

0 Kudos

It seems that records to be deleted should be put into T_YKNVP table without KZ.

Regards

0 Kudos

Hi Raymond,

Thanks for your help and guidelines to solve my problem. It means you are a great man.

Thanks again

Kuldeep Verma

0 Kudos

HI,

How do we update the KNVP table using this function module. I was trying to use SD_CUSTOMER_MAINTAIN_ALL. I was able to Insert and Delete successfully, but update is not working for me. I am getting a system error. Can any one please help?

My requirement is when we update KNVP table, the CDHDR table should be updated wit hold values.

Regards,

Jay

0 Kudos

HI,

How do we update the KNVP table using this function module. I was trying to use SD_CUSTOMER_MAINTAIN_ALL. I was able to Insert and Delete successfully, but update is not working for me. I am getting a system error. Can any one please help?

My requirement is when we update KNVP table, the CDHDR table should be updated wit hold values.

Regards,

Jay