• No results found

BIT670 - Programming Display Functions

N/A
N/A
Protected

Academic year: 2021

Share "BIT670 - Programming Display Functions"

Copied!
234
0
0

Loading.... (view fulltext now)

Full text

(1)

©SAP AG 2003

Programming Display Functions

THE BEST-RUN BUSINESSES RUN SAP

© SAP AG 2003

BIT670

Programming Display Functions

„ SAP R/3 – Release Enterprise „ 2003/Q3

(2)

©SAP AG 2003

Copyright 2003 SAP AG. All rights reserved.

No part of this publication may be reproduced or transmitted in

any form or for any purpose without the express permission of

SAP AG. The information contained herein may be changed

without prior notice.

All rights reserved.

Copyright

Trademarks:

„ Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.

„ Microsoft®, WINDOWS®, NT®, EXCEL®, Word®, PowerPoint® and SQL Server® are registered trademarks of Microsoft Corporation.

„ IBM®, DB2®, DB2 Universal Database, OS/2®, Parallel Sysplex®, MVS/ESA, AIX®, S/390®, AS/400®, OS/390®, OS/400®, iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere®, Netfinity®, Tivoli®, Informix and Informix® Dynamic ServerTM are trademarks of IBM Corporation in USA and/or other countries.

„ ORACLE® is a registered trademark of ORACLE Corporation.

„ UNIX®, X/Open®, OSF/1®, and Motif® are registered trademarks of the Open Group. „ Citrix®, the Citrix logo, ICA®, Program Neighborhood®, MetaFrame®, WinFrame®,

VideoFrame®, MultiWin® and other Citrix product names referenced herein are trademarks of Citrix Systems, Inc.

„ HTML, DHTML, XML, XHTML are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology.

„ JAVA® is a registered trademark of Sun Microsystems, Inc.

„ JAVASCRIPT® is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape.

„ MarketSet and Enterprise Buyer are jointly owned trademarks of SAP AG and Commerce One. „ SAP, SAP Logo, R/2, R/3, mySAP, mySAP.com, and other SAP products and services mentioned

(3)

©SAP AG 2003

Course Prerequisites

z

BC400

BC405

BC410

BC660 or comparable knowledge about SAP

Data Archiving

(4)

©SAP AG 2003

Target group

Participants

z Data archiving project team members who have to develop their own client-specific read programs.

Duration

(5)

© SAP AG BIT670 1-1  SAP AG 2003

Contents

Course Overview

l

Course Goal

l

Course Objectives

l

Course Content

l

Course Overview Diagram

(6)

 SAP AG 2003

This course will prepare you to:

l

Understand the logic of the write, delete and

read programs used in data archiving

l

Learn how to create customer-specific write,

delete and read programs

l

Create field catalogs and infostructures in

SAP AS

l

Use SAP AS to display original documents for

an R/3 business object that were archived via

SAP ArchiveLink

(7)

© SAP AG BIT670 1-3  SAP AG 2003

At the conclusion of this course, you will be able to:

l

Create customer-specific archiving objects

l

Create field catalogs in SAP AS

l

Explain how to empty customer-specific tables

via customer-specific archiving objects

l

Explain how to expand existing archiving objects

to include customer-specific tables

(8)

 SAP AG 2003

Chapter 4

Write and Delete

Programs

Chapter 5

Sequential

Read Programs

Chapter 6

Index-Based Read

Programs

Chapter 1

Course Overview

Chapter 2

The Data Archiving

Process

Chapter 3

ADK Development

Tools

Preface

Course Content

(9)

© SAP AG BIT670 1-5  SAP AG 2003

Course Overview Diagram

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

!"

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

(10)

 SAP AG 2003

l

Your company, TablesRUs, has initiated a data

archiving project and you are part of the project

team.

Your team, together with the relevant departments,

has identified the following requirements for your

data archiving project:

n You need to create your own archiving objects. n You need to be able to carry out rapid, index-based

read accesses to archived data.

(11)

 SAP AG 2003

l

Business Object and Archiving Object

l

The Process of Data Archiving

Contents

(12)

 SAP AG 2003

l

Describe the process of Data Archiving

l

Explain the relevant components

At the conclusion of this unit, you will be able to:

(13)

© SAP AG BIT670 1  SAP AG 2003

The Data Archiving Process: Overview

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

!"

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

(14)

 SAP AG 2003

The Data Archiving Process: Business Scenario

l

The user department, IT department, and the

project team meet to discuss the existing data

archiving solution within their enterprise.

l

They also list the options in the standard SAP

System for accessing archived data.

(15)

© SAP AG BIT670 1  SAP AG 2003

What Is Data Archiving?

Table VBAK 6320 6321 ... Table VBUK 6320 6321 ... Table VBPA 6320 10 6321 10 ... ... ... Order 6320 Order 6321

Archiving object SD_VBAK

Database SAP Business object SAP Archiving object ADK Files in the file system ...

n Data archiving means data records are extracted from the database tables of the SAP system database

and written to at least one archive file. Data archiving is done using an archiving program and is based on archiving objects.

n The contents of business objects of the SAP system are distributed over several database tables.

Archiving objects group together the logically linked tables of business objects.

This ensures that during archivingall data for a business object is extracted from the database and

deleted.

n Archived data can be accessed using reports, provided by the applications. It is also possible to

create customer-specific reports.

(16)

 SAP AG 2003

Data Objects in R/3

001 1000 1900000 1999 KR 1.2.99 5.2.99 ... 001 1000 1900001 1999 KR 1.2.99 5.2.99 ... 001 1000 1900002 1999 KR 1.2.99 5.2.99 ... ... 001 1000 1900000 1999 50 02 157,60 134,50 001 1000 1900001 1999 50 02 45,30 33,70 001 1000 1900002 1999 50 02 230,00 200,40 ... Table BKPF 001 1000 1900000 1999 001 A1 175000 01 H 001 1000 1900001 1999 001 A2 175000 02 H 001 1000 1900002 1999 001 A0 400000 01 H ... ... 1000 1900000 1999 1000 1900001 1999 1000 1900002 1999 ... R/3 Business Object Table BSEG Table BSET R/3 Database Tables Unique Key

n R/3 business documents are distributed across different tables in the R/3 database. n FI document 1000 1900000 1999 is a concrete business object.

n In data archiving, all table records belonging to a business object are written together (in context) to

(17)

© SAP AG BIT670 1  SAP AG 2003

The Archiving Process

Archiving object

R/3 Database

Data archiving session

