You are on page 1of 99

SAPALink

Release 4.5

Installation Guide
Version 4.0.4 10 March 2011

Contents
1 Modifications since last Release (4.0.3) .................................................................... 4 2 Installation and running the software modules of the ArchiveLink interface software, release 4.5........................................................................................................................ 5 2.1 HTTP ContentServer.......................................................................................... 5 2.1.1 Introduction ................................................................................................. 5 2.1.2 Implementation ........................................................................................... 5 2.1.2.1 Initialisation of the ContentServer servlet ................................................ 6 2.1.2.2 New Format ........................................................................................... 22 2.1.2.3 Connecting to DMS / Archiving Systems ............................................... 22 2.1.2.3.1 Using SAPALINK with JAVA interface.......................................... 23 2.1.2.3.2 Using SAPALINK with Windows DLL interface ............................ 23 2.1.2.4 Using SAP R/3 security ......................................................................... 23 2.1.3 Running HTTP ContentServer with Apache Tomcat 6.x or 7.x Server ...... 25 2.1.3.1 Installation on Windows X86 ................................................................. 25 2.1.3.2 Installation on Windows x64 .................................................................. 33 2.1.3.3 Known Issues ........................................................................................ 33 2.1.3.4 SAP Connection Settings ...................................................................... 35 2.1.3.5 Installation on Linux(Unix) ..................................................................... 36 2.1.3.6 Administration of ContentServer Software ............................................ 37 2.1.4 SAP Solution Manager Ready functionality (optional) ............................... 41 2.1.5 SAP Information Lifecycle Management ................................................... 46 2.1.6 Administration of SAP Certificates ............................................................ 50 2.1.7 Barcode upload functionality HTTP ContentServer ................................... 52 2.1.7.1 Common Description ............................................................................. 52 2.1.7.2 Technical Description ............................................................................ 52 2.1.7.3 SAP Authorization for Barcode upload .................................................. 53 2.1.7.4 RFC Connection Setup with and without Load Balancing ..................... 54 2.2 Frontend Modul (COM-Object DMSAUTOM.DLL) ........................................... 55 2.2.1 INI-files ...................................................................................................... 55 2.2.1.1 Requirements ........................................................................................ 55 2.2.1.1.1 DLLs in the windows system directory ........................................... 56 2.2.2 SAP CONFIGURATION ............................................................................ 56 2.2.3 Frontend-Client (Scan-/Retrieval) ............................................................. 57 2.2.3.1 Customizing SAP OLE Automation DMSautom.dll ................................ 57 2.2.3.2 Methods to access DMS System ........................................................... 59 2.2.3.2.1 DMSComponentCreate ................................................................... 59 2.2.3.2.2 DMSComponentCreateExt ............................................................. 60 2.2.3.2.3 DMSPropertySet ............................................................................. 61 2.2.3.2.4 DMSGetLastErrorMsg ..................................................................... 61 2.2.3.3 Methods to access SAP ........................................................................ 62 2.2.3.3.1 SAPConnectionOpen ...................................................................... 62 2.2.3.3.2 SAPConnectionClose ..................................................................... 62 2.2.3.3.3 SAPGetLastErrorMsg ..................................................................... 63 2.2.3.3.4 SAPWorkItemCreate....................................................................... 63 2.2.3.3.5 SAPDocumentAttach ...................................................................... 64 2.2.3.3.6 SAPCallUsrFct ................................................................................ 64 2.2.3.4 Examples............................................................................................... 69 2.2.3.4.1 Scenario late archiving with barcode .............................................. 69 2.2.3.4.2 Scenario early archiving .................................................................. 70 2.2.3.4.3 Calling SAP userfunction ............................................................... 71
SAPALINK Release 4.5 Installation Guide Version 4.0.4 Page 2/99

Installation and Configuration of Additional Modules ............................................... 72 3.1 SAP Indexexport .............................................................................................. 72 3.1.1 Requirements............................................................................................ 72 3.1.2 Installation/Configuration .......................................................................... 73 3.1.2.1 HTTP ContentServer ............................................................................. 73 3.1.2.2 SAP Remote Function ........................................................................... 75 3.1.2.3 SAP Event-driven index download ........................................................ 84 3.1.2.3.1 Sample: storing for subsequent entry ........................................... 84 3.1.2.3.2 Sample: indexdownload triggered by writing link entries ............. 85 4 URL Commands ...................................................................................................... 89 5 SAP DocumentFinder.............................................................................................. 90

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 3/99

Modifications since last Release (4.0.3)


Fixes: o Compression did not work (on Windows) if working directory contains blank(s). On Unix/Linux however compression functionality not possible with blanks in working directory o BC-ILM: Propfind with depth=1 did not include the undelying resources if collection name in URL did not have a trailing slash o Shutdown procedure (incl. LinkClose) was not logged in the log file o BC-ILM: Propfind with only one property and this one is not existing resulted in a incorrect 207 Multi-Status o BC-ILM: Wrong namespace listing with 207 Multi-Status (PROPPATCH) o "ForceCompIDData" with set to 1 now retrievs the correct component names (before they all were set to "data")

Enhancements: o Braintribe Solution Manager integration o New Init parameter "ForceCompIDData" in order to enable viewing of documents with compId names <> data, data1,...data<n> with ECL-Viewer o Better Exception handling if BCSAP parameters are not configured correctly o BC-ILM: Property "expiration_date" could be set for past dates o Sitecode now being displayed in ServerStatus HTML-page o Compression: Now configurable by size & mime type (and extension) per ContRep o Corporate License EnBW implemented o Corporate License AGFA Healthcare implemented o KGS Web- and Annotation Client implementation (new Init Parameters: "WebClientMimeType" & "WebClientTrace")

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 4/99

2 Installation and running the software modules of the ArchiveLink interface software, release 4.5
2.1 HTTP ContentServer

2.1.1 Introduction The SAP R/3 HTTP ContentServer functionality is implemented as a servlet in JAVA programing language. Servlets are server-side extensions programmed against the Servlet API. This interface is philosophically equivalent to the old CGI interface, but is both more powerful and extremely more efficient. More information is available at jeeves.javasoft.com. Because of its design, the servlet HTTP ContentServer can be set up with any HTTP server, that is compatible with the Servlet Specification version 2.2. For testing purposes the SAPALINK HTTP ContentServer is shipped as a package for the Apache 5.x, 6.x & 7.x Servlet engine. For further information about this HTTP server contact http://tomcat.apache.org/

2.1.2 Implementation The JAVA implementation of the SAPALINK HTTP ContentServer consists of the following modules:
ContentServer.class ALFtoASCII.class (optional, separatly licensed) Base64Decoder.class Base64FormatException.class Comparable.class ContentData.class DMSException.class DialogBox.class DocumentFinder (optional, separately licensed) Encryption.java IndexExport.class (optional, separately licensed) IndexLine.class KeyFetch.class (only if IndexExport is installed) KGSserialNo.java LongList.class MultipartInputStreamHandler.class MultipartRequest.class MultipartResponse.class ParameterNotFoundException.class ParameterParser.class PatternInfo.class PrintListDataFile.class PrintListIndexFile.class RfcConnectionList.class SendBarcode.class SSFSigRcpSsfInfo.class SSFSigRcpSsfInfoManager.class SecuException.class SecuLink.class Sorter.class StopContentServer.class Tools.class VersionInfo.class WebdavStatus.class Webdav.class

The class ContentServer is the initial servlet class and has to be loaded by the servlet API of the used HTTP server. The other classes can be gathered into a jar or zip container file and added to the CLASSPATH. There is an additional class SAPALink.class that has also to be added to the CLASSPATH.

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 5/99

Please make sure to use the default SAPALink.class module, provided by KGS, if you are going to use the DLL implementation of SAPALink. In the case you are going to use the Java interface for the SAPALINK implementation, you have to replace KGSs default SAPALink.class by your own implementation! 2.1.2.1 Initialisation of the ContentServer servlet The servlet ContentServer has several initialisation parameters that can be set for the initialisation of the software. If there is a "newFormat" version you will find the old and the new name (in that order) in the column "Parameter name". How to activate the newFormat please refer to section 2.1.2.2. These parameters are: Parameter name
CSConfigFile

Value
<Filename>

Description

Default value (if not specified)

Debug LOGDebugLevel 0

