Common Store Sap Archive

31
Customizing DB2® Content Manager CommonStore for SAP® and SAP ArchiveLink Stephan C. Kammerer IBM Boeblingen Lab Germany August 2003 ©2003 International Business Machines Corp. All rights reserved.

Transcript of Common Store Sap Archive

Customizing DB2® Content Manager CommonStore for SAP®

and SAP ArchiveLink

Stephan C. Kammerer IBM Boeblingen Lab

Germany August 2003

©2003 International Business Machines Corp. All rights reserved.

Customizing DB2 CM CommonStore for SAP and SAP ArchiveLink

2

Trademarks and notices The following terms are trademarks or registered trademarks of the IBM Corporation in the United States or in other countries IBM AIX DB2 DB2 Universal Database Windows and Windows 2000 are registered trademarks of Microsoft Corporation in the United States, other countries, or both. UNIX is a registered trademark of The Open Group in the United States and other countries. Other company, product, and service names may be trademarks or service marks of others.

This information in this article is provided as-is and without any warranties, whether EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. IBM AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE THAT RESULT FROM YOUR USE OF THE SOFTWARE. IN NO EVENT WILL IBM OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF IBM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

Customizing DB2 CM CommonStore for SAP and SAP ArchiveLink

3

Table of contents Introduction....................................................................................................................4

Customizing DB2 CM CommonStore for SAP .............................................................4

Customizing the SAP 4.6C system ................................................................................6

Functional Testing .......................................................................................................16

Incoming documents ..............................................................................................16 Print lists ................................................................................................................19 Outgoing documents ..............................................................................................20 SAP data.................................................................................................................21

Troubleshooting ...........................................................................................................25

General troubleshooting.........................................................................................25 Incoming documents ..............................................................................................26 Print lists ................................................................................................................27 SAP data.................................................................................................................27

Appendix: Sample configuration profile .....................................................................29

Customizing DB2 CM CommonStore for SAP and SAP ArchiveLink

4

Introduction

The purpose of this paper is to show you how to customize DB2® Content Manager CommonStore for SAP V8 and SAP ArchiveLink. The steps in this paper assume that you are running CommonStore for SAP on DB2 Content Manager V8 and SAP system release 4.6C. You will learn how to customize your system to archive:

• Documents ! Print lists ! Incoming documents ! Outgoing documents

• SAP Data This paper also provides a section on testing so that you can determine whether the customization was successful. Last, but not least, some troubleshooting hints are given.

Customizing DB2 CM CommonStore for SAP

After you have successfully installed DB2 CM CommonStore for SAP you can start to customize your system. In our scenario we will do that for a DB2 Content Manager V8 archive system on Microsoft® Windows® 2000.

Recommendation: <SID> is the SAP system id. If you want to add additional DB2 CM CommonStore instances in future you have a better overview on which DB2 CM CommonStore server is running against which SAP system, by copying the instance directory and all files in it from: C:\Program Files\IBM\CSSAP\Server\Instance01\ to C:\Program Files\IBM\CSSAP\Server\<SID>\

Change to the newly created directory and copy the file archint.sample_cm8.ini to archint.ini. Open the file archint.ini and check the directories already inserted whether they fit to your installation and make the necessary changes. Make the following changes in the section called DESTINATION:

Customizing DB2 CM CommonStore for SAP and SAP ArchiveLink

5

Keyword Value (example) Description DESTINATION IDS SAP system id (SID) you want to connect

to PROGID IDS.ARCHINT Program id you must create in SAP GWHOST /H/172.16.83.105 SAP gateway hostname or IP address GWSERV sapgw00 Gateway service (00 is the number of

your SAP installation) LU 172.16.83.105 Hostname or IP address of the SAP

application server TP sapdp00 Dispatcher service (00 is the number of

your SAP installation) LOGICAL_SYSTEM IDSCLNT800 Logical system name of your SAP system CLIENT 800 Number of the SAP client USER cssap Name of the SAP CPIC user

You can use transaction code SCC4 to find the name of the logical system. Double click on the client you want to connect to and find the logical system name. The service names must be available in the services file. You find this file in UNIX® in the directory /etc/ and in Windows in the directory \winnt\system32\drivers\etc.

This listing shows you an excerpt from a sample archint.ini file. #-----------------------------------------------------------------------# # Technical connection parameters for SAP R/3. Similar to the sideinfo # file provided by the SAP. # Multiple LOGICAL_SYSTEM sections can be specified. #-----------------------------------------------------------------------# DESTINATION IDS PROGID IDS.ARCHINT GWHOST /H/siccides.isicc.de.ibm.com GWSERV sapgw00 LU siccides.isicc.de.ibm.com TP sapdp00 LOGICAL_SYSTEM IDSCLNT800 CLIENT 800 USER cssap

Now you can configure the archive section. Recommendation: Define different archives for different document types. In this example I define four logical archives: for print lists, incoming documents, outgoing documents and SAP data. The following table gives you an example on how to set the data in the ARCHIVE section:

Keyword Value (example) Description ARCHIVE A1 Archive id you must create in SAP STORAGETYPE CM Archive system (CM = DB2 Content

Manager V8) LIBSERVER ICMNLSDB Name of the library server of DB2

Content Manager CMUSER cscm User you created in DB2 Content

Manager ITEM_TYPE SAPprintList Item type you created in DB2 Content

Manager LOGICAL_SYSTEM IDSCLNT800 Logical system name of your SAP system

Here is the sample archive section:

Customizing DB2 CM CommonStore for SAP and SAP ArchiveLink

6

