SAP Knowledge Base Article - Public

2650234 - Understand how a copy of KW documents works in scenario "Solution Documentation" in SAP Solution Manager 7.20

Symptom

You copy elements that store Knowledge Warehouse (KW) documents in your process structure in SAP Solution Manager 7.20, scenario "Solution Documentation". In some cases the KW documents are copied and in some cases the copied element points to the same KW document. This KBA explains how this works in detail. It helps you to understand when the KW documents are really copied, and when the copied node will refer to the same KW document.

Environment

Starting with SAP Solution Manager 7.20 SP05, a new flag was introduced on the KW documents. It is called "Document reference". With this flag, a new algorithm was implemented that decides how KW documents are copied, in case the element that stores the document is copied.

Before SAP Solution Manager 7.20 SP05, KW documents were never copied when the element that stores the document was copied.

Resolution

In this chapter, we want to explain when KW documents are copied in case an element is copied, and when the copied element refers to the same KW document.

As already mentioned above, the copy behavior has been changed in SP05. Whereas no copies of KW documents were created up to SP05, this is done in some cases starting in SP05, if elements are copied. In SP05, a new attribute was introduced that has an influence on the document copy process. It is called "Document reference" and is a checkbox on the UI that can be set manually, but it is also set automatically in some cases. How this works, is described in following chapter.

There are two different variants of a copy action in SP05 and higher:

1. Copying structures

If a structure is copied (e.g. a scenario or a process) all child elements and all assignments contained in this structure (e.g. KW document assignments) are copied along with the structure. It now depends on the flag "Document Reference", how the KW document on the different elements are handled:

  • A KW document is regarded as "original" if the attribute "Document Reference" is false. Such "original" KW documents are copied into an independent new KW document. The copies of all elements where this flag is false will point to a new KW document.
  • A document is regarded as a reference to another ("original") KW document, if the attribute "Document Reference" is true. An element that represents a KW document reference (where the attribute "Document Reference" is true) is not copied if a structure is copied, but an additional assignment to the same original KW document is included into the copied structure.
  • Please note that even if a KW document is copied to a new KW document, the description of the copy is the same as the description of the original. So different to SAP Solution Manager 7.1, where an appendix "(copy)" was added to the document description, this is not done in SAP Solution Manager 7.2. For that reason, you usually cannot directly see if you have the same KW document on two elements or not. At the end of this SAP note, you find a workaround that describes how you can compare two elements that store documents. So you can see if you have stored the same or different KW documents on these two elements.
  • If a structure is copied which contains originals ("Document Reference" = SPACE) and references that point to that originals ("Document Reference" = "X"), then the copy of this structure will also contain copies of the originals and references. But the references ("Document Reference" = "X") in the copied structure will now point to the originals in the copied structure. They will not point to the originals in the source structure, as this would not be the expected behaviour. In this sense, the originals and their references are consistent in the copy. The references in the copy will point to original documents that are also inside the copied hierarchy, in case of this scenario, where documents and their references are both contained in the source structure of the copy process.

2. Copying KW documents directly

If one or multiple KW documents are directly selected for a "copy" an "insert" action, the copy will always create independent KW document copies. This is done regardless of the flag "Document Reference" mentioned above.

  • For this direct copy process of KW documents, we consider to provide an addition function to insert document references (i.e. additional assignments of the same documents) instead of inserting always independent KW document copies. As mentioned above, at the moment the system always creates KW document copies and ignores the flag "Document Reference" if the copy process is done on one or more KW document elements directly.
  • We plan to give the users the choice to insert the documents at the destination as reference (without copying the KW document) or to insert it as a new original (which is a copy of the original KW document). Please note that we have such plans, but for legal reasons we cannot commit if or when such a new functionality will be available.

3. Meaning and handling of the "Document Reference" flag

  • As mentioned above, the flag controls the copy process in case you copy hierarchies (as described in section 1 above). It does not have any effect if you directly copy one or several documents (as described in section 2 above).
  • The "Document Reference" flag is set automatically:
    • It is unchecked if a new document is created using "Document (Upload)" or "Document (From template)" from the context menu
    • It is checked if a new document is assigned using "Document (Assign)" from the context menu, in case you assign a document that is already used in the hierarchy. In case you assign a document that is not yet assigned to the hierarchy (these documents are called "orphans") the flag is not set, because a copy of the orphan document is created.
    • In case you copy a hierarchy (as described in section 1 above), the flag is kept as it was in the original structure, as only documents with the unchecked attribute are copied.
    • In case you copy one or several documents directly  (as described in section 2 above), the flag is always unchecked, as new originals are created 
  • If you uncheck or check the flag manually, the copy processes that are performed after this change will be influenced accordingly.
  • Since the "Document Reference" flag did not yet exist up to SP05, it is not 100% reliable that you really have a document that is not used at any other place if the flag is not set.
  • Any change of the "Document Reference" flag does not affect the document stored on the element. Only further copy processed that happen after the change of the flag are influenced. But unchecking the flag itself will not create a copy of the document. The flag only describes the fact whether a document is seen as an original or reference for further copy processes, but changing the flag itself does not trigger any creation of document copies.

See Also

How to see if two elements in the Solution Documentation hierarchy point to different KW documents:

If you want to see if a copy action resulted in different KW documents, or if the copied elements still point to the same KW document, you can see this from the "Created at" attribute in the attribute panel. You see this in the "History" attribute group of the attribute panel:

Capture.PNG

Check the attribute "Created at" for both elements in the hierarchy you want to compare. If both elements refer to the same KW document, all attributes have the same values. Especially the "Created at" attributes have the same values. If the documents are different, because one was copied from another document, the "Created at" timestamps are different.

Keywords

copy document, dokument, kopieren, refer to original, change document, ändern, Kopie, Verhalten, KW, original, reference document, , KBA , SV-SMG-IMP-BIM , Business Blueprint / Solution Documentation , How To

Product

SAP Business ByDesign all versions