SAP Function SDOK_LOIO_CREATE - Create a Logical Document

Parameter Reference Type Length Default Optional Text
CLIENT SYST-MANDT C 3 SY-MANDT X Client
OBJECT_CLASS SDOKLOCL-LO_CLASS C 10 X Object Class
OBJECT_UNIQUE_ID SDOKLOIO-LOIO_ID C 32 X Unique Object Identification

Parameter Reference Type Length Text
OBJECT_ID SDOKOBJECT u 42 BOR Key for the Object

Parameter Reference Length Optional Text
PROPERTIES SDOKPROPTY 89 X Name and Value of Attributes

Exception Text
BAD_CLASS Object Class Unknown
BAD_PROPERTIES Attributes Not Specified Correctly
DUPLICATE_OBJECT_ID Object already exists
EXCEPTION_IN_EXIT Exception in Application Exit
MISSING_CLASS Object Class Not Specified
MISSING_PROPERTIES Required Attributes Not Specified
NOT_AUTHORIZED No Authorization

Functionality
This function module creates a logical document from a specificdocument class.
The user specifies the document class of the new document when thedocument is being created. The user has the option of pre-defining thedocument ID as a DCE-compatible GUID. Otherwise, KPro defines thedocument ID.
The user can set attributes for the new logical document when thedocument is being created. If a document class contains requiredattributes, the document can only be created when all requiredattributes have been specified in the interface, or have been inheritedfrom the document class.

  • The document class is optional for compatibility reasons only. It is
  • not possible to set a meaningful default document class. If a documentis called without a document class being specified, an exceptionoccurs.
    • The document ID has no semantic content and is usually defined by SAP
    • Knowledge Provider. It only makes sense for the application to specifythe ID in situations where an application uses the ID in questionbefore the document has been created. In such cases, the ID must beDCE-compatible and must be transferred as a 32-digit hex number string,in order to prevent conflicts with other documents.
      • Attribute entries generated by KPro are not available as export
      • parameters in the table PROPERTIES. You have to read them using"PropertiesGet".

        Description
        Export parameter.
        This parameter describes the class and the ID of the new object.

        Value range
        The structure contains the following fields:
        CLASS,,Document class
        OBJID,,Object identifier

        Default
        This parameter is not automatically assigned a value.

        Description
        Optional import parameter.
        Every logical document has a logical document class. The logicaldocument class describes the properties and functions of the documentin terms of attributes and relationships. It also specifies the exitfunctions in situations where application logic is required.

        Value range
        All logical documents known to SAP Knowledge Provider.

        Default
        This parameter is not automatically assigned a value. If you attempt tocall the function module without specifying a parameter, an exceptionoccurs.

        Description
        Optional import parameter.
        Every object in SAP Knowledge Provider (logical document, physcialdocument, relationship, and so on) has a globally unique identifier(GUID). This GUID is DCE-compatible and appears on the interfaces as a32-digit hex number string.

        Value range
        Sequence of 32 hex numbers (0 - 9, A - F).

        Default
        This parameter has no default value.

        Description
        Transfer table, used as an import parameter.
        This parameter describes a list of attributes.
        An attribute can be specified only if it is entered for the class ofthe object in question. It can have multiple values, provided that thedocument class allows for this.

        Value range
        The structure or table has the following fields:
        NAME,,Attribute name
        VALUE,,Attribute value

        Default
        This parameter has no default value.