Ansicht
Dokumentation

SDOK_PHIO_CREATE - Create a Physical Document

SDOK_PHIO_CREATE - Create a Physical Document

PERFORM Short Reference   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

This function module creates a physical document based on a specific document class.

The document class of the new document is specified when the function module is called. The document ID can be assigned as a DCE-compatible GUID, or it can be automatically assigned by KPro.

You can assign attributes to the new phyiscal document. If the document class contains mandatory attributes, the document can be created only if all mandatory attributes are specified on the interface or if they are inherited from the document class attributes.

Relationships to and from other documents can also be created along with the physical document. In particular, the relationship with the associated logical document should be set at this point. The GUID of a relationship can also be pre-set to be DCE-compatible. If the relevant structure field is not filled when the function module is created, KPro assigns the GUID. The GUID is then returned. If a relationship cannot be created for some reason (see SDOK_RELA_CREATE), the exception BAD_RELATION occurs.

If the physical document is derived from another document, one of the function 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 has the status "initial".

Example

Notes

The document class is optional here because no meaningful default class can be specified for this function module. You must, however, specify a document class. If you attempt to call this function module without specifying a document class, an exception occurs.

The document ID or relationship ID has no semantic content and is normally assigned by KPro. It makes sense for the application to assign IDs only in situations where the application has already used an ID before the document was created in KPro. In such cases, you must ensure that the ID is DCE-compatible and that it is transferred as a 32-digit hex character string, to avoid clashes with existing KPro documents.

Attribute entries generated by KPro are not contained as export parameters in the table PROPERTIES. They must be read using "PropertiesGet".

Further information





Parameters

CLIENT
FROM_RELATIONS
OBJECT_CLASS
OBJECT_ID
OBJECT_UNIQUE_ID
PROPERTIES
TO_RELATIONS
X_ENQUEUE
X_SUPPRESS_PARTNER_CHECK

Exceptions

BAD_CLASS
BAD_PROPERTIES
BAD_RELATIONS
DUPLICATE_OBJECT_ID
ENQUEUE_FAILURE
EXCEPTION_IN_EXIT
MIMETYPE_NOT_ALLOWED
MISSING_CLASS
MISSING_PROPERTIES
NOT_AUTHORIZED

Function Group

SDCL

TXBHW - Original Tax Base Amount in Local Currency   ABAP Short Reference  
This documentation is copyright by SAP AG.

Length: 2953 Date: 20240523 Time: 055253     sap01-206 ( 70 ms )