Last week I was testing some ArchiveLink functionalities in my test system, but they were not working as expected. I found that some of the documents I use for my test scenario were missing. Since this is a shared testing system, I was wondering who deleted my test documents. The easiest way to find the answer was by using the ArchiveLink Logging function.

I first checked that the logging function was active in OAG1. Luckily the flag was set:

 

 image

 

The next step was to check if the log was correctly customized to track changes to my test documents. Transaction OALOGCUST showed me that BKPF, the business object that I always use for my testing, was being logged for deletion of links:

 

 image

 

So, I was ready to dive into the log to find what happened to my documents. I used transaction OA_LOG_VIEW_DOC restricting my search by function D (delete) and by business object BKPF:

 

image

 

I executed the report to find that the user who deleted my documents was:

 

image 

Then I closed my sessions ashamed of finding out that I deleted them myself some time ago, and I didn't remember. Good thing is that the ArchiveLink Log was there to remind me.

I wrote a wiki page explaining the features of the ArchiveLink Logging functionality. Here is the link: How to log document access in ArchiveLink

The Generic Object Services (GOS) attachment list offers only a limited set of ArchiveLink document attributes. Sometimes this is not sufficient to correctly determine the content of an attachment, especially as the title of stored documents can be ambiguous. The SAP standard functionality only allows showing the ArchiveLink document type description in the title field of the attachment list:

image

This clearly shows a necessity to include a meaningful description to every document, or at least to have the possibility to display the original file name in the attachment list. This is why SAP has decided to extend the functionality of the GOS attachment list to include more attributes to easily identify the stored documents. This new functionality will be delivered in two parts, which are described below.

Recently, the developer responsible for the GOS has released the SAP Note 1560955 which adds the 'Filename' attribute to the attachment list. This note is valid for attachments uploaded via 'Create Attachment', so ArchiveLink documents (uploaded via 'Store Business Document') are not affected by this advance development.

At the same time, the ArchiveLink developers have created the SAP Note 1451769 to add this functionality to ArchiveLink documents. This note contains an advance development and it has a 'Pilot' status, meaning that it is not formally released and that it is being tested with selected customers, so it is not visible in the SAP Service Marketplace.

This is how the attachment list looks like with the note implemented:

image

However, there are scenarios like storing incoming documents using barcodes and/or workflow where ArchiveLink is not designed to store/display these file attributes (file name, creator name). Hence, this enhancement is only applicable in manual storing scenarios and display through GOS scenario.

The new functionality is available as of SAP Basis Release 700 as an advance development, but due to the high number of requests, we have decided to further test it with more customers in order to release it as standard functionality as of SAP Basis Release 731, but this depends on the quality assurance results. So, please leave a comment below in case you are interested in having this new functionality in your system. We will be accepting a few testers who have to commit to provide feedback to SAP regarding this development.

There are a few things to consider before importing this note into your system:

  1. The functionality is delivered as an advance development, so make sure you read the SAP Note 170272 first.
  2. Make sure you read the GOS note 1560955 as well, since this is a prerequisite for the ArchiveLink note.
  3. The advance development is available for the following versions only:
    • Release 700 From SAPKB70019
    • Release 701 From SAPKB70104
    • Release 702 All Support Package levels
  4. There are no plans to extend this development to any other release.

 

*** UPDATE: July 14, 2011 ***

After a successful testing phase, the note 1451769 has been released for all customers now. All customers will be able to download and implement the note via SNOTE only. Thanks to those who participated in the testing phase.

  I constantly receive customer inquiries regarding the upload of employee photos into the SAP system. That is why I decided to create this step-by-step guide on how you can easily upload the photos so they can be displayed in HR transactions like PA20 or PA30.

Find a place to store the photos

The first thing we need is a place to store the photos. You have two main options here: to store them in an external storage system, or to store them in the SAP database. I strongly recommend storing these photos in an external storage system, such as the SAP Content Server or any 3rd party SAP-certified storage system. Installing the SAP Content Server is a simple task, but in case you cannot perform this task at this moment, then you can use the SAP Database to store the photos. The disadvantage here is that the photos may use a lot of space in your database, so this is a decision you have to make in advance.

Create a content repository

Once you have decided where to store the photos you have to create a content repository, which is nothing more than a logical definition of the content server.

Some of the prerequisites to create a repository are necessary for both storing options:

 

Make sure that the HTTP plug-in is active.

Transaction SMICM, "Display Services" function key (shift F1). The list of services must contain a port other than 0 for HTTP. If not, you must adjust the relevant profile parameter.

 

Typical entry (you may set your own port number):

icm/server_port_0    =     PROT=HTTP, PORT=8045 image

 

0.1.

Check the system PSE.

Start Transaction STRUST. Expand the system PSE. The system PSE must be green for each application server. 

image

 

0.1.

Determine a suitable exchange directory.

The archive system must be accessible from every application server. If all application servers are running on the same platform (for example, Windows), one network directory that is accessible on all application servers (for example,

server\share) is sufficient. You can generally use the global directory (profile parameter DIR_GLOBAL). You can use report RSPARAM or transaction AL11 to determine the path of DIR_GLOBAL. 

Storing in the SAP Database

 

