
Archivelink - Attachment Attachment Technology in SAP for Novice Consultants
- From the sandbox
- Tutorial
This article is a synthesis of five years of experience as a consultant in the field of corporate document management in the SAP environment. My experience is limited to only one vendor - OpenText (Canada) , but in recent years this technology has become more and more popular, and therefore there is a desire to publish this material.
The article describes the technology of working with unstructured documents (document scans, electronic originals in MS Office format, etc.) in an environment of structured electronic documents - SAP transactions. Both the technical aspect and the main business scenarios of working with documents are described. The publication will be useful to all beginner (and not so) document management consultants working on SAP projects. The material was written almost “from the head”, as a kind of crib, or training manual.
The publication here is a desire to share with all specialists in order to pass on their experience to the younger generation. I clearly understand that not a single training course or training manual will allow a single person (a spherical SAP / ECM consultant in a vacuum) to take and complete a turnkey project for a customer. Therefore, I consider the material published here as saving valuable human time. Well, I'm glad to criticize, of course!
EA system based on standard Archivelink technology covers all types of paper documents subject to accounting in connection with the conduct of business transactions on them. In the direction of movement, all documents can be divided into two types:
Incoming documents, in turn, are divided into three typical scenarios:
To realize the ability to process the flow of documents in practice, marking documents with barcodes is used. In the document movement chain, the barcode is used to identify the scan itself and the place in the accounting system (transaction in SAP) to which it should be attached.
In addition, the presence on the first page of each HQ document allows you to automatically parse the flow of scanned pages into units of documents.
For those who like to watch screenshots, there is a link to YouTube that describes one of the typical projects for the implementation of an electronic archive for SAP users:
In this video you can see on what kind of equipment you can make a similar project. Further, more specific questions can be in PM.
On outgoing documents (generated by SAP), a barcode image is printed at the same time as the document is printed on a laser printer.

On incoming documents, regardless of the scenario, the barcode is placed using a sticker, for example this:

... however, we wanted to talk about Archivelink here. We continue in the technical plane.
Description of the interaction scheme of the components of the SAP Document Access by OpenText solution based on the standard Archivelink technology in the scenario of mass scanning of documents with a bar code:

According to p. 6-9, interaction is carried out via the secure https channel. Security is based on a self-signed certificate between the DP server and the Archive Server.
Here's how SAP imagines it from the point of view of organizing a business process:

At the level of SAP link tables, the scheme for attaching an Archivelink document with a

bar code : BDS_BAR_IN is a standard table in which records about open bar codes are temporarily recorded (i.e., a new one was registered in the electronic document HQ).
BDS_BAR_EX - a standard table, into which records of documents received in EA with identification bar codes are received for temporary storage.
TOA01 is a standard link table containing linked records of electronic documents and links to EA documents added to them.
The functionality of the document card is implemented using the standard “R / 3 Indexing” script, which allows the scan client to transfer, together with the barcode, an arbitrary number of additional document attributes that will be transferred to Archivelink tables for storage. Of course, this approach provides for the addition of standard tables, for example, new tables Z_BDS_BAR_EX for the attributes coming from the scanning system and Z_TOA01 for their permanent placement.
After linking in the Archivelink standard chain, the value of the barcode is lost, but for further maintaining the EA (for example, to implement the function of managing physical storage of documents) it makes sense to continue to store the value of the identification barcode in the document card.
An Archivelink link can be made “manually”, knowing the parameters of a specific archived document (table TOA01 will help us). The link uses several attributes, the minimum set of which are:
In the above example:
In productive systems, a security key is added at the end of the Archivelink link, which is generated using a self-signed security certificate sent by SAP to the archiving system.
For test purposes, security (certificate verification) can be disabled, then it becomes possible to create a link in the browser, for example:

