SAP Function SDOK_PHIO_CREATE - Create a Physical Document

Parameter Reference Type Length Default Optional Text
CLIENT SYST-MANDT C 3 SY-MANDT X Client
OBJECT_CLASS SDOKPHCL-PH_CLASS C 10 X Object Class
OBJECT_UNIQUE_ID SDOKPHIO-PHIO_ID C 32 X Unique Object Identification
X_ENQUEUE SYST-DATAR C 1 X Flag for Locking New Document
X_SUPPRESS_PARTNER_CHECK SYST-DATAR C 1 X (Only for Internal Use)

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

Parameter Reference Length Optional Text
FROM_RELATIONS SDOKRELIST 84 X Incoming Relationships with Partner Object
PROPERTIES SDOKPROPTY 89 X Name and Value of Attributes
TO_RELATIONS SDOKRELIST 84 X Outgoing Relationships with Partner Object

Exception Text
BAD_CLASS Object Class Unknown
BAD_PROPERTIES Attributes Not Specified Correctly
BAD_RELATIONS Relationships Not Specified Correctly
DUPLICATE_OBJECT_ID Object already exists
ENQUEUE_FAILURE Locking Error
EXCEPTION_IN_EXIT Exception Triggered 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 physical document based on a specificdocument class.
The document class of the new document is specified when the functionmodule is called. The document ID can be assigned as a DCE-compatibleGUID, or it can be automatically assigned by KPro.
You can assign attributes to the new phyiscal document. If the documentclass contains mandatory attributes, the document can be created onlyif all mandatory attributes are specified on the interface or if theyare inherited from the document class attributes.
Relationships to and from other documents can also be created alongwith the physical document. In particular, the relationship with theassociated logical document should be set at this point. The GUID of arelationship can also be pre-set to be DCE-compatible. If the relevantstructure field is not filled when the function module is created, KProassigns the GUID. The GUID is then returned. If a relationship cannotbe created for some reason (see SDOK_RELA_CREATE), the exceptionBAD_RELATION occurs.
If the physical document is derived from another document, one of thefunction modules SDOK_PHIO_CREATE_WITH_MODEL, SDOK_PHIO_CREATE_AS_COPY,or SDOK_PHIO_CREATE_NEW_VERSION is used instead of SDOK_PHIO_CREATE.
After SDOK_PHIO_CREATE has been successfully executed, the document hasthe status "initial".

Notes
The document class is optional here because no meaningful default classcan be specified for this function module. You must, however, specify adocument class. If you attempt to call this function module withoutspecifying a document class, an exception occurs.
The document ID or relationship ID has no semantic content and isnormally assigned by KPro. It makes sense for the application to assignIDs only in situations where the application has already used an IDbefore the document was created in KPro. In such cases, you must ensurethat the ID is DCE-compatible and that it is transferred as a 32-digithex character string, to avoid clashes with existing KPro documents.
Attribute entries generated by KPro are not contained as exportparameters in the table PROPERTIES. They must be read using"PropertiesGet".

1611604Fix for bad property passed during ATF document creation