This procedure works if your system is on Basis release 620 or higher. For lower releases, you have to follow the Storing in a SAP Content Server section. The best guide on how to set up the storage in the SAP Database can be found in the SAP Note 595563  (https://service.sap.com/sap/support/notes/595563). Three of the steps from the note were already discussed, so let's check the rest of the steps:

 

 

0.1.

Make sure that the /sap/bc/contentserver service is active.

Transaction SICF, select: default_host - sap - bc - contentserver. Select the function to display/change the service. Check that a user is defined. If a user is not defined, use Transaction SU01 to create a new user. Use the "System" user type. Assign the profiles SAP_ALL and SAP_NEW to the user. Using the relevant data from the user that has just been created, maintain the anonymous logon data for the service /default_host/sap/bc/ and then save the changes. 

image

image

 

0.1.

Create a table for storing the data.

Use Transaction SE11 to create a copy of table SDOKCONT1. If you want to create the repository database, you can call the table ZCONT_DB, for example.  Save the table as a local object. Activate the table. This is a very important step if you want to set up more than one SAP Database repository. You cannot use the same table for more than one repository. 

image

 

0.1.

Create the repository.

Use Transaction OAC0 to create a new repository. Use the following parameters:|  |

Repository</p></td><td width="180" valign="top"><p><CR></p></td><td width="210" valign="top"><p>Max. 2 characters (e.g. DB)</p></td></tr><tr><td width="139" valign="top"><p>Document Area

 

ArchiveLink

 

Storage Type

 

R/3 Database

 

Storage Subtype

 

Normal

 

Version No.

 

0046

 

Contents Table</p></td><td width="180" valign="top"><p><Table name></p></td><td width="210" valign="top"><p>e.g. ZCONT_DB</p></td></tr><tr><td width="139" valign="top"><p>Exchange Directorye.g.

server\share

 

 

Note that the exchange directory ends with a \ (or a / on Unix). If you are using a variety of platforms, you must use Transaction FILE to define a suitable logical file name, and use this file name. Save the settings.

 

0.1.

Test the repository.

Use Transaction SE38 to start report RSCMSTH0. Specify your repository and start the test. The report must run without errors. !https://weblogs.sdn.sap.com/weblogs/images/41085/arl1_6.png|height=495|alt=image|width=636|src=https://weblogs.sdn.sap.com/weblogs/images/41085/arl1_6.png|border=0!

 

Storing in the SAP Content Server

 

If you are planning to use the SAP Content Server (CS) to store the photos, then you have additional requirements, like finding a suitable server to install this software. SAP customers can download the SAP CS for free. I will not go into details on how to install the SAP CS here, but you can get more information and download instructions at the SAP CS info page  (http://service.sap.com/contentserver).

 

Once you have the SAP CS installed, you can create a content repository in transaction OAC0. In my example below, I am creating repository Y6. I have the SAP CS running on server sapcs.sap.corp and the SAP CS service listening on port 1090:

 

Repository

 

Y6

Max. 2 characters (e.g. DB)

Document Area

 

ArchiveLink

 

Storage Type

 

HTTP Content Server

 

Version No.

 

0046

 

HTTP Server

 

sapcs.sap.corp

set your own host name

Port Number

 

1090

or the port you set during the installation

HTTP Script

 

ContentServer\ContentServer.dll

this value is the same for both Windows and Unix content servers

Transfer Directory

 

 

You can leave this field empty to use the SAP global directory. Alternatively, use a path that is widely accessible by the application servers and the SAP CS.

 

Once you created the definition of the content repository, you have to physically create it in the SAP Content Server. Do it as follows:

0.1. Create the content repository as above and save the changes.

0.2. Click on the "CS Admin" button, which will take you to the "Content Server Administration" transaction.

0.3. You will probably be asked for an user and password. If so, enter the operating system user and password utilized for installing the SAP CS.

0.4. Go to the "Create" tab and click the "Execute" button.

 

image

 

Now you can test your content repository by using the program RSCMSTH0. Specify your repository and start the test. The report must run without errors.

Configure the archivelink tables

Now that you have a repository, you can proceed to configure the archivelink tables so the photos are properly linked to the employees records.

 

You will first need an archivelink document type. HR provides an standard document type called HRICOLFOTO that can be freely used. Go to transaction OAC2 and make sure that this document type exists, and that it has the document class JPG assigned. If your photos are in a format different to JPG (e.g. TIF or GIF), this would be the right place to change this setting. You can also create a new document type if you prefer (e.g. ZPHOTO).

 

!https://weblogs.sdn.sap.com/weblogs/images/41085/arl1_8.png|height=103|alt=image|width=686|src=https://weblogs.sdn.sap.com/weblogs/images/41085/arl1_8.png|border=0

 

Then, you will have to link the business object and document type to the content repository that you just created. Go to transaction OAC3 and look for the entry with object type PREL and document type HRICOLFOTO (or your own document type). Assign the content repository you created; in my example above I have Y2 for the database repository and Y6 for the Content Server. Save the changes and you are done.

image

  

Upload the employee photos

 

 

You are now ready to upload the photos. Go to transaction OAAD and press the button Store and Assign. Enter the business object PREL and document type HRICOLFOTO (or your own document type). Then press the Create button. You will be requested for the employee number:

 

image

 

 

Then, the system will request the file from your PC. Select the file and continue. You should get a message saying Stored document created successfully. You will also get the technical details of the photo:

 

image

 

Finally, go to transaction PA30 to confirm that the photo was uploaded correctly. The screen should look like this one:

!https://weblogs.sdn.sap.com/weblogs/images/41085/arl1_c.png|height=201|alt=image|width=626|src=https://weblogs.sdn.sap.com/weblogs/images/41085/arl1_c.png|border=0!</body>