Archive files Offline storage File system optional / manual

R/3

R/3

Database

Database

Business Objects

n The data archiving process is composed of two steps.

Creation of archive files - The write program writes the files for archiving from the R/3 database to

archive files.

Deletion of data - The delete program first reads the data in the archive files and then deletes the

records from the database.

n Thestorage of archive files on a tertiary storage medium can be seen as a third step in the archiving

process. Depending on the storage medium and the customizing settings, this step can take place either before or after the delete phase.

You should consider this third step to be part of the archiving process: It is not generally enough to write the data to be archived to archive files and delete it from the database. The archive files must be stored and managed to guarantee future access when required.

(18)

 SAP AG 2003 Archiving-objects FI_DOCUMNT SD_VBAK SD_VBKA SD_VBRK RV_LIKP CO_ITEM AM_ASSET MM_EBAN MM_EKKO IDOC WORKITEM PS_PLAN CO_ORDER ...

Archiving Objects (1)

Structure Definition Archiving and Delete Programs

Archiving Classes Used Customizing Technical Settings Customizing Residence Times/Application Read Programs Additional Indicators (e.g. 'Interruption Possible') For every

archiving object information about the points on the right is

available in the system Transaction AOBJ

n An archiving object must have at least one write and one delete program.

Optional programs are read, pre- and post-processing, as well as reload programs.

n The maintenance transaction is AOBJ.

n An example of additional indicators is 'Interruption Possible', which enables you to interrupt a write

program.

n In application-specific customizing you enter criteria - e.g. if or as of when data can be archivable. In

addition to these criteria, the application (the write program) must check if a business object has the status 'Completed' so that the object can be archived.

(19)

© SAP AG BIT670 1  SAP AG 2003 Structure Definition Table BKPF Structure Definition Table BSET Structure Definition Table BSEG Structure Definition Table BVOR Structure Definition Table BSEC

Archiving Objects (2)

... Archiving Object FI_DOCUMNT

TheSTRUCTURE DEFINITION of an archiving object describes

which tables are to be processed during data archiving

AnARCHIVING OBJECTis a set of linked business data, which is periodically extracted from the database, archived, and deleted according to individual criteria

from the current system.

n Additional examples of archiving objects:

SD_VBAK Data structure Orders

SD_VBKA Data structure Sales activities RV_LIKP Data structure Deliveries PP_ORDER Data structure Production orders

n R/3 Release 4.6 contains more than 200 standard archiving objects. n Archiving objects are defined by the individual applications.

(20)

 SAP AG 2003

Data Archiving: Step 1 - Archiving Data

Write Program Archive Archive file file R/3 R/3 Database Database

n During the first step, the write program creates an (initial) archive file.

The data to be archived is read from the database by a batch process and written to the archive file. This process continues until one of the following occurs:

1. The archiving is finished: All the data for selection has been written to the archive

2. The archiving is not yet completed but the archive file has reached the maximum size that was specified in Customizing.

3. The archiving is not yet completed but the archive file contains the number of data objects that was specified in Customizing.

n The write program has to make sure that only data of completed business processes that, based on

the customizing settings, is archivable, is actually archived.

n Master data can only be archived if a deletion indicator has been set.

Some archiving objects set the deletion indicator in a specific preprocessing program within the framework of data archiving (for example, the archiving object CO_ORDER).

(21)

© SAP AG BIT670 1  SAP AG 2003

Data Archiving: Step 2 - Deletion of Data, Option 1:

Delete Jobs Run Parallel to Archiving

Write Program

Delete program

Prerequisite:

You have marked the radio button 'Start Automatically' in the technical settings under Archiving Object-Specific Customizing

Delete jobs are started automatically after an archive file is closed

Delete program Archive Archive file file Archive Archive file file Archive Archive file file R/3 R/3 Database Database

n There is one deletion process for each archive file created. n The deletion process can be started in three different ways. n Variant 1 for starting the delete program:

After closing an archive file, ADK opens a new one and continues with the archiving process. The system starts the delete program in parallel, which reads the archived records from the file which has just been closed and deletes them from the database.

In this case, delete and write jobs run in parallel.

n For this option, the indicator 'Start Automatically' has to be set in the technical settings in Archiving

Object-Specific Customizing. Moreover, the corresponding setting has to be made in the selection screen of the write program. If this is not done, then, despite the fact that the indicator 'Start Automatically' was set, you must follow the procedure described on the next slide.

(22)

 SAP AG 2003

Data Archiving: Step 2 - Deletion of Data, Option 2:

Delete Jobs Are Started Manually

The administrator MANUALLY starts the delete jobs in the data archiving transaction after the archiving session is completed

Prerequisite:

You have NOT marked the radio button 'Start Automatically' in the technical settings under Archiving Object-Specific Customizing Delete program Delete program Archive Archive file file R/3 R/3 Database Database Archive Archive file file

n Variant 2 for starting the delete program:

The delete program is scheduled manually by the administrator once all archive files have been closed.

The archiving session is completely finished.

There is one deletion process for each archive file created.

n For this option, the indicator 'Start Automatically' in the technical settings in Archiving

(23)

© SAP AG BIT670 1  SAP AG 2003

Data Archiving: Step 2 - Deletion of Data, Option 3:

Delete Jobs Are Started Automatically

The delete jobs are started

AUTOMATICALLY after the end of the archiving session

Prerequisite:

You have marked the indicator 'Do Not Start Before End of Write Phase' in the definition of the archiving object

Delete program Delete program Archive Archive file file R/3 R/3 Database Database Archive Archive file file

n Variant 3 for starting the delete program:

The delete program is scheduled manually by the administrator once all archive files have been closed.

The write program is completely finished.

For every archive file created, a delete program is started as a batch process.

n For this option, the indicator 'Start Automatically' in the technical settings in Archiving

Object-Specific Customizing is NOT set.

n If the radio button 'Do Not Start Before End of Write Phase' in the definition of the archiving object

(24)

 SAP AG 2003

Data Archiving: Step 3 - Storage on Third Party

Storage Systems

l External storage system

connected via SAP ArchiveLink or SAP CMS

l HSM Systems

l Exclusively for file

system used with ADK Create archive files

delete archived data

'Final storage' of archive files Archive Archive file file Archive Archive file file Archive Archive file file Archive Archive file file R/3 R/3 Database

Database ArchiveArchive

file

file

n There are various ways to store and administer archive files on external storage media.

You can use archive management to find out where an archive file is located. Read/write authorizations are mandatory at UNIX-level for the directories used.

