Ansicht
Dokumentation

KW_CONTENT_DELETION - Deletion of KW Contents

KW_CONTENT_DELETION - Deletion of KW Contents

Fill RESBD Structure from EBP Component Structure   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.
SAP E-Book

Purpose

This report deletes KW content (structures/content objects) for specified contexts from selected folders in an area or for the entire area.

Integration

Prerequisites

Important:

  • Before you run this report, create a separate backup of the SAP system and the SAP content server of your Knowledge Warehouse system. This avoids having to re-import the SAP standard content in case you happen to delete other content by mistake.
  • If you do not make a backup before deleting content, the relevant SAP content transports would have to be re-imported into your SAP KW system in order to restore the SAP contents. Use transaction KW_IO_DEL_TR to identify these transports. If for some reason (for example, SAP KW system has been renamed) the E07* tables are no longer correctly filled, the information about the transport requests can no longer be found. All transports would therefore have to be re-imported from the content updates DVD for the relevant part of the content.
If you intend to use this report to delete versions of customer content from the system, then a backup of SAP backend and SAP content server is essential since normally no transport requests for re-import are available for this customer content.

Required Authorizations

To run the report correctly, activity 'ADMIN' is required for authorization object S_IWB_ADM. If this is not available, report KW_CONTENT_DELETION or transaction KW_IO_DEL can still be called and the context settings made, but the folders to delete can no longer be selected. In dialog mode instead of being able to run the report, the following message appears: "You do not have authorization for this function".

Context Resolution Settings

The enhanced context resolution must be activated in your SAP KW system (parameter 'NCONT_RES = 3' in table IWBSETTING). You can find information about enhanced context resolution in SAP Note 1060417.

Parallel Execution

While the KW content deletion report (KW_CONTENT_DELETION) is running, all other reports that process content at folder level in the SAP KW system must be inactive (for example, reorganization (SI81 -> Goto -> Reorganization)). Also, there must be no other active instance of the deletion report.

Folders in Reorganization

Folders with entries in the shadow tables of the reorganization report (SI81) are excluded from processing. One info object in reorganization is sufficient to remove all info objects assigned to this folder from further processing.

If all selected folders are affected, the deletion report is cancelled. When folders are reorganized in SI81, the versions are first stored in "shadow" tables. Shadow tables for the folders in question are not emptied and versions not deleted from the SAP content server until "final deletion" is performed.

Info Objects with Checked-Out Versions

There must not be any info objects from contexts selected for deletion checked out for editing or translating (with offline translation package). Checked-out objects (plus their predecessors) are excluded from processing.

Object Usage

You must have set all the required options for the structure analysis (or deletion) before you select options for the deletion of content objects. If you have not set them, the number of content objects deleted will be small since they are still referenced by structures and therefore cannot be removed. Objects with usages are retained.

Features

Folders/contents from the XML areas (XML documentation/XML training) are not included in this report. Only objects from "classic" areas (e.g. training/documentation) can be processed.

If the report cannot be run because

  • another instance of this report exists, or
  • another report is processing the contents at folder level (e.g. reorganization),

the user is notified by a popup in dialog mode. If the report was scheduled in the background, a new background job is automatically scheduled 60 minutes later. This procedure is repeated until the report can be started.

Folders That Are Not Processed

Some folders are always excluded from processing regardless of the settings in the report.

  • All folders with content templates that have an entry in table IWBSETTING (parameter: TEMPLATE_FOLDER_xxxx)
Examples: TEMPLATE_FOLDER_IWBTRAIN for templates from the area training / TEMPLATE_FOLDER_IWBHELP for documentation
  • Administration area (IWBMISC):
  • OEPPR3 (macros)

  • STYLES (cover sheets / style templates)

  • Folders whose objects are assigned from classes "language-dependent miscellaneous" or "language-independent miscellaneous"

  • IWB_ENTRY (entry structure; important for the IKS display)

The folder to which the entry structure is assigned is excluded from processing. Parameter ENTRY_STR from table IWBSETTING is checked.
  • Documentation area (IWBHELP):
HELP.GLOSSARY (glossary)

This deletion report will not process any info objects that are assigned to the folders listed above. The list of folders excluded from processing appears in the application log (SLG1). If no folders at all are left for processing, the folders will appear directly in the display.

The "best PHIO" is the most recent version (PHIO) in the specified deletion area if there are no other versions in higher releases. In other words, it is the version displayed to users when they call the structure preview. In this preview the context resolution is deactivated for the content part. The deactivated context resolution means that the most recent version is displayed independently of the status but without a language fallback.