#-----------------------------------------------------------------------# # Technical connection parameters when CM8 is used as archive. # Different entries with explicitly defined archive ID are needed # if different CM8 Servers and/or different Item Types # should be used for storing R/3 documents. #-----------------------------------------------------------------------# ARCHIVE A1 STORAGETYPE CM LIBSERVER ICMNLSDB CMUSER cscm ITEM_TYPE SAPprintList LOGICAL_SYSTEM IDSCLNT800 ARCHIVE A2 STORAGETYPE CM LIBSERVER ICMNLSDB CMUSER cscm ITEM_TYPE SAPincomingDoc LOGICAL_SYSTEM IDSCLNT800 ARCHIVE A3 STORAGETYPE CM LIBSERVER ICMNLSDB CMUSER cscm ITEM_TYPE SAPoutgoingDoc LOGICAL_SYSTEM IDSCLNT800 ARCHIVE A4 STORAGETYPE CM LIBSERVER ICMNLSDB CMUSER cscm ITEM_TYPE SAPdata LOGICAL_SYSTEM IDSCLNT800

Customizing the SAP 4.6C system

We are using an SAP IDES system release 4.6C.

Step 1. Create a CPIC user

Call transaction code SU01. Choose the username you entered in the archint.ini file in the DESTINATION section and change some settings. This user is used by DB2 CM CommonStore to connect to SAP.

User name CSSAP (choose the same name as you did in the file archint.ini for the keyword USER)

Password Enter a password Profiles SAP_ALL and SAP_NEW Logon data User group for authorization check: SUPER User type Communication

Customizing DB2 CM CommonStore for SAP and SAP ArchiveLink

7

Step 2. Create a DB2 CM CommonStore for SAP test user

We want to create a test user in order to do all the customizing and in order to run the functional testing later. Call transaction code SU01 to create this user.

User name CSDEMO Password Enter a password Profiles SAP_ALL and SAP_NEW Logon data User group for authorization check: SUPER User type Dialog

Log off from the SAP system and log in again with the user CSDEMO.

Step 3. Create an RFC destination

1. As user CSDEMO, call transaction code SM59. Select Create and enter the following information:

RFC Destination IDS.ARCHINT (choose the same value as you did in the file archint.ini for the keyword PROGID)

Connection Type T Description Enter descriptive text

2. Press Enter and then click on Registration and enter the following:

Progam ID IDS.ARCHINT (choose the same value as you did in the file archint.ini for the keyword PROGID)

Go to the menu and select Destination | Gateway Option. Enter the following values:

Gateway Host siccides.isicc.de.ibm.com (replace with the same value as you did in the file archint.ini for the keyword GWHOST)

Gateway Service sapgw00 (replace with the same value as you did in the file archint.ini for the keyword GWSERV)

Click OK. 3. Save the entries and click Test Connection. (Be sure that the DB2 CM CommonStore Server is started.)

Step 4. Create an output device for archiving print lists

You need to create an output device if you want to archive a print list.

1. Call transaction code SPAD.

2. Click on Output Devices.

3. Click on Change.

4. Click on Create and make the following entries:

Output Device ARCH

Customizing DB2 CM CommonStore for SAP and SAP ArchiveLink

8

Short Name ARCH Device Type ARCHLINK: SAP Archive Link Archiver Spool Server Press F4 to get a list of spool server. Choose one of

them, for example siccides_IDS_00 Device Class Archiving Program Change to tab strip HostspoolAccMethod HostSpool Access Method

I: Archive Service

5. Save the entries.

Step 5. Ensure that ArchiveLink number ranges exist

Call transaction code OANR and click on Intervals. Normally you will see a range defined already; if not, you need to create a new one. If you use more than one client in an SAP system the recommendation is to start each number range with the client number.

Step 6. Create ArchiveLink queues

If the ArchiveLink queues do not already exist, use transaction code SPRO to create them. 1. Click on SAP Reference IMG.

2. Open the folders Basic Components | Basis Services | SAP ArchiveLink | Basic Settings and execute Create Queues, or call transaction code OAQI.

3. Mark every field with an X, and enter a user name for the queue administrator.

4. Click on Execute.

Step 7. Register an OLE application

Perform this step if you want to use DB2 CM CommonStore clients for viewing or archiving: 1. Call transaction code SOLE.

2. Click Display/Change. (Ignore the warning telling you that the table is cross client.)

3. Click on New Entry and make the following entries for the archiving client: OLE Application CSCLIENT.DOCUMENT CLSID {C8452EF3-19FE-11D1-A16E-0004AC62FCBA} Type Info Key NO_TYPELIB

4. Save the entries. A prompt for a workbench request appears.

5. Click on Create Request. Enter a short description, such as DB2 CM CommonStore Customizing and click Save.

6. A request number appears, and you can click Continue and Back.

Customizing DB2 CM CommonStore for SAP and SAP ArchiveLink

9

7. Click on New Entry and make the following entries for the viewing client: OLE Application OLEDISPA.DOCUMENT CLSID {45526A21-AA41-11CF-B90A-0004ACED415F} Type Info Key NO_TYPELIB

8. Save the entries and click Back.

Step 8. Define DB2 CM CommonStore applications

To customize the DB2 CM CommonStore clients for SAP, call transaction code OAA4. 1. Click on Create and enter the following for the archiving client:

Application Name CSARCH 2. Click on Back. Double-click on the new list entry CSARCH. Double click the entry called Archive from Frontend. Enter the following:

Application CSCLIENT.DOCUMENT Radio button M setAID @AID Radio button M doQueueArchive =@DID Radio button G @EID=EID

3. Click on Back and Save. The status for the entry Archive from Frontend changes to maintained. Click on Back.

4. Repeat the procedure for the viewing client by clicking on Create and enter the following:

Application Name CSVIEW 5. Click on Back. Double-click on the new list entry CSVIEW. Double click the entry called Display stored document, and enter the following:

