SAP Program KW_CONTENT_DELETION - Deletion of KW Contents

Purpose
This report deletes KW contents (structures / content objects) forspecified contexts from selected folders of an area or for the completearea.

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 to avoidhaving to re-import the SAP standard contents in case you happen todelete other contents by mistake.
    • If no backup is made before content is deleted, the relevant SAP content
    • transports would have to be re-imported into your SAP KW system in orderto restore the SAP contents. Transaction KW_IO_DEL_TR is used todetermine these transports. If for some reason (for example, SAP KWsystem has been renamed) the E07* tables are no longer correctly filled,the information about the transport requests can no longer bedetermined. Consequently all transports would have to be re-importedfrom the content updates DVD for the part in question.
      If you intend to use this report to delete versions of customer contentsfrom the system, then a backup of SAP backend and SAP content server ismandatory since normally no transport requests for re-import areavailable for these customer contents.
      Required Authorizations
      To run the report correctly, activity 'ADMIN' is required forauthorization object S_IWB_ADM. If this is not available, report KW_CO
      NTENT_DELETION or transaction KW_IO_DEL can still be called and thecontext settings made, but the folders to delete can no longer beselected. In dialog mode instead of being able to run the report, youget the message: '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 findinformation 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 contents at folder level in the SAP KWsystem must be inactive (for example, reorganization (SI81 -> Goto ->Reorganization)). Also, there must be no other active instance of thedeletion report.
      Peculiarity with Folders in Reorganization
      Folders with entries in the shadow tables of the reorganization report(SI81) are excluded from processing. One info object in reorganizationis sufficient to remove all info objects assigned to this folder fromfurther 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. Only when "final deletion" is called, are the shadowtables for the folders in question emptied and the versions deleted fromthe SAP content server.
      Info Objects with Checked-Out Versions
      All info objects from contexts selected for deletion must not be checkedout for editing or translating (with offline translation package).Checked-out objects (plus their predecessors) are not included in theprocessing.
      Usage of Objects
      Before selecting options for the deletion of content objects, all therequired options for structure analysis (or deletion) must have beenset. If they have not, the number of content objects deleted will besmall since they are still referenced by structures and therefore cannotbe 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 wasscheduled in the background, a new batch job is automatically scheduled60 minutes later. This procedure is repeated until the report can bestarted.
        Folders Not Processed
        Some folders are always excluded from processing regardless of thesettings 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)
            Falls Makros in anderen Mappen liegen, dann sind diese nicht geschützt.
            STYLES (cover sheets / style templates)
            Folders whose objects are assigned from classes "language-dependentmiscellanaeous" or "language-independent miscellanaeous"
            IWB_ENTRY (entry structure / important for the IKS display)
            The folder to which the entry structure is assigned is excluded from theprocessing. 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 assignedto the folders listed above. The list of folders excluded fromprocessing appears in the application log (SLG1). If no folders at allare left for processing, the folders will appear directly in thedisplay.
              The "best PHIO" is the last available version (PHIO) in the specifieddeletion area if there are no other versions in higher releases. Inother words, it is the version displayed to the user when he or shecalls the structure preview. In this preview the context resolution isdeactivated for the content part. The deactivated context resolutionmeans that the last version is displayed independently of the status butwithout a language fallback.
              The deletion area covers all contexts with the same enhancement (orcountry code) as specified in the report. All releases are included thatare smaller or the same as the release specified in the report. Example:Release: 620 / enhancement: none. This setting means that all existingreleases 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 stillfound. If referenced objects are already flagged for deletion, thetarget objects are also checked for deletable versions.
              If a "released" version of an info object is deleted, this version isflagged for deindexing. The next time the index report RSTIRIDX is run,the changes are made in the index itself. Background: In SAP KW onlyinfo objects with status "released" are flagged for indexing, providedthe appropriate settings for the area itself (made in SKPR06) and forthe object class are made too include them in the search index.
              If versions of an info object (or a complete info object) are deleted,the entries in the transport tables (E07*) are retained anyway. Theseentries may be needed to ascertain the transport requests that contentswere re-imported with. Contents would only be imported again if more SAPcontents than intended happen to get deleted from the SAP KW systembecause of incorrect settings in the deletion report.
              Depending on whether the report is run in dialog mode or in thebackground, there are different options to verify the results or to viewthe log.
              • Application log (transaction SLG1)

              • Information is stored when the report is run in dialog mode and in thebackground.
                • History tables

                • Information is stored in dialog mode or in the background when thereport 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 reportKW_FOLDER_REPORTS.
                  • Spool log

                  • Only filled when the report is run in the background. Only applies tostructure objects, since the exception list can be generated from them.With content objects there is only the decision to be as to whether todelete or to save all versions flagged as "best PHIO". Selected contentobjects 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 folderno longer has any info object assigned to it.
                      While the deletable versions are being ascertained only the source anddelete PHIOs (SRC and DEL PHIOs) are analyzed by this report. Theversions of the display formats (DST PHIOs) are determined by therelationship to the source object (SRC-PHIO) and not deleted until thedeletion 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 ofan object in an enhancement are deleted, all delete PHIOs are removedtoo.
                        • If there are multiple delete PHIOs in an enhancement, the last delete
                        • PHIO is retained for "hiding" the object, if not all versions in anenhancement can be removed (see previous paragraph).
                          If you want to delete all versions of an info object (all PHIOsbelonging to an LOIO), the LOIO itself is flagged for deletion too.
                          If an error occurs in Knowledge Provider (KPro) in at least one deletionaction (for example, deleting a relationship / PHIO, or LOIO), otherversions of the same info object are excluded from further deletion. Indialog mode these versions are shown in the ALV list with the value "X"in the "Error" column. You can also find information about versions inthe application log (transaction SLG1) and in the entries in the historytables. Generally, these objects should not be examined since they couldhave an inconsistent status due to the cancelled deletion.
                          All versions marked as "checked out" (and their predecessors linkedthrough the EXPORTMODL relationship) are excluded from processing. Theyremain in the system untouched, since the report cannot decide whetherthese versions are still needed or not. Objects can be marked as"checked out" if they are being edited in the original language, or ifthey are in the translation workflow.
                          The results of the test and deletion mode can be different since evenexcluding one version from this process (for example, by retaining abest PHIO) can result in a situation where the object itself or objectsreferenced 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 allavailable languages are included in the processing.
                            If the option to retain all "best PHIOs" in the deletion process isselected, and the "Language" field is empty, only the versions in theoriginal language and in English are retained. All other langaugeversions will be deleted.
                            Important: If best PHIOs are also required in other languages other thanthe original language of the object and English, the deletion reportmust be run separately for each language. In this case the languagefield must be filled.
                            If a value for the language has been entered, versions in otherlanguages are excluded. The most up-to-date version for the selectedlanguage 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 valuestaken from table IWRELEASE.
                                PHIOs from releases that are not in table IWRELEASE are not included inthe processing.
                                • "Enhancement Release"

                                • Only displayed with radio button "Enhancement Context".
                                  The existence of the specified release is checked in table IWEXTEND anda 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 theselected enhancement (in accordance with the entries in table IWEXTEND).
                                  PHIOs from contexts (enhancement + release) that are not in tableIWRELEASE are not included in the processing.
                                  • "Enhancement"

                                  • Only displayed with radio button "Enhancement Context".
                                    The existence of the specified enhancement is checked in table IWEXTENDand 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 inthe 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 thatcan be selected.
                                        If an XML area (for example, XML documentation) is selected, a messageappears stating that this area is not valid. These contents cannot beprocessed 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 selectedmanually. 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 thelist 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 largenumber of info objects (in many different contexts), processing shouldbe done in the background. If you process the folders in dialog mode,the runtime restriction of work processes can result in the reportterminating.

                                          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)
                                            Test mode: Determination of all deletable versions
                                            The report collects all structure objects that are not used in thecontexts flagged for deletion or only referenced by objects alreadyflagged for deletion.
                                            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.
                                            The best PHIOs are selected separately in dialog mode ('X' in column"Best PHIO"). In background mode your LOIOs are listed in the spool listof the batch job. This list can be downloaded to create the structureexception list later.
                                            The remaining deletable versions do not appear in the spool list. If youwant to see the complete list of all deletable versions, you have tolook in the application log in transaction SLG1.
                                            If the report was started in dialog mode, the results list is displayedas an ALV list.
                                            The result is stored in dialog/batch mode in the history tables.
                                            RESET N2
                                            Test mode: Determining the best PHIOs
                                            Processed as described in point 1 ("test mode: determining all deletableversions".
                                            In this case the results list in dialog mode contains only the bestPHIOs. If the report is run in the background, the best PHIOs are storedin the spool list (if one exists). If there are no best PHIOs, no spoolis created for the background job.
                                            The results list or the spool list can be used to create the structureexception list later.
                                            The result can be saved in the format understandable by this report.
                                            RESET N2
                                            Deletion mode: All versions / no exceptions
                                            Processed as described in point 1 ("test mode: determining all deletableversions".
                                            With this mode, all deletable versions are removed from the SAP KWsystem. It is not possible to exclude selected structures.
                                            If problems occur when deleting specific objects, an "X" is inserted inthe "Error" column of the results list, and an entry written in theapplication log.
                                            RESET N2
                                            Deletion mode: Selected versions are retained
                                            To protect specific versions from being deleted, with this option a TXTfile with the exception list of the structures must be uploaded.
                                            For the LOIOs in this list all the best PHIOs that exist in the deletionarea are retained.
                                            If there are problems uploading the exception list, you can continueprocessing the structure by choosing "Continue". Note that no best PHIOswill be retained because of the missing exception list. The deletion iscarried out as in the option "All Versions / No Exceptions". By choosing"Back" you return to the selection screen of the report.
                                            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.
                                            If problems occur when deleting specific objects, an "X" is inserted inthe "Error" column of the results list, and an entry written in theapplication log.
                                            The number of deleted objects can be smaller than in point 3 ("Deletemode: All versions / no exceptions).
                                            RESET N2
                                            Deletion mode: All "Best PHIOs'" are retained
                                            The report excludes all best PHIOs from the analysis and tries to findout which other PHIOs can be flagged for deletion.
                                            If problems occur when deleting specific objects, an "X" is inserted inthe "Error" column of the results list, and an entry written in theapplication log.
                                            The number of deleted objects can be smaller than in point 4 ("Deletionmode: "Selected versions are retained").
                                            RESET N2
                                            RESET N1

                                            Group box: Options with radio button "Content Objects":
                                            Only content objects (IWB_CLASS_TYPE = TOPIC) are processed. Since nostructures are included here, all structures flagged for deletion("deletable") should have already been removed. If they have not, thenumber of deletable info object versions is sharply reduced since onlyversions that are no longer used will be deleted.
                                            Test mode: Determination of all deletable versions
                                            See point 1 for structures ("Test Mode: Determination of all DeletableVersions").
                                            Deletion mode: All versions / no exceptions
                                            See point 3 for structures ("Test Mode: All Versions / No Exceptions").
                                            Deletion mode: All "Best PHIOs'" are retained
                                            See point 5 for structures ("Test Mode: "All Best PHIOs are retained").
                                            RESET N2
                                            RESET N1

                                            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 inBackground" is selected:

                                              • Checkbox "Immediate Start"

                                              • If this option is not selected, the background job is scheduled as inthe SAP standard.
                                                If this option is selected, the batch job is started directly providedno other reports with content changes at folder level or other instancesof the deletion report are active.
                                                • Job Name

                                                • Default: KW_CONTENT_DELETION
                                                  The batch job has the same name as the name in the field "Job Name", andcan 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 "ExternalIdentification" in the application log (transaction SLG1).

                                                  Output
                                                  The output resulting from the different processing options(dialog/background) is described below. Features that are common toboth 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 thevalue in column "IO Type". Examples: IWB2GEN (multimedia object from thetraining area/ LOIO class) / IWB0NODSRC (source format topic from theadministration area / PHIO class).
                                                    IO Type: Possible values: L (LOIO) / P (PHIO) / F (folder)
                                                    Best PHIO: Possible values: 'X' (version is the best PHIO for thespecified context) / ' ' (no 'X' means that this version is de
                                                    letable).
                                                    • 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 witha mouse click:
                                                      Structures in test mode: Display object in browser
                                                      If no Internet Knowledge Server (IKS) has been defined to display thecontents in Customizing (transaction SKPR02), a popup appears with thedetails of the selected entry instead of contents being displayed in thebrowser.
                                                      If the selected version of the structure is the best PHIO, you have tomake a decision about flagging the object for the exception list. If youanswer the question, "Would you like to include this LOIO in theexception list?" with "yes", when you leave the results list you areasked where you would like to store the exception list. The file nameexception_list.txt is suggested.
                                                      Structures in deletion mode: Only details are displayed in a separatepopup.
                                                      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 notpossible. 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.
                                                        RESET N1
                                                        RESET N2
                                                        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 ina predefined format. You can find more information about this underpoints 2 and 4 for structures. The best PHIOs are required for creatingan 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 thefollowing 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 fromprocessing. This list can contain folders that:
                                                                are not normally processed (e.g. OEPPR3 / STYLES / TEMPLATES)
                                                                are excluded from processing because they are, for instance, beingreorganized (entries for assigned objects in shadow tables of the KWreorganization report).
                                                                • Information about the number of objects to be processed

                                                                • The application log contains some information about the number ofobjects 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 areassigned to the selected folders.
                                                                  Number of logical objects
                                                                  Number of info objects (LOIOs) selected for an activity (e.g. deletionof a version / deletion of an entire object).
                                                                  Number of physical objects to delete
                                                                  Number of source/delete PHIOs (SRC / DEL PHIOs) found in the analysisthat can be deleted.
                                                                  The actual number of really deleted versions can vary greatly since inthe analysis only the versions of the source formats (SRC PHIOs) and thedeleted objects (DEL PHIOs) are listed. Only when the versions areactually deleted, are the associated display formats (DST PHIOs)determined. Furthermore, the total number may change due to errors whendeleting.
                                                                  The number of actually deleted versions is not available and thereforenot 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 acomma (","). The relevant values for starting the deletion report for KWcontents cannot be determined without a detailed evaluation of thehistory tables. List of entries:
                                                                    Area of selected folders, or the technical name of the completelyselected 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 explicitlanguage 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 thisnumber.
                                                                    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 theoptions 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 togetherwith deletion mode for structures / content objects, for which all bestPHIOs are retained (option 5 or 8).
                                                                    Upload exception list
                                                                    Value "X" means that an exception list has been uploaded for targetedretention 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 transactionKW_IO_DEL_TR. In particular, it is important to be able to ascertain thetransport requests to which info objects belong, just in case too manySAP contents were deleted.
                                                                      RESET N2
                                                                      RESET N1

                                                                      Activities
                                                                      The report searches through a complete area or selected folders forstructure/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 meansthat you can consider processing structure objects in dialog mode, evenif 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 inthese folders is relatively small. In particular with the actualdeletion, it is preferable to run the report in the background to avoidinconsistencies caused by the report terminating due to the runtimelimit of dialog work processes.
                                                                                • Before running the deletion report for content objects, the report
                                                                                • should already have been run for structure objects. Background: Ifobjects are still being used (e.g. by references from structures), thesecontents 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 therequired 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 thestructures are actually deleted. These objects are then retained inde
                                                                                      pendently of the context area specified for the deletion.