Points to an alternative configuration file for holding the ContentServer properties. The syntax for the properties in the alternative config file is: ContentServer.<name>=<val ue> Example: ContentServer.Debug=2 Level of Debuginfo 0 No Debug, only Errormessages with Context of the command that caused the error Debuginfo, only to LogFile Debuginfo to LogFile and Console Performance trace Name of Logfile (and path) for Error- and debuginfo. If not provided, name will be generated automatically. Splits the LogFile into daily logs and keeps maximum of daily log files as specified No splitting of LogFile into daily logs -> LogFile will be written continuously Log file splits into daily logs. Oldest daily logs will be deleted in order to limit amount of daily log files to the value specified. Directory for temporary files (must be large enough to take printlists that can be up to several GB). If not provided, name will be generated automatically. Whether a new certificate, send by R/3 is shown in a dialog box or not New certificate is not shown in a dialog box

LogFile LOGFile

1 2 3 <Filename>

ContentServer.log

KeepLogfileDays LOGSplitAndKeep 0

30 -> Will keep daily logs for one month

>0

WorkingDirectory CSWorkingDirectory

<Path>

work

ShowCertificate SAPShowCertificate 0

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 6/99

1 Security SAPSecurity

0 1 2

PABName CSPABName

<Filename>

PABPassword CSPABPassword

<String>

New certificate is shown in a dialog box Whether SAP Security is activated or not. This value has to correspond to the security level, activated in R/3 (digital Signature) Security off Security on Security on and administration of SAP certificates using SAP transaction OAC0 -> CSAdmin Filename (and path) of the Private Adressbook that holds all certificates of the connected R/3 systems. If not provided, name will be generated automatically. Password for access to Private Adressbook

ContentServer.PSE

DocProtection SAPDocProtection

Combination of characters rucd

Repositories SAPRepositories

MaxProcessCount CSMaxProcessCount

<ContRep1>, <ContRep2>, , <ContRepn> Integer > 0

Normally DocProtection is set by SAP for every document created by R/3. If it is missing, the value specified here is set instead (r = read, u = update, c = create, d = delete) Name of all R/3 ContentRepositories that are going to connect to the ContentServer, each separated by a colon Max. Count of parallel processes within ContentServer. Attention: BarcodeUpload is also a separate process. If set > 1, this requires that the DMS system is able to handle multiple calls to LinkOpen.

None Attention: Length of PABPassword must be greater than 0 None

None Example: FI,SD,CO,HR 0(= MultiThreaded)

MaxCache CSMaxCache

0 Integer > 0

No limitation of parallel processes Max. Count of cached Documents for free text search. Base directory used for this: <WorkingDirectory>\Cache\<Cont Rep> No caching enabled

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 7/99

BarcodeTimer BCTimer

Integer >= 0

BCLogAgeOK

Integer >= 0

BCLogAgeERR

Integer >= 0

BCSAPClient

<String>

BCSAPUser

<String>

Parameter to enable Barcode upload out of the DMS to SAP. The value specifies the time cycles (in seconds), the module requests the archiving systems for new (scanned) barcodes. These barcodes are loaded up to SAP. The module uses a directory tree Barcode, relative to the parameter WorkingDirectory. For the communication with SAP the following parameters (BCSAPxxx) are mandatory. As of release 2.6.0 this timer also defines the cycles for processing SAP Index export files, if Index Export is enabled. Specifies the time (in days) the OK Logfiles (<WorkingDirectory>/Barcode/succ essful) Specifies the time (in days) the Error Logfiles (<WorkingDirectory>/Barcode/error ) Client needed for RFC communication with SAP application server (CPIC user). Default for all ContRepIDs, defined with param Repositories. To specify a specific value for a repository use BCSAPClient_<Repository name> (e.g. : BCSAPClient_FI=000 for Repository FI). To specify a specific value for a repository use together with SID (for SAP ILM - AL Reference handling) BCSAPClient_<Repository name>_<SID> (e.g. : BCSAPClient_FI_K47=000 for Repository FI within SID K47) User name needed for RFC communication with SAP application server (CPIC user). Default for all ContRepIDs, defined with Repositories. To specify a specific value for a repository see BCSAPClient

0 (= Barcode upload disabled an no cycle for processing of index export files)

60 (= Files are kept for 60 days)

60 (= Files are kept for 60 days)

None Example: 800

None

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 8/99

BCSAPPassword

<String>

BCSAPLanguage

<String>

BCSAPHost

<String>

Password for BCSAPUser name needed for RFC communication with SAP application server (CPIC user). Default for all ContRepIDs, defined with Repositories. To specify a specific value for a repository see BCSAPClient Language for RFC communication with SAP application server. Default for all ContRepIDs, defined with Repositories. To specify a specific value for a repository see BCSAPClient SAP Servers IP Adress (or name) for RFC communication. Default for all ContRepIDs, defined with Repositories. To specify a specific value for a repository see BCSAPClient. System number for RFC communication with SAP application server. Default for all ContRepIDs, defined with Repositories. To specify a specific value for a repository see BCSAPClient Whether a connection to DMS (object) should to be closed (LinkClose), if an error to DMS-call occurs. DMS-object is not closed DMS-object is closed by LinkClose and new DMS-object is created by calling LinkOpen. Useful if DMSimplementation doesnt support reconnect (e. g. after DMS restart). ContentRepository list for which CR IndexExport is enabled (subset of Repositories). For RFCconnection the BCSAPxxx params are used. Attention: Also an appropriate remote function on the SAP side has to be installed.

None

None Example: EN

None Example: 192.168.52.122

BCSAPSysNr

<String>

None Example: 00

ConnectionKeepAlive CSConnectionKeepAlive

1 0

ContRepsForIndexExport IDXRepositories

<ContRep1>, <ContRep2>, , <ContRepn>

None

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 9/99

IndexLicenseKey IDXLicenseKey

<String>

ALFLicenseKey

<String>

License-key needed, if (optional) None module IndexExport is installed and ContRepsForIndexExport contains at least one entry. After installation, this feature has to be licensed. In the ContentServer logfile you'll find the message: ...License for KGS IndexExport NOT installed. Please install license for SiteCode: >>xyz<< (e.g. >>E759F3971<<) Please request a license-key online @ http://www.kgssoftware.com/index.php/en/request -a-license-key.html and install by assigning to this value. If BarcodeTimer is set to 0, the default cycle time of 60 seconds is used for processing Index Export files License-key needed, if (optional) None module for ALV conversion (to ASCII for COLD import) is installed. After installation, this feature only works on Printlist that go to the DMS, using the ContentServer. Please maintain this parameter by setting it to a dummy value xyz. After you have send the first printlist to the CS, you will find a message like ...License for KGS ALF module NOT installed. Please install license for SiteCode: >>xyz<< (e.g. >>E759F3971<<) in the ContentServer logfile Please request a license-key @ http://www.kgssoftware.com/index.php/en/request -a-license-key.html and install by assigning to this value.

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 10/99

ProcessTimeout CSProcessTimeout

Integer

ALFDescriptionFile

<String>

CSLicenseKey

<String>

StreamBlockSize CSStreamBlockSize

<Int>

If a DMS request doesn't return (for any reason) and new requests are blocked (since Max Processcount reached) now this InitParameter can be used to allow the next waiting request to enter after he has waited this value (seconds). The value 0 means that the timeout is deactivated (default) Absolute Filename for an Text file with descriptions how to reindex printlists (ALF). The CS is able to generate an Attribute file for already or new archived printlists. For further information about this extra feature of the CS, please contact support@kgssoftware.com If you run a license limited version of the ContentServer, a license key has to be supplied with this parameter in order to enable the ContentServer to start up. Please request a license-key @ http://www.kgssoftware.com/index.php/en/request -a-license-key.html The Sitecode that can be found in the CS logfile (e. g. "...invalid license for ContentServer. Please request for a license for SiteCode >>XYZ<< . Defines the Buffer Size to be used to send response data from ContentServer to SAP. Unit is KB

None

None

100 -> 100KB The default value works fine in most environments. If there are problems on the network, you can try different values to achieve better throughput. None

DocFinderLicenseKey

<String>

SAPDocFinderHost DocFinderHost SAPDocFinderGW DocFinderGW SAPDocFinderRFCDest DocFinderRFCDest

<String> <String> <String>