If this topic will be interesting to the Habrasociety, I’m ready to deepen it, for example, with the settings in SAP, as well as articles about installing OpenText servers.
The article describes the technology of working with unstructured documents (document scans, electronic originals in MS Office format, etc.) in an environment of structured electronic documents - SAP transactions. Both the technical aspect and the main business scenarios of working with documents are described. The publication will be useful to all beginner (and not so) document management consultants working on SAP projects. The material was written almost “from the head”, as a kind of crib, or training manual.
The publication here is a desire to share with all specialists in order to pass on their experience to the younger generation. I clearly understand that not a single training course or training manual will allow a single person (a spherical SAP / ECM consultant in a vacuum) to take and complete a turnkey project for a customer. Therefore, I consider the material published here as saving valuable human time. Well, I'm glad to criticize, of course!
Description of typical business scenarios
EA system based on standard Archivelink technology covers all types of paper documents subject to accounting in connection with the conduct of business transactions on them. In the direction of movement, all documents can be divided into two types:
- Incoming documents (from external organizations, other information systems);
- Outgoing (the source of origin is SAP ERP).
Incoming documents, in turn, are divided into three typical scenarios:
- Inboxes with pre-registration (the document enters the EA system at the time of the transaction, the SAP electronic document already exists; it can subsequently be associated with other existing transactions).
- Inbox without preliminary registration (the document is placed in the EA before the transaction is completed, it is the basis for the creation of one or more SAP electronic documents).
- Incoming documents without reference to SAP objects (a category of documents for which it is difficult to establish a connection with transactions due to their large number or complete absence).
To realize the ability to process the flow of documents in practice, marking documents with barcodes is used. In the document movement chain, the barcode is used to identify the scan itself and the place in the accounting system (transaction in SAP) to which it should be attached.
In addition, the presence on the first page of each HQ document allows you to automatically parse the flow of scanned pages into units of documents.
For those who like to watch screenshots, there is a link to YouTube that describes one of the typical projects for the implementation of an electronic archive for SAP users:
In this video you can see on what kind of equipment you can make a similar project. Further, more specific questions can be in PM.
Methods for marking documents
On outgoing documents (generated by SAP), a barcode image is printed at the same time as the document is printed on a laser printer.

On incoming documents, regardless of the scenario, the barcode is placed using a sticker, for example this:

Typical scenario descriptions
To implement the ability to register barcodes (documents), minor improvements to the SAP user interface are used.
Pre-registered incoming documents are documents that enter the EA system when an electronic SAP document already exists. In other words, the document is attached to an already committed transaction. Posting is performed by the same employee who completed the reception of documents.
The formation of an identification sticker with a bar code comes from the corresponding business transaction. To work with such documents, for each transaction, for example, a new functionality may be introduced: the “Application Registration” button.

The operation scenario can be described by the scheme:

Incoming documents without pre-registration are documents that are placed in EA before a transaction is made to SAP. A typical example of the use of this scenario is separate accounting from warehouses located geographically in an arbitrary place. The storekeeper, accepting the delivery of goods, performs only the registration of each paper document from the package of documents, but does not perform movement of materials or other operations on them. Instead, the accountant is tasked with processing each document (or package of documents).
Initially, the barcode of these documents carries information about the type of document and the route of its movement. Sticker printing with barcode is made from the developed transaction Z *. When choosing from the directory the values of the fields "Processing Unit" and "Document Type" depend on each other, i.e. from the list you can select only those documents with which specific departments work.

The operation scenario can be described by the scheme:

Incoming documents without reference to standard SAP objects are a special subtype of documents that cannot be matched with a standard business object (for example, references), or that correspond to an array of transactions (for example, reports). As a result, for this subtype of documents, you can create an artificial Z-object that does not contain postings. On this business object, you can simply hang links to an array of archived documents with attributes.
Outgoing documents are documents generated by the SAP system. The scenario for working with outgoing documents is intended for archiving copies of outgoing documents signed by the counterparty.
The functionality for generating barcode is integrated into the business transaction from which printing is performed. There is no need to use a sticker with a barcode (the barcode is printed at the same time as the document).

Inbox with SAP Pre-Registration
To implement the ability to register barcodes (documents), minor improvements to the SAP user interface are used.
Pre-registered incoming documents are documents that enter the EA system when an electronic SAP document already exists. In other words, the document is attached to an already committed transaction. Posting is performed by the same employee who completed the reception of documents.
The formation of an identification sticker with a bar code comes from the corresponding business transaction. To work with such documents, for each transaction, for example, a new functionality may be introduced: the “Application Registration” button.

The operation scenario can be described by the scheme:

Incoming documents without prior registration
Incoming documents without pre-registration are documents that are placed in EA before a transaction is made to SAP. A typical example of the use of this scenario is separate accounting from warehouses located geographically in an arbitrary place. The storekeeper, accepting the delivery of goods, performs only the registration of each paper document from the package of documents, but does not perform movement of materials or other operations on them. Instead, the accountant is tasked with processing each document (or package of documents).
Initially, the barcode of these documents carries information about the type of document and the route of its movement. Sticker printing with barcode is made from the developed transaction Z *. When choosing from the directory the values of the fields "Processing Unit" and "Document Type" depend on each other, i.e. from the list you can select only those documents with which specific departments work.

The operation scenario can be described by the scheme:

