Application Development and Automation 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: 
Read only

Having a problem in changing customer using CMD_EI_API

surendra_battula
Participant
0 Likes
2,550

I am having a customer number with general data and I want to insert company code ,sales data . I have created the customer number when my bp is created using account group.  I am trying to enter data using class cmd_ei_api class=>maintain method and passing  update mode 'U'. but I am ending up with an error as below.

Error:

Customer 200003 has not been created for sales area AAL0 10 10.

I am trying to update the customer with data and the knvv table dont have data for this customer and I am getting an error. am I using the right method. if I am wrong please tell me the function module or other way to update the customer.

---------------------------

debugging errors .

Message was edited by: Matthew Billingham

4 REPLIES 4
Read only

Arun_Prabhu_K
Active Contributor
0 Likes
1,532

Hello Surendra Battula.

     I guess the problem may be because of no preceding zeroes for customer field.

     Have you hard-coded the customer number?

     While passing to any standard FM/BAPI, its internal representation should be passed.

     Make use of CONVERSION_EXIT_ALPHA_INPUT for your customer value and try.    

Regards.

Read only

0 Likes
1,532

Hi Arun

No i am not hard coding but it is happening because if it has no data in knvv table it is raising the error. is this method for modifying on existing data.

I have created one customer daat in xd01 by passing the customer no and then I ran the program as there is data in knvv it executed with out an error.

so it is working only when there is sales data.

Read only

surendra_battula
Participant
0 Likes
1,532

hi

I have managed to execute the method. what I found is the sales data is created but the company code is not created. I couldnt trace out why the company code is not created so the knb1 table is not updated.

but the sales data is updated and working fine.

I am using the  task as M which is change/create .

Read only

matt
Active Contributor
0 Likes
1,532

I have edited your question so the subject is not in ALL CAPITALS. Please note the having a subject in all capitals can lead to your question being rejected.