Application OLEDISPA.DOCUMENT Radio button M SetUID @UID Radio button M setAID @AID Radio button M doView @DID Radio button G @EID=EID

6. Click on Back and Save. The status for the entry Display stored document changes to maintained. Click on Back.

Step 9. Define a protocol for displaying and retrieving

1. Call transaction code OAA3, then click on Create and enter the following:

Protocol CSPROT Version 0045 Description DB2 CM CommonStore HTTP

2. Click on Save and double-click the new protocol CSPROT.

Customizing DB2 CM CommonStore for SAP and SAP ArchiveLink

10

3. For displaying faxes double-click the entry Display stored Document. Select the FAX radio button and double-click the entry. Enter the following to call the Web browser for this document type:

Communication Type HTTP

4. Click on Continue. 5. To display PDFs: Double-click the entry Display stored document. Select the PDF radio button, and double-click the entry. Enter the following to call the DB2 CM CommonStore Viewing Client for this document type:

Communication Type OPEN

Press Enter and the screen changes. Add the entry:

Application CSVIEW

Click Continue and Save.

6. To archive TIFs: To customize the DB2 CM CommonStore Archiving Client for FAX (i.e. TIF) documents, double-click the entry Archive from Front End. Select the FAX radio button, and double-click the entry. Enter the following:

Communication Type OPEN

Press Enter and the screen changes. Add the following entry:

Application CSARCH

Click on Continue and Save.

Step 10. Define the content repository

For print lists: 1. Call transaction code OAC0 to define the logical archive IDs you already customized in the archint.ini file.

2. Click on Display/Change.

3. Click on Create.

4. Click on Full Administration and enter the following:

ContentRep. A1 Description SAPprintList DocArea ArchiveLink Storage Type HTTP Content Server Protocol CSPROT Version 0045 HTTP Server:Port 9.153.162.208:5580 HTTP Script IBMCS Basic Path /tmp/ Archive Path /tmp/ Output Device Arch

• Give the content repository the same name as you specified in the ARCHIVE section of the archint.ini file

Customizing DB2 CM CommonStore for SAP and SAP ArchiveLink

11

• To create an HTTP connection, choose version number 0045. The HTTP server is the hostname or IP address of the DB2 CM CommonStore server, and the port number (Port) is the port you specified for WEBPORT in the archint.ini file

• HTTP Script is a description used in the HTTP request. No blanks are allowed in this description. If you use HTTP communication, the Basic and Archive Path must only be locally available. For RFC communication you must share these paths with the machine where DB2 CM CommonStore for SAP is running

5. Click on Save. A dialog that prompts you for a workbench request appears. Click on Continue.

6. Click on Send certificate for secure communication.

7. Click on Test connection. (Make sure DB2 CM CommonStore is started first.)

The button CS Admin is not supported by DB2 CM CommonStore for SAP.

8. Click on Back.

9. Repeat this procedure for the content repositories A2, A3 and A4 of our example.

For incoming documents: 1. In transaction OAC0 mark the entry A1 and click Copy. Change only the content repository and description as shown:

ContentRep. A2 Description SAPincomingDoc

2. Leave the rest as is, and click on Save. 3. Click on Send certificate for secure communication.

4. Click on Test connection. (Make sure that DB2 CM CommonStore is started first.)

5. Click on Back.

For outgoing documents: 1. In transaction OAC0 mark the entry A1 and click Copy. Change only the content repository and description as shown:

ContentRep. A3 Description SAPoutgoingDoc

2. Leave the rest as is, and click on Save. 3. Click on Send certificate for secure communication.

4. Click on Test connection. (Make sure that DB2 CM CommonStore is started first.)

5. Click on Back.

For SAP data: 1. In transaction OAC0 mark the entry A1 and click Copy. Change only the content repository and description as shown:

ContentRep. A4 Description SAPdata

2. Leave the rest as is, and click on Save. 3. Click on Send certificate for secure communication.

Customizing DB2 CM CommonStore for SAP and SAP ArchiveLink

12

4. Click on Test connection. (Make sure that DB2 CM CommonStore is started first.)

Step 11. Customize document types

To start the wizard to customize your document types, call transaction code OAD5. This wizard only enables you to create and modify document types. If you want to delete a document type then you must call transaction OAC2 and OAC3 and delete the relevant entries.

For print lists: 1. First we want to create a new document type for print lists. To do this, click on Continue, and make the following entries:

Doc Type ZCSALF Name Printlists for CommonStore

2. Click on Continue. Leave the Document Type Template empty. Click on Continue. Do not mark the checkbox in the Workflow Document Type screen.

3. Click on Continue. Enter the following in the Document Class screen:

Doc. Class ALF

4. Click on Continue. Enter the following in the Object, Method and Tasks screen:

Object Type DRAW

5. Click on Continue. Ignore the warning that informs you that no task was specified.

6. Click on Continue, and the Storage System and Link Table screen appears. Make the following entries:

Con.Rep.ID A1 Link TOA01

7. Click on Continue, then click Complete.

For incoming documents: 1. Call transaction code OAD5, click Continue, and make the following entry in the Document Type screen appears:

Doc Type ZCSFAX Name Incoming Documents for CommonStore

2. Click on Continue. Enter the following in the Document Type Template screen:

Doc Type FIIINVOICE

3. Click on Continue. Mark the checkbox in the Workflow Document Type screen.

4. Click on Continue. Enter the following in the Document Class screen:

Doc. Class FAX

5. Click on Continue. Enter the following in the Object, Method and Tasks screen:

Object Type BKPF Method CREATE Task TS30001128

Customizing DB2 CM CommonStore for SAP and SAP ArchiveLink

