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

Customer creation using BAPI

Former Member
0 Likes
1,328

Hi everyone,

I am using Bapi 'BAPI_CUSTOMER_CREATEFROMDATA1' to create new Customer but getting this error:

Can anyone guide to rectify this error?

A Raheem

6 REPLIES 6
Read only

Former Member
0 Likes
963

What is the message id and number?

Rob

Read only

0 Likes
963

hi rob,

id = F2

number = 891

message = Internal error: Ref. customer does not exist in tax master record

Read only

former_member156446
Active Contributor
0 Likes
963

You need to check the parameter: PI_COPYREFERENCE

From the FM Documentation:

The entered personal data has a direct influence on the master data, company code data and contact person data. One contact partner record is created for the customer in question.

All the master data, company code data, sales area data, tax code data, and reminder data that is not entered is adopted from a reference customer and from the sales area data (sales organization, distribution channel and division - import parameter PI_COPYREFERENCE).

Read only

0 Likes
963

Hi Jay,

When we create manually it is not at all check sales area data, tax code data..............

But when we create using BAPI then it is checking all these data isn't?

So is it better to provide sales area data even though it is not required in our case?

or

There is any other solution?

Please advise.

Read only

0 Likes
963

It might not be the same code that hit manually and via BAPI

With a search on the message number 891.. both the places it raises this message when there is not entry in KNVI table Customer Master Tax Indicator, Check with a functional person why that check is failing.

Read only

dsubhash567
Explorer
0 Likes
963

Hi,

You can try creating a customer with SD_CUSTOMER_MAINTAIN_ALL this FM. You need to pass partner functions while using this FM. You can look at the partner functions of an existing customer and pass them as required.

Thanks,

Subhash.