The deletion area covers all contexts with the same enhancement (or country code) as specified in the report. All releases up to and including the release specified in the report are included. Example: Release: 620 / enhancement: none. This setting means that all existing releases from table IWRELEASE up to and including 620 are included, e.g. 40B / 46C.

The report will not process any info objects for which usages are still found. If referenced objects are already flagged for deletion, the target objects are also checked for deletable versions.

If a "released" version of an info object is deleted, this version is flagged for deindexing. The next time the index report RSTIRIDX is run, the changes are made in the index itself. Background: In SAP KW only info objects with status "released" are flagged for indexing, provided the appropriate settings for the area itself (made in SKPR06) and for the object class are made to include them in the search index.

If versions of an info object (or an entire info object) are deleted, the entries in the transport tables (E07*) are retained anyway. These entries may be needed to ascertain the transport requests that contents were re-imported with. Contents would only be imported again if more SAP contents than intended happen to get deleted from the SAP KW system because of incorrect settings in the deletion report.

Depending on whether the report is run in dialog mode or in the background, there are different options to verify the results or to view the log.

  • Application log (transaction SLG1)
Information is stored in dialog mode or in the background when the report is run.
  • History tables
Information is stored in dialog mode or in the background when the report is run.
Tables used for storing the information: KWDEL_HEAD and KWDEL_RES_OBJ
These tables are evaluated in transaction KW_IO_DEL_TR or in report KW_FOLDER_REPORTS.
  • Spool log
Only filled when the report is run in the background. Only applies to structure objects, since the exception list can be generated from them. With content objects you only have to decide whether to delete or to save all versions flagged as "best PHIO". Selected content objects are not excluded.
  • ALV list
Only filled when the report is run in dialog mode.

This report does not delete folders. They are retained even if a folder no longer has any info object assigned to it.

While the deletable versions are being ascertained only the source and delete PHIOs (SRC and DEL PHIOs) are analyzed by this report. The versions of the display formats (DST PHIOs) are determined by the relationship to the source object (SRC-PHIO) and not deleted until the deletion process is actually running.

Handling Delete PHIOs (DEL PHIOs)

  • Delete PHIOs (DEL PHIOs) are also deleted by the report provided their context parameters match the defined deletion area. If all versions of an object in an enhancement are deleted, all delete PHIOs are removed too.
  • If there are multiple delete PHIOs in an enhancement, the last delete PHIO is retained for "hiding" the object, if not all versions in an enhancement can be removed (see previous paragraph).

If you want to delete all versions of an info object (all PHIOs belonging to an LOIO), the LOIO itself is flagged for deletion too.

If an error occurs in Knowledge Provider (KPro) in at least one deletion action (for example, deleting a relationship / PHIO, or LOIO), other versions of the same info object are excluded from further deletion. In dialog mode these versions are shown in the ALV list with the value "X" in the "Error" column. You can also find information about versions in the application log (transaction SLG1) and in the entries in the history tables. Generally, these objects should not be examined since they could have an inconsistent status due to the cancelled deletion.

All versions marked as "checked out" (and their predecessors linked through the EXPORTMODL relationship) are excluded from processing. They remain in the system untouched, since the report cannot decide whether these versions are still needed or not. Objects can be marked as "checked out" if they are being edited in the original language, or if they are in the translation workflow.

The results of the test and deletion mode can be different since even excluding one version from this process (for example, by retaining a best PHIO) can result in a situation where the object itself or objects referenced from it are excluded from processing.

Selection

Group Box: Context Options:

  • Language
  • Only appears with radio button "content objects".

  • The field can remain empty. In this case the versions (PHIOs) from all available languages are included in the processing.

  • If the option to retain all "best PHIOs" in the deletion process is selected, and the "Language" field is empty, only the versions in the original language and in English are retained. All other langauge versions will be deleted.

Important: If best PHIOs are also required in other languages other than the original language of the object and English, the deletion report must be run separately for each language. In this case the language field must be filled.
  • If a value for the language has been entered, versions in other languages are excluded. The most up-to-date version for the selected language is retained for the selected deletion area.

  • Radio buttons: "Standard Context" / "Enhancement Context"