13

Note: You will probably see task TS7869 because it is predefined in the template. This is an old version, which you should not use any more. Thus enter the new task number specified above.

6. Click on Continue. Ignore the warning that informs you that no task was specified. Click on Continue, and the Workflow parameter screen appears. Enter the transaction code that should be executed when a work item is processed:

Contents FB10

7. Click on Continue, and the Storage System and Link Table screen appears. Make the following entries:

Con.Rep.ID A2 Link TOA01

8. Click on Continue, and leave the default settings in the Selection from Available Presetting screen.

9. Click on Continue, and leave the Create New Presetting screen blank.

10. Click on Continue, and enter the following in the Details of Presetting screen for E001 All Applications - Not a summary:

ObjType US ID CSDEMO Storing for subsequent entry

Mark the checkbox

If you want more users to see the work items in their SAP inbox you must enter the user names here.

11. Click on Continue, then click Complete.

For outgoing documents: 1. Call transaction code OAD5, click Continue, and make the following entry in the Document Type screen:

Doc Type ZCSPDF Name Outgoing documents for CommonStore

2. Click on Continue. Leave the Document Type Template empty.

3. Click on Continue. Do not mark the checkbox in the Workflow Document Type screen. 4. Click on Continue. Enter the following in the Document Class screen:

Doc. Class PDF

5. Click on Continue. Enter the following in the Object, Method and Tasks screen:

Object Type VBRK

6. Click on Continue. Ignore the warning that informs you that no task was specified. Click on Continue, and the Storage System and Link Table screen appears. Make the following entries:

Con.Rep.ID A3 Link TOA01

7. Click on Continue, then click Complete.

Customizing DB2 CM CommonStore for SAP and SAP ArchiveLink

14

Step 12. Customize conditions for output control

1. To customize the message class for outgoing documents call transaction code NACE.

2. Mark the line V3 Billing and click on Output Types.

3. Click on Display/Change, then double-click line RD00 for invoices.

4. On the tab Storage System make the following changes:

Archiving Mode Print and archive Document Type ZCSPDF

5. Click Save and Back.

Step 13. Create the archive link batch job

You need a batch job in order to archive spooled print lists automatically.

1. Call transaction code SM36.

JobName ArchivLink JobClass C (Low priority)

2. Click on Start condition.

3. Click on Date/Time and Period Values. Here you can specify how often the job should run. If you want the job to run every 10 minutes then click Other Period, and enter 10 in the Minute(s) field. Click Save and then click Save again.

4. Enter a valid date and time for the first run, then click Save.

5. Click Step and ABAP program and enter the name ILQBATCH, then click Save and Save again.

Step 14. Enabling extended ALF viewing

To enable HTTP links to archived documents in print lists:

1. Call transaction code RZ10.

2. Change the value of the parameter rspo/archive_format to 2, which means that the graphical display of the print lists will be archived (also frames and lines). Keep in mind that if you choose this option then (worst case) your print list will grow up to a factor of five because SAP stores one line character with five characters.

3. After changing this parameter, restart the SAP system.

Step 15. Customize the file name and path for archiving data

1. Call transaction code FILE. Ignore the popup that says the table is cross client, and click Continue.

2. In the left panel, double-click Logical file name definition, cross-client.

Customizing DB2 CM CommonStore for SAP and SAP ArchiveLink

15

3. In the right panel double-click ARCHIVE_DATA_FILE.

4. Check the entry for the logical path. It should be ARCHIVE_GLOBAL_PATH.

5. Click Save and Back. 6. Repeat this procedure for the entry ARCHIVE_DATA_FILE_WITH_ARCHIVE_LINK in the right panel. This should be set to ARCHIVE_GLOBAL_PATH_WITH_ARCHIVE_LINK.

Now check the paths:

1. In the left panel double-click Logical file path definition.

2. In the right panel, highlight ARCHIVE_GLOBAL_PATH, and double-click in the left panel the folder Assignment of physical paths to logical path. 3. Depending on your operating system you can check the setting for the physical path where the data is temporarily stored. Click on Back and click Back again.

4. Repeat the procedure for the entry ARCHIVE_GLOBAL_PATH_WITH_ARCHIVE_LINK.

If you specify for the physical path <F=Archivelink><Filename> then ArchiveLink will take the path specified in transaction code OAC0.

Customizing DB2 CM CommonStore for SAP and SAP ArchiveLink

16

Functional Testing

This section describes how to test: • Incoming documents • Print lists • Outgoing documents • SAP data

Incoming documents

Step 1. Create a DB2 CM CommonStore archiving client queue

1. Choose Start | Programs | IBM CM Commonstore Clients | CS Archiving Client. At the first launch you will be forced to run the setup. Click OK, and enter the relevant data:

Archive Host 127.0.0.1 Port 5500 WebPort 5580 Modules Mark DIRQueue

• Archive Host is the IP address where the DB2 CM CommonStore Server is running.

• The ports must match those you chose in the file archint.ini.

2. Click OK. Select from the menu Queue | New Queue.

Queue Type DIRQueue Queue Name Incoming Invoice Document Format FAX DocumentType ZCSFAX SAP R/3 Archive A2

Important: Be careful when entering the Document Type and Archive because the entries are case-sensitive.

3. Click Next, and enter the path name where the TIF files are stored that you want to archive. With the installation there are some example files copied to your hard disk.

Path Name c:\Program Files\IBM\IBM CM Commonstore Clients\queues\dir\

4. Click Next, which brings up the Connection Properties window. Click Next and Finish. Save the queue otherwise it will be lost after closing the program.

5. In the left panel you find the queue you just created. Highlight the queue and right-click on it. Select Import. Now the files from the directory you specified above are shown in the right panel.

