SAP BW - PSA/Change Log Deletion Governance

Similar documents
Program to Find Where used List of a Query for Web Template (3.5), Work Books and RRI

Step by Step Method for File Archival in BW

Extracting Missing Fields of Data Source Which Are Present In Their Extract Structure

Process Chain Log Deletion

DB Connect with Delta Mechanism

Step by Step Procedure for DSO Creation

Customized Transaction to Trigger Process Chain from Failed Step

Generate Export Data Source

How to use Boolean Operations in the Formula as Subsidiary for IF Condition

SAP BW Copy Existing DTP for Data Targets

Standalone BW System Refresh

Database Statistics During ODS Activation

Triggering the Process Chains at Particular Date using Events

Performance Management in Data Loading: an Overview

Recreating BIA Indexes to Address the Growth of Fact Index Table

Creation of Sets in SAP-ABAP, How to Read them INI SAP-ABAP Reports

ABAP Code - Recipients (Specific Format) SAP BW Process Chain

SAP Net Weaver 400s BI 7.0For more information, visit the Business Intelligence homepage.

Procedure to Trigger Events in Remote System Using an ABAP Program

About ITAB Duplicate_Key (SAP lrsaods) Runtime Error

Using Query Extract to Export Data from Business warehouse, With Pros and Cons Analyzed

Reporting Duplicate Entries

Explore to the Update Tab of Data Transfer Process in SAP BI 7.0

Custom Process types Remote Trigger and End Time

How to Default Variant Created for Report Developed In Report Painter/Writer

Step By Step: the Process of Selective Deletion from a DSO

Linking Documents with Web Templates

Using Radio Buttons in Web Template

Easy Lookup in Process Integration 7.1

Data Flow During Different Update Mode in LO Cockpit

Performance Tuning in SAP BI 7.0

Creation of Key Figures with Higher Decimal Place Precision

How to Create and Schedule Publications from Crystal Reports

Reading Enhanced DataSource fields for the Remote Cube

ABAP Code Sample to Report IDOCs in Error

Errors while Sending Packages from OLTP to BI (One of Error at the Time of Data Loads through Process Chains)

Using Nested Exception Aggregation in BEx Reports- Scenario

Restricting F4 (Input Help) Values While Running a SAP BW Query

Implementing Customer Exit Reporting Variables as Methods

POWL: Infoset Generation with Web Dynpro ABAP

How to Display Result Row in One Line While Reporting On Multiproviderer

Developing Crystal Reports on SAP BW

How to Create Top of List and End of List of the ALV Output in Web Dynpro for ABAP

Common Production Failures Encountered at BW Production Support

Routines in SAP BI 7.0 Transformations

How to Create View on Different Tables and Load Data through Generic Datasource based on that View

Customizing Characteristic Relationships in BW-BPS with Function Modules

Table Row Popup in Web Dynpro Component

Setting up Connection between BW and R/3 for Data Load

Cut Over Activities Specific for LIS* Data Sources

How to Broadcast BEx Workbooks using BW Pre-calculation Server and through Process Chains

Data Source Replication and Activation of Transfer Structures

MDM Syndicator: Custom Items Tab

Step by Step Guide on How to Use Cell Definition in BEx Query

MDM Import Manager - Taxonomy Data (Attribute Text Values) Part 3

Step by Step Guide How to Use BI Queries in Visual Composer

All about Compression

Limitation in BAPI Scheduling Agreement (SA) Create or Change

Implying Security on Business Object XI 3.1 Universe having SAP BW as Source

Add /Remove Links on ESS Home Page in Business Package 1.5

Using Customer Exit Variables in BW/BI Reports: Part - 14

BW Reconciliation. Applies to: Summary. Author Bio

Data Extraction & DS Enhancement in SAP BI Step by Step

How to Check BW system Before Go-Live

Psuedo-deltas: An Approach Customized for WFM/iTime Data Extraction

A Simple search program for Dictionary objects

Data Mining: Scoring (Linear Regression)

Step by Step Guide to Enhance a Data Source

Open Text DocuLink Configuration - To Access Documents which are Archived using SAP

Replacement Path: Explained with an Illustrated Example

Performance Optimization of Long Running Queries Using OLAP Cache

Extraction of Hierarchy into Flat File from R/3 and Loading in BW System

ABAP Code - Read SAP BW Infoprovider (Infocube, DSO, Multiprovider) Data using ABAP Code