License-key needed, if (optional) module DocumentFinder is installed and the following parameters SAPDocumentFinderXXX Parameters are supplied. Host name / IP of DocumentFinder None RFC-Destination SAP Geateway name of None DocumentFinder RFC-Destination Name of DocumentFinder RFCNone Destination on SAP side

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 11/99

DocFinderUnicode

0 or 1

AllowedClients SAPAllowedClients

<String>

AllowedCSAdmin SAPAllowedCSAdmin

<String>

CSConfigFile

<String>

Specifies whether SAP DocumentFinder functionality is being used from a UNICODE(=1) or NON-UNICODE (=0) SAP System If specified, only requests for writing (create, update etc.) from IP addresses or host names, specified here explicitly are accepted by the CS. To specify a specific value for a repository use AllowedClients_<Repository name> (e.g. : AllowedClients_FI=192.168.1.13 for Repository FI -> Only Write requests from host with IP 192.168.1.13 are accepted by CS, requests from other IPs or hosts will be rejected with error# 401 -> not authorized) Only the specified IP addresses and/or host names are authorized for the CSAdmin function in SAP transaction OAC0. Requests from other IPs or hosts will be rejected with error# 401 -> not authorized) The entry in the Servlet config file (st-25 or web.xml) references a ini file that holds all ContenServer init value definitions. The specification for an init param entry is:
ContentServer.<init param name 1>=<init param value 1> ContentServer.<init param name 2>=<init param value 2> : : ContentServer.<init param name n>=<init param value n>

1 -> UNICODE

None

Example: 192.168.1.3,192.168 .1.54,sapprod1,sapp rod

None

Example: sapadmin,192.168.1 .2 None Example: File st-25 has the entry:


<value>CSConfigFile=e:\http\Jigs aw\Jigsaw\config\ContentServerconfig.properties</value>

This allows an much more easier way to handle the init params, independently from the Servlet engine and together with HTML configuration dialogs

File ContentServerconfig.properties ha the entries:


ContentServer.Debug=2 ContentServer.AllowedCSAd min=vm47 ContentServer.CSLicenseKe y= ContentServer.LogFile=c\: \\temp\\cs.log ContentServer.WorkingDire ctory=c\:\\temp ContentServer.PABName=c\: \\temp\\kr.pse : :

ProtocolFile CSProtocolFile

<String>

Defines a qualified file name that the ContentServer uses in order to write a file with a one line protocol entry per CS request. A protocol entry consist of information such as: Date, Time, Return Code, Duration, Command, Repository, DocID, CompID, Remote Address

None

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 12/99

ForceComponentRead CSForceComponentRead

0 or 1

0 1

BrowserAsHTML SAPBrowserAsHTML

0 or 1

AllowedOSCommands CSAllowedOSCommands

0 1 <String>

Defines whether a SAP get command for a whole component (toOffset=-1) should be split into single ComponentRead requests towards the backend archive. May be useful for backend archives with sub-optimal performance. Implementation of SAPALink function ComponentRead is mandatory Disabled -> default Enabled -> portion size equivalent to parameter value StreamBlockSize Defines whether documents that are accessed via a browser interface are to be viewed as an HTML document. This avoids the ArchiveLink URL to be displayed in the top level bar of the browser HTML Disabled -> default HTML enabled If specified, determines the list of OS commands (separated by ,) that are accepted by the URL command osExecute. The URL command contains the actual OS command string with the URL parameter pattern. The contents of pattern has to match exactly (including spaces and options) one of the comma separated entries. Usage of * is possible. Beside the parameter pattern the URL has to contain a valid ContentRepository, DocID and CompID as well. As a return the response body contains a string consisting of <return code> <return message>. Upon request, KGS provides a sample RFC function (Z_KGS_CS_EXEC) that can be used in order to leverage this functionality.

None Example: ls l,ls lrt, sls D, stage,release,p rint *

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 13/99

CompressSize CSCompressSize

<Float>

Defines whether components of <CompressSize> MByte or greater are to be compressed with gzip. Only supported, if DMS vendor SAPALink implementation supports the property (String value) DMS_COMP_PROPERTY_COMPRES SIONSTRING On Windows systems, the following two executables have to be accessible in path: - gzip.exe - sum.exe Both are freeware and available under http://sourceforge.net/projects/gnu win32/files/coreutils/ and http://gnuwin32.sourceforge.net/do wnlinks/gzip.php To specify a specific value for a repository: CompressSize_<Repository name>_<ContRep> (e.g. : CompressSize_T1=1 Attention: On Non-Windows platforms the CSWorkingDirectory mustnt contain blanks, if compression is to be used!

0-> no compress

Examples: 1-> 1MB 0.0488 -> 50KB 0.1953 -> 200KB 12.5 -> 12.5MB 0.6835 -> 700KB 0.0009765 -> 1KB

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 14/99

CompressMimeType CSCompressMimeType

<String>

Defines the mime type for which Empty -> compression should be activated compression for all (provided compression size is > 0). mime types If not specified, compression is not restricted to any mime type (= *). Examples: Multiple values are separated by comma Beside mime type values, also extensions may be specified (e. g. .tif or .pdf. However this can only be made if the parameter SAPMimeExtensionLookup has been configured as the ContentServer will derive the mime types from the extension by looking them up through SAP table TOADD image/tiff or application/pdf,imag e/tiff or .tif,.pdf.,.txt or .tif,.pdf.,.txt

IdxExportBarcodeNoEvent 0 or 1 IDXBarcodeNoEvent

To specify a specific value for a or repository: CompressMimeType_<Repository * name>_<ContRep> (e.g. : CompressMimeType_T1=.tif If set to 1, ContentServer will 0 create index input files for barcode entries, if index export is enabled. This is the old style and may cause unnecessary error entries during index download should the document not yet be reported back and linked in SAP. The preferred method for index download with scenario Late Archiving with Barcode should be done via the SAP event mechanism. For details refer to section 3.1.2.3. In order to uses the event driven mechanism, this parameter has to be set to 0 (default).

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 15/99

AlterCompID CSAlterCompID

<String>

DeleteNoError CSDeleteNoError

0 or 1

DisableBarcode BCDisable

0 or 1

SAPidxRemoteFunction IDXRemoteFunction

<String>

RestrictContent CSRestrictContent

<String>

SAPSolHost

<String>

SAPSolPort

<String>

This parameter can hold a list of CompID names, separated by , (Comma). If at least one CompID is specified, the ContentServer will try to deliver a component back to the caller under the following provisions: a) the caller CompID = data b) the system holds exactly one Component (under the specified DocID) that neither is data nor one of the names specified in this parameter. If set to 1 prevents the ContentServer to return HTTP 500 error if deletion fails (might be useful in connection with Filer Storage solution that dont allow physical deleting of documents) If set to 1 disables barcode functionality, even if BarcodeTimer is set > 0. This is useful if CS is supposed to do Indexexport but no barcoding should occur. Specify the name of the SAP-FB for KGS Keyexport here, should it be different from the standard name Z_KGSKEYEXPORT CS will check for Archiving request whether documents match the content definition. E. g. if defined as PDF,TIF only documents will be allowed for storing that do match the pdf or tiff specification within the data stream. All other documents will be rejected. To specify a specific value for a repository use RestrictContent_<Repository name> (e.g. : RestrictContent_FI=PDF or Restrict_Content_T1=PDF,TIF) Host name (or IP) to Customer System Landscape Directory (SLD) in order to connect for SAP SolutionManager Ready functionality Port number to Customer System Landscape Directory (SLD) in order to connect for SAP SolutionManager Ready functionality

None

None

None Possible values: PDF TIF PDF,TIF

None

None

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 16/99

SAPSolUser

<String>

SAPSolPassword

<String>

CSReadTimeout

<Int>

CSWriteTimeout

<Int>

User name to Customer System Landscape Directory (SLD) in order to connect for SAP SolutionManager Ready functionality User name to Customer System Landscape Directory (SLD) in order to connect for SAP SolutionManager Ready functionality Time in seconds until a read operation (from backend storage and/or database) will return a HTTP SC_REQUEST_TIMEOUT (408) error. The ServerStatus will switch from online to timout and can only be reset by either restarting the CS or issuing the following command from a browser: http://<host>:<port>/SAPALink/Co ntentServer?serverInfo&operation= ReSetTimeOut. If used together with KGSStore, version 03.23P2 or higher of KGSStore is required Time in seconds until a write operation (to backend storage and/or database) will return a HTTP SC_REQUEST_TIMEOUT (408) error. The ServerStatus will switch from online to timout and can only be reset by either restarting the CS or issuing the following command from a browser: http://<host>:<port>/SAPALink/Co ntentServer?serverInfo&operation= ReSetTimeOut If used together with KGSStore, version 03.23P2 or higher of KGSStore is required

None

None

0 - > indicates that timeout is disabled

0 - > indicates that timeout is disabled

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 17/99

ContRepsForSignature

<ContRep1>, <ContRep2>, , <ContRepn>

SAPMimeExtensionLooku p

0 or 1

SAPILMContRep

<String>

SAPILMUser

<String>

ContentRepository list for which CR Digital Signature (OpenLimit module) is enabled (subset of Repositories). For all documents with comId data that are being stored in one of the defined repositories a digital signature will be calculated and stored as additional component (name signature) with the document. If the document is being read from the archive, the signature will be checked and if not correct, an error message will be returned. Otherwise the document will be returned. The Openlimit signature software has to be installed correctly and the following JAR files/Libraries have to be present (in shared/lib): SignOpenlimit.jar & VerifyOpenlimit.jar, (in loadLibraryPath [e. g. Tomcat/bin]): siqJNI_PDFcut.dll & siqVerification.dll If set to 1 mime type and file extensions in archive will be set according to mapping in SAP table TOADD. Values in TOADD are being looked up during CS initialization phase. BCSAPxxx parameters have to be set accordingly in order to be able to connect to SAP. Also reports SAP DocClass equivalent, derived by content type (from SAP table TOADD) with barcode record set. E. g. if content type delivered from Archive (with function call WriteBarcodeFile) = image/tiff, CS will report external barcode data set with DocClass equivalent from TOADD. Hence in this case it will be FAX Virtual Repository name for ILM configuration. May be used to logically group data that is being stored through a certain ContentServer interface User name setup in SAP ILM configuration for communication with ContentServer Password setup in SAP ILM configuration for communication with ContentServer

None

None
See section 2.1.5 for details on SAP ILM configuration

None
See section 2.1.5 for details on SAP ILM configuration

SAPILMPassword

<String>

None
See section 2.1.5 for details on SAP ILM configuration

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 18/99

SAPILMLicenseKey

<String>

License key provided by KGS in order to enable ILM functionality Java class name of third party vendors SAPAILMLink implementation. If used together with KGSStore or with DLL implementation, leave empty. For ILM Functionality only: If ILM resource is a reference to an ArchiveLink document and later one is to be locked due to expiration_date or legal_hold (PROPPATCH), this reference locking can be disabled by setting this parameter to 1. Enabling trough 0 For ILM Functionality only: If a Put Requests wants to create a resource that already exist in the archive, this request will be rejected. However if this parameter is set to 1, such a request will be returned as successful by the ContentServer provided, the size of the already existing resource is equal to the one coming with the request. Qualified file name that contains lines for documents for which signature components have to be newly generated and updated by the ContentServer. This update process is being done during CS start up if this parameter is provided. Every line within this file represents a document to be updated. The syntax is:

None
See section 2.1.5 for details on SAP ILM configuration

SAPILMClass

<String>

None
See section 2.1.5 for details on SAP ILM configuration

SAPILM_AL_RefCheckDis able

0 or 1

0 -> ILM-AL reference check enabled

SAPILMAllowDuplicates

0 or 1

0 -> does not allow ILM Put Requests for resources that do already exist in archive

SignatureUpdatefile

<String>

None

<ContRep> <DocId> \n <ContRep> <DocId> \n <ContRep> <DocId> \n :


SAPALinkClass <String> Java class name of third party vendors SAPALink implementation (e. g. com.Vendor.Archive.SAPALink). If used together with KGSStore or with DLL implementation, leave empty. SAPALink

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 19/99

SAPidxFileSystem

<String>

BCSAPASHost

<String>

BCSAPGWHost

<String>

BCSAPGWServ

<String>

BCSAPMSHost

<String>

BCSAPSystem

<String>

BCSAPGroup

<String>

PROTSplitAndKeep

Numeric value (in days) <String>

Qualified path name into which (if specified) CS will export components with compId "index" that will come to the CS through Create requests Host name of the application server. Default for all ContRepIDs, defined with Repositories. To specify a specific value for a repository see BCSAPClient Host name of the SAP gateway. Default for all ContRepIDs, defined with Repositories. To specify a specific value for a repository see BCSAPClient Service number of the SAP gateway. Default for all ContRepIDs, defined with Repositories. To specify a specific value for a repository see BCSAPClient Host name of the message server. Default for all ContRepIDs, defined with Repositories. To specify a specific value for a repository see BCSAPClient Name of the SAP system. Use this param in connection with a load balanced RFC configuration in connection with the params BCSAPMSHost & BCSAPGroup. Default for all ContRepIDs, defined with Repositories. To specify a specific value for a repository see BCSAPClient Name of the group of application servers. Default for all ContRepIDs, defined with Repositories. To specify a specific value for a repository see BCSAPClient Splits the Protocol File into daily chunks and keeps maximum of daily prot files as specified.

None

None

None

None

None

None

None

configPassword

ForceCompIDData

0 or 1

If set, secures the configuration dialog so that alterations can only be made if the password matches with the one that has to be supplied within the dialog. See 2.1.3.6 for details If compID in archive does not start 0 -> disabled with data viewing with the SAP ECL Viewer might lead to an error. Set this parameter to 1 will enable viewing with ECL viewer. Page 20/99

0 -> Will not split protocol file and add on continuously None

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

WebClientMimeType

<String>

By setting this to (a list, separated by ; of) mime type(s), the new KGS Java based Document & Annotation Viewer will be enabled for viewing documents. Also extensions like .tif or .pdf may be used but require the TOADD lookup settings as described at param CompressMimeType

None Example: image/tiff;application /pdf

WebClientTrace

0 or 1

Setting this parameter without the additionally needed components installed on the ContentServer side however might lead to viewing errors. In order to use this optional feature please contact support@kgssoftware.com to learn more about the possibilities, features and cost of this powerful document viewer. If set to 1 this will enable detailed 0 -> disabled tracing in Java console once document is being opened using the KGS Java based Document & Annotation Viewer

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 21/99

2.1.2.2 New Format As of Release 3.2.0 you have the possibility to use modified Config Parameter Names, according to the mapping table listed below. Please mind, that in order to activate the new parameter names, the following setting in web.xml has to be applied:

Please note that NO automatic conversion of old to new parameter names is provided by the ContentServer. The ContentServer-config.properties file has to be translated manually. 2.1.2.3 Connecting to DMS / Archiving Systems Since the SAPALINK software provides a SDK, a connection to a DMS / Archiving System can easily be realized through this SDK. The SDK gives the DMS vendor to ways to adopt his System to the KGS HTTP ContentServer: Either the implementation can be done by using a pure JAVA interface or communication to the DMS can be made through a C++ library.

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 22/99

2.1.2.3.1 Using SAPALINK with JAVA interface The JAVA interface is the best way to adopt DMS, which provide also a JAVA API on its server side. For further information see the SAPALINK SDK Reference Guide. In this case the provided class file SAPALINK.class (mentioned in 2.1.2) has to be substituted by the vendors implementation of this class file to establish a direct way of communication between the HTTP ContentServer and the DMS vendors archiving server. 2.1.2.3.2 Using SAPALINK with Windows DLL interface In addition to the JAVA interface mentioned in 2.1.2.3.1 you can use the C++ SAPALINK SDK implementation to bind the HTTP ContentServer to the vendors DMS system. This way is normally used, if the archiving server runs on a Win32 platform and does not provide a JAVA API to its server side To use the SAPALINK DLL interfacing, none of the class files mentioned in 2.1.2 have to be exchanged. The SAPALINK.class file delivered by the standard is designed to use this way of implementation. You have to make sure that the SAPALINK library file (SAPALINK.DLL on Windows platform) is loadable by the SAPALINK class. Thus this library file has to be located either in the system directory or in the same directory, where the SAPALINK class files are located.

2.1.2.4 Using SAP R/3 security SAP R/3 uses some security mechanisms to ensure secured access to the stored data. Therefore SAP provides libraries to do de- and encoding of the URLs that are used to communicate with the HTTP ContentServer. Unfortunately these libraries are implemented in C language and no JAVA implementation is provided by SAP. Since the HTTP ContentServer is implemented in JAVA and the SAP security library is written in C language, SAPALINK provides a JNI (Java Native Interface) to enable the HTTP ContentServer software to use SAP s security libraries. The class file SecuLink.class loads the library file JavaSeculink which implements the JAVA native interface (JNI) to the SAP security library file SAPSECU. On the distribution CD of the SAPALINK software the variants for the different OS/hardware platforms of the SAPSECU library are provided (e.g. HP-UX, NTIntel, NTAlpha). For the NT/Intel platform the SAPALINK distribution CD contains the complete source code for the JavaSeculink library as a Visual C++ project.

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 23/99

To use the security files on different HW/OS platforms you have to recompile this C++ implementation on the target platform to generate the desired library file. To run the software make sure that both library files, JavaSeculink and SAPSECU are loadable by the JAVA class file SecuLink.class. Thus these library files have to be located either in the system directory or in the same directory, where the SAPALINK class files are located. Please make sure that the versions of the security libraries used ([lib]SAPSECU on ContentServers side) and LIBSSFSO on R/3 application servers side (/sys/exe/run/libssfso) are identical!

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 24/99

2.1.3 Running HTTP ContentServer with Apache Tomcat 6.x or 7.x Server Because of its design as a JAVA servlet the SAPALINK HTTP ContentServer can be run with any HTTP Server that supports the Servlet Specification version 2.2 (see 2.1.1) The following steps describe the installation with Apache Tomcat 6.x 2.1.3.1 Installation on Windows X86 Install Java Runtime (JRE >= 1.5)

Download and install Apache Tomcat 6.x or 7.x according to the Setup routine

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 25/99

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 26/99

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 27/99

Configure Tomcat environment using Tomcat Monitor in the Windows system tray

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 28/99

Set startup type to Automatic

Download the ContentServer install package for Tomcat from the KGS Website (You have to login with your credentials in order to access the container file):

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 29/99

And extract package into Tomcat home directory (overwriting existing files)

Stop Tomcat engine

Edit the file catalina.properties in the Tomcat conf directory and apply the following changes: [before]:

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 30/99

[after]:

Add DMS vendor specific class and jar files to Tomcat Java configuration (here: Example using the KGSStore)

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 31/99

If DMS vendor supplies his own SAPALink.class, this has to be placed in the ..\shared\classes directory, overwriting the existing SAPALink.class file Start the Tomcat Server using the Tomcat Monitor

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 32/99

2.1.3.2 Installation on Windows x64 In order to install the ContentServer on Tomcat 6.x in an Windows 64 Bit environment (x64), follow the exact same steps as described in the previous section (x86). However, please make sure that you download and install the 64 Bit version of the Java Runtime Environment. As an additional step you will have to copy all files residing in the Tomcat\bin\x64 one level up into the Tomcat\bin directory, overwriting all existing files, before starting the Tomcat service. 2.1.3.3 Known Issues

a) If your Tomcat service should not launch, this could be related to: http://forums.sun.com/thread.jspa?threadID=5121172 b) When installing the ContentServer on Windows 2008 Server x64 you might run into the following issue: - ContentServer does not start up properly with Security enable (1 or 2) - The ContentServer log file ends unexpectedly like this