Customizing DB2 CM CommonStore for SAP and SAP ArchiveLink

17

Step 2. Customize the DB2 CM CommonStore viewing component

Because we customized our SAP system such that we will display PDF documents with the DB2 CM CommonStore Viewing Client application, we need to customize this application.

Run Start | Programs | IBM Commonstore Clients | CS Viewing Client. Make the appropriate entries on the setup screen. We choose Browser Viewing to view the PDF files with the Internet Explorer. Make sure that you have an appropriate browser plug-in installed.

If you use Native Viewing then you should uncheck the box File and Viewer Management.

Step 3. Create an incoming document for SAP

We will test two different ways to archive documents.

• Archiving from the DB2 CM CommonStore Archiving Client • Archiving from SAP

To archive from the DB2 CM CommonStore archiving client application, call the archiving client application, and mark a document in the right panel, such as bike-invoice-1.tif. This file will be deleted from the directory and sent to the archive. In addition a work item in SAP will be created. Select from the menu Documents | Early archiving to WFL | Archive selected Item.

Another way to archive documents is from the SAP GUI. Call transaction code OAWD and open the folder All Applications – NOT a summary. Mark your user name, e.g. CSDEMO, and select from the menu Document | Storing for subsequent entry. A popup window appears. If you press Continue one document from the DB2 CM CommonStore Archiving Client queue is archived, and a work item in SAP is created. If you click Mass Archiving then all files in the queue are processed.

Step 4. Display and post a work item in SAP

To see the work items created in SAP: 1. Log on as user CSDEMO and call transaction code SBWP. The workplace opens.

2. Open the folder Inbox and Workflow and you should find at least one document in your inbox, e.g. Incoming Documents for CommonStore.

3. Mark the new entry in your workflow inbox, and click Execute. The TIF document is displayed in the web browser. In addition a pop up window appears: Process Document Type (Enter Document). Click Continue.

4. When transaction FB10 is invoked, make the following entries:

Company Code 1000 Document Type KR Posting Date <date> Currency EUR Document Date <date>

Customizing DB2 CM CommonStore for SAP and SAP ArchiveLink

18

Automatic Tax Calculation

Mark the checkbox

Make sure that if you are using IDES 4.6C, that you use a date in year 2002.

5. Click on Enter invoice/credit memo. Press Enter when an information message appears, and make the following entries:

Account 1007 Amount 473,28 (value with VAT) TAX Amount 65,28

Enter as the first item:

Account 476100 Amount 200 (price without tax) TX VN Cost CTR 1000

Enter as the second item:

Account 476100 Amount 100 (price without tax) TX VN Cost CTR 1000

Enter as the third item:

Account 476100 TX VN Amount 108 (price without tax) Cost CTR 1000

6. Go to the menu Document | Simulate which brings up the screen Invoice/Credit Fast Entry: Display Overview.

7. Go to the menu Document | Post. An information pop-up appears with the document number. Note the number (e.g. 1900000002) and click OK. Now the document is linked to the SAP business object.

Step 5. View documents linked to a posting

1. Call transaction code FB03 and enter the following values:

Document Number 1900000002 (the number from above) Company Code 1000 Fiscal Year 2002

2. Press Enter, which brings up the Document Overview screen.

3. To display the attached and archived invoice document, go to the menu System | Services for Object. A popup appears. Click on Attachment list. A popup appears with the archived document.

4. Highlight the document you want to display, and click on Display. The document should be displayed correctly.

Customizing DB2 CM CommonStore for SAP and SAP ArchiveLink

19

Step 6. Verify that the documents are stored in DB2 Content Manager

1. Run Start | Programs | IBM Content Manager V8 | Client for Windows.

2. Log in to the library server ICMNLSDB.

3. Click on Search and choose item type SAPincomingDoc, and click OK. Now you see all incoming documents that are stored in DB2 Content Manager.

Print lists

Ensure that in transaction OAG1 the option Deactivate print list management in DMS is checked. With SAP release 4.5A you do not need to customize the protocol for print lists. The default is sufficient. In earlier releases, you needed to set the display communication type for ALF to R/3.

Step 1. Create a print list

1. Call transaction SE38 and execute the program RFBELJ00. A selection screen appears. Make the following entries:

Company Code 1000 Document Number 1900000002 (the number from above) Fiscal Year 2002

2. Click on Execute. A print list with the just created document is shown. If you have extended ALF viewing enabled then you can move the mouse cursor over the document number and the cursor will change. If you click on that number the attached document will be displayed from the archive. If more than one document is attached then a hit list of the documents will be shown.

3. Click on Print and make the following entries:

Output Device LP01 Print Immediately Mark the checkbox Delete after output Mark the checkbox Archiving Mode Archive only

Hint: You can save your preferred options by customizing your personal settings via the menu System | User Profile | Own Data on the Defaults tab. 4. Click on Continue, which brings up the Archive parameters window. Make the following entries:

Obj.Type DRAW DocType ZCSALF Information CS0 Text Print List for CommonStore

5. Use the input in the Information and Text field for easier retrieval later.

6. Click on Archive. In the status line you will see something like Spool Request transmitted to archive.

Customizing DB2 CM CommonStore for SAP and SAP ArchiveLink

20

Step 2. Process the spool request

If you have created an ArchiveLink background job, then you can wait until this job runs or you can send the print list manually with transaction code OAM1.

1. To list the spool requests, click on Storage in the Queues frame.

2. Click on Process selections. Answer the popup that asks you whether all selected entries should be processed with Yes.

Step 3. Find stored print lists

1. Call transaction OADR. Enter the Information and/or Text you entered, when you created the print list above, and click on Execute. 2. Highlight an entry and click on Display from storage system. Keep in mind that SAP does not check any authorization when retrieving archived print lists. That means it is possible to retrieve a print list even if you were not allowed to generate it.