n Connection to a Heirarchical Storage Managment system (HSM): An HSM system simulates an

'infinitely large' file system. The archive files created during an archiving session are stored in the HSM file system. You just have to enter the HSM file system path in archiving object Customizing as the target path for the archive files.

n Connection to an external archive system. Up to and including 4.6B the connection takes place via

the SAP ArchiveLink Interface. If you want to store the archive files on a third party archive system, the data has to be successfully deleted from the database. As of 4.6C this connection takes place via the interface SAP CMS. With this interface it is possible to store archive files either before or after the delete phase.

n Manual administration: If you do not want to store the archive files on an external archive or in an

HSM System, then the IT department can administer the files on tapes or CDs. There is no interface to these files from SAP R/3.

n Ensure that backup strategies are in place for the relevant storage medium. It may also be necessary

(25)

© SAP AG BIT670 1  SAP AG 2003

You are now able to:

The Data Archiving Process: Summary

l

Explain the steps of the data

archiving process

n Writing data to archive files n Deleting data from the database n Storing data on third party storage

systems

l

Define an archiving object as the

central component of the data archiving

process

(26)

Exercises

Unit: The Data Archiving Process

At the conclusion of this exercise, you will be able to:

• Explain the relationship between data objects and archiving objects

• Carry out the Customizing required to start the delete jobs

1-1

Business Object – Archiving Object

1-1-1 What is data archiving?

1-1-2 What is an archiving object?

1-1-3 Where can you see which table entries can be written out of the database for a

specific archiving object?

1-2

Delete Jobs

1-2-1 Which Customizing settings do you have to make so that instead of being

scheduled immediately after an archive file is closed, the delete jobs have to be

scheduled manually?

1-2-2 Which Customizing settings do you have to make so that a delete job is

automatically scheduled immediately after an archive file has been closed?

1-2-3 Which Customizing settings do you have to make so that the delete jobs are

automatically scheduled immediately after the entire archiving session is

completed?

1-2-4 Can you remove the indicator ‘Do Not Start Before Beginning of Write Phase’

in the definition of the archiving object, if it has already been marked?

1-2-5 Can you mark the check box ‘Interruption Possible’ in the definition of the

archiving object, if it has not been marked?

(27)

© SAP AG BIT670 2-1

Solutions

Unit: The Data Archiving Process

1-1

Solution to question 1-1

1-1-1 Extracting data records from the database tables of the SAP system database

and writing them to at least one archive file.

1-1-2 An object that contains all programs and customizing settings that are necessary

to write the complete information of a business object to archive files, and also

to delete, read, etc. this information.

1-1-3 Call up transaction AOBJ. Select the archiving object. Select the dialog

structure ‘Structure definition’

1-2

Solution to question 1-2

1-2-1 Tools, Administration, Administration, Data Archiving

Enter the archiving object

Button <Customizing>

Call up ‚Archiving Object-Specific Customizing’ Technical Settings’, ‘Settings

for Delete Program’: ‘Start Automatically’ should not be selected.

1-2-2 Tools, Administration, Administration, Data Archiving

Enter the archiving object

Button <Customizing>

Call up ‚Archiving Object-Specific Customizing’ Technical Settings’, ‘Settings

for Delete Program’: ‘Start Automatically’ must be selected.

1-2-3 Call up transaction AOBJ

Double click on the archiving object

'Do Not Start Before End of Write Phase' must be selected

1-2-4 For archiving objects delivered by SAP: No!

(28)

 SAP AG 2003

Contents

l

Overview of the ADK Programming Interface

l

What are archiving classes and what are they used for?

(29)

© SAP AG BIT670 3-2  SAP AG 2003

l

Name the components of the ADK Programming

Interface.

l

Understand how to use and apply archiving

classes.

At the conclusion of this unit, you will be able to:

ADK Development Tools: Course Objectives

(30)

 SAP AG 2003

ADK Development Tools: Overview

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

!"

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

(31)

© SAP AG BIT670 3-4  SAP AG 2003

ADK Development Tools: Business Scenario

l

Before developers can begin to work, they need

to familiarize themselves with the ADK

Programming Interface.

(32)

 SAP AG 2003

ADK Programming Interface - ADK API

l

ADK includes a series of function modules that are used

by all programs on a cross-application basis during data

archiving

l

These function modules write data to and read data from

archive files.

l

The selection of data for archiving or deletion (that is,

database access) must be defined in archiving and

deletion programs in the relevant application.

n In addition to reading and writing data, ADK also undertakes conversion tasks during the data

archiving process, for example:

Codepage changes (for example, HP/UX to AS/400)

Format conversion (for example, Compaq/Alpha to HP/UX) Structure changes (for example, additional table fields) Data compression and decompression

n Since Release 3.0, ADK is the only means of archiving data from R/3 database tables.

(33)

© SAP AG BIT670 3-6  SAP AG 2003

ADK API - Function Group ARCH (1)

ADK function modules used in archiving programs

ARCHIVE_CLOSE_FILE ARCHIVE_GET_INFORMATION ARCHIVE_GET_NEXT_OBJECT ARCHIVE_GET_NEXT_RECORD ARCHIVE_GET_NEXT_STRUCT_SPECIF ARCHIVE_GET_OPEN_FILES ARCHIVE_GET_RECORD_INFO ARCHIVE_GET_STATISTICS ARCHIVE_GET_TABLE ARCHIVE_GET_WITH_CURSOR ARCHIVE_NEW_OBJECT ARCHIVE_OPEN_FOR_CONVERSION ARCHIVE_OPEN_FOR_DELETE ARCHIVE_OPEN_FOR_MOVE ARCHIVE_OPEN_FOR_READ ARCHIVE_OPEN_FOR_WRITE ARCHIVE_POPUP_CUSTOMIZING_DATA ARCHIVE_PUT_RECORD ARCHIVE_PUT_TABLE ARCHIVE_READ_OBJECT ARCHIVE_REGISTER_CLASS ARCHIVE_RELOAD_OBJECT_DATA ARCHIVE_ROLLBACK_WORK ARCHIVE_SAVE_OBJECT ARCHIVE_SET_RECORD_CURSOR ARCHIVE_WRITE_STATISTICS

n The function group ARCH includes the function modules for access to ADK archive files. n The function group AADM contains function modules for managing ADK archive files. n The group ARCH is essential for customer developments.

n Archiving programs are created by the respective applications. The application is responsible for the

programming of the selection and check logic. The application uses the function modules listed above as the interface to ADK.

