Step by Step Guide to Archiving and Deleting of XML Messages in SAP NetWeaver PI

Similar documents
Embedding Crystal Reports inside ECC ALV Reports

Creating Transaction and Screen Variants

Restricting Search Operators in any Search View

SAP CRM Middleware Configurations

How to Generate Stack Xml for Ehp4 and Above Upgrade

Step by Step Guide How to Copy Flat File from Other Application Server to BI and Load through Info Package

Step by Step guide of Report-to- Report Interface in BW Reporting

Deleting the Requests from the PSA and Change Log Tables in Business Intelligence

Step by Step Guide for Language Translation Tool

How to Modify, Create and Delete Table Entries from SE16

Creation and Configuration of Business Partners in SAP CRM

ALE Settings, for Communication between a BW System and an SAP System

Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP

Reverse Transport Mechanism in SAP BI

LSMW: Upload Master Data using Batch Input Recording

Step By Step Process For Archiving

Configuring HTTPs Connection in SAP PI 7.10

SAP BW Configuration Basic System Settings

Invoice Collaboration: Self Billing Invoice

Order Split Usage in Production Orders

Working with SAP BI 7.0 Data Transfer Process (DTP)

Creating Web Service from Function Modules/BAPIs & Integrating with SAP Interactive Forms

Display Options in Transaction SE16

Configuration of Enterprise Services using SICF and SOA Manager

A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1

BW Performance Monitoring

Deleting the User Personalization done on Enterprise Portal

Query OLAP Cache Optimization in SAP BW

SAP CRM System 6.0/7.0. For more information, visit the Customer Relationship Management homepage

SAP CRM 7.0 E2C Setup: CRM via Toolset

Quick Viewer: SAP Report Generating Tool

How to Integrate CRM 2007 WebClient UI with SAP NetWeaver Portal

Step by Step Procedure to Block and Debug a CIF Queue Flowing from R/3 to APO System

How to Assign Transport Request for Language Translation?

SAP CRM-BW Adapter an Overview

Transfer of GL Master from Source SAP System to a Target SAP System through IDOCS

ABAP Proxy Interfacing

Salesforce.com Integration Using SAP PI: A Case Study

A Simplified Approach to Archiving Your Data

ABAP How To on SQL Trace Analysis

Creating New Unit of Measure in SAP BW

Configuration and Utilization of the OLAP Cache to Improve the Query Response Time

Table of Contents. Passing Data across Components through Component Controller between Two Value Nodes

Forgot or Lock "Administrator or J2EE_ADMIN" Password

SAP Workflow in Plain English

Salesforce Integration Using PI: How to Perform Query and Other DML Operations Using the Enterprise WSDL

How To Manage Work Mode On An It Calendar On An Apa System

Step by Step Guide to Extract Batch Master Data via Generic and Classification Datasource to BW

SAP NetWeaver Developer Studio 7.30 Installation Guide

SAP FI - Automatic Payment Program (Configuration and Run)

SPDD & SPAU Adjustments Handbook

Creating and Scheduling Publications for Dynamic Recipients on SAP Business Objects Enterprise

Message handling in SAP CRM Web UI

SAP CRM 7.0 for Newbies: (Part 1) Simple BOL Object Creation for CRM Webclient UI

Process Controlled Workflow SRM 7.0 (Using BRF)

Sending an Image File Through XI in a File-to-Mail Scenario

SDN Community Contribution

Integrating SAP CRM with the SAP R/3 HR module

Direct Subcontracting Process (SAP SD & MM)

Understanding DSO (DataStore Object) Part 1: Standard DSO

Creating Mobile Applications on Top of SAP, Part 1

SAP CRM Campaign Automation

SDN Contribution Beginners guide to CRM Interaction Center (IC) Winclient setup

XSLT Mapping in SAP PI 7.1

How to Create an ecatt?

