Skip to Content
avatar image
Former Member

Customer Create BAPI

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,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Dec 15, 2007 at 06:03 PM

    Hi Anil,

    use

    CALL FUNCTION 'BAPI_BUPA_ROLE_ADD'

    Regards,

    Clemens

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.

  • avatar image
    Former Member
    Dec 16, 2007 at 02:14 PM

    use 'BAPI_CUSTOMER_CREATE'..

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 16, 2007 at 07: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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 15, 2011 at 01: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 &regards,

    sap8752

    Add comment
    10|10000 characters needed characters exceeded