Vous êtes sur la page 1sur 2

Linking Documents and Invoices

Purpose
You can use SAP ArchiveLink to link FI-CA documents to the original invoices created in the
EBS. This provides the relevant accounting clerks with direct access to the invoice sent to
the customer without having to call it up in a different system. In this way, the information
regarding a given customer is available in integrated form, enabling the clerk to provide
customers with optimum information and advice.

Prerequisites
The prerequisite for using the IDoc interface is for the SAP ArchiveLink and the connection to
a corresponding, SAP-certified archiving system to have been configured. For detailed
information on the SAP ArchiveLink , refer to the SAP Library under Basis Components
Basis Services/Communication Interfaces SAP ArchiveLink . Furthermore, the print system
and the SAP system or archiving system need to share a hard disk or a hard disk system. In
other words, the files have to be stored in folders that can be accessed by all systems
involved.

Process Flow
Archiving
The files containing the images (optical representations of the invoices in a graphic file) of
the original invoices are stored in an optical archive and are managed by an archiving
system. The structure of the IDoc interface is represented in the IDoc basic type
FKK_EBS_ARC_DOC. This IDoc basic type consists of one segment ( E1LINK), whereby one
line of this segment corresponds to one data record. The IDoc interface uses the basic
functions of the SAP ArchiveLink . It serves as the connection between the document stored
in an external archiving system and the FI-CA documents. On account of the connection
between the individual IDoc interfaces and the assignment of a key (AWSYS, AWKEY,
AWTYP), documents and invoice documents can be transferred from the optical archive
concurrently and independently. If the corresponding invoice documents have not yet been
posted in the contract accounts receivable and payable, then entries referencing the FI-CA
documents to be created subsequently are made at this point in the link table. The entry in
the key field OBJECT_ID is the linked character string consisting of the individual fields of the
key. When the invoices documents are transferred subsequently, the corresponding FI-CA
document is posted. In this process, the same key is determined during IDoc processing and
entered in the document header (table DFKKKO). This ensures that there is always a link
between an FI-CA document and the invoice file.
The representations of the invoices are stored as graphic files. They are entered by an SAP
archiving system, then archived and linked with an SAP business object using SAP
ArchiveLinks . In this context, archiving is to be understood as issuing the document to be
archived with a document ID that is unique within an archive. If files have already been
entered and archived by an SAP archiving system, the corresponding document ID just has

to be entered using the IDoc interface. For this, you have to set the ARC_FLAG indicator in
the IDoc structure and enter the corresponding key in the field DOC_LOC. The document ID
is entered in the field ARC_DOC_ID of the link table.
The SAP system can also perform archiving independently. In such cases, the path name and
file name of the image can be entered in the IDoc instead of the document ID. For this, the
ARC_FLAG indicator must not be set. The path and file name need to be entered in the field
DOC_LOC. The document ID is generated in the SAP system. The information is transferred
to an archiving system that stores the documents. Then the link tables of the SAP
ArchiveLinks are updated.

Access to the Archived Documents


From an FI-CA document, the key (consisting of the fields AWSYS, AWKEY, and AWTYP) can
be used to access the archived documents and to make a connection to the original invoice.
An FI-CA document with a document number (OPBEL) refers to exactly one invoice and is
therefore linked with exactly one file (image) in the archive. The key (which is unique at the
document level) is entered in the key field OBJECT_ID of the link table as a combined
character string. When combined with the field SAP_OBJECT (CA_REF_DOC see below), a
unique key is achieved, which contains the archive ID and the document ID. On the basis of
these two fields, the SAP ArchiveLink is able to determine the path name and file name of
the requested file and to display these using an external program (such as Adobe Acrobat
Reader for PDF documents).
The link between an FI-CA document and the optical archive is created using an instance of
the object type CA_REF_DOC. The key fields of the object type are identical with the key
fields AWSYS, AWKEY, and AWTYP. When the key fields of the object type are filled by the
corresponding fields of the FI-CA document, an instance of the object type is created. The
object method ArchiveDisplay uses the key fields to access the link table, reads the archive
ID and the document ID, and transfers this information to an SAP ArchiveLink standard
function module. Using the transferred information, this function module determines the
path and file name as well as the corresponding application, executes that application, and
opens the relevant file.
The object method LinkCheck checks whether there is an entry in the link table for an FI-CA
document. If there is such an entry, a link is generated to refer to the document in the
archive. A user can then choose this link to display the document.
Object Type CA_REF_DOC Reference Document for an FI-CA Document
Key Fields

AWSYS
AWKEY
AWTYP

Attributes

ObjectType
ArchiveDocID

Methods

ExistenceCheck
Display
LinkCheck
ArchiveDisplay