Setup Guide Central Monitoring of SAP NetWeaver Proces Integration 7.3 with SAP Solution Manager 7.1. Active Global Support February 2011

Adobe Document Service Configuration and Troubleshooting Guide

Web Dynpro ABAP: ALV and Table in Popup Window

Middleware Configuration and Monitoring for Master Data Transfer from SRM to ECC

ABAP Debugging Tips and Tricks

Standard SAP Configuration of SMS through HTTP with Third Party SMS Gateway

Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration. : SAP Labs India Pvt.Ltd

Workflow Troubleshooting and Monitoring in SAP ECC 6.0

Web Dynpro: Multiple ALV Grids and Layouts in ALV

Step By Step Procedure to Create Logical File Path and Logical File Name

Credit Management in Sales and Distribution

Table of Content. SAP Query creation and transport Procedure in ECC6

Practice Fusion API Client Installation Guide for Windows

Create Automatic Mail Notification/ Alert for Process Chain Monitoring

Release Strategy Enhancement in Purchase Order

Different Types of Alerts for Process Chains. Table of Content

Extractor in R/3 and Delta Queue

Consuming Services in SOA Manager

Web Application Designer for Beginners

How to Archive Data from SAP NetWeaver BW to SAP Sybase IQ as Near line Storage

ODEX Enterprise. Introduction to ODEX Enterprise 3 for users of ODEX Enterprise 2

Organizational Management- Organizational Structure Creation

Inventory Management in SAP BW

Guidelines for Effective Data Migration

Creating Content Using SO10 Objects and Text Symbols

Converting and Exporting Data in XML Format

Using PI to Exchange PGP Encrypted Files in a B2B Scenario

Step by Step Procedures to Load Master Data (Attribute and Text) from FlatFile in BI 7.0

SAP BW - Excel Pivot Chart and Pivot Table report (Excel)

Tutorial - Creating Pop Up Window Using New Features in WebDynpro Java CE 7.1 Ehp1

How to Develop Programs for SAP Mobile RF

Oracle Exam 1z0-102 Oracle Weblogic Server 11g: System Administration I Version: 9.0 [ Total Questions: 111 ]

Data Extraction and Retraction in BPC-BI

Implementing TinyMCE JavaScript HTML Editor for Web Page Composer (WPC) within the SAP Portal

Transcription:

Step by Step Guide to Archiving and Deleting of XML Messages in SAP NetWeaver PI Applies to: SAP NetWeaver Process Integration 3.0 / 7.0 / 7.1. Summary This document explains the step by step procedure of archiving and deleting of XML messages in SAP NetWeaver Process Integration. The document covers the archiving and deleting procedure only at Integration Engine level (ABAP Stack). Author: Netrey R. Powdwal Company: Tata Consultancy Services Created on: 27 August 2010 Author Bio Netrey is SAP NetWeaver PI Consultant from Tata Consultancy Services. He has 4 years of experience in the industry with SAP ABAP and Process Integration expertise. 2010 SAP AG 1

Table of Contents Introduction:... 3 Configuration:... 4 Global path for archiving files:... 5 Assignment of physical path to logical path:... 5 Logical file name definition: cross client... 6 Archiving object-specific customizing:... 6 Activation of archive infostructure: SAP_BC_XMB... 7 Interfaces for archiving:... 7 Rentention periods:... 8 Asynchronous messages:... 8 Synchronous messages:... 8 History Entries:... 8 Archive Job Scheduling:... 9 Viewing archived messages:... 10 Delete Job Scheduling:... 11 Housekeeping Job ZBC_XMB_REFRESH_ADAPTER_STATUS:... 12 Conclusion:... 13 Related Content... 14 Disclaimer and Liability Notice... 15 2010 SAP AG 2