(34)

 SAP AG 2003

ADK API - Function Group ARCH (2)

ADK function modules used in delete programs

ARCHIVE_CLOSE_FILE ARCHIVE_GET_INFORMATION ARCHIVE_GET_NEXT_OBJECT ARCHIVE_DELETE_OBJECT_DATA ARCHIVE_GET_NEXT_RECORD ARCHIVE_GET_NEXT_STRUCT_SPECIF ARCHIVE_GET_CUSTOMIZING_DATA ARCHIVE_GET_OPEN_FILES ARCHIVE_GET_RECORD_INFO ARCHIVE_GET_STATISTICS ARCHIVE_GET_TABLE ARCHIVE_GET_WITH_CURSOR ARCHIVE_GET_NEXT_OBJECT ARCHIVE_GET_NEXT_RECORD ARCHIVE_GIVE_STATISTICS ARCHIVE_OPEN_FOR_CONVERSION ARCHIVE_OPEN_FOR_DELETE ARCHIVE_OPEN_FOR_MOVE ARCHIVE_OPEN_FOR_READ ARCHIVE_POPUP_CUSTOMIZING_DATA ARCHIVE_READ_OBJECT ARCHIVE_REGISTER_CLASS ARCHIVE_RELOAD_OBJECT_DATA ARCHIVE_ROLLBACK_WORK ARCHIVE_SET_RECORD_CURSOR ARCHIVE_WRITE_STATISTICS

n Delete programs are created by the relevant applications. The application uses the function modules

(35)

© SAP AG BIT670 3-8  SAP AG 2003

Where In the R/3 System Can You Find the ADK

API?

l

ADK Function modules that are available to customers

can be found in the function group ARCH

l

Path:

Tools -> ABAP Workbench -> Overview -> Object

Browser -> Function Group ARCH

l

Display of function group

Drilldown of function modules

n You can find documentation for ADK under the following path in the SAP Library:

SAP Web Application Server - ABAP Workbench (BC-DWB) - BC Extended Applications Library-Archive Development Kit

(36)

 SAP AG 2003

Archiving Classes (1)

 SAP AG 1999

l

Archiving Classes

n Function modules and form routines for a business object that is

not archived separately. It is reused within the system and archived together with other objects.

n Examples of archiving classes:

SAPscript Texts Change Documents Variant Configuration SAP ArchiveLink Entries IDOCs Work Items HR Time Data HR Trip Data CO Settlement Documents ...

n Release 4.6 contains 57 archiving classes.

n Archiving classes are maintained in transaction ACLA.

n Class-specific function modules are useful for customer-specific function modules that are required

to read data from archiving classes.

(37)

© SAP AG BIT670 3-10  SAP AG 2003

Archiving Classes (2)

1000 19000000 1994 1000 19000001 1994 1000 19000002 1994 1000 19000003 1994 . . . . . . . . . . . . . . . . 1000 19999999 1994 4500000551 1994 4500000552 1994 4500000553 1994 4500000554 1994 . . . . . . . . . . . . . . . . 4500000999 1994 Table BKPF Change DocumentsArchiving Class

Table CDHDR Table VBAK

Data archiving is

done using an archiving object done using an archiving objectData archiving is Change1 1994 to 1000 19000001 1994 Change2 1994 to 1000 19000001 1994 Change1 1994 to 1000 19999999 1994 Change1 1994 to 4500000552 1994 Change1 1994 to 1000 19000003 1994 Change1 1994 to 4500000554 1994 Change1 1994 to 4500000551 1994 ... Data archiving is done using an archiving class

n Use of archiving classes:

The figure shows how during the archiving of FI and SD documents the function modules for the archiving of change document tables are called up and how the change documents of the R/3 business objects are stored together with these objects in the archive file.

Similarly, change documents in other R/3 applications are also archived together with their corresponding business objects.

n Archiving classes collect change documents.

n The archiving class Changedocu archives not only from CDHDR, but also from the second table

CDPOS.

n Data from archiving classes can only be accessed with the function modules belonging to the

archiving class itself.

These function modules, which are tailored specifically to suit the archiving class data, are developed by the relevant applications.

n Data that is stored using archiving classes is not transparent for ADK. ADK cannot interpret the data.

While reading the archived data ADK needs a read function module from the archiving class to access the data.

(38)

 SAP AG 2003

Archiving Classes (3)

l

Using Archiving Classes

n Processing of complex, cross-archiving-object logical data

objects

n Data structures are used and archived by different

applications

l

Archiving classes are created by the responsible persons

from the development area

n NOTE:

Archiving class development does not belong to the ADK development environment, which is released to customers.

(39)

© SAP AG BIT670 3-12  SAP AG 2003

Archiving Classes (4)

l

Advantages of Archiving Classes

n Can be reused without extra effort

n Archiving objects can be easily expanded through new

archiving classes

n Allows you to view the object without having to worry about

where the data is physically stored

n Preservation of data integrity

n Encapsulation of data and its methods

n Central implementation of archiving functionality

n Archiving classes reflect an object-oriented approach and encapsulate the methods for accessing

data.

Because of the data encapsulation, the calling program no longer has to know the specific data structures and hierarchies. By using archiving classes, you can easily archive and read data for which you have no detailed knowledge.

(40)

 SAP AG 2003

You are now able to:

ADK API: Summary

l

Explain which part of the ADK

Programming Interface can be

accessed by customers

l

Exlpain that archiving classes

can be used to reduce the size

of tables that are filled from

different applications at the

same time.

(41)

© SAP AG BIT670 3-14

Exercises

Unit: ADK Development Tools

Topic: Identifying ADK Function Modules

Identifying Archiving Classes

At the conclusion of this exercise, you will be able to:

• Find and identify ADK function modules in the system

• Explain what archiving classes are

• Identify archiving classes used

1-1

ADK Function Modules

1-1-1 Which function group contains the function modules that can be used by

customers?

1-1-2 Display the function modules

1-1-3 Which modules are used in the write program, and which in the delete program?

1-2

Archiving Classes

1-2-1 For what purpose were archiving classes developed? What type of data

is archived/deleted using archiving classes

1-2-2 Who creates archiving classes?

Can customers create archiving classes?

(42)

Solutions

Unit: ADK Development Tools

Topic: Identifying ADK Function Modules

Identifying Archiving Classes

1-1 Solution to question 1-1

1-1-1 The function modules are located in the function group ARCH.

1-1-2 Tools, ABAP Workbench, Overview, Object Navigator