Step 4. Verify that the print lists are stored in DB2 Content Manager

1. Run Start | Programs | IBM Content Manager V8 | Client for Windows.

2. Log in to the library server ICMNLSDB.

3. Click on Search and select item type SAPprintList, and click OK. Now you see all print lists stored in DB2 Content Manager. Because the print lists are an SAP-proprietary format, you cannot view them in an appropriate fashion.

Outgoing documents

Step 1. Archive an outgoing document

We will use an existing document, and change it in order to print and archive it again. 1. Call transaction code VF02, to bring up Change Billing Documents.

2. Enter a number for the billing document, e.g. 90009074. Press Enter.

3. From the menu, select Goto | Header | Header.

4. Click on Output. If an entry already exists, you must select this entry and click on Repeat Output. A new entry will be displayed with a yellow status light.

5. Click on Communication method. Select the following entries:

Print Immediately Mark the checkbox Release after output

Mark the checkbox

6. Click Back.

7. Click Further Data.

Customizing DB2 CM CommonStore for SAP and SAP ArchiveLink

21

8. In the section Requested processing, select the dispatch time Send Immediately (when saving the application). 9. Click Back and Save.

Now the invoice will be printed and sent to the archive.

Step 2. Display an archived document

1. Call transaction code VF03 (display billing document). Enter the same number for the billing document from above, e.g. 90009074. Press Enter. 2. From the menu select System | Services for object. A popup Customer individual document xxxx appears. 3. Click on Attachment list. A popup Service: Attachment list appears. 4. Highlight the line you are interested in and click Display. The archived document will be displayed.

Step 3. Verify that the documents are stored in DB2 Content Manager

1. Run Start | Programs | IBM Content Manager V8 | Client for Windows.

2. Log in to the library server ICMNLSDB.

3. Click on Search and select item type SAPoutgoingDoc, and click OK. Now you can see all outgoing documents stored in DB2 Content Manager.

SAP data When you archive SAP data then the code page information is stored with the archive file to ensure that the files can be read even from another SAP system. If SAP retrieves the archived data it converts the data appropriately.

Step 1. Create sample archiving data for FI_BANKS

1. Call transaction code FI01. Make the following entries:

Bank Country AD Bank Key 4711 (choose any number)

2. Press Enter. Now you can enter details such as the bank name and address.

3. Click Save.

Step 2. Customize archiving object FI_BANKS

1. Call transaction code SARA. Enter the object name FI_BANKS and press Enter.

Customizing DB2 CM CommonStore for SAP and SAP ArchiveLink

22

2. Click on Customizing.

3. Press the Clock button next to Technical Settings. Make the following entries:

Log.file name Archive Data_File_with_Archive_Link

4. In the section Settings for delete program select:

Start automatic Mark the checkbox

This starts the delete program after the archive run has finished.

5. In the section File storage to storage system select:

Start automatic Mark the checkbox

This starts the program that stores the files into DB2 Content Manager when SAP is ready to do so.

6. Select the Content Repository A4 for data archiving.

7. In the section Sequence select the following entries:

Store before Delete Mark the checkbox Delete prog. reads from stor.system

Mark the checkbox

8. Click Save. A dialog that prompts you for a workbench request appears. Click Continue and Back.

Step 3. Create an info structure

You can create an index in the online database for archived data. This means that you can store, for example, the bank key in the online database for fast retrieval. If you need the address data for the bank, then you can double-click this bank key to retrieve the detailed information from the archive.

1. Call transaction code SARI.

2. Click on Customizing.

3. Click on Create. 4. A popup called Archive Retrieval Configurator appears. Make the following entries:

Info Structure CSDEMO01 (choose any name) Achiving Object FI_BANKS Field Catalog SAP_FI_BANKS_01

5. Click on Create.

6. A dialog that prompts you for a workbench request appears. Click Continue. 7. On the next screen of the Archive Retrieval Configurator you can transfer additional fields into the info structure. This structure is used by SAP for viewing archived data. For our scenario we do not change anything. Click Save. 8. A dialog appears that prompts you for a workbench request. Click Continue and Back.

9. Click on Activate.

Customizing DB2 CM CommonStore for SAP and SAP ArchiveLink

23

A popup appears called Activate Info structure: Display messages. When the status is green, click Continue.

Step 4. Archive SAP data

1. Call transaction code SARA. Enter FI_BANKS and press Enter. The screen changes.

2. Click on Archive. 3. Enter a variant name, e.g. CSDEMO01. Click on Maintain. 4. A popup appears called Variants: Change Screen Assignment. 5. Click Continue. Enter the following values:

Bank Country From AD to AD Min. of days in the system

0

only with deletion flag

Unmark the checkbox

test run Unmark the checkbox detail log Mark the checkbox Comment Enter text

6. Click on Variant Attributes. Enter a description on the next screen, then click Save and Back.

7. Click on Start date and on the next screen Immediate. Click Save. 8. Click on Spool params. Enter an Output device for the spool file, then click Continue. 9. Both Start Date and Spool params. should have a green light status.

10. Click on Execute.

11. Click on Job overview to check whether the job has successfully finished. Click Back. You can display the spool list to check for errors or to have an overview of the archived objects by calling transaction code SARA.

1. Enter the archiving object, e.g. FI_BANKS and press Enter. 2. Click on Management and select the archiving session you just ran. 3. Click on Spool List, and the protocol is displayed.

Step 5. Viewing archived data in SAP

1. Call transaction code SARI.

2. Click on Archive Explorer and make the following entries:

Archiving Object FI_BANKS Archiving Info Struct.

