Functionality This method of the "Customer" business object is used to create acustomer in SAP R/3 on the basis of entered personal data (importparameter PI_PERSONALDATA) or entered company data (import parameterPI_COMPANYDATA). Only one structure (personal data or company data) can be transferredto the BAPI with entries. (i) One person to be created as a customer: With the entered personal data, addresses of type 1 (company address),type 2 (address for a person/private address of a contact person), andtype 3 (contact partner address) are created simultaneously in CentralAddress Management (CAM). If the "Allow Consumer Maintenance" indicator is set, then a consumeris created in SAP R/3. (See also: import parameterPI_CONSUMEREN >). (a) No consumers to be created: The entered personal data has a direct influence on the master data,company code data and contact person data. One contact partner recordis created for the customer in question. All the master data, company code data, sales area data, tax code data,and reminder data that is not entered is adopted from a referencecustomer and from the sales area data (sales organization, distributionchannel and division - import parameter PI_COPYREFERENCE). If parameter PI_CREDIT_CONTROL_FLAG is set, then the credit controldata of the reference customer is adopted. Exceptions to the fields mentioned above can only exist for the fieldsof import structure "optional personal data" (PI_OPT_PERSONALDATA). Ifvalues exist for the fields in this structure, these values takepriority over any equivalent values for the reference customer. Note: - Important data that is adopted from the reference customer: Master data: Account group. This must be an account group linked to anumber range that internally assigns a customer number. Company code data: Reconciliation account in Financial Accounting Sales data: Customer schema (for determining the calculation schema),term of payment key, shipping conditions, Incoterms part 1, 2 andsupplying plant. - Data that is not adopted from the reference customer: Contact person data, partner function data, and bank details. Example Notes (1) Data needed to create a customer in SAP R/3:
- - Fields of import parameter PI_PERSONALDATA
Surname, language, location, country, currency. Depending on the country, further data may be necesary. The country can be transferred to the BAPI in R/3 format or ISOstandard. If the country key is transferred to the BAPI in both formats (R/3format and ISO standard), the country key in R/3 format has priority. A language key in R/3 format or ISO 639 standard must also betransferred to the BAPI. If both formats are transferred to the BAPI, the language key in R/3format has priority. Finally, a currency key in R/3 format or ISO standard format must betransferred to the BAPI. If both formats are transferred, the currency key in R/3 format haspriority. Notes on names and search term field: Surnames are always entered in the Search term A field in the customermaster.
- - Fields of optional import parameters PI_OPT_PERSONALDATA:
None of these fields are mandatory for customer creation. The structure consists of the following fields: Customer master field: Transportation zone Company-code-relevant fields: Reconciliation account and term ofpayment Sales data fields: Shipping condition, supplying plant, partialdelivery at item level and credit control area
- - Fields of import parameter PI_COPYREFERENCE:
R/3 reference customer, sales area data (sales organization,distribution channel, division) Note on reference customer: The reference customer should be created bearing in mind that its solepurpose is to provide data for customers that are created via the BAPI. That is, the reference customer is not an operative customer in thebusiness sense. As a result, the customer should be created with aseparate account group with internal number assignment. In addition,the reference customer must exist in the organizational data that istransferred to the BAPI. If company-code-independent data is transferred to the BAPI, thereference customer must be created for a company code. (2) The permitted countries are those in R/3 table T005. The permittedregions in these countries are those in R/3 table T005S. The correctlength and necessity of a postal code depends on the country inquestion. (3) An e-mail address is only valid if it contains the character '@'. Note: The e-mail address in the reference customer's correspondencedata is not adopted, as only e-mail addreses of companies or personaladdresses are relevant for future operative business. The e-mailaddress of the reference customer is only adopted if CAM is not active. (b) A consumer is to be created: The entered personal data has a direct influence on the master data and contact person data. One contact person record is created for thecustomer in question. All the master data that is not entered is adopted from the referencecustomer of the consumer. Exceptions to the master data fields can only exist for the first twocustomer master fields of the import structure "optional personal data"(PI_OPT_PERSONALDATA). If values exist for the fields in thisstructure, these values take priority over any equivalent values forthe reference customer. Notes The necessary data for creating a consumer in SAP R/3 is, except forthe reference customer, the same as the data described above needed forthe person customer. (ii) A company customer is to be created: With the entered personal address data, only one type 1 address(company address) is created. Otherwise, the same mechanisms for aperson customer (not a consumer) apply to a company customer. For all three cases: person customer, consumer or company customer, thefollowing applies: (1) For the fields for form of address and form of address key: Onlythe form of address in the personal data structure is used to updatethis field. The form of address key in the personal data structure isirrelevant for updating the data. This field is only used for the"Customer" business object, and therefore possibly used in F4 help forthe form of address field. (2) A check on duplicate records for the purpose of matchcode fields(see MCOD1-3 and table TFMC) is carried out on the basis of an entry inR/3 table T100C (transaction OBA5 work area F2, for MsgNr 145 entry I).If the three matchcode fields are the same, an error message is issued. (3) Messages are returned in parameter RETURN. The return values andtheir meanings can be found in this parameter documentation. (4) The customer is updated synchronously, but no Commit is executed. (5) The new customer is returned in field CUSTOMERNO (key field of"Customer" business object (KNA1)). (6) All address data come from the central function module of the CAM(see ADDR_CHECK >). (7) Authorization requirements for using this BAPI: "Create"authorization must exist for the following objects: F_KNA1_APP(customer: user authorization), F_KNA1_BUK (customer: authorization forcompany codes, for the selected company code) and V_KNA1_VKO (customer:authorization for sales organization, for the selected salesorganization). Authorization profiles that cover the following objectsare SAP_ALL, V_Verkauf and V_Versand. Example Notes FURTHER_SOURCES_OF_INF&Description Export parameter customer number. Number of the newly created customerin the R/3 system Description Return values for errors Value range TYPE = "E" CODE For the error codes, see documentation on exceptionfield NOT_VALID > offunction module POSTAL_CODE_CHECK > TYPE = "E" CODE For the error codes, see documentation on functionmodule TELNUMBER_STRUCT_TO_NORMAL > TYPE = "E" CODE For the error codes, see documentation of functionmodule ADDR_CHECK > TYPE = "E" CODE = "F2013" Country & is not defined TYPE = "E" CODE = "F2016" Language & is not defined TYPE = "E" CODE = "F2031" Region & for country & is not defined TYPE = "E" CODE = "F2034" Currency key & is not defined TYPE = "E" CODE = "F2081" Account & & is not a valid reconciliationaccount (error message for optional import field) TYPE = "E" CODE = "F2081" G/L account & in company code & does notexist (error message for optional import field) TYPE = "E" CODE = "F2145" Customers found with the same address: Check TYPE = "E" CODE = "F2200" Enter a postal code or postal code of thepostbox TYPE = "E" CODE = "F2827" Enter data in all mandatory fields TYPE = "E" CODE = "F2830" E-mail address & is invalid TYPE = "E" CODE = "F2835" Date of birth is invalid TYPE = "E" CODE = "F2838" Form of address text is invalid TYPE = "E" CODE = "F2840" Transportation zone & in country & is notdefined (error message for optional import field) TYPE = "E" CODE = "F2845" Shipping condition & is not defined (errormessage for optional import field) TYPE = "E" CODE = "F2850" Supplying plant & is not defined (errormessage for optional import field) TYPE = "E" CODE = "F2855" Credit control area & is not defined (errormessage for optional import field) TYPE = "E" CODE = "F2860" Partial delivery indicator & is not defined(error message for optional import field) TYPE = "E" CODE = "F2881" Update problem '&1' when calling '&2' TYPE = "E" CODE = "F2882" Internal error: External number assignmentfor reference customer/customer TYPE = "E" CODE = "F2885" Internal error: The "Language" field ofstructure & is empty TYPE = "E" CODE = "F2887" Internal error: The "Currency" field ofstructure & is empty TYPE = "E" CODE = "F2889" Internal error: The reference customer is notknown in company code master record. TYPE = "E" CODE = "F2890" Internal error: The reference customer is notknown in master record TYPE = "E" CODE = "F2891" Internal error: The reference customer is notknown in tax master record TYPE = "E" CODE = "F2892" Internal error: The sales organization is notdefined in master record TYPE = "E" CODE = "F2893" Internal error: Reference customer is notknown in sales master record TYPE = "E" CODE = "FH409" Term of payment & is not valid (error messagefor optional import field)Description Import parameter for a customer's company data. Note: (i) If this import parameter is filled with data, the importstructure for the person data cannot be filled. In this case, the user exit (WWCC1001) for the IAC Online Storetransfers no person address data. Description Preliminary remark: Up until Release 4.5B, "Internet customers" weremanaged as customers in the R/3 System. When an "Internet customer" wascreated, company code data and sales area data were determined from areference customer that was created by SAP Online Store. As of Release 4.6A, customers can be managed as private or companycustomers in the IAC SAP Online Store. Private and company customersdiffer from each other in the use of forms of address and correspondingname fields. Company customers are managed as always as customers inthe R/3 System, and the reference method described above is used forthe creation of company customers. The indicator "Allow consumer maintenance" is discussed in thefollowing only in connection with private customers of the SAP OnlineStore.
- If the indicator "Allow consumer maintenance" is not set, the "Internet
private customers" are managed as usual as customers in the R/3 Systemand the reference method described above is further used. At atechnical level, a private customer here is identical to a companycustomer.
- If the indicator "Allow consumer maintenance" is set, the "Internet
private customers" are managed as R/3 consumers in the R/3 System. Onlya reduced master record is created for these consumers with the help ofa reference customer. In practice, the organizational data of thereference customer is copied. You define the reference customer underMaster data> -> Customer> -> Business partner> ->Consumer> -> Reference customer >. Consequences: Preliminary remark: A consumer is a customer with a private address inthe customer master of the R/3 System. As the "Internet private customer" is a consumer, only the referencemethod of the consumer is valid , and not the normal method of the SAPOnline Store internet customer that was valid until Release 4.5B. Consequences that arise here are: The "Internet private customer" is depicted here as what it is, aconsumer. The data required is reduced. A consequence of this is that areference customer for the consumer can only refer to one sales area.(Before it was possible for different reference customers to refer todifferent distribution channels within a sales area.) A further advantage is that the search help created especially forconsumers can also be used for the "Internet private customers". Old data, that is, customers that were created before Release 4.6A, arecustomer master records and thus are inconsistent with the new datathat is consumer master records. To avoid this inconsistency, SAPdelivers a conversion report (IAC_CUSTOMER_MOVE) that converts olddata, which is defined as "Internet private customers" by the creationmethod, into consumers. See the documentation for the function.Description Copy references for the creation of a customer in the R/3 system. Copy reference fields are: Reference customer and organizational data. Note: If the indicator Allow consumer maintenance> is also set,then a consumer should be created in the R/3 System. (See also ImportParameter PI_CONSUMEREN >). In this case, the reference customer for the consumer serves as areference.Description Import parameter. If this parameter is set, the customer's creditcontrol data (KNKA und KNKK) is transferred. Description Optional import parameter for the optional company address data of anexisting customer. Note: If this import parameter is filled with data, then do not fillthe import structure for the optional personal data. Description Optional import parameter for the optional personal data of a customer. Note: If this import parameter is filled with data, the importstructure for the optional company address data cannot be filled. Description Import parameter for the personal data of a customer. Note: If this import parameter is filled with data, the import structure forthe company address cannot be filled. In this case, the user exit (WWCC1001) for the IAC SAP Online Storedoes not transfer a company address. Field "ONLY_CHANGE_COMADDRESS" is irrelevant for this BAPI.
|