Choose 'Function Group'

Entry: ARCH

Push button 'Display'

Drilldown 'Function Modules'

1-1-3 Write program: Archive_open_for_write

Archive_new_object

Archive_put_record

Archive_put_table

Archive_save_object

Archive_write_statistics

Archive_close_file

Delete program: Archive_get_customizing_data

Archive_close_file

Archive_get_next_object

Archive_get_next_record

Archive_get_table

Archive_open_for_delete

Archive_delete_object_data

Archive_write_statistics

1-2 Solution to question 1-2

1-2-1 Archiving classes read and write objects to tables that are not filled directly by a

business object, but that are used as cross-application and cross-object tables in

R/3.

1-2-2 Archiving classes are created by the respective applications.

For customers we do NOT support the development of archiving classes

1-2-3 Call up transaction AOBJ

(43)

© SAP AG BIT670 4-1  SAP AG 2003

Contents:

Write and Delete Programs

l

Definition of Archiving Objects

l

Structure of Write Programs

l

Function Modules in Write Programs

l

Structure of Delete Programs

l

Function Modules in Delete Programs

l

Procedure to Extend Standard

(44)

 SAP AG 2003

At the conclusion of this unit, you will be able to:

Write and Delete Programs: Course Objectives

l

Explain the logic of write programs.

l

Explain the logic of delete programs.

l

Create a new archiving object.

(45)

© SAP AG BIT670 4-3  SAP AG 2003

Write and Delete Programs: Overview

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

!"

Ł

Ł

Ł

Ł

Ł

Ł

Ł

Ł

(46)

 SAP AG 2003

Write and Delete Programs: Business Scenario

l

The developers of customer-specific

archiving objects learn about the logic that

lies behind SAP Data Archiving.

(47)

© SAP AG BIT670 4-5  SAP AG 2003

Availability of ADK API

l

ADK is a development tool for:

n SAP developers for the development of SAP standard archiving

objects

n Customers for the development of customer-specific archiving

objects

n Customers for the development of read access to data that was

archived using standard archiving objects

n Customers who need to extend SAP standards - you can do this only

if you have a developer's key (and after consultation with SAP development)

w

Z/Y tables as extensions of SAP archiving objects

n SAP standard archiving objects archive data from SAP standard tables.

(48)

 SAP AG 2003

Creating An Archiving Object

l

Creating an archiving object:

n Transaction AOBJ

l

Information that can be entered:

n Programs for the archiving object n General characteristics

n Tables involved n Customizing settings n Archiving classes used n Network graphic

(49)

© SAP AG BIT670 4-7  SAP AG 2003

Transaction AOBJ

Dialog structure Archiving object Structure definition Table, only for delete Maintain network graphic Customizing settings Archiving classes used Read program

Customizing transaction Info tables

Assign exit routines

Object Description of the archiving object CO_KSTRG Cost Object: Master and transaction data CO_ML_BEL Material ledger documents (MLHD/IT/PP/PPF...) CO_ML_DAT Material ledger Records (CKMLPP, CKMLCR) CO_ML_IDX Index entries material documents: Ledger CO_ML_ML1 Material ledger period rates (CKML1) CO_ORDER Orders with transaction data

CO_PROCESS Business process, incl. transact. data CO_TEST Only for testing

CS_BOM PP bills of material CV_DVS Document management DATAFDLOG TR-TM: Datafeed access log EC_PCA_SUM Profit Center invoice: Totals records EIS_CF001 Archiving object for aspect CF001 EIS_CF002 Archiving object for aspect CF003 EIS_CF003 Archiving object for aspect CF003 EIS_CF004 Archiving object for aspect CF004 EIS_CF005 Archiving object for aspect CF005 EIS_CF006 Archiving object for aspect CF006 EIS_CF050 Archiving object for aspect CF050 EIS_CF501 Archiving object for aspect CF501 EIS_CF502 Archiving object for aspect CF502 EIS_CF503 Archiving object for aspect CF503 Position Entry 1 of 182

(50)

 SAP AG 2003

Archiving Object: Programs

Write and delete program

Sequential read program Preprocessing program

Index-based read program

Reload program Postprocessing program

n An archiving object needs to have at least one write program and one delete program. n Normally an archiving object also has programs for the reading of archived data.

n If necessary, the archiving object can also have a preprocessing and a postprocessing program. You

can set a deletion flag in the preprocessing program (e.g. for master data). A preprocessing program can also be an analysis program that shows which business objects cannot be archived and why (i.e. which business-related conditions they have not fulfilled).

n Also optional are the index build program and the index delete programs for directly accessing the

business object in the archive file.

However, direct access to a business object is controlled using the generic functionality of the Archive Information System (SAP AS). Index build programs that are entered in the transaction AOBJ are no longer needed with the AS.

n You can create reload programs, but these should only ever be used immediately after an archiving

(51)

© SAP AG BIT670 4-9  SAP AG 2003

Archiving Object: General Characteristics

l

Name and descriptive text

l

Application area and application component

l

Settings for write, delete, index and reload programs

l

Settings for archive management

l

Tips for the programs of the archiving object

(52)

 SAP AG 2003

Archiving Object: Tables and Technical

Customizing

l

Structure Definition

n Entry of tables that are to be archived

n These entries are the data model of the archiving object

l

Tables from which data is only deleted

l

Customizing settings

n Technical settings, such as file size, commit counter, delete

program variant, connection to external storage system

n The technical settings can be maintained by the user via

transaction SARA

n Entries in the structure definition:

Record no.: For defining the order

Parent Segment Name of the next highest structure in the hierarchy. Therefore, for the first record, this field remains empty. From Release 3.0, entries are also only for defining the order.

In Release 2.2, archiving was organized hierarchically.

Segment: Subordinate segment in the archive hierarchy. Name of the structure belonging to the archiving object. This field informs ADK (and its function module) which tables are to be processed. ADK uses the entries for the following functions:

- Meta data for the archive file to be written- Basic information for transaction DB15

Structure: If a structure name is entered here, this structure will be used for conversions. This is essential if you are working with logical databases and the structure name entered under segment is a pseudonym for a real structure. ADK uses the entries in the same way as was described for segments (see above).

n Technical Customizing:

(53)

© SAP AG BIT670 4-11  SAP AG 2003

Archiving Object: Archiving Classes and Read

Programs

l

Transaction AOBJ - Archiving Classes Used

n Archiving classes used by the archiving object are entered n An entry in transaction AOBJ means that the archiving

class is used by the archiving object

l