CSDEMO01

3. Click on Report.

Customizing DB2 CM CommonStore for SAP and SAP ArchiveLink

24

4. Now the screen Archive info structure list CSDEMO01 appears. When you click on Execute you can see the data stored in the online database in the info structure. When you double-click on a record, a window appears called Display data object from archive: Table Overview. This window shows detailed data from the archive.

Step 6. Analyze data

1. Call transaction code SARA and enter FI_DOCUMNT as the object name. Press Enter. 2. Click on Analyze and leave the default values. Click on Execute. 3. In the next screen, Compact Document Journal, click Choose data sources from the Technical Settings section. Here you can define whether you want to search online in the database and or in the archive. This works only if you have executed at least one archive run of type FI_DOCUMNT.

Step 7. Retrieve archived data to the file system

1. Call transaction code SARA and enter FI_BANKS as the object name. Press Enter.

2. Select the archiving session you ran before.

3. Click on Storage system. A popup Archive Administration: Store/Retrieve File appears. Yellow status for the archive file implies that the archive file is accessible in the storage system.

4. Click on Retrieve Files. The data file will be retrieved in the file system and the status of the archive file changes to green.

Step 8. Reload data to the R/3 database

You should reload data only in exceptional cases. Sometimes it is not even possible due to data consistency reasons.

1. Call transaction code SARA and enter FI_BANKS as the object name. Press Enter.

2. From the menu select Goto | Reload.

3. Click Continue in the information window.

4. Choose a variant name, e.g. CSDEMOreload01.

5. Click on Maintain.

6. In the popup window called Variants: Change Screen Assignment, click Continue.

Bank Country Leave this field empty test run Unmark the checkbox detail log Mark the checkbox

7. Click on Attributes and enter a comment. Click on Save and Back.

Customizing DB2 CM CommonStore for SAP and SAP ArchiveLink

25

8. Click on Archive Selection, to bring up the popup called Archive Management: Choose files to Reload.

9. Highlight the entry you want to reload, and click Continue.

10. Click on Start date and choose Immediate. Click Save. 11. Click on Spool params. Enter an Output device for the spool file. Click Continue. Both Start Date and Spool params. should show a status of green. .

12. Click on Execute.

13. Click on Job overview to check whether the job has successfully finished. Click Back.

Step 9. Verify that the data record is restored

1. Call transaction code FI03.

Bank Country AD Bank Key 4711

2. Press Enter to display the record. Then click Back.

Step 10. Verify that the data files are stored in DB2 Content Manager

1. Run Start | Programs | IBM Content Manager V8 | Client for Windows.

2. Log in to the library server ICMNLSDB.

3. Click on Search and select item type SAPdata, and click OK. Now you can see all data files stored in DB2 Content Manager. Because SAP data is stored in an SAP-proprietary format you cannot view the data in an appropriate fashion.

Troubleshooting

This section describes: • General troubleshooting • Incoming documents • Print lists • Data archiving

General troubleshooting

DB2 CM CommonStore does not start due to missing libraries

If there is no SAP system installed on the DB2 CM CommonStore Server you need to install the following SAP library files into the corresponding directories: librfc32.dll – c: \winnt\system32 sapsecu.dll – c:\program files\ibm\cssap\bin

Customizing DB2 CM CommonStore for SAP and SAP ArchiveLink

26

On AIX® you need to copy the file libsapsecu.o to /usr/lpp/cssap/bin. You can download the files from the SAP service marketplace:

http://service.sap.com/swcenter

DB2 Error: SQL data type out of range

If an error occurs when archiving and you find in the DB2 CommonStore for SAP archint.trace file a DB2 error stating that an SQL data type is out range then you are using a JDBC driver other than 2.0. Refer to the DB2 Content Manager manuals on how to force the use of JDBC driver 2.0.

Incoming documents

No work item is displayed in your inbox

Early archiving: Although DB2 CM CommonStore for SAP logs that the action Create WI was OK you are not able to see the work item in your inbox. Check the customization of the task you are using for incoming documents. Call transaction code PFTC.

Task Type Standard Task Task 30001128

Click on Display/Change. Go to the menu Additional Data | Classification | Change (or if not yet created go to Additional Data | Classification | Create) and change the classification to or create a General Task. Click on Save and Back. Attention: If the task is already in use then you might run into problems when changing the classification.

No administrator for this task

Early archiving: When you execute a work item you get the error in the status line: No administrator for this task. Check the customization of the task you are using for incoming documents. Call transaction code PFTC.

Task Type Standard Task Task 30001128

Click on Display/Change. Go to the menu Additional Data | Person Responsible | Change (or Create if not yet created), and change or create a person responsible. Click Save and Back. Attention: If the task is already in use then you might run into problems when changing the setting.

Customizing DB2 CM CommonStore for SAP and SAP ArchiveLink

27

Maintain file front.ini

If you get a status message like Maintain file front.ini then you should apply OSS Note 566398. If you run an SAP release greater than 6.x you must download the newest build of ALViewer.exe from SAP Marketplace and rename the front.ini to sapfront.ini.

Error diagnostics

You can see all work items with transaction code SWI1. If an error occurs you can find useful hints here.

Print lists

Error diagnostics

You can see all spool requests with transaction code SP01. If an error occurred, you can find useful hints here.

Another possibility for error diagnostics is to call transaction OAM1. From the Queues frame, click on Storage in the frame. If an error occurs you can find useful hints here.

SAP data

No data is archived by SAP