These determine whether the fields "Release", "Enhancement Release" and "Enhancement" are displayed.
  • "Release"
  • Only displayed with radio button "Standard Context".

  • The existence of specified releases is checked in table IWRELEASE.

  • The character "*" is valid as a placeholder for F4 help.

  • The entered or selected release determines the upper limit of the values taken from table IWRELEASE.

  • PHIOs from releases that are not in table IWRELEASE are not included in the processing.

  • "Enhancement Release"
  • Only displayed with radio button "Enhancement Context".

  • The validity of the specified release is checked in table IWEXTEND and a check is made that it matches the selected value of the subsequent "Enhancement" field.

  • The character "*" is valid as a placeholder for F4 help.

  • The entered or selected release determines the upper limit for the selected enhancement (in accordance with the entries in table IWEXTEND).

  • PHIOs from contexts (enhancement + release) that are not in table IWRELEASE are not included in the processing.

  • "Enhancement"
  • Only displayed with radio button "Enhancement Context".

  • The validity of the specified enhancement is checked in table IWEXTEND and a check is made that it matches the value selected in the subsequent "Enhancement Release" field.

  • The character "*" is valid as a placeholder for F4 help.

  • "Country Key"
The character "*" is valid as a placeholder for F4 help.
PHIOs with country codes that are not in table T005 are not included in the processing.

Group Box: Area Selection:

  • "Area"
  • With this report only KW areas can be selected.

The attribute 'KW_APPLICATION', which is assigned in DMWB, is checked. Only areas with the value "KM_KW_R3" appear in the list of areas that can be selected.
  • If an XML area (for example, XML documentation) is selected, a message appears stating that this area is not valid. These contents cannot be processed further.

Message 42041: The check is not valid for XML areas.
  • Option "Complete Area"
  • If this is not selected, the folders to be processed have to be selected manually. You can select any number of folders.

  • If folders that have been especially excluded from processing (e.g. templates / OEPPR3 / STYLES) are selected, these are removed from the list of folders to be processed.

These folders are shown in the application log (transaction SLG1) provided not all the folders are excluded from processing.
  • If you have selected a large number of folders, or folders with a large number of info objects (in many different contexts), processing should be done in the background. If you process the folders in dialog mode, the runtime restriction of work processes can result in the report terminating.

Group Box: Steps (Analyzed Objects):

  • Radio buttons: "Structures" / "Content Objects"
They control the selection options in the group box "Options".

Group Box: Options with radio button "Structures":

Only structure objects are processed (IWB_CLASS_TYPE = STRUCT)

  1. Test mode: Determination of all deletable versions
    1. The report collects all structure objects that are not used in the contexts flagged for deletion or only referenced by objects already flagged for deletion.
    2. If all versions of an info object (also all PHIOs belonging to an LOIO) are flagged for deletion, the LOIO itself is also flagged for deletion.
    3. The best PHIOs are selected separately in dialog mode ('X' in column "Best PHIO"). In background mode your LOIOs are listed in the spool list of the batch job. This list can be downloaded to create the structure exception list later.
