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: 

Customer creation using BAPI with given customer number

Former Member
0 Kudos

Hi All,

Can we create the customer with our own customer number using the BAPI - BAPI_CUSTOMER_CREATEFROMDATA1.

Generally SAP Creates its own number using number range objects,but i want to create customer with our own specified number.

I found the BADI - CUSTOMER_ADD_DATA for XD01,but it is not working for BAPI.

Please give me the solutions.

Regards,

Srinivas.

5 REPLIES 5

Former Member
0 Kudos

Hey,

Customers are assigned to a account group and a number range is assigned to the account group.

If you want to create a customer with an external number then assign an external number range to the account group.

Search for the node "Assign Number Ranges to Customer Account Groups" in SPRO

Also use function SD_CUSTOMER_MAINTAIN_ALL to create customers. Pass the external number in the import parameter I_KNA1-KUNNR

-Kiran

0 Kudos

Thanks Kiran for your update.

The external customer number comes from the another NON-SAP system.

This is an interface,from NON-SAP(Front-end) system to the SAP(Back-end) system.Data comes from the NON-SAP system and we have to create the customer based on the information from the NON-SAP system,including customer number.

Finally we want to maintain the same customer number in NON-SAP system and the SAP system.

Regards,

Srinivas.

0 Kudos

Hey,

You need to understand the number range in the NON-SAP system and configure that number range in SAP.

For e.g. if the number range in the NON-SAP system is AAA to ZZZ, then you need to create the same number range in SAP. Search the text " Create Number Ranges for Customer Accounts" in SPRO to configure the external number range.

Assign the number range to the account group in which you will create the customers in SAP. Search the text "Assign Number Ranges to Customer Account Groups" in SPRO.

-Kiran

Please mark useful answers

0 Kudos

Thanks once again.

The interface is like this NON-SAP (Front-end)

-

Mercator

-

SAP (Back-end).

and the volume of Date is more than 20,000 a day and mercator will put into the 'Q'.i do not think the data flow in front-end and back-end is authentic.

and lot of business logic is involved in these three systems.

I found the BADI for this,but it is not working for the BAPI.Please suggest any thing for BAPI - BAPI_CUSTOMER_CREATEFROMDATA1.

Regards,

Srinivas.

0 Kudos

Hey,

You cannot use the BAPI to create customers with external numbers. There is no provision to set the external customer number in the BAPI's interface.

This BAPI internally calls the function SD_CUSTOMER_MAINTAIN_ALL to create customers. You need to directly call the function SD_CUSTOMER_MAINTAIN_ALL instead of using the BAPI.

-Kiran