Depending on the selected archiving object, SAP runs some checks on the object whether it can be archived and deleted or not. For example, you cannot archive fiscal documents (FI_DOCUMNT) when the fiscal year is still open (you can find more information on each archiving objects at http://help.sap.com). Besides this, there are some other parameters like account type or document type life, which can be customized in special SAP transactions. To find these customizing transactions call transaction code AOBJ and mark the archiving object of interest in the right panel. Double click on Customizing transactions in the left panel and the transaction codes will be displayed.

Error diagnostics

You can display the spool list in order to check for errors or to have an overview on the archived objects by calling transaction code SARA. Enter the archiving object, e.g. FI_BANKS and press Enter. Click on Management and select the archiving session you just ran. Click on Spool List to display the protocol.

Customizing DB2 CM CommonStore for SAP and SAP ArchiveLink

28

You can find useful hints in the job protocol. Call transaction code SARA. Enter the archiving object, e.g. FI_BANKS and press Enter. Click on Management and Job Overview. Select the job in question and click on Job Log.

Customizing DB2 CM CommonStore for SAP and SAP ArchiveLink

29

Appendix: Sample configuration profile

######################################################################### # # # Sample configuration profile for # # # # IBM Content Manager CommonStore for SAP 8.1 # # # # on Windows using Content Manager Version 8 # # # # Copyright IBM Deutschland Entwicklung GmbH # # # ######################################################################### #-----------------------------------------------------------------------# # Path (directory) of the CommonStore binaries #-----------------------------------------------------------------------# BINPATH 'C:\Program Files\IBM\CSSAP\bin' #-----------------------------------------------------------------------# # Path (directory) of the CommonStore instance. # Should point to the instance directory of the server installation. # All instance related files will be located in this directory, e.g. # trace files, log files, config files, etc. #-----------------------------------------------------------------------# INSTANCEPATH 'C:\Program Files\IBM\CSSAP\Server\IDS' #-----------------------------------------------------------------------# # REPORT ON|OFF # Switches reporting to STDOUT on or off #-----------------------------------------------------------------------# REPORT ON #-----------------------------------------------------------------------# # TRACE ON OFF RFC_OFF ... # Switches trace levels # # Examples for usage: # TRACE ON # TRACE ON RFC_OFF #-----------------------------------------------------------------------# TRACE ON #-----------------------------------------------------------------------# # Size of the trace file in KB #-----------------------------------------------------------------------# TRACEMAX 5000 #-----------------------------------------------------------------------# # LOG ON|OFF # Switches the writing of the log file on or off #-----------------------------------------------------------------------# LOG ON #-----------------------------------------------------------------------# # Path for temporary files #-----------------------------------------------------------------------# TEMPPATH 'C:\Program Files\IBM\CSSAP\Server\IDS\temp' #-----------------------------------------------------------------------# # Path in which SAP R/3 is storing the data for CommonStore. It should # be shared through all R/3 application servers via NFS mount. #-----------------------------------------------------------------------# BASEPATH 'C:\Program Files\IBM\CSSAP\Server\IDS\transfer' #-----------------------------------------------------------------------# # Path in which CommonStore is storing the data for SAP R/3. It should # be shared through all R/3 application servers via NFS mount. #-----------------------------------------------------------------------# ARCHPATH 'C:\Program Files\IBM\CSSAP\Server\IDS\transfer'

Customizing DB2 CM CommonStore for SAP and SAP ArchiveLink

30

#-----------------------------------------------------------------------# # Technical connection parameters for SAP R/3. Similar to the sideinfo # file provided by the SAP. # Multiple LOGICAL_SYSTEM sections can be specified. #-----------------------------------------------------------------------# DESTINATION IDS PROGID IDS.ARCHINT GWHOST /H/siccides.isicc.de.ibm.com GWSERV sapgw00 LU siccides.isicc.de.ibm.com TP sapdp00 LOGICAL_SYSTEM IDSCLNT800 CLIENT 800 USER cssap #-----------------------------------------------------------------------# # Technical connection parameters when CM8 is used as archive. # Different entries with explictly defined archive ID are needed # if different CM8 Servers and/or different Item Types # should be used for storing R/3 documents. #-----------------------------------------------------------------------# ARCHIVE A1 STORAGETYPE CM LIBSERVER ICMNLSDB CMUSER cscm ITEM_TYPE SAPprintList LOGICAL_SYSTEM IDSCLNT800 ARCHIVE A2 STORAGETYPE CM LIBSERVER ICMNLSDB CMUSER cscm ITEM_TYPE SAPincomingDoc LOGICAL_SYSTEM IDSCLNT800 ARCHIVE A3 STORAGETYPE CM LIBSERVER ICMNLSDB CMUSER cscm ITEM_TYPE SAPoutgoingDoc LOGICAL_SYSTEM IDSCLNT800 ARCHIVE A4 STORAGETYPE CM LIBSERVER ICMNLSDB CMUSER cscm ITEM_TYPE SAPdata LOGICAL_SYSTEM IDSCLNT800 #-----------------------------------------------------------------------# # Number of parallel instances of the CommonStore child programs #-----------------------------------------------------------------------# DISPATCHERS 2 ADSMAGENTS 0 VIAGENTS 0 ODAGENTS 0 CMAGENTS 2 ARCHWINS 2 WEBDPS 2 #-----------------------------------------------------------------------# # TCP/IP port numbers used by CommonStore. # ARCHPRO_PORT is used by archstop, archbc and the Windows DLL. # WEBPORT is used by the web dispatcher for the internet access. #-----------------------------------------------------------------------# ARCHPRO_PORT 5500 WEBPORT 5580 #-----------------------------------------------------------------------# # LUM #-----------------------------------------------------------------------# SYSTEMTYPE SAPSYSTEM

Customizing DB2 CM CommonStore for SAP and SAP ArchiveLink

31

#-----------------------------------------------------------------------# # End of profile #-----------------------------------------------------------------------# END