/OSGMBH/D2S_INSERT_CONNECTION Function Module
Two preconfigured modules are supplied as standard. They are contained in the sub-package /OSGMBH/DEXP10_D2S.
The /OSGMBH/D2S_INSERT_CONNECTION function module creates an ArchiveLink link in the SAP® system. It can only be called if the document to be linked is in the technical enaio® cabinet and a receipt exists in SAP® that is to be linked to this document.
Interface
The module has the following import parameters:
Parameters in the module | Parameters in the Enterprise service | Data type | Optional | Description/examples |
---|---|---|---|---|
ARCHIV_ID | ArchivId | CHAR 2 | Optional | Name of the repository (E1, Z0, etc.) |
ARC_DOC_ID |
ArcDocId | CHAR 40 | The ArchiveLink DocID | |
AR_DATE | ArDate | Date (YYYYMMDD) | Optional |
Archive date Default: current date |
AR_OBJECT | ArObject | CHAR 10 | ArchiveLink document type (FIINVOCE, SDODELNOTE, etc.) | |
DEL_DATE | DelDate | Date (YYYYMMDD) | Optional |
Deletion date Default: calculated from the OAC3 transaction in SAP® |
TENANT | Tenant | NUMC 3 | Optional |
Tenant, not transferred Default: Login tenant |
OBJECT_ID | Object ID | CHAR 50 | Key of the SAP® object in SAP®, for example, 100019000000222023 | |
SAP_OBJECT | SapObject | CHAR 10 | SAP® object type (BKPF, BUS2088, etc.) | |
DOC_TYPE | DocType | CHAR 20 | Optional |
Document type (PDF, TIF, etc.) Default: Type of document type |
BARCODE | Barcode | CHAR 40 | Optional | Barcode, not used |
FILENAME | Filename | STRING 255 | Optional | File name |
DESCR | Descr | STRING 60 | Optional | Description |
CREATOR | Creator | CHAR 12 | Optional | Creator |
CREATIME | Creatime | Time (HHMMSS) | Optional | Creation time |
RUN_D2E | RunD2e | CHAR 1 | Optional |
Execute data transmission using D2E (X) or not Default: 'X' |
Parameters
At least the following values must be transferred for a correct link:
-
SAP_OBJECT and AR_OBJECT
These two values determine for which SAP® object and with which document type the link is to be created. These two values must be maintained as a link in the OAC3 in SAP® ArchiveLink Customizing. These two values are usually known in advance and do not change within a project or workflow.
-
ARC_DOC_ID and OBJECT_ID
These two values identify the document in the archive cabinet on the one hand and the SAP® receipt of the SAP® object on the other. The structure of the object ID must match the structure of the key of the SAP® object. The definition maintained in transaction SWO1 is binding. The object ID is usually derived from the enaio® project. When a document is archived, the ARC_DOC_ID is assigned by SAP®. It is very often generated in enaio® data2s projects by calling the module /OSGMBH/D2S_MOVE_DOCUMENT.
Optional Parameters
-
ARCHIV_ID
Name of the repository in which the document is located. However, this value can also be found in transaction OAC3 and is always yielded by the entry from SAP_OBJECT and AR_OBJECT. Both entries must match.
-
RUN_D2E
The data2s modules are part of a larger package. The main component of this package is an application that transfers index data from SAP® to enaio®. This transfer is triggered, among other things, by creating a link for selected combinations of SAP® object and document type, that is, possibly also when this module is called. If this is not desired, a space must be transferred to this parameter.
The following four parameters are not available in every SAP® system. You will need to install an ArchiveLink extension. If there is the TOAAT table, then you know that this extension exists. The values are primarily for the user's information and are not evaluated by the SAP® system by default.
-
FILENAME
External name of the file
-
DESCR
Description
-
CREATOR and CREATIME
Name of the creator and time of creation
Result
Apart from the HTTP status code, there is no explicit return value to indicate the success of the operation. However, in the event of an error, an SAP® message is returned with the cause of the error. This is shown in an HTTP 'Internal Server Error (500)' status and the output of a SOAP exception, as in this example response:
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header/>
<soap-env:Body>
<soap-env:Fault>
<faultcode>soap-env:Client</faultcode>
<faultstring xml:lang="de">ErrorConnectiontable</faultstring>
<detail>
<n0:_-osgmbh_-d2sInsertConnection.Exception xmlns:n0="urn:sap-com:document:sap:soap:functions:mc-style">
<Name>ErrorConnectiontable</Name>
<Text>SAP ArchiveLink: Objekttyp keinem Ablagesys. zugeordnet (Customizing) BKPF FIIINVOICE</Text>
<Message>
<ID>OA</ID>
<Number>402</Number>
</Message>
</n0:_-osgmbh_-d2sInsertConnection.Exception>
</detail>
</soap-env:Fault>
</soap-env:Body>
</soap-env:Envelope>