Introduction: Problem statement: Tables that store the XML messages in PI are rapidly growing and you are running out of disk space. As a temporary measure, you increased the table space, but this is afterall a temporary solution. The disk space is limited and if you go on increasing the disk space like this then you will run out of the entire disk space soon and it will affect the performance of the system badly. It might also bring the entire PI system down and all message transfers will come to halt. The growing table space is a serious threat to the system and you need to quickly find a solution to clear the XML messages and reduce the disk space usage. Preparations: Before we start the configuration, it s a good idea to note down the current status of the system. i.e. current table space comsumption so that we can compare the results after archiving and deleting to see the reduction in table space. For this, go to transaction SARA, enter the archiving object BC_XMB and click on Database Tables button. Select All Tables radio button and click on Space Statistics button to see the table space statistics. Note: As mentioed earlier, this document deals with messages at Integration Engine level only. It does not involve handling of messages at Java stack (Adapter Engine). The main tables that grow rapidly with growing traffic in PI are, SXMSPMAST: Integration Engine: Message Queue (Master) SXMSCLUR: XMB Resources Cluster SXMSCLUP: XMB Property Cluster Go to transaction SE11 and open these tables and check the Number of Entries in each of these. Program RSXMB_DEL_TO_ARCH: This is a very useful program. There are mainly 2 types of messages in PI; messages that are marked for archiving and those marked for deletion. By default, the message will be marked for deletion. We need to explicitly confiture interfaces so that those messages will be marked for archiving. This configuration needs to be done even before sending the very first message in PI. If this configuration is not done already then all messages in PI will be marked for deletion. We can use the program RSXMB_DEL_TO_ARCH to change the deletion flag of these message to archiving flag. Note that this action is irreversible. Field ITFACTION of the table SXMSPMAST stores the flag. We can check this table after executing the program to see if the flag has been updated properly. This program takes a great amount of time to execute depending on the amount of messages that are read as per input criteria. It is recommended to run this program in background. Also, enter the maximum possible value in Maximum Runtime (s) parameter (E.g. 86,400 seconds). Do not forget to remove the Test Mode checkbox before executing. 2010 SAP AG 3

Configuration: Now we come to the actual configuration part. Follow the given path to reach the following screen. SPRO > SAP Reference IMG > Cross Applicaton Components > General Application Functions > Mass Data Archiving > Cross-Archiving Object Customizing Check if all the settings are as per shown in the screen below. Cross-Object Customizing Data Archiving: Details 2010 SAP AG 4

Global path for archiving files: Now follow the below path to configure the archive file settings. SPRO > SAP Reference IMG > Cross Applicaton Components > General Application Functions > Mass Data Archiving > Create Logical File Path Here I have created a logical file path ARCHIVE_GLOBAL_PATH Assignment of physical path to logical path: Once we create a logical path, it has to be assigned to the physical path on the disk. Click on Assignment of Physical Paths to Logical Path. Mention the physical path as shown below. <FILENAME> is a placeholder which will contain the actual file name at runtime. 2010 SAP AG 5

Logical file name definition: cross client Click on Logical File Name Definiton to specify the file name format for the archive file. I have created a file with the format <PARAM_1>_<PARAM_3>_<DATE>_<TIME>_<PARAM_2>.ARCHIVE. Here, PARAM_1, PARAM_2, PARAM_3, DATE and TIME are variables that will be populated at runtime. Including Date and Time in file name ensures the uniqueness of the file name. Archiving object-specific customizing: Follow the path SPRO > SAP Reference IMG > Cross Applicaton Components > General Application Functions > Mass Data Archiving > Archiving Object-Specific Customizing. Select archiving object BC_XMB and click on Details. Select the logical file name that we created in earlier step. Check all the settings are as per the screenshot below. Select the radio button Start Automatically under Delete Jobs. This will start the archive-delete job once the archive job is complete. I am using the naming convention archive-delete job here to avoid confusion with the delete job. Delete job deletes all messages which are marked for deletion whereas archive-delete job deletes messages which are marked for archive once they are archived by the archive job. 2010 SAP AG 6