SMT (Service Mapping Tool)

Real Time Data Acquisition (RDA) Overview and Step-by-Step Guide (SAPI and Web Services)

Integration of Web Dynpro for ABAP Application in Microsoft Share Point Portal

Maintaining Roles and Authorizations in BI7.0 - RSECADMIN

SDN Community Contribution

Step-By-Step guide to Virtual InfoCube Implementation

How to Write Inverse Routine with Expert Routine

Download SAP Query Output to Local/ Network Folders in Background

Step by Step Guide to Creating a Process Type to Close an Open Request in a Cube in BI 7.0

Positioning of CML of SAP s LSA with NLS SAND as Archiving Technology

Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable

Tracking Zero Record Loads

How to Work with F4 Input Help Effectively in BEX

How to Reference External JAR Files in Web Dynpro DC in SAP NW Portal 7.3

SAP BI BO Unit/Currency Logic for Unknown Units Case Study

To Check the Files/Reports in Application Server and Trigger Mail Alerts

Analysis Process Designer (APD) Step by Step Business Intelligence

List of Values in BusinessObjects Web Intelligence Prompts

A Step-by-Step Guide on IDoc-ALE between Two SAP Servers

Server Connectivity and Data Load from Non SAP System to BW

Freely Programmed Help- Web Dynpro

Material Listing and Exclusion

Data Mining: Decision Trees

Open Hub Destination Basics

Creating Custom SU01 Transaction Code with Display and Password Reset Buttons

Changing the Source System Assignments in SAP BW Objects without Affecting the Data Modeling

Universal Worklist - Delta Pull Configuration

Transcription:

SAP BW - PSA/Change Log Deletion Governance Applies to: SAP Net Weaver 2004s BI 7.0 Ehp1 SP 05. For more information, visit EDW homepage Summary This article suggests importance of PSA/Change log deletion process and governance around it. In any BW database one third space is being occupied by the PSA/Change Log. A proper strategy should be there with business involvement for PSA/Change Log Deletion and expectations set accordingly. Author: Pradeep Banwar Company: Infosys Technologies Limited Created on: 15 th October 2010 Author Bio The author has been associated with Infosys Technologies Limited for 3 years and has been in a Sr, consultant role in the Process and Domain consulting Stream. He has been involved in a BW upgrade and is currently placed as the Platform lead of the complex Enterprise Data Warehouse Platform of a renowned Client in this domain. 2010 SAP AG 1

Table of Contents Introduction... 3 Importance of PSA/Change Log... 4 Audience & Recommended Use... 4 Need for Governance... 5 Challenges... 6 Steps to Overcome Challenges... 7 Step 1: PSA/Change log Process chain failing for few variants.... 7 Step 2: PSA/Change Log not scheduled for deletion... 8 Step 3: Details of Custom built ABAP Program... 8 References... 13 Disclaimer and Liability Notice... 14 2010 SAP AG 2

Introduction Even the most modern and technologically advanced database systems can suffer from performance bottlenecks caused by large volumes of data. In applications, this can lead to poor system performance, while from an administration point of view, it can cause increases in the use of resources. High volumes of data can also have a considerable effect on the total cost of ownership of a system, despite falling storage prices. According to SAP Data Volume Strategy, data deletion is also one of the methodologies used to check potential size and growth reductions. In any BW database One third space is being occupied by temporary data (PSA and DSO Change Log ) as shown below. 2010 SAP AG 3

Importance of PSA/Change Log Persistent Staging Area stores data in the original format while being imported from the source system, PSA allows for quality checks before the data are loaded into their destinations such as ODS objects or Info cubes Persistent Staging area is used as a temporary space to hold data before it is loaded to the SAP BI system. As the operational system OLTP cannot be kept out of service for long, we use the PSA. All the data in the source system is copied as it is to the PSA. Transformations are then carried out on PSA data before it gets loaded in the SAP BI system. If we set the PSA when we are extracting data, you get improved performance. The temporary storage facility in the PSA also allows to check and change the data before the update into data targets. In contrast to a data request with IDocs, a data request in the PSA also gives various options for a further update of the data in the data targets. The possible coupling of the loading process from the further processing in BW likewise contributes to an improved loading performance. The operative system is not debited if data errors first appear with further processing. A persistent staging area is the foundation that provides this functionality. When bugs are found in the load process or the business wants to change the rules, we can design a systematic approach to removing, reloading and tracking data loads as it propagates throughout the warehouse. Audience & Recommended Use The entire BW community specially the Production Support team. The Service Delivery team and Platform Team also needs to be aware of the situation. The Stake holders involved during the implementation and later during maintenance. 2010 SAP AG 4