The remaining deletable versions do not appear in the spool list. If you want to see the complete list of all deletable versions, you have to look in the application log in transaction SLG1.
  1. If the report was started in dialog mode, the results list is displayed as an ALV list.
  2. The result is stored in dialog/batch mode in the history tables.
  • Test mode: Determining the best PHIOs
    1. Processed as described in point 1 ("test mode: determining all deletable versions".
    2. In this case the results list in dialog mode contains only the best PHIOs. If the report is run in the background, the best PHIOs are stored in the spool list (if one exists). If there are no best PHIOs, no spool is created for the background job.
    The results list or the spool list can be used to create the structure exception list later.
    1. Deletion mode: All versions / no exceptions
      1. Processed as described in point 1 ("test mode: determining all deletable versions".
      2. With this mode, all deletable versions are removed from the SAP KW system. It is not possible to exclude selected structures.
      3. If problems occur when deleting specific objects, an "X" is inserted in the "Error" column of the results list, and an entry written in the application log.
    2. Deletion mode: Selected versions are retained
      1. To protect specific versions from being deleted, with this option a TXT file with the exception list of the structures must be uploaded.
    For the LOIOs in this list all the best PHIOs that exist in the deletion area are retained.
    If there are problems uploading the exception list, you can continue processing the structure by choosing "Continue". Note that no best PHIOs will be retained because of the missing exception list. The deletion is carried out as in the option "All Versions / No Exceptions". By choosing "Back" you return to the selection screen of the report.
    1. The exception list (TXT file) requires the following format:
      1|IWB_STRUCT|4DDC8C8E5F15D21197D10060B0672A3C
      2|HELP.KMKW
    There are two lines per entry in this file marked with '1|' + '2|'.
    Line '1|' must contain the info object class and the LOIO ID.
    Line '2|' contains the technical name of the info object.
    1. If problems occur when deleting specific objects, an "X" is inserted in the "Error" column of the results list, and an entry written in the application log.
    2. The number of deleted objects can be smaller than in point 3 ("Deletion mode: All versions / no exceptions).
  • Deletion mode: All "Best PHIOs'" are retained
    1. The report excludes all best PHIOs from the analysis and tries to find out which other PHIOs can be flagged for deletion.
    2. If problems occur when deleting specific objects, an "X" is inserted in the "Error" column of the results list, and an entry written in the application log.
    3. The number of deleted objects can be smaller than in point 4 ("Deletion mode: "Selected versions are retained").

    Group Box: Options with radio button "Content Objects":

    Only content objects (IWB_CLASS_TYPE = TOPIC) are processed. Since no structures are included here, all structures flagged for deletion ("deletable") should have already been removed. If they have not, the number of deletable info object versions is sharply reduced since only versions that are no longer used will be deleted.

    1. Test mode: Determination of all deletable versions
    See point 1 for structures ("Test Mode: Determination of all Deletable Versions").
    1. Deletion mode: All versions / no exceptions
    See point 3 for structures ("Test Mode: All Versions / No Exceptions").
    1. Deletion mode: All "Best PHIOs'" are retained
    See point 5 for structures ("Test Mode: "All Best PHIOs are retained").

    Group Box: Processing Options

    • Option "Execute in Background"
    This controls the appearance of the group box Background Processing .
    If this option is not selected, the report is started in dialog mode.

    Group Box: Background Processing if checkbox "Execute in Background" is selected:

    • Checkbox "Immediate Start"
    • If this option is not selected, the background job is scheduled as in the SAP standard.

    • If this option is selected, the batch job is started directly provided no other reports with content changes at folder level or other instances of the deletion report are active.

    • Job Name
    • Default name: KW_CONTENT_DELETION

    • The batch job has the same name as the name in the field "Job Name", and can be found in transaction SM37.

    • If the report cannot be directly started because of other reports (e.g. reorganization) or because another instance of the same report exists, the job is rescheduled 60 minutes later under the same name.

    • The job name can also be found as part of the column "External Identification" in the application log (transaction SLG1).

    Standard Variants

    Output

    The output resulting from the different processing options (dialog/background) is described below. Features that are common to both dialog and background modes are also described.

    In dialog mode:

    • The output is a sorted ALV grid list.
    • The processor can define the criteria for sorting and filtering.
    • Important columns in the results list.
    • Docu Class: This can contain an LOIO or PHIO class depending on the value in column "IO Type". Examples: IWB2GEN (multimedia object from the training area/ LOIO class) / IWB0NODSRC (source format topic from the administration area / PHIO class).

    • IO Type: Possible values: L (LOIO) / P (PHIO) / F (folder)

    • Best PHIO: Possible values: 'X' (version is the best PHIO for the specified context) / ' ' (no 'X' means that this version is deletable).

    • If the appearance of the mouse pointer changes into a hand symbol when placed on the object ID, you can carry out the following activities with a mouse click:
    • Structures in test mode: Display object in browser

    If no Internet Knowledge Server (IKS) has been defined to display the contents in Customizing (transaction SKPR02), a popup appears with the details of the selected entry instead of contents being displayed in the browser.
    If the selected version of the structure is the best PHIO, you have to make a decision about flagging the object for the exception list. If you answer the question, "Would you like to include this LOIO in the exception list?" with "yes", when you leave the results list you are asked where you would like to store the exception list. The file name exception_list.txt is suggested.
    • Structures in deletion mode: Only details are displayed in a separate popup.

    Since the deletion has already been done, nothing can be displayed.
    • Other Object Classes <> Structures in Test / Deletion Mode: Details displayed in a separate popup only / display in browser not possible. Typical objects: Folders / content objects

    • If problems occur when deleting selected objects, an "X" is entered in field "Error" and an entry written to the application log.

    In the background:

    • All structure LOIOs, for which best PHIOs have been found in the specified context area, are listed in the spool list of the batch job in a predefined format. You can find more information about this under points 2 and 4 for structures. The best PHIOs are required for creating an exception list.
    • If no best PHIOs were found when the selected folders were processed, no spool log is created. The job log of the batch job contains the following entry: No objects (LOIOs) with best PHIOs found.

    Dialog and background:

    • Information about problem cases
    To be found in the application log (transaction SLG1).
    Selection using:
    • Object: SIWB (Information Workbench)

    • Subobject: KW_FOLDER_REPORTS (reports for folder procressing)

    • User: User who started the deletion report or transaction KW_IO_DEL.

    • Information about excluded folders
    The application log also contains the list of folders excluded from processing. This list can contain folders that:
    • are not normally processed (e.g. OEPPR3 / STYLES / TEMPLATES)

    • are excluded from processing because they are, for instance, being reorganized (entries for assigned objects in shadow tables of the KW reorganization report).

    • Information about the number of objects to be processed
    The application log contains some information about the number of objects to be processed (at the end of the analysis phase).
    • Number of info objects to check

    Number of info objects (structure or content objects) to check that are assigned to the selected folders.
    • Number of logical objects

    Number of info objects (LOIOs) selected for an activity (e.g. deletion of a version / deletion of an entire object).
    • Number of physical objects to delete

    Number of source/delete PHIOs (SRC / DEL PHIOs) found in the analysis that can be deleted.
    The actual number of really deleted versions can vary greatly since in the analysis only the versions of the source formats (SRC PHIOs) and the deleted objects (DEL PHIOs) are listed. Only when the versions are actually deleted, are the associated display formats (DST PHIOs) determined. Furthermore, the total number may change due to errors when deleting.
    The number of actually deleted versions is not available and therefore not shown in the application log.
    • Information about initial parameters of the deletion report for KW contents
    The relevant column in the application log is "External Identification".
    The possible values are described below, and are always separated by a comma (","). The relevant values for starting the deletion report for KW contents cannot be determined without a detailed evaluation of the history tables. List of entries:
    • Area of selected folders, or the technical name of the completely selected area (e.g. IWBTRAIN for training).

    • Enhancement

    Can remain empty / only filled if part of the context.
    • Release

    Upper limit for the release area selected for deletion.
    • Language

    Not filled if the report is run for structure objects, or if no explicit language was selected for the content objects.
    • Country code

    Can remain empty / only filled if part of the context.
    • Number of folders to be processed

    Folders excluded from the processing are no longer contained in this number.
    • Processing option

    Possible values: 1-8 / 1-5 are the options for processing structures / can be selected in the same sequence as in the report. 6-8 are the options for content objects.
    • Deletion / test mode

    Value "X" means that the contents are really changed. " " (no value) means run in test mode.
    • Type of objects to be processed

    1: Structures / 2: Content objects
    • Best PHIOs are retained: Yes / No

    Value "X" means that all best PHIOs are retained. Only possible together with deletion mode for structures / content objects, for which all best PHIOs are retained (option 5 or 8).
    • Upload exception list

    Value "X" means that an exception list has been uploaded for targeted retention of structures. Only possible with option 4 ("Deletion mode: selected versions are retained").
    • Job Name

    Can remain empty / only filled if run in the background.
    • All deletable versions / objects (SRC and delete PHIOs / LOIOs) are kept in the history tables:
    • KWDEL_HEAD

    • KWDEL_RES_OBJ

    The entries in these tables can be evaluated using transaction KW_IO_DEL_TR. In particular, it is important to be able to ascertain the transport requests to which info objects belong, just in case too many SAP contents were deleted.

    Activities

    The report searches through a complete area or selected folders for structure/content objects that meet the following criteria:

    • Completely without usages / references
    • Without usage /references in the context area selected for deletion
    • Contained in the list of versions (PHIOs) that have already been flagged for deletion.

    Fixing Errors / Messages:

    • Message 42 149: "No PHIO found for context &2 &3 &4 for LOIO &1 "
    • Remedy: Create a context chain between the context found and the current context. Restart the report with the same settings as before.

    Tips for Using the Report:

    • In the training area (IWBTRAIN) courses or structures are largely independent of each other and the number is not too large, which means that you can consider processing structure objects in dialog mode, even if you select the complete area.
    • For content objects you should consider running the report in dialog mode only if the number of folders and the number of objects assigned in these folders is relatively small. In particular with the actual deletion, it is preferable to run the report in the background to avoid inconsistencies caused by the report terminating due to the runtime limit of dialog work processes.
    • Before running the deletion report for content objects, the report should already have been run for structure objects. Background: If objects are still being used (e.g. by references from structures), these contents are NOT included in the deletion.
    • If you want to retain info objects in a specific context, you must ensure that the context area specified for the solution ends below the required release.
    • If you want to retain specific structures, you must select the following options:
    • Test mode: Determining the best PHIOs

    • Deletion mode: Selected versions are retained

    You then get the option to upload an exception list before the structures are actually deleted. These objects are then retained independently of the context area specified for the deletion.

    Example






    PERFORM Short Reference   General Data in Customer Master  
    This documentation is copyright by SAP AG.

    Length: 37101 Date: 20240520 Time: 084402     sap01-206 ( 485 ms )