Activation of archive infostructure: SAP_BC_XMB Open transaction SARJ (or follow the path SARA > Information System > Customizing). Press F4. Select Archive Infostructure SAP_BC_XMB for archive object BC_XMB and click on Activate. Interfaces for archiving: Follow the path SXMB_ADM (t-code) > Define Interfaces for Archiving and Retention Periods. Mention all the interfaces for which you intend the archive the messages. Click on Multiple Selection > Select all required interfaces > Press F8. All interfaces will apprear under Interfaces to Be Archived. Messages of all interfaces that are excluded here will be marked for deletion. In future, if new interfaces are added to the system then entry has to be made here for archiving. Otherwise, those messages will also be marked for deletion by default. 2010 SAP AG 7

Rentention periods: Once you are done adding all the interfaces to the list, click on Retention Periods button to jump to the following screen. Here you can mention the period for which the messages should be retained in database before they are archived or deleted. Below is the explanation of various parameters maintained in the screenshot below. Asynchronous messages: XML Messages Without Errors Awaiting Deletion: (1 Day) Messages which are older than a day and are marked for deletion will be deleted forever from the database tables. This will not affect the messages which are marked for archive. XML Messages Without Errors Awaiting Archiving: (30 Days) Messages which are older than 30 days and are marked for archive will be archived to a file and deleted from the database tables. Synchronous messages: XML Messages Without Errors Awaiting Deletion: (1 Day) Messages which are older than a day and are marked for deletion will be deleted forever from the database tables. XML Messages Without Errors Awaiting Archiving: (0 Days) Synchronous messages which are successful will be deleted immediately. History Entries: History Entries for Deleted XML Messages: (30 Days) History entries are required for QOS Exactly Once. It is recommended to keep history entries at least for 7 days. 2010 SAP AG 8

Archive Job Scheduling: Now we are ready to schedule the jobs. Go to transaction SXMB_ADM and select Schedule Archiving Job Maintain Start Date and Spool Parameter and click on Schedule Archiving. Once the job is scheduled, click on Job Overview to see the job. 2010 SAP AG 9

Viewing archived messages: Go to transaction SXMB_MONI and select Archived XML Messages (Seach Using Archive) Select the archive file and press Enter. Note that if the File Status is shown as Delete Completed then archiving was done successfully. You will see the messages which were archived. 2010 SAP AG 10

Delete Job Scheduling: Go to transaction SXMB_ADM and select Schedule Delete Jobs. Select both the checkboxes, enter the start date, time and period (to schedule periodic job) and press F8. Click on Jobs button to see the scheduled delete job. Once the delete job is complete, you will be able to see the total number of records affected in the Job Log. 2010 SAP AG 11

Housekeeping Job ZBC_XMB_REFRESH_ADAPTER_STATUS: Create a job with program SXMS_REFRESH_ADAPTER_STATUS and schedule it periodically to update status of successful messages. If you have receiver Idoc communication channels, sometimes the delivery status of the Idocs is not know to the PI system and the message status does not change to Final. These messages are excluded when the delete job runs. To avoid this, schedule this job, say weekly, to update the message status. 2010 SAP AG 12

Conclusion: Congratulations! You have successfully configured PI system to archive and delete XML messages. Now the next step is to verify the configuration. In the beginning we had noted down the system status before archiving. Now same steps need to be performed to check the system status after archiving i.e. we will check the number of table entries of all critical tables mentioned above. This will ensure that the messages were actually archived and deleted and the setup was successful. 2010 SAP AG 13

Related Content PI Archiving Conceptual Overview Wiki on SCN Archiving and Deletion in PI on SAPTechnichal Archiving and Deleting on SAPHelp Introduction to Data Archiving on SAPHelp SAP Notes: 872388 Section 5 k 2. 872388 Section 5 k 1. 1042379 789352 1239882 842187 862423 2010 SAP AG 14

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 15