Need for Governance PSA Occupies one third of the BW Database space. It is very important that PSA s should be deleted periodically. PSA/Change log deletion should be scheduled via process chains when data loads are not running and user activity is minimal. The PSA deletion Strategy should be reviewed every year. After successful completion of the project it is often forgotten to schedule PSA/Change log data deletion jobs Strict Governance should be in place so that PSA deletion in included for the new projects going live. Improves overall performance of the system Importance of PSA/Change Log Deletion. In any BW database One third space is being occupied by the PSA/Change Log. A proper strategy should be there with business involvement for PSA/Change Log Deletion and expectations set accordingly. Strategy should be to define retention times for PSA records for all Data Sources as well as for DSO change logs and delete outdated data. Schedule regular deletion accordingly. 2010 SAP AG 5

Challenges With the new functionality of EhP1 we need to give the DSO name in the change log deletion variant which is being done by F4 functionality. All the DSO s are not getting captured at one go and there are chances when the Change logs are not getting deleted. In big landscapes the PSA/Change log count are in thousands and it is impossible to find out which PSA s/change logs are not getting deleted. ST14 transaction also shows the top xx PSA & Change Log tables but this is internal SAP transaction and not is use always. A few Change log and PSA variant are not getting executed successfully and below error appears. Change Log PSA 2010 SAP AG 6

Steps to Overcome Challenges Step 1: PSA/Change log Process chain failing for few variants. Identify the PSA s which are not getting deleted inspite of repeated running of process chains. Check whether SAP Note 1063105 (PSA Clean up Directory) is implemented in the BW system or not. Then execute the report SAP_PSA_PARTNO_CORRECT for the concerned PSA first in check and then in repair mode as stated in note 1051664 as shown below. Then again execute report rsar_psa_cleanup_directory first in check mode for the concerned PSA and then in repair mode as shown below. 2010 SAP AG 7

Step 2: PSA/Change Log not scheduled for deletion Take help of a custom built ABAP program which gives out as the list of PSA s which have huge requests. It helps find out the temporary tables (PSA & Change Log) which are not getting deleted. It is particularly very helpful for big landscapes involving many temporary tables (PSAs & Change Logs) where this check would ensure proper house-keeping for the fast growing tables. Step 3: Details of Custom built ABAP Program Function is to see which PSA is not being deleted periodically and to see which PSA table is occupying significant space. REPORT : ZBW_IDENTIFY_PSA TABLES: rstsods. TYPE-POOLS: slis. TYPES: BEGIN OF ty_display, Tabname TYPE rstsods-odsname, count TYPE rscewcount, odsname(20) TYPE c, records TYPE nrows, END OF ty_display, BEGIN OF ty_rsreqicods, tabname TYPE rsreqicods-tabname, timestamp TYPE rsreqicods-timestamp, req_date TYPE sy-datum, END OF ty_rsreqicods, BEGIN OF ty_rstsods, odsname TYPE rstsods-odsname, odstech TYPE rstsods-odsname_tech, dateto T YPE rstsods-dateto, END OF ty_rstsods. DATA: wa_display TYPE ty_display, wa_rsreqicods TYPE ty_rsreqicods, wa_rstsods TYPE ty_rstsods, t_display TYPE STANDARD TABLE OF ty_display INITIAL SIZE 0, t_rsreqicods TYPE STANDARD TABLE OF ty_rsreqicods INITIAL SIZE 0, t_rstsods TYPE STANDARDTABLE OF ty_rstsods INITIAL SIZE 0. SELECT-OPTIONS: s_tabnm FOR rstsods-odsname. PARAMETERS: p_date LIKE sy-datum OBLIGATORY DEFAULT sy-datum, p_cnt TYPE c AS CHECKBOX. START-OF-SELECTION. DATA: lc_timestamp(14) TYPE c, l_timestamp TYPE rsreqicods-timestamp. CONCATENATE p_date '000000' INTO lc_timestamp. 2010 SAP AG 8