- In the localhost.log (Tomcat\logs) you'll have an entry like this

In order to resolve this issue, you will have to enable the "Desktop Experience" feature. In order to do so, you have to follow these steps:

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 33/99

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 34/99

2.1.3.4 SAP Connection Settings Running the Content Server in a Tomcat environment, the connection settings in SAP have to be set as follows:

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 35/99

2.1.3.5

Installation on Linux(Unix)

Installation steps: Download and extract apache-tomcat-5.5.17.tag.gz as root (http://www.apache.org) Build program jsvc as described on http://tomcat.apache.org/tomcat-5.5doc/setup.html cd $CATALINA_HOME/bin tar xvfz jsvc.tar.gz cd jsvc-src autoconf ./configure make cp jsvc .. cd .. Install DMS vendor specific components. SAPALink.class has to placed into $CATALINA_HOME/shared/classes Example: KGSStore as archiving component under $CATALINA_HOME/shared/lib with contents: ContentServer.jar KGSStore.jar KGSTool.jar FPLibrary.jar Download (from KGS ftp site) and install SAPALink-x.x_OnTomCat5.x_Linux.tar under $CATALINA_HOME Adjust path to absolute filename for CSConfigFile in web.xml under $CATALINA_HOME/webapps/SAPALink/WEB-INF/web.xml e. g. /apache-tomcat-5.5.17/conf/ContentServer-config.properties Move SAP-Security librarys from $CATALINA_HOME/bin to $JRE_HOME/lib/Processor type Example: Suselinux on Intel -> /usr/lib/jvm/java/jre/lib/i386 This applies to the following library files: libJavaSeculink.so librfccm.so libsapjcorfc.so libsapsecu.so libUnix.so Start Tomcat (e. g. sh catalina.sh start)

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 36/99

2.1.3.6 Administration of ContentServer Software The KGS ContentServer is fully integrated into the Tomcat Manager console and can be administred as follows: Connect to Tomcat Console via your browser interface on http://localhost:8080

Click on Tomcat Manager and login using the Tomcat Manager credentials as defined during the Tomcat installation process

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 37/99

Click on SAPALink

Click on Configure in order to adjust the ContentServer property values:

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 38/99

Maintain property values according to the documentation

And confirm. Please restart ContentServer in order to take effect of property value changes.

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 39/99

As of release 4.0.3 this configuration dialog can be secured by setting the init parameter configPassword in the ContentServer-config.properties file and supplying a password value for it. Once this parameter is set with a password value, the configuration dialog will change so that all passwords will be displayed invisible and on the bottom of the page you will have an input field in order to supply the config password value which has to match the value of the init param configPassword) . Only if the 2 match, you will be able to make any changes to the configuration.

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 40/99

