12-15-2007 4:45 PM
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,
12-15-2007 6:03 PM
12-15-2007 9:21 PM
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.
12-16-2007 2:14 PM
12-16-2007 7:40 PM
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
09-15-2011 2:57 PM
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 ®ards,
sap8752