l_timestamp = lc_timestamp. SELECT tabname timestamp INTO TABLE t_rsreqicods FROM rsreqicods WHERE timestamp < l_timestamp AND typ = 'O' AND tabname IN s_tabnm. IF sy-subrc <> 0. WRITE: / 'No matching records found.'(001). EXIT. LOOP AT t_rsreqicods INTO wa_rsreqicods. lc_timestamp = wa_rsreqicods-timestamp. wa_rsreqicods-req_date = lc_timestamp(8). MODIFY t_rsreqicods FROM wa_rsreqicods TRANSPORTING req_date. ENDLOOP. SELECT odsname odsname_tech dateto INTO TABLE t_rstsods FROM rstsods WHERE odsname IN ( SELECT DISTINCT tabname FROM rsreqicods WHERE timestamp < l_timestamp AND typ = 'O' AND tabname IN s_tabnm ). SORT t_rstsods BY odsname dateto. LOOP AT t_rsreqicods INTO wa_rsreqicods. CLEAR wa_display. wa_display-tabname = wa_rsreqicods-tabname. wa_display-count = 1. READ TABLE t_rstsods WITH KEY odsname = wa_rsreqicods-tabname TRANSPORTING NO FIELDS BINARY SEARCH. IF sy-subrc = 0. LOOP AT t_rstsods INTO wa_rstsods FROM sy-tabix. IF wa_rstsods-odsname <> wa_rsreqicods-tabname. EXIT. IF wa_rstsods-dateto >= wa_rsreqicods-req_date. wa_display-odsname = wa_rstsods-odstech. EXIT. ENDLOOP. COLLECT wa_display INTO t_display. ENDLOOP. LOOP AT t_display INTO wa_display. 2010 SAP AG 9

IF wa_display-odsname <> ''. SELECT tabname INTO wa_display-odsname FROM dd02l UP TO 1 ROWS WHERE tabname = wa_display-odsname. ENDSELECT. IF sy-subrc = 0. IF p_cnt = 'X'. SELECT COUNT(*) INTO wa_display-records FROM (wa_display-odsname). ELSE. CLEAR wa_display-records. CONCATENATE '(' wa_display-odsname ')' INTO wa_display-odsname SEPARATED BY space. MODIFY t_display FROM wa_display. ENDLOOP. IF p_cnt = 'X'. SORT t_display BY records DESCENDING. ELSE. SORT t_display BY count DESCENDING. END-OF-SELECTION. DATA: wa_fc TYPE slis_fieldcat_alv, t_fc TYPE STANDARD TABLE OF slis_fieldcat_alv INITIAL SIZE 0. wa_fc-tabname = 'T_DISPLAY'. wa_fc-col_pos = 1. wa_fc-fieldname = 'TABNAME'. wa_fc-seltext_s = wa_fc-seltext_m = 'PSA Name'(005). wa_fc-outputlen = 30. APPEND wa_fc TO t_fc. wa_fc-col_pos = 2. wa_fc-fieldname = 'COUNT'. wa_fc-seltext_s =wa_fc-seltext_m = 'Num Requests'(006). wa_fc-outputlen = 12. APPEND wa_fc TO t_fc. wa_fc-col_pos = 3. 2010 SAP AG 10

wa_fc-fieldname = 'ODSNAME'. wa_fc-seltext_s = wa_fc-seltext_m = 'Table Name'(007). wa_fc-outputlen = 20. APPEND wa_fc TO t_fc. IF p_cnt = 'X'. wa_fc-col_pos = 4. wa_fc-fieldname = 'RECORDS'. wa_fc-seltext_s = wa_fc-seltext_m = 'Record Count'(008). wa_fc-outputlen = 20. APPEND wa_fc TO t_fc. CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING it_fieldcat = t_fc[] TABLES t_outtab = t_display[] EXCEPTIONS program_error = 1 OTHERS = 2. IF sy-subrc <> 0. WRITE: / 'ALV Display Error:'(003), sy-subrc. 2010 SAP AG 11

The selection screen will be as follows. The output will be as below. This program identifies both PSA and Change Log tables which are not getting deleted by seeing at the number of requests. 2010 SAP AG 12

References https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/5801 Deleting the Requests from the PSA and Change Log Tables in Business Intelligence http://www.ittestpapers.com/blogs/sap-bw--psa-and-changelog-deletion.html For more information, visit the Business Intelligence homepage. For more information, visit EDW homepage 2010 SAP AG 13

Disclaimer and Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade. SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk. SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document. 2010 SAP AG 14