Transaction AOBJ - read programs

n If an entry exists for a read program, this program can be

called up from archive administration (transaction SARA)

n It is necessary to enter the archiving classes into transaction AOBJ, for transaction DB15 and the

Archive Information System to take the archiving classes into account.

n Transaction DB15 finds the tables for an archiving object, or the archiving object that belongs to a

specific table.

n The corresponding function modules of the archiving classes that are entered here, have to be called

(54)

 SAP AG 2003

Archiving Object: Application-Specific

Customizing

l

Transaction AOBJ - Customizing Transactions

n Group of transactions that require application-specific customizing n In application-specific Customizing, applications can enter criteria

for the archivability of data. During the archiving session the data is analyzed based on these criteria.

n For transaction data, this is mainly defining residence times. For

master data, this is mainly setting deletion indicators.

n The application-specific customizing settings are made by the

(55)

© SAP AG BIT670 4-13  SAP AG 2003

Examples of Archiving Objects

l

As of BASIS Release 640 example archiving object 'BC_SBOOK'

l

R/3 >= 4.5A: With some restrictions, the example archiving

object 'BC_SBOOK' can be used as an example archiving object

l

R/3 < 4.5A: Example archiving object 'EXAMPLE'

SAP AG 2003

n Caution:

The archiving object EXAMPLE only simulates deletion of data from the database.

n Functionality 'read single document' for SBOOK is realized via SAP AS;

(56)

 SAP AG 2003

Write Program: Structure

l

Define selection screen

l

Authorization check

l

Data Selection

l

Business-relevant checks for the

archivability of the data

l

Create archive file, fill logs/statistics,

produce progress messages

l

Produce logs/statistics

n Authorization checks to be implemented:

- Authorization from the different applications to write the archive file.

- Authorization from the different applications to archive the data specified in the selection screen.

n The system automatically checks the following:

- Authorization to call up ADK function modules. - Authorization to create and administer jobs.

(57)

© SAP AG BIT670 4-15  SAP AG 2003

Write Program: Selection Screen

<Object>

e.g.: Material Document Cost center

Constraints e.g.: Fiscal year

Period <Blank line> Value type Version Record type ... Options o Set deletion flag o Set deletion indicator

o Set deletion flag and deletion indicator

q Check document flow

Process Control o Test mode

o Production mode q Delete with test variant q Detail log

Comment about the archiving session

<Object> contains selections that describe the business object to be archived. Generally these are

selections for the object key and organizational units. <Object> means the description of the objects to be archived

Constraints contains further restrictions for the range of data to be archived, such as time

restrictions.

