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 Create BAPI

Former Member
0 Kudos

Hi All,

I am trying to create a customer by calling a BAPI. I am unable to find the right one. I wanted to create customer with all levels of data(General, Company and Sales Org including partner functions). I have used below BAPI's.

BAPI_CUSTOMER_CREATEFROMDATA - Only taking general data

BAPI_CUSTOMER_CREATEFROMDATA1 - Importing general information and copying sales org data from reference customer.

SD_CUSTOMER_MAINTAIN_ALL - it is not importing KNVP(partner function data)

Please help me.

ABAPer.

Thanks in advance,

5 REPLIES 5

Clemenss
Active Contributor
0 Kudos

Hi Anil,

use

CALL FUNCTION 'BAPI_BUPA_ROLE_ADD'

Regards,

Clemens

Former Member
0 Kudos

Hi Clemens,

Thanks, but this BAPI does not add entry to Customer partner function table KNVP. Right now i am creating a customer but not able to assign existing customer to newly created customer as a partner (as a sold to or ship to) in KNVP table. Help me, it is very urgent. Please ask me if you guys have any questions.

Thanks,

Anil.

Former Member
0 Kudos

use 'BAPI_CUSTOMER_CREATE'..

Former Member
0 Kudos

Hi All,

I found a way to solution.The way is using multiple BAPI's.

BAPI "BAPI_CUSTOMER_CREATEFROMDATA1" is used for creating for customer with reference customer number and then send the information to BAPI "SD_CUSTOMER_MAINTAIN_ALL" for changing the the values.

Still having problem passing parameters.

When i am sending partner information(KNVP) to "SD_CUSTOMER_MAINTAIN_ALL", it is giving ABAP dump ASSERTION_FAILED.

I tried to debug the program but i couldn't find the error.

values i passed to BAPI SD_CUSTOMER_MAINTAIN_ALL

internal table of type FKNVP.

MANDT sy-mandt

KUNNR st_knvp-kunnr

VKORG st_knvp-vkorg

VTWEG st_knvp-vtweg

SPART st_knvp-spart

PARVW st_knvp-parvw

PARZA

KUNN2 st_knvp-sp_kunnr

LIFNR

PERNR

PARNR

KNREF

DEFPA

Appending line by line to the table.

Please help. Is there anything i am missing.

Thanks,

ABAPer.

Edited by: ABAPer on Dec 16, 2007 8:43 PM

Former Member
0 Kudos

Hi ABAPer,

I have the same requirement now,

but tried all the bapis like :

/SAPNEA/SMAPI_CUSTOMER_CREATE2

/SAPNEA/SMAPI_CUSTOMER_CREATE

BAPI_CUSTOMER_CREATEFROMDATA1

BAPI_CUSTOMER_CREATEFROMDATA

SD_CUSTOMER_MAINTAIN_ALL,

bapi_customer_create,

these are not suitable for my requiement.

even i have to pass customer,address,control data,shipping and billing details of xd01.

please help me to sort out this problem.

thanku &regards,

sap8752