Blogs

Make ERP`s Document Management System transactional consistent [Updated]
Stephan Heinberg 
Business Card
Company: Zimmer, Inc.
Posted on Dec. 13, 2009 08:30 AM in ERP, Product Lifecycle Management

Subscribe.Subscribe
Print. Print
Permalink Permalink
Share

Well, when you read the headline, you must assume that currently Document Management (CA-DMS) of the ERP system can produce inconsistent states and unfortunately you are right. Recently SAP published a bug fix. This blog is about to explain details, since the correction is not well communicated by the SAP support.

Quick Action

If you run Document Management (CA-DMS) of the ERP and PLM system and use the Knowledge Provider (BC-SRV-KPR) to store your files (originals) on a Content Server, I recommend to execute the following steps:

  • Implement Note 1403231
  • Implement BAdI DOCUMENT_MAIN01. In the method SET_KPRO_UPDATE_MODE add the following source line: set_update_mode = ‘X'.
  • Schedule daily or weekly a job that runs the program RSIR_CONTENT_UNMARK_PRELIM

Background

When SAP corrects something after the product is on the market, the change is often poorly documented. This blog shall help you to bring some light into the darkness.

When you save a document with a file in the SAP system the data are actually stored in three different layers and two different systems:

  1. DMS layer, data are stored in the main SAP database.
  2. KPRO layer, which carries the metadata of the file, data are stored in the main SAP database.
  3. Content Server stores the file itself, it is a new system.

When you hit the save button you expect that all data are stored consistent according to the ACID principle. In this Wikipedia article it is mentioned:

"It is difficult to guarantee ACID properties in a distributed transaction across a distributed database where no single node is responsible for all data affecting a transaction. Network connections might fail, or one node might successfully complete its part of the transaction and then be required to roll back its changes because of a failure on another node".

In 2005 SAP managed to make the KPRO layer in combination with Content Server transactions consistent: Note 810391 - Update capability of the KPro-DMS

However like it is mentioned in this note the new update mode only comes into effect when it is explicitly activated by the application utilizing the KPRO layer. One application is Records Management where quickly a correction was provided which changed completely to the new mode: Note 869198.

It took four more years until the DMS support provided a proper solution to utilize the new consistent update mode with Note 1403231. And there is a difference: The new update mode has to be switched on explicitly by the customer. Since the SAP support does not deliver new customizing switches after the product was ramped up, the switch is realized by providing a new BAdI method. How to turn on the switch is described above.

SAP itself provides info what happens, if you don't change the mode:

Note 1302899 - DIR has files which have multiple active content version

There is another part that is not properly documented after the new update mode is turned on: When the user deletes a file, due to transactional reasons the file is not deleted directly from the content server but only marked for deletion in the KPRO layer. In the database table SDOK_PRELIM_CONT you can find these documents. Since you don't want uncontrolled growth of your Content Server data, these documents have to be cleared. This can be done by calling the program RSIR_CONTENT_UNMARK_PRELIM which removes all files that are deleted prior seven days.

Update

After switching to this new mode in 2009 we experienced a few side effects. Together with the SAP support we worked on a solution. So please , also implement the following notes:

The correction of note  1532002 is quite logical: When using the toggle button (Display<->Change) in CV01N/CV02N it makes sense to use a synchronous update (Commit work and wait) and not an asynchronous update (commit work), since this mode puts the KPRO changes also in update mode.
However Charith Muniyappa from the SAP support did not want to generally release this note, he just put it in “Pilot Release”. So please create a support message and ask SAP to generally release the note.

Open Issue

You still get the info message 296(26) This is because DMS want to update the record in table DMS_PH_CHKO_CD1 with FM CV120_PHIO_CHECKOUT_USER_SET, but KPRO does not write this property.


I will work with the SAP support to solve this problem, too.

I will keep you updated.

Stephan Heinberg   is a Inhouse Consultant and Project Manager for Product Lifecycle Management and an enthusiastic fan of ABAP.


Comment on this article
Comment on this weblog
Showing messages 1 through 7 of 7.

Titles Only Main Topics Oldest First

  • Thank you!
    2010-07-05 08:47:02 Egor Malov Business Card [Reply]

    Could you please clarify concerning Netweaver releases? As I see, all these notes are applicable to Release 6**. What about 700? Was it 'ACID' right from the start?
    • Thank you!
      2010-07-05 09:00:07 Stephan Heinberg Business Card [Reply]

      Hi Egor ,
      looks like you are new to the internet and to SAP.
      For ACID: Follow the hyperlink. This is the text that is underlined and where your mouse curser changed.
      For NW 6.* notes: The notes are already in NW 7.00. When SAP creates a new release, they copy it from the latest versions. Notes before this specific date are already in the new release, which is the case for 810391.


      Cheers,
      Stephan

  • I have urgent question
    2010-04-15 00:55:27 Bachman Elad Business Card [Reply]

    Thanks for the important issue.
    Should I implement notes 942227 and 942228 before 1403231 ? or implementing note 1403231 is enough?


    I dont want to do multiplicative actions...


    Thanks again

    • Answer
      2010-04-15 02:52:02 Stephan Heinberg Business Card [Reply]

      Only note 1403231 needs to be installed.


      Notes 942227 and 942228 don't carry source code that can be automtically inplemented.
      They describe an earlier solution via customer coding which 1403231 implements via SAP namespace coding.

      • Answer
        2010-04-15 05:41:18 Bachman Elad Business Card [Reply]

        I tried to add a new method definition in badi DOCUMENT_MAIN01 but I cant find the way to do it. could you please guide me?


        Thanks,
        Elad

  • Thanks!
    2009-12-14 20:50:53 Vivek Pandey Business Card [Reply]

    Hi Stephen,
    Many thanks for bringing this to our knowledge. This is of much help and would definitely avoid inconsistencies in the future.


    Regards,
    Vivek


Showing messages 1 through 7 of 7.