Incoming documents without reference to standard SAP objects are a special subtype of documents that cannot be matched with a standard business object (for example, references), or that correspond to an array of transactions (for example, reports). As a result, for this subtype of documents, you can create an artificial Z-object that does not contain postings. On this business object, you can simply hang links to an array of archived documents with attributes.
Outgoing documents
Outgoing documents are documents generated by the SAP system. The scenario for working with outgoing documents is intended for archiving copies of outgoing documents signed by the counterparty.
The functionality for generating barcode is integrated into the business transaction from which printing is performed. There is no need to use a sticker with a barcode (the barcode is printed at the same time as the document).

... however, we wanted to talk about Archivelink here. We continue in the technical plane.
Archivelink Component Technical Diagram
Description of the interaction scheme of the components of the SAP Document Access by OpenText solution based on the standard Archivelink technology in the scenario of mass scanning of documents with a bar code:

- The SAP ERP user, through the GUI, registers a new document entry. The document is assigned a unique identifier, a sticker is printed with a barcode;
- The sticker is glued onto a paper document;
- A paper document with a sticker is sent in the document stream to a scanner locally connected to the scanning station (“thick” OpenText client);
- The scanning client receives a page stream from the scanner, recognizes the borders of documents and recognizes barcode numbers from stickers;
- The user initiates a session sending a document stream to an electronic archive. The OpenText Document Pipeline document pipeline component is called:
a. Metadata is sent over http on port 8080.
b. The scan image is sent to a special DPDIR folder on the archive server, in which then the action on the document takes place. - The document conveyor initiates sending the document scan to the logical archive specified on the SAP side (ARCHIV_ID);
- The Administration Server component responds with the host name pipeline for sending the scan (ALHOST);
- The scan image file is sent to the archive server;
- The archive server confirms the successful placement by returning a new DocID (ARC_DOC_ID) to the pipeline;
- The document conveyor passes the following parameters to the SAP application server through an RFC call: BARCODE, DOCID;
- Further interactions take place at the SAP application server level.
According to p. 6-9, interaction is carried out via the secure https channel. Security is based on a self-signed certificate between the DP server and the Archive Server.
Here's how SAP imagines it from the point of view of organizing a business process:

At the level of SAP link tables, the scheme for attaching an Archivelink document with a

bar code : BDS_BAR_IN is a standard table in which records about open bar codes are temporarily recorded (i.e., a new one was registered in the electronic document HQ).
BDS_BAR_EX - a standard table, into which records of documents received in EA with identification bar codes are received for temporary storage.
TOA01 is a standard link table containing linked records of electronic documents and links to EA documents added to them.
The functionality of the document card is implemented using the standard “R / 3 Indexing” script, which allows the scan client to transfer, together with the barcode, an arbitrary number of additional document attributes that will be transferred to Archivelink tables for storage. Of course, this approach provides for the addition of standard tables, for example, new tables Z_BDS_BAR_EX for the attributes coming from the scanning system and Z_TOA01 for their permanent placement.
After linking in the Archivelink standard chain, the value of the barcode is lost, but for further maintaining the EA (for example, to implement the function of managing physical storage of documents) it makes sense to continue to store the value of the identification barcode in the document card.
Archivelink http link syntax
An Archivelink link can be made “manually”, knowing the parameters of a specific archived document (table TOA01 will help us). The link uses several attributes, the minimum set of which are:
http://hostname:port/script?get&pVersion=XXXX&contRep=YY&docId=ZZZZZZZZZZZZZZ&accessMode=r
In the above example:
- script - name of application on the application server through which the functions of the archive data storage are called (for OpenText Archive Server it is archive , for IBM FileNet - cs , etc.)
- X is the Archivelink protocol version, usually 0046 ;
- Y - name of the logical archive (repository from transaction oac0);
- Z is a unique document key assigned either by SAP itself (consists of 16 uppercase characters - 005056B4DE071EE48790BFFD3EECF989 ), or external to the SAP system (then it will be written in small characters aaaa1g5wyelfhthsb3bmjcqkqfidi ).
- The accessMode parameter explicitly indicates the type of access to the content (r, w, u, d). It is optional.
In productive systems, a security key is added at the end of the Archivelink link, which is generated using a self-signed security certificate sent by SAP to the archiving system.
For test purposes, security (certificate verification) can be disabled, then it becomes possible to create a link in the browser, for example:
http://vm-as-11:8080/archive?get&pVersion=0046&contRep=L0&docId=aah1yo65r5yviqtqlecc1g5avaiim

If this topic will be interesting to the Habrasociety, I’m ready to deepen it, for example, with the settings in SAP, as well as articles about installing OpenText servers.