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

Creating a customer without passing a reference customer

Former Member
0 Likes
1,835

Hi im using BAPI_CUSTOMER_CREATEFROMDATA1 in order to create a customer.

However it's mandatory for me to pass a reference customer.

The problem is when i pass a reference customer it takes some values like payment terms and account group from the reference customer and not from the values i pass through the bapi.

IS there any way out of this.

Hi im using BAPI_CUSTOMER_CREATEFROMDATA1 in order to create a customer.

However it's mandatory for me to pass a reference customer.

The problem is when i pass a reference customer it takes some values like payment terms and account group from the reference customer and not from the values i pass through the bapi.

IS there any way out of this.

9 REPLIES 9
Read only

andreas_mann3
Active Contributor
0 Likes
1,527

very strange, but the docu of that bapi confirms your statement

-> it's an unusable bapi better use report rfbide00

A.

Read only

0 Likes
1,527

What do you mean by an unusable bapi . It works just fine , except for a few values which it takes from the reference customer.

Is there any way to circumvent this?

Read only

0 Likes
1,527

Hi

The existing BAPI's create customer with reference customer only. there is no BAPI for creating the customer without giving reference.

we faced the same problem earlier and we have developed the custom bapi for creating customer without gicving reference

With Regard,s

Dwarakanath.S

Read only

0 Likes
1,527

HI Yogi,

I am trying to create a bapi to create customer with out reference number. I tried a lot to write a bapi for customer creation .But i am unable to finish it. I have seen your mail that you created a bapi for customer creation . Can you give some idea how to create a bapi for customer creation. I know how to write a bapi. I hope you will answer for this.

Regards,

Madhu.

Read only

Former Member
0 Likes
1,527

Hi Dexter,

there is NO BAPI for creating customers or vendors.

The one you are talking about is to be used with a specific SAP product called Online Stores.

In this perspective only it works fine.

For general handling, nothing do exists at the moment.

Moreover, if you face trouble in the future, such BAPI are only supported from with the Online Store scope.

You may have a look to note 384462.

Alternatively, starting with ERP 2005, SAP introduced 2 new class called CMD_EI_API and VMD_EI_API. There you may find what you expect.

Alain

Read only

uwe_schieferstein
Active Contributor
0 Likes
1,527

Hello Dexter

For a big customer I once created a SAP-XI interface for creating customers which eventually called BAPI_CUSTOMER_CREATEFROMDATA1.

This customer had only a few different combinations of payment terms and accouting groups for its customers (< 6 different combinations). For each combination a reference customer was created.

Thus, there are two options for you:

1) Use the report suggested by Andreas which you have to feed with all details that cannot be feed into the BAPI

2) Define the logic which "calculates" the reference customer from the accounting details and use the BAPI

Regards

Uwe

Read only

asik_shameem
Active Contributor
0 Likes
1,527

Hi

Use the FM SD_CUSTOMER_MAINTAIN_ALL as in the below code.

CALL FUNCTION 'SD_CUSTOMER_MAINTAIN_ALL'
       EXPORTING
            I_KNA1                        = I_KNA1
            I_KNB1                        = I_KNB1
            I_KNVV                        = I_KNVV
            I_BAPIADDR1                   = I_BAPIADDR1
            I_BAPIADDR2                   = I_BAPIADDR2
            I_FORCE_EXTERNAL_NUMBER_RANGE = POSTFLAG
            PI_POSTFLAG                   = POSTFLAG
       TABLES
            T_XKNBK                 = T_XKNBK
            T_XKNB5                 = T_XKNB5
            T_XKNVI                 = T_XKNVI
            T_XKNVK                 = T_XKNVK
            T_XKNVP                 = T_XKNVP
            T_YKNBK                 = T_YKNBK
            T_YKNB5                 = T_YKNB5
            T_YKNVI                 = T_YKNVI
            T_YKNVK                 = T_YKNVK
            T_YKNVP                 = T_YKNVP.

Read only

0 Likes
1,527

Hi,

this FM SD_CUSTOMER_MAINTAIN_ALL has been developped for a very particular case within standard transactions.

As a result it is not recommended to use it. Same comment as in my previous message.

Alain

Read only

Former Member
0 Likes
1,527

This BApi generates a customer no internally.

What if i need an external customer no?