Options contains check boxes or radio buttons such as "Check ... " (e.g. Check Document Flow"),

"Deletion Flag/Set Deletion Flag".

Process Control and the Entry Field "Comments about the archiving session" always have to

exist in exactly this format. The statement “INCLUDE ARCH_WRITE_PRG_STANDARD1”

inserts a standard frame "Process Control" and the entry field "Comment about the archiving

session" into the program. You must use this include! It will allow you to more quickly create a more standardized selection screen.

Check box "Detail Log“ should only appear, when a detail log is being offered. The log contains

statistics taken from the ADK table statistics. In addition to the above-named elements, the statement “INCLUDE ARCH_WRITE_PRG_STANDARD2.” also inserts the check box "Detail Log" into

the program.

• The above-named includes are available in the standard as of BASIS 640. For Release BASIS 620 the includes are available via SAP Note 528861 and in Release 46B and 46C via SAP Note 565298.

(58)

 SAP AG 2003

Write Program: Data Selection

The Options:

1. Select all data through a SELECT statement, according to the selection criteria

2. Select all data through a SELECT statement, but using the FETCH technique, according to the selection criteria

3. Create an internal table with "selection packages/selection portions". In a LOOP via this table, issue a SELECT

statement with the FETCH technique.

n 1. Possible problems: The internal table that contains the data to be archived (result of the SELECT

statement) becomes overloaded and can break down , or it is impossible to further process the table later (organization, etc.).

n 2. Advantages: the internal table no longer breaks down. Possible problems: the cursor on the table

continues to remain open for a long time. With ORACLE databases this often leads to ORA1555 runtime errors.

n 3. Advantages: the internal table does not break down; the cursor remains open for a shorter period

of time, because the single SELECT statement is shorter. The efficiency of this solution depends on which selection packages are chosen (Remedy: use object keys or the fields of the table indexes) and which value is chosen for the PACKAGE SIZE parameter during the FETCH. Recommendation: To make sure that all packages are full, the PACKAGE SIZE should be determined by dividing 28K by the width of the row of the results table of a SELECT. It is also possible to have more than one package. (The data of the FETCH are transported in packages of 32 K, of which 28K are available for data).

n If the data that is to be archived is available in the internal table, it has to be checked for archivability

(completed processes, etc.) and whether it coincides with the settings made in archiving-object-specific Customizing (residence times, etc.). For performance reasons, this should be done via the WHERE conditions of the SELECT.

(59)

© SAP AG BIT670 4-17  SAP AG 2003

Write Program: Fill Archive Files

n ARCHIVE_OPEN_FOR_WRITE

n ARCHIVE_PROTOCOL_INIT

n LOOP etc. over the data to be archived

w

ARCHIVE_NEW_OBJECT

l ARCHIVE_PUT_RECORD / ARCHIVE_PUT_TABLE

l <Name of the archiving class>_ARCHIVE_OBJECT

(Archiving function module of an archiving class)

w

ARCHIVE_SAVE_OBJECT

w

ARCHIVE_PROTOCOL_COLLECT

w

PROGRESS_INDICATOR n ENDLOOP n ARCHIVE_WRITE_STATISTICS n ARCHIVE_CLOSE_FILE n ARCHIVE_PROTOCOL_WRITE

n ARCHIVE_NEW_OBJECT prepares a data container in the main memory.

This function module also ensures communication with any archiving classes.

n ARCHIVE_PUT_RECORD (ARCHIVE_PUT_TABLE) writes the record (a table of records) to the

prepared data container.

n <Name of the archiving class> means the archiving module of the archiving class (e.g.

TEXT_ARCHIVE_OBJECT for the archiving class TEXT).

It is used to collect archiving class data for an object and to store it in its own data area on the main memory.

n In ARCHIVE_SAVE_OBJECT, ADK takes the records from the data container and compresses it.

From the archiving classes, ADK requests the compressed archiving class data for the object and writes it to the ADK file. At present, ADK cannot subsequently decompress this data.

n ARCHIVE_CLOSE_FILE releases all resources and starts the delete program, if required.

(60)

 SAP AG 2003

ADK API: ARCHIVE_OPEN_FOR_WRITE

l

Interface parameter export

n archive_handle

l

Interface parameter import

n call_delete_job_in_test_mode, create_archive_file n object, comments

l

Capabilities of the function module:

n create archive file in the file system n generate archive handle

n In transaction AOBJ "Customizing settings" you can specify whether the delete program for the

archived data is to be called automatically.

n The archiving function modules use platform-independent file names to create new archive files. In

transaction AOBJ "Customizing Settings", you can specify the platform-independent file names that are to be used for your archiving object.

If you have not defined a file name, the system will automatically use the platform-independent file name ARCHIVE_DATA_FILE to create the server-independent file name.

n The import parameters mentioned do not come from the technical settings for the archiving object.

They are selection parameters.

In the Comments parameter, you can enter a text that is automatically saved during the session.

n The function module informs the archiving classes used and makes an entry in the archive

(61)

© SAP AG BIT670 4-19  SAP AG 2003

ADK API: ARCHIVE_NEW_OBJECT

l

Interface parameter import

n archive_handle

l

Capabilities of the function module:

n Initializing of new data object n Discarding of processed data

n This function module should always be called if a new data object is to be prepared for writing to an

archive.

n There can only be one data object per handle. When this function module is called, all of the data

from the current data object is forgotten, and all of the accompanying archiving classes are informed that the following operations with this handle belong to a new data object.

n The archiving classes will forget all of the information about the current data object.

n The system does not check whether you have stored the current data object with the function module

(62)

 SAP AG 2003

ADK API: ARCHIVE_PUT_RECORD

l

Interface parameter import

n archive_handle n record_flag n record_structure n record

l

Capabilities of the function module:

n You can use this function module to transfer a data

record to the data object that was previously called by the function module ARCHIVE_NEW_OBJECT

All data records that you transferred to the data object are written to the archive file together when you call up the function module ARCHIVE_SAVE_OBJECT.

n The import parameter 'RECORD_FLAG' is available for any supplementary information. For

example, FI uses it to mark records that are to be deleted.

n The import parameter 'RECORD_STRUCTURE' is given the name of the structure that is to be

transferred. This name must be stored in the structure definition in AOBJ.

n The import parameter 'RECORD' receives the actual transferred data.

If the structure entered under RECORD_STRUCTURE and the record transferred via RECORD do not match, you will get a runtime error. Archive cannot be read.

n If you realize that the data records that you transferred should not be archived, call the function

module ARCHIVE_NEW_OBJECT. This ensures that the data that you transferred is discarded. The data that you transferred to the archiving classes for archiving is also discarded. Due to performance reasons you should carry out these types of checks during the data selection stage.

(63)

© SAP AG BIT670 4-21  SAP AG 2003

ADK API: ARCHIVE_PUT_TABLE

l

Interface parameter import

n archive_handle n record_structure

l

Interface table

n table

l

Capabilities of the function module:

n You can use this function module to transfer an

internal table to the data object that was previously called by the function module

ARCHIVE_NEW_OBJECT.

Every row of the internal table is written to the data object as a separate data record. All transferred data records are written to the archive file together when you call up the function module

ARCHIVE_SAVE_OBJECT.

n In the 'RECORD_STRUCTURE' parameter, you enter the name of the structure/table whose objects

are to be written.

n The data is transferred to an internal table via the table interface.

n If required, an archiving program typically selects all line items for one document in an internal

(64)

 SAP AG 2003

Comparison

ARCHIVE_PUT_RECORD - ARCHIVE_PUT_TABLE

l Writes one record at a time l requires more coding l Performance not as good,

because it processes one record at a time

l writes array of records l Requires less coding, due to

loop structure

l Better performance, because does not process one record at a time

(65)

© SAP AG BIT670 4-23  SAP AG 2003

l

Interface parameter import

n archive_handle

l

Capabilities of the function module:

n This function module writes an entire data object to

the archive file. It includes the data that was transferred with the function module

ARCHIVE_PUT_RECORD, and the data that was transferred via the archiving classes.

l

Exceptions

n termination_requested

ADK API:

ARCHIVE_SAVE_OBJECT

n If the data object does not fit into the current archive file, the system closes the archive file and

opens a new archive file. The system then automatically calls the delete program, unless this option was switched off in transaction AOBJ "Customizing Settings".

n The exception "TERMINATION_REQUESTED" is triggered when the archiving session was

interrupted in transaction SARA. In this case, the current data object will not have been written to the archive file. In this case, the write program must close the archive file created up to that point and come to an end.

(66)

 SAP AG 2003

l

ARCHIVE_PROTOCOL_INIT

n Interface parameter import

u I_DETAILPROTOCOL

l

ARCHIVE_PROTOCOL_COLLECT

n Interface parameter import

u I_OBJECT u I_TEXT u I_MSGTYPE u I_MSGID u I _MSGNO u I_MSGV1 to I_MSGV4

l

ARCHIVE_PROTOCOL_WRITE

ADK API: ARCHIVE_PROTOCOL_*

n Function module ARCHIVE_PROTOCOL_INIT must be called only once before the first call of the

function module ARCHIVE_PROTOCOL_COLLECT. The value of the check box "Detail Log" from the selection screen, must be transferred in the parameter I_DETAILPROTOCOL.

n Function module ARCHIVE_PROTOCOL_COLLECT must be called per archived business object.

The business object is transferred via the parameter I_OBJECT, while the message type is

transferred via parameter I_MSGTYPE (1 = processed, 2 = not processed, 3 = other). With the other parameters you can transfer the object information (e.g. "archived", "not archivable due to residence times", etc.). You can transfer the information in the form of text (I_TEXT) or as a message

(I_MSGID and I_MSGNO). The parameters transferred in I_MSGV1 to I_MSGV4 are replaced in the message and in the text.

n The function module ARCHIVE_PROTOCOL_WRITE has to be called only once at the end of the

program (e.g. after ARCHIVE_CLOSE_FILE). It generates the log.

n You can find complete documentation on the function modules in the function module

documentation as of Release BASIS 640.

n The function modules are available in the standard as of BASIS 640. For Release BASIS 620 the

(67)

© SAP AG BIT670 4-25  SAP AG 2003

PROGRESS_INDICATOR

l PROGRESS_INDICATOR

n Interface parameter import

u I_TEXT u I_MSGID u I_MSGNO u I_MSGV1 to I_MSGV4 u I_PROCESSED u I_TOTOAL u I_OUTPUTIMMEDIATELY

n Interface parameter export

u E_PROGRESS_SENT

l The function module can be used everywhere, not only for data archiving!

n The function module shows the progress of a process. The information can be transferred as text or

in the form of a message. For text use the parameter I_TEXT and for messages the parameters I_MSGID and I_MSGNO. It is better to use a message instead of a text if you want to also use a long text, for example.

n During a background job the progress is displayed via a message in the job log. During online

processing the progress is displayed as text in the status field, with the help of the function module 'SAPGUI_PROGRESS_INDICATOR'.

n During background processing, progress is displayed about every 30 minutes, while during online

processing progress is displayed every 10 seconds. See documentation for the parameter

I_OUTPUT_IMMEDIATELY.

n The variables "&1" to "&4" of your text or your messages can be transferred or replaced by values

calculated by the function module. See documentation for the parameterI_PROCESSED, I_TOTAL and I_MSGV4.

n You can find complete documentation on the function modules in the function module

documentation as of Release BASIS 640.

n The function modules are available in the standard as of BASIS 640. For Release BASIS 620 the

(68)

 SAP AG 2003

ADK API: ARCHIVE_WRITE_STATISTICS

l

Interface parameter import

n archive_handle

n statistics_only_per_run

n statistics_only_per_file (as of Release 4.6)

l

Capabilities of the function module:

n You can use this function module to generate statistics

about the data objects that were written to the archive file with ARCHIVE_SAVE_OBJECT. These statistics are generated in the form of a list and therefore appear in the log of the archiving program.

n You can use the import parameter 'STATISTICS_ONLY_PER_RUN' to request totals statistics for

the whole archiving session. The parameter 'STATISTICS_ONLY_PER_FILE' provides statistics for one archive file and is, for this reason, only useful when used with a delete program.

n You must call this function module immediately before the function module

ARCHIVE_CLOSE_FILE , otherwise you will obtain incorrect values in the number fields.

n The size of the archive file in MB also appears in the output. If you run the write program for a

(69)

© SAP AG BIT670 4-27  SAP AG 2003

ADK API: ARCHIVE_CLOSE_FILE

l

Interface parameter import

n archive_handle

l

Capabilities of the function module:

n The function module closes the archive file.

The resources that were allocated to a handle, are released. After that the handle is no longer valid and may not be used anymore. Each additional operation with this handle triggers the exception WRONG_ACCESS_TO_ARCHIVE .

(70)

 SAP AG 2003

Example Report SBOOKA (1)

! " # $ % % & ' ( )*+ , -' . )*+ , -' ! /" 0-' 12 )*+ , # $ % %-' ( , 3-' 1. , -' 2 , & -4 2 . " 5 4 ! 3 6 7 4 8 0 "*9: " 4 " & 4 $ % 7 %-4 " & 4 $ %*;999*9*% %<99<9*9*% " & 4 ! 3 $& ! = 2 3 < > ( =

(71)

© SAP AG BIT670 4-29  SAP AG 2003

Example Report SBOOKA (2)

? 4 8 2 = 2 3 > ( = ( . " $ $ 4 8 2 = 2 3 1 21 $ 5 " 4" 2 4$ % 7 # % @ 5 2 A 2 2 ( . ! 4 8 67 & ' 1. A /" 2 . ( % 7 # 4 6 % ( . ' . A %@% 4 2 = A %@% ' ( A 2 ' ( A %@% 4 2 ' . A 2 & 4 & 4

(72)

 SAP AG 2003

Example Report SBOOKA (3)

2 = ! ' 3 ! ' 4$ % 7 # 4 6 % @ 5 . A ' . .. A 2 . ! ' ( A ' ( A 8 5 ! ' ! A ' ! 3 B ! ( . 2 3B(1 ! 4 8 C 2 3 *D 2 3 * E = 4$ % 7 # 6 F % @ 5 ! ' ! A ' ! 21 & % 4$ % 7 # $ &% @ 5 ! ' ! A ' ! 1 1 A % % A

(73)

© SAP AG BIT670 4-31  SAP AG 2003

Example Report SBOOKA (4)

!" #$%" & ' ($)*+,!#+# - *& *.,%'#$"/ + 0 + + 0 &1*,*"1$"/+# - *2& # - *3 0 + + 2 = ! ! ' ( 4$ % 7 # # F % @ 5 ! ' ! A ' ! @ . G1 A * 4 /" 1 A * ' 12 A %@% @ & 4 2 . 3 " " "( " ' ( & , 2 4$ % 7 # % @ 5 A ' ( 0 A % 3 ( 3! 3 ! ' % )99*+ . 3 /2 A * ' 2 A ' 2 H *

(74)

 SAP AG 2003

Example Report SBOOKA (5)

!" #$%" &,'%/'*33+$"1$ #%'& *.,%'#$"/ + 4 0 &52 56 57 & 886 + 0 + 9 + + 0 + + 9 + *"1 %%, 9 !" #$%" &,'%/'*33+$"1$ #%'& *.,%'#$"/ + 4 0 &52 56 57 & 886 + 0 + 9 + + 0 + + 9 + + + 0 &.& $ + + 0 &.& : ; < = *"1$ !" #$%" & ' ($)*+>'$#*+3# #$3#$ 3& *.,%'#$"/ + 0 + !" #$%" & ' ($)*+ %3*+ $ *& *.,%'#$"/ + 0 + !" #$%" & ' ($)*+,'%#% % +>'$#*&

(75)

© SAP AG BIT670 4-33  SAP AG 2003

Delete Program: Structure

 SAP AG 1999

l ARCHIVE_GET_CUSTOMIZING_DATA

l ARCHIVE_OPEN_FOR_DELETE

l Do

n ARCHIVE_GET_NEXT_OBJECT

n ARCHIVE_GET_TABLE “or ARCHIVE_GET_NEXT_RECORD in DO Loop n PROGRESS_INDICATOR

n ARCHIVE_DELETE_OBJECT_DATA "call up archiving classes n If cut = cust_cut „check commit counter

Perform Delete

ARCHIVE_GIVE_STATISTICS

n endif

l ENDDO

l If cust_cut > 0 „possible processing of remaining data

Perform Delete ARCHIVE_GIVE_STATISTICS l Endif l PROGRESS_INDICATOR l ARCHIVE_WRITE_STATISTICS l ARCHIVE_CLOSE_FILE

References

Related documents