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: 

Error in customer_update FM

Former Member
0 Kudos

Hi,

When i am trying to add a new record using the customer_update FM into KNVP table it says system error. Can some one tell me what the error is for ?

Thanks in advance.

8 REPLIES 8

Former Member
0 Kudos

This is an update function module and you should not use it directly in any custom program. What updates to the customer master are doing?

If this is coming when using a standard SAP transaction or BAPI, then please give the exact error message or dump information.

Srinivas

0 Kudos

I am trying to use it in my BAPI. so executed it individually and it says system error.

'System error in table KNVP, account 1000132 when inserting'

This is the error.

Thanks in advance.

Former Member
0 Kudos

You probably ought to be using one of the BAPIS:

BAPI_CUSTOMER_CHANGEFROMDATA or

BAPI_CUSTOMER_CHANGEFROMDATA1

To add a customer, use:

BAPI_CUSTOMER_CREATEFROMDATA or

BAPI_CUSTOMER_CREATEFROMDATA1

Rob

Message was edited by: Rob Burbank

0 Kudos

nope...i am using it in a custom BAPI...

0 Kudos

I was agreeing with Srinivas that you shouldn't be using a custom BAPI. Does neither of the ones I mentioned do what you need?

Rob

Former Member
0 Kudos

Hi Subbu,

Most of these update function modules have a logic of importing and exporting data from and to memory. So unless you did all that this function module is expecting, it will not work, because of issues with referencial integrity and what not.

The interface of the function module is not the only thing that it expects. So please don't use such function modules in your custom code. Use either one of the ones Rob suggested, or find something that is not a update function module.

It looks like you are trying to insert a customer partner into the table. You cannot have a partner that is not in KNA1. The partner record has to be created as a customer first and then only you can use that customer as a partner. Never try to insert records into some tables, even if you are using a standard SAP function module. All these update function modules will mostly do inserts in a sequence and nothing else. So if you are using something in the middle and the sequence is broken then your data will not be in sync.

Srinivas

Former Member
0 Kudos

Subbu,

By trying to update KNVP directly, you are attempting to break SAP's data model.

You MUST use business transaction like XD01, XD02, etc. By trying any other method, you run a large risk of creating orphan records throughout your system.

Unless your knowledge of the SAP customer master is extensive (and sounds like that is not the case here... no offense... just being honest), you should NOT perform this record creation using your idea.

0 Kudos

Thanks for the response but i created a customer using XD01 and i want to now add the partners using XD02 for which i had to do some manipulations with the table control to add the records. So, instead of that i felt like using any existing FM. Anyways, that did not help me. Once thanks to you all for the clear explanation.