Fonction SAP BAPI_BCONTACT_CREATEFROMDATA - Creation of Business Partner Contact with Data

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
CONTACTDATA BAPIBCONTACT u 220 Contact Data
TEXT_LANGUAGE BAPITEXTLI-LANGU C 1 X Language for Note Text

Paramètre Reférence Type Long. Description
CONTACT BAPIBCONTACT_KEY-CONTACT C 12 Contact Number
RETURN BAPIRETURN1 u 470 Structure for Return Parameter

Paramètre Reférence Long. Facultatif Description
CONTACTOBJECTS BAPIBCONTACT_OBJECT 80 X Contact Objects (Obsolete)
CONTACTOBJECTS_WITH_ROLE BAPIBCONTACT_OBJROLE 92 X Contact Objects with Object Roles
EXTENSIONIN BAPIPAREX 990 X Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT
NOTICETEXT BAPIBCONTACT_TEXTLINE 134 X Note for Contact

Functionality
In the parameters CONTACTDATA and CONTACTOBJECTS, all input data andobjects for a contact are defined. This data is used to generate acontact.

Notes
For a contact to be created, at least the required fields of theparameter CONTACTDATA must be filled.
If an error occurs during processing, it is returned in the parameterRETURN.
If processing is completed successfully, the contact number generatedis returned in the parameter CONTACT.

Further information

Description
After the call, this field contains the number of the contactgenerated.

Description
If an error occurs, this structure might contain the followinginformation.

  • Message type (field: TYPE)

  • Message code (field: CODE)

  • Message text (field: MESSAGE)

  • If no errors occur, the structure remains empty.

    Value range
    Type ID Number Meaning

    • E R2 887 Unexpected error calling function module

    • BCONTACT_CREATE
      The exception codes are returned from the function
      module BCONTACT_CREATE.
      The following codes may be returned:
      o 1 = EXISTING
      The contact already exists.
      o 2 = FOREIGN_LOCK
      When the contact was created, a lock conflict
      occurred.
      o 3 = NUMBER_ERROR
      When the contact was created, an error occurred
      in the internal number assignment.
      o 4 = GENERAL_FAULT
      When the contact was created, an internal
      program error occurred.
      o 5 = INPUT_ERROR
      The transfer structure of the contact data
      CONTACTDATA contains at least one incorrect
      data field.
      o 6 = NOT_AUTHORIZED
      No authorization to create a contact

      Description
      This parameter contains the data of the contact to be generated.
      The structure contains the following fields:

      • PARTNER: Business partner number (required)

      • CONTACT_PERSON: Contact person (optional)

      • CLASS: Contact class (required)

      • ACTIVITY: Contact activity (required)

      • DIRECTION: Direction of contact (optional)

      • PARTNER_INFO: Information about business partner (optional)

      • PRIORITY: Priority (optional)

      • CONTACT_INFO: Information about contact (optional)

      • CONTACT_DATE: Date of contact (optional)

      • CONTACT_TIME: Time of contact (optional)

      • CREATED_ON: Date on which contact was created (optional)

      • CREATED_BY: User who created the contact (optional)

      • AUTH_GROUP: Authorization group (optional)

      • TEXT_LINE: Text attached to contact for information purposes

      • (optional)

        Value range
        The following fields are supplied with default values if nothing isentered by the user:

        • CONTACT_DATE: System date

        • CONTACT_TIME: System time

        • CREATED_ON: System date

        • CREATED_BY: Current user

        • Enter the R/3 language key for the memo text. If this parameter is leftblank, the text is created in the logon language.

          Description
          This table contains the business objects that are to be attached to thecontact to be generated.
          The table contains the following fields:

          • OBJECTTYPE: Object type

          • You can store any BOR object types in the object list of
            the contact.
            • OBJECTKEY: Object key

            • Identification of the object type. The structure of the
              key is described in the BOR for the corresponding object
              type.Description
              This table contains the business objects that will be appended to thecontact to generate.
              The table contains the following fields:
              • OBJECTROLE: Role of the object

              • Indicates the role that the object plays during the
                contact. Possible roles are defined in table BCONTOR. If
                no role is specified or the role is incorrect, the object
                with the DEFAULT role is appended.
                • OBJECTTYPE: Object type

                • You can save any BOR objects in the object list of the
                  contact
                  • OBJECTKEY: Contact key

                  • Key that uniquely identifies the corresponding object
                    type. The key structure is described for the respective
                    object types in the BOR.

                    Default
                    The fields OBJECTTYPE and OBJECTKEY must be filled. The OBJECTROLEfield can be left blank. In this case, the object reference isautomatically assigned the "DEFAULT" role.

                    Description
                    Reference structure for the BAPI parameter ExtensionIn/
                    ExtensionOut

                    This fills the memo text for the contact.
                    Each text line contains two fields:
                    FORMAT
                    Format indicator from SAPscript that enables you to influence theformatting of the text. Please use the following values:
                    ,,Body text
                    * ,,Default paragraph
                    = ,,Long line
                    ( ,,Raw line
                    / ,,Line feed
                    /=,,Line feed and long line
                    /(,,Line feed and raw line
                    /:,,Command line
                    /*,,Comment line
                    TEXT_LINE
                    Contains the text in SAPscript format.