2.1.4 SAP Solution Manager Ready functionality (optional) If you want to register at the Customer System Landscape Directory (SLD) (e. g. http://iccsolman40.sap.com/sld) follow the steps as shown below (example). User / Password: 3rd_party / isvconnect08

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 41/99

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 42/99

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 43/99

Now have the ContentServer to register the product against entry made as shown above by providing the SAPSolxxx Parameters and restarting the ContentServer. After registration with ContentServer, you should be able to find the registered system (The SAPSolxx parameters will be commented out by the CS after successful registration):

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 44/99

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 45/99

2.1.5 SAP Information Lifecycle Management In order to setup your SAP system for the XML Data Archiving service, please apply the following configuration steps:

1. Make sure that XML DAS service has been deployed in SAP J2EE engine 2. ContentServer has to be at least of version 4.0.0 3. Setting up HTTP destination via SAP Visual Administrator

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 46/99

4. Do the corresponding XML DAS configuration http://kgs-server:50000/DataArchivingService/DAS

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 47/99

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 48/99

In order to address the ContentServer from SAP please adjust the settings in transaction OAC0 according to the following screen shot

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 49/99

2.1.6 Administration of SAP Certificates As of Release 2.6.2 the administration of SAP Certificates can be handled using the CSAdmin functionality in transaction OAC0. In order to use this functionality, the following parameter setting have to be applied: Security=2 AllowedCSAdmin=<host name or IP of SAP System for CSAdmin> The following screen shots indicates, how this works:

Goto change mode

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 50/99

Mark certificate rows which you want to activate , deactivate or delete

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 51/99

2.1.7 Barcode upload functionality HTTP ContentServer 2.1.7.1 Common Description

The ContentServer contains the RFC- functionality for sending barcodes and DocIDs of scanned documents to SAP for the scenario late archiving with barcodes. For further information see the SAP documentation. With Release 2.20 of the ContentServer this functionality replaces the prior KGS Barcode module DMSALBarcode with SAPALINK 4.5 2.1.7.2 Technical Description

To specify the parameters for the Barcode functionality see section 2.1.2.1 . The program calls in a specified time cycle the function WriteBarcodeFile (see SAPLINK SDK documentation). These function has to create a Job file if there barcode information available for SAP. If there is more than one ContentRepsitory depend RFC Connection specified, the Job file and RDY file will be created in the folder <WorkingDirectory>/Barcode/Internal and in a second step the program spilt this file in single files ContentRepsitory depend to the folder <WorkingDirectory>/Barcode and creates the necessary RDY files. If there is only one RFC Connection defined, the Job file will be created directly in the folder <WorkingDirectory>/Barcode with the appropriate RDY file. A job file has the following contents: Column 1: Column 2: Column 3: Column 4: Column 5: Barcode logical SAP Archive DMS Objectnumber (Document-Id) Archiving date Doctype

The Columns are separated by space. Example: 100001000000212000 FI 002001000007000001 20001018 FAX 100001000000222000 FI 002001000007000002 20001018 FAX 100001000000232000 FI 002001000007000003 20001018 FAX In the next step the program searches the folder <WorkingDirectory>/Barcode for new job files. These files have the Extension TXT. To each final job file, a file with same name and the Extension RDY is expected. Only if both files are found, the job is detected as to process.
SAPALINK Release 4.5 Installation Guide Version 4.0.4 Page 52/99

After a job is available, the barcode information is being sent by RFC to SAP and inserted into the SAP table for open barcodes. After a successful Upload of the bar code information the successfully processed Barcodes are stored in the file <WorkingDirectory>/Barcode/successful/yyyymmdd.txt. Barcodes which upload failed could be found in the file <WorkingDirectory>/Barcode/error/yyyymmdd.txt. These logfiles are automatic deleted after the specified time (see BCLogAgeOK and BCLogAgeERR). For testing purposes you can move a logfile to the folder <WorkingDirectory>/Barcode. After creating a file with the same name and the extension RDY the file will processed again. 2.1.7.3 SAP Authorization for Barcode upload The following authorizations may be compiled within a custom role which is to be applied to the CPIC user profile used for RFC communication:

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 53/99

2.1.7.4

RFC Connection Setup with and without Load Balancing

The RFC communication setup (for Barcoding & Indexdownload) can be done through the following three different scenarios: 1. Configuration with SAP Application Server (without load balancing) and an application server named VMECC60: BCSAPHost=VMECC60 BCSAPClient=100 BCSAPSysNr=00 BCSAPUser=user_1 BCSAPPassword=passwd BCSAPLanguage=EN

2. Configuration with SAP Messages Server (for load balancing) and Group of SAP Application servers (named "NBR"): SAP MessageServer = "ahnbr.wbne.net" BCSAPHost=ahnbr.wbne.net BCSAPSystem=NBR BCSAPGroup=NBR BCSAPMSHost= ahnbr.wbne.net BCSAPClient=100 BCSAPSysNr=00 BCSAPUser=user_1 BCSAPPassword=passwd BCSAPLanguage=EN 3. Configuration for the scenario where SAP Gateway and Application Server are located on different machines or they run on the same machine (without load balancing) but the Gateway is only reachable through a NATed IP (in this case 192.168.70.128) from externaly but internally the Gateway has to connect to AS through a network internally known host name or IP (in this case "vm47.kgs-software.com): BCSAPASHost=vm47.kgs-software.com BCSAPGWHost=192.168.70.128 BCSAPGWServ=sapgw00 BCSAPClient=800 BCSAPSystem=E63 BCSAPSysNr=00 BCSAPUser=user_1 BCSAPPassword=passwd BCSAPLanguage=EN

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 54/99

2.2

Frontend Modul (COM-Object DMSAUTOM.DLL)

2.2.1 INI-files The INI-file ALDMSAcc.ini is locatetd in the windows systemdirectory (e. g. C:\WINNT\ALDMSAcc.ini) All nesseccary configuration parameters are stored there. The parameters are all set through the modules dialogs and do not have to set manualy.
Typ [DMSAUTOM] DebugLevel Value Description Configuration Frontend Client Logwindow off Logwindow on Testmodus (ohne Connect zu SAP) Filename logfile Logging mode Logging off Log errors Log debuginfo level I Log debuginfo level II Logging mode Logwindo (see LogMode) Window Placement Logwindow Default

Integer

0 1 8

Log-File Log-Mode

String Integer 0 1 2 4

Log-ModeScreen Log-WindowPos

Integer Integer Array String

ScanQueue

WorkitemCreateFct

String

ScanQueue for OLE function GUIScanDoc and GUIGetFileFromClient (see SAP Configuration Frontend Client) Name of SAP R/3 Userfunction to create workitems if you dont like to use the standard RFC-function (e.g Z_MYWORKITEMCREATE) The Interface of this function must be compatible to RFC-funtion ARCHIV_PROCESS_RFCINPUT

2.2.1.1 Requirements WindowsNT 4.0, XP or Vista SAP R/3, Rel. 4.5 or higher SAP GUI 4.5 or higher
SAPALINK Release 4.5 Installation Guide Version 4.0.4 Page 55/99

2.2.1.1.1 DLLs in the windows system directory The following DLLs have to be located in the windows system folder (e. g. C:\WINNT\SYSTEM32): ALDMSTool.dll MFC42.dll (Version 6.00.8267.0) MSVCP60.dll (Version 6.00.8168.0) MSVCRT.dll (Version 6.00.8397.0) COMDLG32.OCX (Version 6.00.8169)

2.2.2 SAP CONFIGURATION In order to put SAP working againt a DMS system, it is needed some configuration inside SAP via its Configuration Interface. For details see SAP Documentations

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 56/99

2.2.3 Frontend-Client (Scan-/Retrieval) 2.2.3.1 Customizing SAP OLE Automation DMSautom.dll This file has to be registered (REGSVR32.exe) OLE Application always DMSAUTOM.SAPOLE Display stored document M G GUIViewDoc @AID,@DID @EID=GUIGetViewDocRC

Function GUIViewDoc requires SAPALINK implementation ViewDocument. Alternatively, the function GUIViewDocBrower may be used. This function calls a DMS vendor specific HTTP script and opens a browser window with the following URL http://computer:8080/HTTPScript&contRep=T1&docId=AFFA362826A94C52AC681641 0F5EF2F3&userId=SAPUser. M GUIViewDocBrowser @URL,@UID,HTTPScript

Retrieval for frontend M G GUIRetrieveLocalFile @AID,@DID,@DPA @EID=GUIGetRetrieveLocalFileRC

Display local file M GUIViewLocalFile @DPA,@DTI Archive from frontend M GUIScanDoc @AID,N N=1 -> Scanmode Single N=2 -> Scanmode Batch N=-1 -> Open FileDialog instate of scanning N=-2 -> Folder as Scanqueue @EID=GUIGetScanDocRC @DID=GUIGetScanDocID

G G

Store file on frontend G G @DPA=GUIGetFileFromClient @EID=GUIGetFileFromClientRC


Version 4.0.4 Page 57/99

SAPALINK Release 4.5 Installation Guide

Store file from frontend M G G GUIArchiveLocalFile @AID,@DTI,@DPA @EID=GUIGetArchiveLocalFileRC @DID=GUIGetArchiveLocalFileDocID

Close window M GUICloseDoc @AID,@DID

Write a Registryentry M M M GUIWriteRegistry KeyArchivID,@AID GUIWriteRegistry KeyDocID,@DID GUIWriteRegistry KeyCmd,GotoSAPData

The Syntax is Keyname,Keyvalue. Please customize the Registrypath in configurationfile ALDMSACC.INI Example:
[DMSAUTOM] Registry_KeyArchivID=\HKEY_CURRENT_USER\Software\JavaSoft\Prefs\myApp\p1 Registry_KeyDocID=\HKEY_CURRENT_USER\Software\JavaSoft\Prefs\myApp\p2 Registry_KeyCmd=\HKEY_CURRENT_USER\Software\JavaSoft\Prefs\myApp\p_cmd

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 58/99

API for external Applications 2.2.3.2 Methods to access DMS System

2.2.3.2.1 DMSComponentCreate This function creates a new document.


String DMSComponentCreate (BSTR ALVersion, BSTR ContRep, BSTR CompId, BSTR Version, BSTR ContentType, BSTR CharSet, BSTR DocProt, BSTR CompFile) Parameter: ALVersion: ContRep: CompId: Version: ContentType: CharSet: DocProt: CompFile: Returnvalue: DocumentID Archivelink version (e.g. 0045) Content repository (SAP content repository ID) Component ID (data ) Application version used to create the component (optional) Mimetype (e. g. FAX for AL 3.1, or image/tiff for AL 4.5) Character set (optional) Document protection (e. g crud) File with componentdata

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 59/99

2.2.3.2.2 DMSComponentCreateExt This function creates a new component to an existing document. If the document does not exist a new document will create first and then attach the component to the new document.
Short DMSComponentCreateExt (BSTR ALVersion, BSTR ContRep, BSTR DocID, BSTR CompId, BSTR Version, BSTR ContentType, BSTR CharSet, BSTR DocProt, BSTR CompFile) Parameter: ALVersion: ContRep: DocID: CompId: Archivelink version (e.g. 0045) Content repository (SAP content repository ID) DocumentID Component ID (data for Multipage TIFF file or data, data1, data2 for single Page TIFF Files) Application version used to create the component (optional) Mimetype (e. g. FAX for AL 3.1, or image/tiff for AL 4.5) Character set (optional) Document protection (e. g. crud) File with componentdata

Version: ContentType: CharSet: DocProt: CompFile: Returnvalue: 0 <0 = ok = Error

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 60/99

2.2.3.2.3 DMSPropertySet
Short DMSDocumentPropertySet(BSTR ContRep, BSTR DocId, short nPropId, BSTR Value) Parameter: ContRep: DocID: PropertyId: Content repository (SAP content repository ID) DocumentID 0 Repository to which document belongs 1 Document creation time 2 Document creation date 3 Document modification time 4 Document modification date 5 Document protection flag 6 ArchiveLink version 7 Document barcode

Returnvalue: 0 <0 = ok = Error

2.2.3.2.4 DMSGetLastErrorMsg
String DMSGetLastErrorMsg() Returnvalue: Last Error Message

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 61/99

2.2.3.3

Methods to access SAP

2.2.3.3.1 SAPConnectionOpen This function establish the SAP Connection. This function must be called first before using other SAP methods.
Short SAPConnectionOpen(BSTR Client, BSTR UserName, BSTR Password, BSTR Hostname, int nSystemNo, BSTR GatewayHost, BSTR GatewayService, BSTR Language)

Parameter:
Client: Username: Password: Hostname: SystemNo: GatewayHost: GatewayService: SAP Client number SAP Username (could be a RFC User) SAP Userpassword Name or IP Address SAP Server SAP Systemnumber SAP Systemnumber SAP Systemnumber

Returnvalue: 0 <0 = ok = Error

2.2.3.3.2 SAPConnectionClose This function close the SAP Connection.


Short SAPConnectionClose() Returnvalue: 0 <0 = ok = Error

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 62/99

2.2.3.3.3 SAPGetLastErrorMsg
String SAPGetLastErrorMsg() Returnvalue: Last Error Message

2.2.3.3.4 SAPWorkItemCreate Creates a SAP Bussiness Workflow Item.


Short SAPWorkItemCreate(BSTR ContRepID, BSTR DocID, BSTR ARObject, BSTR DocType, BSTR ExtraData)

Parameter:
ContRep: DocID: ARObject: DocType: ExtraData: Content repository (SAP content repository ID) DocumentID SAP Archivobject (SAP Documenttype) Mimetype (e.x. FAX for AL 3.1, or image/tiff for AL 4.5) for future use.

Returnvalue: 0 <0 = ok = Error

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 63/99

2.2.3.3.5 SAPDocumentAttach
This function assigns a document to a SAP Object. short SAPDocumentAttach(BSTR ContRepID, BSTR DocID, BSTR ARObject, BSTR SAPObj, BSTR SAPObjID)

Parameter:
ContRep: DocID: ARObject: SAPObj: SAPObjID: Returnvalue: 0 <0 = ok = Error Content repository (SAP content repository ID) DocumentID SAP Archivobject (SAP Documenttype) SAP Object (e.g. BKPF) SAP Object-ID

2.2.3.3.6 SAPCallUsrFct
This Function calls the RFC Function Z_KGSDMSAUTOMUSRFCT. You can use this RFC Function to add your own ABAP Code for special requirements. BSTR SAPCallUsrFct(BSTR OpCode,BSTR InParam)

Parameter:
OpCode InParameter will be passed to Function Z_KGSDMSAUTOMUSRFCT will be passed to Function Z_KGSDMSAUTOMUSRFCT

Return:
Returnstring from Function Z_KGSACTIVATORUSRFCT in the case of an error the function returns an empty string

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 64/99

The RFC Function must be defined as follow:

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 65/99

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 66/99

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 67/99

FUNCTION Z_KGSDMSAUTOMUSRFCT. *"---------------------------------------------------------------------*"*"Lokale Schnittstelle: *" IMPORTING *" VALUE(OPCODE) TYPE CHAR1024 OPTIONAL *" VALUE(INPARAM) TYPE CHAR1024 OPTIONAL *" EXPORTING *" VALUE(OUTPARAM) TYPE CHAR1024 *" VALUE(RETURN) TYPE BAPIRET1 *"---------------------------------------------------------------------IF OPCODE = '1'. *" Here you can write your own code for Opcode 1 *" IF INPARAM = ......... OUTPARAM = 'No ABAP-Code implemented for OPCODE 1 yet'. ENDIF. IF OPCODE = '2'. *" Here you can write your own code for Opcode 2 *" IF INPARAM = ......... OUTPARAM = 'No ABAP-Code implemented for OPCODE 2 yet'. ENDIF. IF sy-subrc NE 0. CALL FUNCTION 'BALW_BAPIRETURN_GET1' EXPORTING type = SY-MSGTY cl = SY-MSGID number = SY-MSGNO par1 = SY-MSGV1 par2 = SY-MSGV2 par3 = SY-MSGV3 par4 = SY-MSGV4 IMPORTING bapireturn = return. ENDIF.

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 68/99

2.2.3.4

Examples

2.2.3.4.1 Scenario late archiving with barcode


Dim nRetCode As Integer Dim sDocId As String Set dms = CreateObject("dmsautom.sapole") store TIF file in DMS sDocId = dms.DMSComponentCreate("0045", T1, "data", "", "FAX", "", "rcud", "e:\scanqueue\document.tif") Set Barcode Property If Len(sDocId) > 0 Then nRetCode = dms.DMSDocumentPropertySet(T1, sDocId, 7, "12345678") Else nRetCode = -1 End If Error Handling If nRetCode <> 0 Then MsgBox (dms.DMSGetLastErrorMsg()) End If Set dms = Nothing

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 69/99

2.2.3.4.2 Scenario early archiving


Dim DMSA As Object Dim nRetCode As Integer Dim sDocId As String Set DMSA = CreateObject("dmsautom.sapole") store TIF file in DMS sDocId = dms.DMSComponentCreate("0045", T1, "data", "", "FAX", "", "rcud", "e:\scanqueue\document.tif") If Len(sDocId) = 0 Then MsgBox (dms.DMSGetLastErrorMsg()) nRetCode = -1 End If create SAP Workitem If nRetCode = 0 Then nRetCode = DMSA.SAPConnectionOpen("800", "user", "passw", "129.1.1.255", 0, "", "", "") If nRetCode = 0 Then nRetCode = DMSA.SAPWorkItemCreate("T1", sDocID, "ZFIEARLY", "FAX", "") End If If nRetCode <> 0 Then MsgBox (DMSA.SAPGetLastErrorMsg()) End If DMSA.SAPConnectionClose() End If Set DMSA = Nothing

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 70/99

2.2.3.4.3 Calling SAP userfunction


Option Explicit Dim myObj Dim bOk Dim nRetCode Dim sRetValue bOk = true set myObj = CreateObject("dmsautom.sapole") nRetCode=myObj.SAPConnectionOpen("800","root","maximal","129.1.1.202",0,"","" ,"DE") if nRetCode<>0 then MsgBox (myObj.SAPGetLastErrorMsg()) bOk = false end if if bOk=true then sRetValue = myObj.SAPCallUsrFct("1","Parameter in String") if Len(sRetValue) = 0 then MsgBox (myObj.SAPGetLastErrorMsg()) else MsgBox (sRetValue) end if end if nRetCode=myObj.SAPConnectionClose() MsgBox ("Skript finished") set myObj = nothing

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 71/99

3
3.1

Installation and Configuration of Additional Modules


SAP Indexexport

This function provides additional keys for the specified document. The Keylist contains meta-data information about the corresponding SAP Object and offers the opportunity to map these information to the Document for an SAPGUI independent search functionality. All in the document storage process involved modules are able to activate the Keyfetch functionality of the ContentServer.

SAP- R/3 Server 4.5, 4.6

Documents via ArchiveLink Call RFC-Function Z_KGSKEYEXPORT Keys Barcode / Document Info

HTTP Contenserver DocumentKeySet

DMS System

SAPALINK

Send Barcode

SAP Workflow

KGS SAP Activator

Documents

External Datasource e.g. Scanner

3.1.1 Requirements To enable this funcationality the following requirements have to be met:

SAPALINK function DocumentKeySet has to be implemented by the DMS vendor INIT parameters of HTTP ContentServer have to be set up Remote Function Z_KGSKEYEXPORT has to be implemented on the SAP System

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 72/99

3.1.2 Installation/Configuration 3.1.2.1 HTTP ContentServer The SAP Keyexport functionality is available with release 2.4.0. However the latest available release of the ContentServer should be installed. To enable the functionality the following INIT params of the ContentServer have to be configured:
Parameter name ContRepsForIndexE xport Value <ContRep1>, <ContRep2>, , <ContRepn> Description Default value (if not specified) None

IndexLicenseKey

<String>

BCSAPClient

<String>

ContentRepository list for which CR IndexExport is enabled (subset of Repositories). For RFCconnection the BCSAPxxx params are used. Attention: Also an appropriate remote function Z_KGSKEYEXPORT on the SAP side has to be installed. If Keyexport is triggered through SAP event, you may leave this parameter empty License-key needed, if (optional) None module IndexExport is installed and ContRepsForIndexExport contains at least one entry. After installation, this feature has to be licensed. In the ContentServer logfile you'll find the message: ...License for KGS IndexExport NOT installed. Please install license for SiteCode: >>xyz<< (e.g. >>E759F3971<<) Please request a license-key @ http://www.kgssoftware.com/index.php/en/requesta-license-key.html and install by assigning this value. Client needed for RFC None communication with SAP application server (CPIC user). Example: 800 Default for all ContRepIDs, defined with param Repositories. To specify a specific value for a repository use BCSAPClient_<Repository name> (e.g. : BCSAPClient_FI=000 for Repository FI)

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 73/99

BCSAPUser

<String>

BCSAPPassword

<String>

BCSAPLanguage

<String>

BCSAPHost

<String>

BCSAPSysNr

<String>

User name needed for RFC communication with SAP application server (CPIC user). Default for all ContRepIDs, defined with Repositories. To specify a specific value for a repository see BCSAPClient Password for BCSAPUser name needed for RFC communication with SAP application server (CPIC user). Default for all ContRepIDs, defined with Repositories. To specify a specific value for a repository see BCSAPClient Language for RFC communication with SAP application server. Default for all ContRepIDs, defined with Repositories. To specify a specific value for a repository see BCSAPClient SAP Servers IP Address (or name) for RFC communication. Default for all ContRepIDs, defined with Repositories. To specify a specific value for a repository see BCSAPClient. Attention: Only valid IP-addresses are allowed for this parameter, no names! System number for RFC communication with SAP application server. Default for all ContRepIDs, defined with Repositories. To specify a specific value for a repository see BCSAPClient

None

None

None Example: EN

None Example: 192.168.52.122

None Example: 00

Please notice: Since this is an optional function, a license key is required to enable it. For details refere to the description of the INIT param IndexLicenseKey Alter you have specified the parameters, please make the SAPALINK implementation (DLL and/or Java class file) available to the ContentServer. The configuration of the ContentServer can be tested with the ServerInfo command (http://localhost:8080/servlet/ContentServer?serverInfo&resultAs=html). The ContentRepositories you have configured for Indexexport should be described with the matching information, e.g.:
Repository: "T1" RepositoryStatus: "online" IndexExport enabled Status of connection to (Host >>localhost<< ;Client >>800<< ;User >>root<<): Succeeded

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 74/99

3.1.2.2 SAP Remote Function On the SAP side the remote function Z_KGSKEYEXPORT is responsable to select the key values that are to be reindexed to the already archived documents. This function will be called by the ContentServer for every document that comes through the http ArchiveLink interface and is to be stored in one of the ContentRepositories that are defined with the parameter ContRepsForIndexExport. To install the remote function Z_KGSKEYEXPORT proceed as following: Request for the SAP transport files by sending an eMail to support@kgs-software.com Install the SAP transport: Extract the transport files (ZIP) into the tranport directory of your SAP application server (normaly: \\<server>\sapmnt) Logon to SAP as Administrador account Start transaction STMS

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 75/99

Press F5 for Import overview

Select the Queue you want to import the transport into (here in this example KG1) by doubble click.

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 76/99

From the men choose Extras->Other requests->Add

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 77/99

Fill in the request name KG1K900043

and confirm

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 78/99

choose Yes and the transport request will be added to your Queue.

Select the request and choose Ctrl.+F11 to start the import.

Specify the target client for your system (here: 800)

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 79/99

synchronous mode

and check the following options

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 80/99

then confirm. The import should now be executed. This can take several minutes.

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 81/99

Alter completion the screen should appear like this:

The SAP remote function Z_KGSKEYEXPORT is now available in the SAP system an can be configured for exporting the key values, the application requires.

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 82/99

To change the ABAP code, please use the transaction SE37

and press Change. The Source can be modified to your needs, saved and activated.

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 83/99

3.1.2.3

SAP Event-driven index download

The index download can be triggered by SAP events. To intercept a SAP event, you have to specify the receiver function Z_KGSKEYEXPORT_REC_FB for this event in transaction SWETYPV. Please make sure that the event which you want to intercept is activated (for details see SAP documentation). 3.1.2.3.1 Sample: storing for subsequent entry In the AL Scenario storing for subsequent entry, the event IMAGE ASSIGNED is triggered when the link between the SAP business object and the image has taken place. To intercept this event as a trigger for providing the index data, please proceed as follows: Transaction: SWETYPV

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 84/99

Button: New Entries

button: save

3.1.2.3.2 Sample: indexdownload triggered by writing link entries In the case of the late storage scenario, SAP creates ASSIGNED events. To enable the indexdownload triggered by this event, please proceed as follows: ArchiveLink events are not triggered until you have activated them in transaction OAG1. Transaction: OAG1

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 85/99

check button Generate event Assigned button: save

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 86/99

Transaction: SWETYPV

Button: New Entries

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 87/99

button: save

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 88/99

URL Commands

As of release 2.6.0 P1 there is a possibility to request Document Properties using a specific URL. As input parameters with that GET method there are Content Repository name, SAP Document ID and the Property ID to be specified in order to receive the result value for that property. The following example shows the exact syntax and result message where Property ID 100 (-> Centera CLIP ID) is retrieved for SAP document with the ID 1234567, residing in Content Repository T1:

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 89/99

SAP DocumentFinder

The ContentServer supports the SAP DocumentFinder Specification. If this addional modul is licensed, SAP can be configured to be used with the ContentServer: Maintain RFC Destination (Transaction SM59) Create a new RFC-Destination for the Document Finder

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 90/99

Should the SAP System that uses the Document Finder functionality be UNICODE enabled, please specify the settings under "MDMP & Unicode" as follows: Try "Connection Test" in order to check whether communication with the ContentServer is working.

Create Document Area for Document Finder (Transaction OADOCSP)

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 91/99

Save.

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 92/99

As of ECC 6.0 you may use transaction OADFFCUST in order to create the Document Area:

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 93/99

Using the DocumentFinder Interface (Transaction OA_FIND)

Choose your created Document Area

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 94/99

Query Mask will be displayed corresponding to the meta information fetched from the external archive. Example:

Specify query attributes and Start Search Hitlist (from external archive) will be displayed

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 95/99

Select Document and use context menu (right mouse button) to display the (archiveLink) image

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 96/99

Document will be fetched out of the external archive using the ArchiveLink interface (ContentServer) and displayed

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 97/99

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 98/99

SAPALINK Release 4.5 Installation Guide

Version 4.0.4

Page 99/99