BAPI - create customer

Dear all,
i need to use the BAPI 'BAPI_CUSTOMER_CREATEFROMDATA1' to create customer record . How and where to define the customer account group??
Or does this function is 'hardcoded' that can only create '0001-sold to party' customer account??
Or is there any other BAPI that can create different customer accounts?
Thanks in advance!

Hello Winson,
I've looked through the source of 'BAPI_CUSTOMER_CREATEFROMDATA1' and it seems that it obtains account group from reference customer.

Similar Messages

  • BAPI create customer with search term 2?

    Hi all,
    I'm looking for a BAPI/FM, which can create customer master record with 'Search term 2' input field. Pls let me know the BAPI/FM name if you know.
    Regards,
    Hung.

    Hello Hung,
    SD_CUSTOMER_MAINTAIN_ALL is used in standard during the maintenance of a consumer using the standard customer master data transaction XD01 & XD02.
    It is not intended to be used out of the transaction and in no case it should be used out of its original context. Due to the specificity of the function module, out of the original context we may face limitations and data inconsistencies.
    For the maintenance of customers, there is NO BAPI and NO direct function module.
    There are some functions modules like the one above where the name is looking nice. But these should not be used.
    Below ECC 2005 (6.00), the only solution was batch input and DEBMAS idocs. See [note 384462|https://service.sap.com/sap/support/notes/384462]
    Starting with ECC 2005 (6.00) and above: a synchronisation tool has been introduce. See class CMD_EI_API and VMD_EI_API
    Hope this helps
    BR
    Alain

  • BAPI Create Customer Contact

    There is no problem to create a debtor with the BAPI: BAPI_CUISTOMER_CREATEFROMDATA1 with parameters COMPANYDATA and COPYREFERENCE filled.
    But is there a way to add a contact to the created debtor? Exists BAPIs to create and modify such a contact?
    Thanks for help.
    Message was edited by: Holger Degroot

    Hi Holger,
    As far as I know there is no BAPI exits whats so ever to change or update the debtor!, However there are some non-Remote functions exits which might can change or update the Debtor.
    Few months back I was also trying to change the debtor data but could'nt figure out any BAPI for that purpose!
    Marek

  • Bapi to  create customer Master

    Dear all,
    As far i know there is no standard bapi to create a customer.  There i s standard fm used her is SD_CUSTOMER_MAINTAIN_ALL. I tried to create customer master using this and making the function module as remote enabled. i tried to created a  zbapi and use this fm inside of this. Please tell me if any idea on this.If any body knows   please help me in this.
    Regards,
    Madhu.

    Dear Alain
    Once again thanks for your reply. I passed customer no to extract data of a customer . But it is not extracting any data .
    I am thinking to fill all the fields of the table by seeing hoe it is extracting the data . can you give me some idea on this .
    DATA: ls_i_main   TYPE cmds_ei_main,
            ls_e_main   TYPE cmds_ei_main,
            lt_custs    TYPE cmds_ei_extern_t,
            ls_cust     TYPE cmds_ei_extern,
            ls_head     TYPE cmds_ei_header,
            ls_instance TYPE cmds_ei_instance.
      CONSTANTS: lc_obj_task TYPE cmd_ei_object_task VALUE 'M'.
      ls_instance-kunnr = '0000100001'.
      ls_head-object_instance = ls_instance.
      ls_head-object_task = lc_obj_task.
      ls_cust-header = ls_head.
      APPEND ls_cust TO lt_custs.
      ls_e_main-customers = lt_custs.
      CALL METHOD cmd_ei_api_extract=>get_data
        EXPORTING
          is_master_data = ls_e_main
        IMPORTING
          es_master_data = ls_i_main.
          "es_error       = pe_error.
    Regards,
    madhu.
    Edited by: madhurao123 on Mar 31, 2010 1:17 PM

  • . bapi to create customer

    Hi All,
    I am having problem finding a right bapi for create a customer.
    I am using "bapi_customer_createfromdata1" to create a customer. Problem is i couldn't find a structure to pass sales org. data as well as partner functions.
    Please help me. Feel free to ask me questions.
    Thanks,
    Diwakar.

    Hi,
    The way is using multiple BAPI's.
    bapi "bapi_customer_createfromdata1" is used to create 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 <b>fknvp</b>.
    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
    Appended line by line to the table.
    Reward points if found helpful....
    Cheers,
    Venkoji Babu.

  • Bapi Bdc Combination to create customer

    Dear all,
    I want to create a customer master from external system. What are the standard bapis are there  they re not suitable for my requirement. I approach it in the following way. I did a bdc for xd01 and trying to call it from a rfc fm which i prepared.  But the data that i passes from this fm is not reaching my bdc program. If any body have a good idea on this please share your idea with me .
    1) I created an import parameter in this i created a structure.
    2) the same structure i declare with the same name in bdc report(se38).
    The code in the fm is in this way
    DATA:
        t_cust TYPE zcust_table .(this is the structure name  in my fm import tab)
    EXPORT t_cust TO MEMORY ID 'TABLE'.
    SUBMIT ZBDC_CUSTOMER AND RETURN.
    3) 
    DATA :BEGIN OF zcust OCCURS 100 .
          INCLUDE STRUCTURE zcust_table.
    DATA:END OF ZCUST.
    START-OF-SELECTION.
    IMPORT t_cust  FROM MEMORY ID 'TABLE'.(Thi is my decalration in se38 bdc program.)
    when i executed my fm  the value that given in fm is not reaching my table which i declared in bdc program.
    Regards,
    Madhu.

    Hi,
    Populate all the customer details address details and personal details in KNA1 structure.
    Populate Company code details in KNB1 structure.
    Populate Sales area details in KNVV structure.
    Populate dunning data in KNB5 table.
    Populate Tax data in KNVI table
    In all the structures other than customer number we have to fill all the primary key fields.
    Call the SD_CUSTOMER_MAINTAIN_ALL function module to create customer as below.
    Create Customer in SAP
            CALL FUNCTION 'SD_CUSTOMER_MAINTAIN_ALL'
              EXPORTING
                i_kna1                  = fs_kna1
                i_knb1                  = fs_knb1
                i_knvv                  = fs_knvv
                i_bapiaddr1             = fs_add1
                i_bapiaddr2             = fs_add2
                pi_postflag             = c_true
              IMPORTING
                e_kunnr                 = w_kunnr
              TABLES
                t_xknb5                 = t_knb5
                t_xknvi                 = t_knvi
              EXCEPTIONS
                client_error            = 1
                kna1_incomplete         = 2
                knb1_incomplete         = 3
                knb5_incomplete         = 4
                knvv_incomplete         = 5
                kunnr_not_unique        = 6
                sales_area_not_unique   = 7
                sales_area_not_valid    = 8
                insert_update_conflict  = 9
                number_assignment_error = 10
                number_not_in_range     = 11
                number_range_not_extern = 12
                number_range_not_intern = 13
                account_group_not_valid = 14
                parnr_invalid           = 15
                bank_address_invalid    = 16
                tax_data_not_valid      = 17
                no_authority            = 18
                company_code_not_unique = 19
                dunning_data_not_valid  = 20
                knb1_reference_invalid  = 21
                cam_error               = 22
                OTHERS                  = 23.
    Check sysubrc to know the error .
    Please let me know if you need any further details.
    Regards
    Madhu

  • BAPI function create Customer master(T-code XD01)??

    Hi All,
    i want to create BDC program using BAPI function create Customer master(upload  customer master),but i do not know which BAPI function for create Customer master.
    Does anyone know,please tell me which BAPI function i can use?
    Thanks.
    Van Dung

    Hi Amit Gujargoud,
    I can use LSMW  upload the data from legacy system to sap system., but my manager he did not want to use LSMW.He wants to use BAPI function for upload customer master.
    I saw this BAPI function create customer master : BAPI_CUSTOMER_CREATEFROMDATA1,
    BAPI_CUSTOMER_CREATEFROMDATA,
    it is not enough field for input data.
    example : if i want input : customer code,company code, Sales organiration,Distribution channel,Division.
    So This BAPI function have not paramaters input this field.
    Thanks for your answer
    Van Dung.

  • How to create customer with bapi

    hi i want to create customer through bapi which facilitates to enter customer code(our own defined not the sequentially next no.)
    i have gone through F.M  BAPI_CUSTOMER_CREATEFROMDATA1 BUT NOT ABLE TO UNDERSTAND HOW TO INPUT PARAMETER FOR CUSTOMER_CODE.
    PLEASE GUIDE ME IF ANY ONE AWARE ABOUT THAT.
    THANKS

    Moderator message - Welcome to SCN.
    But please search the forum before asking a question. This has been discussed many times before. Also read the BAPI documentation - thread locked.
    Also, Please read Please read "The Forum Rules of Engagement" before posting!  HOT NEWS!! and How to post code in SCN, and some things NOT to do... and [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers] before posting again.
    Rob

  • How to Create Customer by BAPI or by Function Module

    Hi all,
    I am new to this forum...
    Please can anyone tell me how to Create Customer by BAPI or by Function Module.....?
    I have tried many of the function modules posted in the threads.. but it couldn't help me out...

    > The only official solution is batchinput and idoc (CREMAS).
    Note that when an IDoc exists, it is often possible to call the function module that is just behind it (see WE57 transaction). SAP would not support that direct call, but if you need to contact SAP support about an issue, you can create the IDoc manually and there's no reason that this issue doesn't arise.
    The only difference with the IDocs is that you don't have any IDoc stored in the database, and even no log in database (so you won't be able to see anything in WE02, etc.).
    Note that it is important to know if this function module does a database commit or not: you can look at the BDFG transaction (I assume there's no BAPI related as it is the initial assumption of my post) to see if IDoc packet processing is allowed or not: if packet processing is allowed, there's no database commit in the function module, otherwise there's one.

  • How to create custom BAPI for a project on Agentry?

    As I am very new to BAPI creation, I would like to get some helpful pdf documents or links for creating custom BAPIs, which would fetch data for an Agentry Project to be build.
    Tags edited by: Michael Appleby

    Rajkamal,
    I would recommend you work through the following tutorial on how to build an Agentry application from scratch.  It covers creating a BAPI to retrieve data from the SAP backend to Agentry.
    Part 1 - http://scn.sap.com/docs/DOC-47550
    Part 2 - http://scn.sap.com/docs/DOC-47651
    --Bill

  • BAPI for Customer Create

    Hi,
    I need to simulate XD01 as my web dynpro application. (My requiremtn).
    I have a requirement to create the customer. ( In WEB DYNPRO)
    I am looking for the BAPI.
    In my application I am giving the customer number from My Screen as Exporting Parameter.
    But, In BAPI, by default it is assigning the Customer number. It is not taking as Input.
    Can you please tell me any BAPI or any FM or which creates customer by taking KUNNR as input.
    Regards
    Sandeep.

    Hi Sandeep,
    first don't use SD_CUSTOMER_MAINTAIN_ALL.....
    SD_CUSTOMER_MAINTAIN_ALL is used in standard during the maintenance of a consumer using the standard customer master data transaction XD01 & XD02.
    It is not intended to be used out of the transaction and in no case it should be used out of its original context. Due to the specificity of the function module, out of the original context we may face limitations and data inconsistencies.
    For the maintenance of customers, there is NO BAPI and NO direct function module.
    There are some functions modules like the one above where the name is looking nice. But these should not be used.
    Below ECC 2005 (6.00), the only solution was batch input and DEBMAS idocs. See [note 384462|https://service.sap.com/sap/support/notes/384462]
    Starting with ECC 2005 (6.00) and above: a synchronisation tool has been introduce. See class CMD_EI_API and VMD_EI_API
    Then some other informations that can help too.
    Starting with ERP 2005 ehp2 or ehp3, a new initiative has been developped. It called the Lean Customer. This is a Web dynpro application to maintain customer master data.
    This development proposes an api that can be used directly if the limitation are ok for your development.
    Otherwise you have to go to the CMD_EI_API class to fullfil you goal
    Hope this helps
    BR
    Alain

  • BAPI for customer scheduling aggrement (VA31)

    Hi,
    I want to create customer scheduling aggrement using BAPI, but i hav't find any BAPI for this.
    So please tell me is their any BAPI available to create scheduling aggrement.
    <REMOVED BY MODERATOR - REQUEST OR OFFER POINTS ARE FORBIDDEN>
    Thanks,
    Rahul
    Edited by: Alvaro Tejada Galindo on Aug 22, 2008 4:21 PM

    Dear Jelena,
    'BAPI_SAG_CREATE' is used for creating Purchase Scheduling Agreement Tcode u2013 ME31L but my requirement is for creating customer scheduling agrrement Tcode - VA31.
    Pl. confirm is it possible to use the above BAPI for VA31 or not.
    Thanks,
    Rahul

  • Need Function Module to create Customer Master

    Hi,
       I need to create customer master data (T-Code: XD01) include the company code data and sales area data.
       Is there any function module that I can use? I tried to use BDC but since the screen is different for each account group, I'm thinking is there any FM that can use so that I do not need to create so much BDC.
    Hope someone can use.
    Thanks.

    hi there...
    Please find below some of the BAPIs, Function Modules and Direct Input Programs for Customer Master.
    RFBIDE00
    BAPI_CUSTOMER_CREATEFROMDATA1
    SD_CUSTOMER_MAINTAIN_ALL
    hope it helps...
    do reward if helpful or get bak if u hav further queries.

  • Getlist bapi for customer based on sales org, distbtn chnl

    Hi,
        Is there any standard BAPI for customer Getlist , i want to filter based on distribution chanel and sales org and divison.
            Now am using BAPI_CUSTOMER_GETLIST  its showing all customer list i want to filter this based on distribution chanel and sales org and divison.
    Thanks ,
    Arun

    Hi Siva : )
    In VK11 we have a key combination radio button called Country/ Destination Ctr./Plant/TaxClCust/TaxClMat.
    I think it might be a custom key combination (so you might have to create a siliar one for yourself), but basically all I had to enter there was Country = GB, Destination Coutry = GB, plant SORG1 (it's called the same as the sales org and is linked 1-1), tax classification on Customer = 2 (because I want the central setting on the customer to be 2 = ICO, no tax), tax classification on material 1 = full tax goods and enter relevat tax code.
    Hope this helps.
    It worked for me.
    Kind regards,
    Tanja

  • Create customer master

    Hi Gurus,
    I have a requirement to create customer,i have used the following bapis but cudnt help o create.
    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.
    i have to pass customer,address,control data,shipping and billing details of xd01.
    please help me to sort out this problem.
    thanks & regards,
    sap8752.

    Hi,
    Have u tried this FM
    go for this /SAPNEA/SMAPI_CUSTOMER_CREATE
    CALL FUNCTION 'BAPI_CUSTOMER_CREATEFROMDATA1'
           EXPORTING
                pi_personaldata        = pi_personaldata
                pi_opt_personaldata    = pi_opt_personaldata
                pi_companydata         = pi_companydata
                pi_opt_companydata     = pi_opt_companydata
                pi_consumeren          = pi_consumeren
                pi_copyreference       = pi_copyreference
                pi_credit_control_flag = pi_credit_control
           IMPORTING
                customerno             = customer_code
                return                 = return.
      IF return IS INITIAL.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
             EXPORTING
                  wait = pi_wait_commit.
      ELSE.
        CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
      ENDIF.
    For creation of classification data you can use below one
    'BAPI_OBJCL_CREATE'.

Maybe you are looking for

  • IF statement is true THEN replace with 0 in box with formula

    Hello. Sorry maybe for very stupid question, but I have some kind of little problem. I need to do this: If the checkbox (B16) is TRUE (checked) then simply put 0 to field O16. How I can do it, if I already in this field have a formula? Best reagards,

  • I-pod touch works on a Mac but not a PC

    Please help! My I-pod touch works on a Mac but not a PC. When hooked up to a PC, the device is not recognized in I-tunes message, says I-pod in recovery mode and to restore, after checking update and restore, receive unknown error message (9). Have t

  • Mapping exception error in MM-SUS interface

    Hi.. I am doing MM-SUS Standard Interfaces, when we are sending the Goods Receipt from R/3 to SUS it is throwing the mapping exception eror. yesterday it was working fine. Today its not working , I have not made any changes. it is throwing error in S

  • Changing the path of execution?

    HI, I am implementing SCD in owb. Its working fine. While impementing SCD for one dimension I used table functions. While using dubugger, I mean while debugging, it is executing as we expected. But when I execute directly through deployment manager,

  • How to save a booklet to e-mail and retain book format?

    I've created a brochure using the "booklet" format in Indesign. I'd like to be able to e-mail out and have it retain the "book" layout.  Is that possible? If I save as a pdf it loses all formatting and it's a regular scroll down to view page after pa