Documente Academic
Documente Profesional
Documente Cultură
- Whitepaper -
NOTICE
KDS Software & Consulting, Inc., reserves the right to claim the following document as
intellectual property. No part of this document may be reproduced or transmitted in any
form or for any purpose without the express permission of KDS Software & Consulting,
Inc.. The information contained herein may be changed without prior notice.
07/09/09 Page 1
Payroll Cluster Repair
Table of Contents
1 HR CLUSTERS ............................................................................................................. 3
1.1 Introduction ................................................................................................................. 3
2 PAYROLL CLUSTER REPAIR ..................................................................................... 6
2.1 Rx and B2 Cluster Check and Repair ......................................................................... 6
2.2 Customer Priorities ..................................................................................................... 6
3 DEFINITION AND SPECIFICATIONS........................................................................... 7
3.1 Definition..................................................................................................................... 7
3.2 Application .................................................................................................................. 8
3.2.1 Cluster Check...................................................................................................... 8
3.2.1.1 Find defect Clusters .................................................................................................................................... 9
3.2.1.2 Handling exception CONNE_IMPORT_ILL_OBJECT_TYPE.................................................................... 10
3.2.2 Cluster Repair (Reconstruction)...................................................................... 10
3.2.2.1 Repair cluster ............................................................................................................................................ 10
3.2.2.2 Create empty cluster ................................................................................................................................. 10
3.2.2.3 Restrictions and Limitations ...................................................................................................................... 11
3.3 2.4 Transport of Single Cluster entries from Backup ................................................ 11
3.4 Performance ............................................................................................................. 11
3.5 Reliability .................................................................................................................. 12
3.6 Durability................................................................................................................... 12
3.7 Simplicity and Aesthetics .......................................................................................... 12
4 SERVICEABILITY AND MAINTENANCE ................................................................... 13
5 APPENDIX .................................................................................................................. 14
5.1 ZPTT_MAU_03......................................................................................................... 14
5.2 ZPT_MAU_04 ........................................................................................................... 16
07/09/09 Page 2
Payroll Cluster Repair
1 HR Clusters
1.1 Introduction
The HR module utilizes so called clusters to store information in a variety of areas. Some of
the cluster tables are PCL1, PCL2, PCL3, PCL4, and PCL5, as shown in Fig. 1. Clusters can
be understood as a deep structure that contains multiple tables. Cluster tables are
compressed and therefore allow saving database space. In HR they are used to store long
texts, notes related to infotypes and of course payroll results and payroll directories.
All these tables have a predefined structure. The structure of one of these tables is shown in
Fig. 1.
07/09/09 Page 3
Payroll Cluster Repair
The tables that store clusters have the following fields in common:
RELID – This is a two-character field that identifies the cluster, e.g., TX, RX, etc.
SRTFD – This field denotes the key passed by the application program while importing and
exporting data stored in a particular cluster. This is similar to key fields for a database table
that uniquely identify a record. Generally, the key is comprised of the fields mentioned
between RELID and SRTF2 in the table definition. In the case of table PCLX , there is only
one – field SRTFD. However, in the case of table STXL, fields TDOBJECT, TDNAME, TDID,
and TDSPRAS collectively make up the key.
SRTF2 – This serves an additional or a duplicate key field. This field is utilized when the fields
SRTFD and RELID alone are not sufficient for uniquely identifying a table record. If a record
is more than one line long, then a new row is inserted with a different SRTF2. For the first (or
the only) row, this field has a value of 0. If the cluster data corresponding to the same SRTFD
value extends over multiple lines, new rows are inserted with an incremented value of SRTF2
such as 1, 2, 3 and so on. The system judges the size of data and the possible increment in
the SRTF2 field value, so the developer need not worry about it.
CLUSTR – This field shows the size (in bytes) of the data stored in a particular table row
CLUSTD – This contains the actual data, for instance the infotype text, stored in compressed
form
Storing data in the form of clusters lets you create logical partitions within one database table.
A single table may be used for storing data from different functional areas. This relieves the
07/09/09 Page 4
Payroll Cluster Repair
developer from creating separate tables (and programming update functions) for data
belonging to each application area. For example, PCL1 table comprises of clusters TX and
TE for storing infotype text and data of travel expenses, respectively. A two-character ID in
field RELID identifies each cluster. Via clusters, a single table may be used to store data
(such as long text related to a variety of application areas) under a separate cluster ID with a
single key value. Otherwise, this information (e.g., long text, internal tables, and flat data
structures) would have to be stored in separate table. Data may be exported to and imported
from the table via the usage of EXPORT and IMPORT statements, respectively. For more
information about these two ABAP commands, refer to the SAP documentation (SAP
Library>mySAP Technology Components>SAP Web Application Server>ABAP
Programming and Runtime (BC-ABA)>The ABAP Programming Language>Saving Data
Externally>Saving Data Objects as Clusters>Data Clusters in the Database).
You may use the following code in your ABAP programs to import data from a cluster.
IMPORT ITAB1
ITAB2
STRUC1.............
FROM DATABASE TABNAME(CLUSTER_ID) ID KEY.
The data objects (residing in the cluster) that you want to access must be specified after the
IMPORT keyword. While importing, it is unnecessary to access all the data objects stored in
the cluster. The table name (TABNAME), cluster key (KEY), and cluster ID must also be
mentioned in order to access the desired data. Moreover, you need to create the correct key
(KEY) before calling the IMPORT statement.
When the IMPORT statement is executed, the data (in compressed form) that corresponds to
the cluster key is read from the field CLUSTD. This data is decompressed (and converted) to
its original form and then made available to the calling program.
On the execution of an EXPORT statement, data is compressed and then stored in the
database.
Use your ABAP program and the following custom code to export data to the database:
07/09/09 Page 5
Payroll Cluster Repair
Basic
Finds defective clusters
Repairs clusters to a certain degree
Can create empty dummy cluster entries
Custom Options
Optional: Load lost cluster results
Optional: Allow to store simulation results
07/09/09 Page 6
Payroll Cluster Repair
3.1 Definition
Two programs have been created to allow cluster checking and repair for RQ and B2 clusters.
These are:
The selection is also the key of the cluster entry, where the key in cluster table PCL2 for
cluster RQ is a concatenation of Personnel number + Sequence number.
07/09/09 Page 7
Payroll Cluster Repair
The selection is also the key of the cluster entry, where the key in cluster table PCL2 for
cluster B2 is a concatenation of Personnel number + Accounting year + Accounting period +
digit ‘1’.
3.2 Application
07/09/09 Page 8
Payroll Cluster Repair
Add-On
Options
Cluster View
Payroll
Directory
A short dump will occur if the exception happened. Make sure that you exclude all personnel
numbers that still have this exception from the run using the selection options. After all EEs
causing short dumps have been excluded run the program again for the entire selection to get
a final list. Remember to record all short dump key as well.
A system administrator may choose to use this report to search for cluster defects on a
regular basis should there be problems with cluster data in general. It is recommended to
search for the cause of the database problems before continuing any activities. Continuation
of daily activities should only happen if a production down cannot be prevented otherwise.
07/09/09 Page 9
Payroll Cluster Repair
After reconstruction a retro calculation may find differences which have to be carefully
reviewed as the data may show differences to the original.
07/09/09 Page 10
Payroll Cluster Repair
The cluster repair does not allow an exact repair. There may be data losses in entire result
tables or single entries may be damaged and show wrong data. Always restore data only as
described in the next section.
3.4 Performance
The application will perform very fast. Only in the case that massive incoming posting data
needs to be analyzed will performance be impacted.
07/09/09 Page 11
Payroll Cluster Repair
3.5 Reliability
To approach software reliability1 we utilize the best engineering methods to improve software
reliability of our solutions. Before the deployment of software solutions, testing, verification
and validation will be performed. Software testing in form of unit and acceptance tests is used
to minimize the possibility of defect occurrences after release and therefore improve our
software reliability. After deployment of our software solutions, field data will be gathered and
analyzed to improve the software and provide updates as necessary.
3.6 Durability
We achieve software durability2 through an pragmatic approach that combines object oriented
techniques (OOTs) with formal description techniques (FDTs). OOTs help system analysts
and designers to bring modularization and structure to the programs to permanently commit
data changes. The main focus of FDTs is to ensure the correctness of the final system by the
provision of extensive validation and verification methods.
1
According to ANSI, Software Reliability is defined as: the probability of failure-free software operation for a
specified period of time in a specified environment. Software Reliability is an important attribute of software
quality, together with functionality, usability, performance, serviceability, capability, installability, maintainability,
and documentation. Software Reliability is usually hard to achieve, because the software complexity tends to be
high.
2
In computer science, durability is the property that guarantees that transactions that are successfully
committed will survive permanently and will not be undone by system failure.
07/09/09 Page 12
Payroll Cluster Repair
07/09/09 Page 13
Payroll Cluster Repair
5 Appendix
5.1 ZPTT_MAU_03
REPORT zptt_mau_03 .
INITIALIZATION.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = 'CAUTION'
txt1 = 'CAUTION: This report allows to repair defective'
txt2 = 'RQ clusters.'
txt3 = ' '
txt4 = ' '
EXCEPTIONS
OTHERS = 0.
START-OF-SELECTION.
07/09/09 Page 14
Payroll Cluster Repair
...
rp-imp-c2-rq.
ENDCATCH.
ELSEIF s_repai2 = 'X'.
IF s_seqnr IS INITIAL.
EXIT.
ENDIF.
* set keys
rx-key-pernr = pcl2-srtfd(8). " '01900117'.
rx-key-seqno = pcl2-srtfd+8(5). " '00176' .
...
07/09/09 Page 15
Payroll Cluster Repair
* BREAK-POINT.
...
ENDIF.
ENDIF.
ENDSELECT.
5.2 ZPT_MAU_04
REPORT zptt_mau_04 .
*INCLUDE rpc2ps00.
*INCLUDE rpcfdc10.
07/09/09 Page 16
Payroll Cluster Repair
*INCLUDE rpcfdc09.
INCLUDE rpc2b201.
INCLUDE rpc2b202.
INCLUDE rptdat00. " common part otables, additional fields
INITIALIZATION.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = 'CAUTION'
txt1 = 'CAUTION: This report allows to repair defective'
txt2 = 'B2 clusters.'
txt3 = ' '
txt4 = ' '
EXCEPTIONS
OTHERS = 0.
START-OF-SELECTION.
07/09/09 Page 17
Payroll Cluster Repair
i_callback_program = sy-cprog
i_structure_name = 'PC2B0'
i_save = 'A' " A = All => Standard & User
TABLES
t_outtab = gt_data.
*---------------------------------------------------------------------*
* FORM check_cluster_b2 *
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
FORM check_cluster_b2.
* refresh cluster tables before accessing new result
...
...
* BREAK-POINT.
* update cluster
IF s_test IS INITIAL.
...
ENDIF.
ENDIF.
ENDIF.
ENDFORM.
07/09/09 Page 18
Payroll Cluster Repair
Disclaimer
Some software products marketed by KDSSC contain proprietary software components of other software
vendors.
TM ® ®
PDF , Adobe , Adobe Acrobat , and other related products are trademarks or registered trademarks of Adobe
Systems, Inc.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, and other SAP products and services mentioned herein as well
as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other
countries all over the world.
® ® ® ® ® ® ®
Microsoft , WINDOWS , NT , EXCEL , Word , PowerPoint and SQL Server are registered trademarks of
Microsoft Corporation.
®
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.
All other products and services mentioned within this document are the trademarks of their respective
companies.
07/09/09 Page 19