SlideShare une entreprise Scribd logo
1  sur  19
Télécharger pour lire hors ligne
Payroll Cluster Repair




                                Payroll Cluster Repair

                                       - Whitepaper -




      Author: Andreas Mau                   andreas@kdssc.com

                 Klaus-Dieter Spatz         klaus@kdssc.com



                                     KDS Software & Consulting, Inc
                                         3715 Jefferson Court
                                       Redwood City, CA 94062


      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.

     PCL1          TX                 Infotype texts
                   TE                 Travel expenses
                   TA                 General data for accounting of
                                      travel expenses
     PCL2          ID                 Interface toolbox – directory of
                                      interface results
                   ZL                 Time wage types and work
                                      schedule
                   RU                 Payroll results (US)
     PCL3          TY                 Applicant data texts
                   AP                 Applicant actions
     PCL4          P2                 Log for RPCALX0 and RPTIME00
                   U1                 Tax reporter forms for US
     PCL5          PY                 Payroll data for personnel cost
                                      planning
                   CP                 Planning run data for personnel
                                      cost planning
     STXL          TX                 Notes related to infotypes

        Fig. 1.:   Component diagram of a Payroll Posting Outsourcing Solution

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




        Fig. 2.:   Structure of PCL1

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:

    EXPORT ITAB1 ITAB2 STRUC1
                    TO
                    DATABASE TABNAME(CLUSTER_ID) ID KEY.




07/09/09                                                                             Page 5
Payroll Cluster Repair



2 Payroll Cluster Repair

2.1 Rx and B2 Cluster Check and Repair
In general any hardware based caused of defective database entries cannot be repaired.
Damage of database content may have happened in single entries leading to incorrect data
which cannot be corrected. Reconciliation of historic records may find errors in single entries.
The procedures in this document can help to partially restore defective data but do not
implicate correctness of all historic data. Usage of the programs herein should only be the
very last resort to reconstruct and repair lost and damaged cluster entries.

  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



2.2 Customer Priorities
Here a comprehensive list of high customer priorities for Payroll Cluster Repair:

  1. Easy to use applications
  2. Fast determination of defective payroll clusters
  3. Ability to monitor payroll results and details
  4. Ability to extend the use of existing SAP components rather than solution replacements
  5. Efficient performance
  6. Standard look and feel of resulting applications




07/09/09                                                                             Page 6
Payroll Cluster Repair



3 Definition and Specifications

3.1 Definition
Two programs have been created to allow cluster checking and repair for RQ and B2 clusters.
These are:

     ZP_TT_MAU_03 Cluster RQ check and repair




        Fig. 3.:   Cluster Repair 1

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

     ZP_TT_MAU_04 Cluster B2 check and repair




        Fig. 4.:   Cluster Repair 2

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

3.2.1 Cluster Check
The cluster check programs have an option “Find defect clusters” which allows finding
defective clusters except those which cause an exception. Clusters with this exception are not
recoverable as the cluster dictionary reference has been completely compromised and does
not allow a reconstruction. In general repair of cluster entries should only be done via
transport of the entry from a backup copy as described in section “Transport of Single Cluster
entries from Backup”.




07/09/09                                                                           Page 8
Payroll Cluster Repair




                                                                      Add-On
                                                                      Options




                                                          Payroll Cluster Repair
                          Payroll                                     /KDSSC/…
                          Results




                                                                  Cluster View
                          Payroll
                          Directory



         Fig. 5.:   Data flow diagram of the Payroll Cluster Repair



3.2.1.1 Find defect Clusters
Running the program will result in a list of defect cluster entries. These can be looked up with
cluster programs RPCLSTRx and RPCLSTB2 for the respective cluster. Running these pro-
grams and checking the cluster entries of the list will result in a short dump with the respective
cluster error/exception. For repair of single cluster entries refer to section “ Transport of Single
Cluster entries from Backup”.

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




3.2.1.2 Handling exceptions
If a short dump occurs with the exception you can retrieve the personnel key
   1. On the short dump screen hit the “debugging” button.
   2. For RQ cluster: by typing
                                     rx-key
      in the field content and hit enter. Write the entire key down. The first 8 digits are the
      personnel number, the next 5 are the sequence number.
   3. For B2 cluster: by typing
                                     b2-key
      in the field content and hit enter. Write the entire key down. The first 8 digits are the
      personnel number, the next 6 are the year and period.
   4. Exclude the entire personnel number causing the short dump from the next run by
      using the selection option (exclusion list) and run the program again either from this
      personnel number or entirely again.
   5. Record all occurrences of this exception including the keys as described above.


3.2.2 Cluster Repair (Reconstruction)
USE EXTREM CAUTION, PREFERABLY SKIP TO THE NEXT SECTION
The incorrect use of this option may lead to further data loss. In general clusters should not
be reconstructed with this method if an intact backup copy is available. This method should
only be used to reconstruct a cluster if a backup copy is NOT available. If a backup copy of
the cluster is available please skip this section and follow the steps in section „Transport of
Single Cluster entries from Backup“.

3.2.2.1 Repair cluster
This option allows to reconstruct damaged cluster entries by ignoring the danged portion of
the entry. This reconstruction will have some data loss and is never a complete
reconstruction. For complete reconstruction always use copies from a backup.

After reconstruction a retro calculation may find differences which have to be carefully
reviewed as the data may show differences to the original.

3.2.2.2 Create empty cluster
In case the cluster cannot be reconstructed as described above this option allows to at least
create an empty cluster which can be filled




07/09/09                                                                              Page 10
Payroll Cluster Repair


3.2.2.3 Restrictions and Limitations
Usage of this option may result in further loss of data if used incorrectly. Examples are:
incorrect key specifications or range selections resulting in deletion of other data.

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.3 2.4 Transport of Single Cluster entries from Backup
In case of total cluster destruction the original result cannot be reconstructed via repair and
retro calculations. It is always recommended to use a backup copy to repair single results. For
this the backup copy has to be restored to a different system in the same client as the
original. If the production system is PRD client 010. Then the backup should be restored to a
separate system BCK client 010. Otherwise the transport of single cluster entries will not
work.
The following steps are needed
   1. Restore backup to separate system where PRD client (production system) = BCK
      client (backup system)
   2. Create an workbench transport via transaction SE09.
   3. Edit the transport entry and add an entry: R3TR TABU PCL2.
   4. Add table keys for the damaged cluster entries only. Check your entries by utilizing
      transaction SE16 for cluster table PCL2 and the respective keys. Note that the key
      requires you to enter the client (e.g. ‘010’), the cluster (e.g. ‘RQ’), the cluster key (e.g.
      eeeeeeeesssss). Expertise in transporting table entries is required for this step!
   5. CAUTION: During the transport confirm that only the entries selected are being
      transported!
   6. Import the transport in the corruptive system.
   7. Run the cluster check again for the entire population without any selections and make
      sure there are no further corruptions in the system. Should there be additional defects
      commence as described above until no further defects are found.


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.


3.7 Simplicity and Aesthetics
It is a requirement that the solution will be easy to use and to maintain. There should be no
special knowledge needed to run the application. All of this should ultimately lead to a good
user-perceived quality of the solution.




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



4 Serviceability and Maintenance
As defined in the Solution Definition and Specifications above various objects are to be
created to allow proper configuration of the solution.




07/09/09                                                                     Page 13
Payroll Cluster Repair



5 Appendix

5.1 ZPTT_MAU_03
REPORT zptt_mau_03 .

TABLES: pcl1, pcl2.

DATA: pn-paper TYPE paper.
INCLUDE rpc2rqq0.            "Cluster RQ data definition
INCLUDE rpc2rx09.            "Cluster RX data definition internat. part

INCLUDE rpppxd00.            "Data definition buffer PCL1/PCL2

DATA: BEGIN OF COMMON PART buffer.
INCLUDE rpppxd10.           "Common part buffer PCL1/PCL2
DATA: END OF COMMON PART.

INCLUDE rpppxm00.            "Buffer handling routine

DATA: gl_pernr TYPE p_pernr,
      gs_rgdir TYPE pc261,
      gt_rgdir TYPE pc261 OCCURS 0,
      gs_data TYPE hrpy_rgdir,
      gt_data TYPE hrpy_rgdir OCCURS 0.

SELECTION-SCREEN BEGIN OF BLOCK s01 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_pernr FOR gl_pernr NO INTERVALS.
PARAMETERS: s_seqnr TYPE cdseq.
SELECTION-SCREEN END OF BLOCK s01.
SELECTION-SCREEN BEGIN OF BLOCK s02 WITH FRAME TITLE text-002.
PARAMETERS: s_find   TYPE xfeld RADIOBUTTON GROUP rd1 DEFAULT 'X',
            s_repair TYPE xfeld RADIOBUTTON GROUP rd1,
            s_repai2 TYPE xfeld RADIOBUTTON GROUP rd1,
            s_test   TYPE xfeld DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK s02.

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.

* show progress indicator




07/09/09                                                                  Page 14
Payroll Cluster Repair

    CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              percentage = 30
              text       = 'Checking clusters ...'.

  SELECT * FROM pcl2 WHERE relid = 'Rx'.
    gl_pernr = pcl2-srtfd(8).
    CHECK gl_pernr IN s_pernr.
*   initialize buffer
*   refresh cluster tables before accessing new result

      IF ( s_repair = 'X' ) OR ( s_find = 'X' ).
*       set keys
        rx-key-pernr = pcl2-srtfd(8).                    " '01900117'.
        rx-key-seqno = pcl2-srtfd+8(5).                  " '00176'   .

        IF NOT s_seqnr IS INITIAL.
          CHECK rx-key-seqno = s_seqnr.
        ENDIF.
*       import result without exceptions

            ...

          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'   .

        IF NOT s_seqnr IS INITIAL.
          CHECK rx-key-seqno = s_seqnr.
        ENDIF.
        rx-key-seqno = s_seqnr.                          " '00176'   .

*       import result directly from PCL2
          ...
        sy-subrc = 1.
      ENDIF.
      IF sy-subrc <> 0.
*       show progress indicator
        CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
              EXPORTING
                   percentage = 60
                   text       = pcl2-srtfd.

*       WRITE: / pcl2-srtfd(8), pcl2-srtfd+8(5).
        CLEAR: gs_data.
        gs_data-pernr = pcl2-srtfd(8).
        gs_data-seqnr = pcl2-srtfd+8(5).

         ...




07/09/09                                                                 Page 15
Payroll Cluster Repair


        MOVE-CORRESPONDING gs_rgdir TO gs_data.
        APPEND gs_data TO gt_data.

        IF ( s_repair = 'X' ) OR ( s_repai2 = 'X' ).

*         BREAK-POINT.

*         export result to itself (in case of s_repai2 tables and
*         structures will be empty!!!)

         ...

*         import result from buffer as additional check before update
*         update cluster
          IF s_test IS INITIAL.
               ...
          ENDIF.

        ENDIF.

      ENDIF.
    ENDSELECT.

* Call ABAP/4 List Viewer
  CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
            i_callback_program = sy-cprog
            i_structure_name   = 'HRPY_RGDIR'
            i_save             = 'A' " A = All => Standard & User
       TABLES
            t_outtab           = gt_data.



5.2 ZPT_MAU_04
REPORT zptt_mau_04 .

TABLES: pcl1, pcl2.

DATA: pn-paper TYPE paper.
DATA: pn-begda TYPE begda.
DATA: pn-endda TYPE endda.

INCLUDE rpc2rqq0.           "Cluster RQ data definition
INCLUDE rpc2rx09.           "Cluster RX data definition internat. part
INCLUDE rpppxd00.           "Data definition buffer PCL1/PCL2
DATA: BEGIN OF COMMON PART buffer.
INCLUDE rpppxd10.           "Common part buffer PCL1/PCL2
DATA: END OF COMMON PART.
INCLUDE rpppxm00.           "Buffer handling routine

*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

DATA: gl_pernr TYPE p_pernr,
      gs_data TYPE pc2b0,
      gt_data TYPE pc2b0 OCCURS 0.

SELECTION-SCREEN BEGIN OF BLOCK s01 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_pernr FOR gl_pernr      NO INTERVALS.
SELECT-OPTIONS: s_pabrj FOR gs_data-pabrj NO INTERVALS,
                s_pabrp FOR gs_data-pabrp NO INTERVALS.
SELECTION-SCREEN END OF BLOCK s01.
SELECTION-SCREEN BEGIN OF BLOCK s02 WITH FRAME TITLE text-002.
PARAMETERS: s_find   TYPE xfeld RADIOBUTTON GROUP rd1 DEFAULT 'X',
            s_repair TYPE xfeld RADIOBUTTON GROUP rd1,
            s_repai2 TYPE xfeld RADIOBUTTON GROUP rd1,
            s_test   TYPE xfeld DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK s02.

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.

* show progress indicator
  CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
       EXPORTING
            percentage = 30
            text       = 'Checking clusters ...'.

  SELECT * FROM pcl2 WHERE relid = 'B2'.
    gl_pernr = pcl2-srtfd(8).
    CHECK gl_pernr IN s_pernr.
*   initialize buffer
*   set keys
    b2-key = pcl2-srtfd.
    CHECK b2-key-pabrj IN s_pabrj.
    CHECK b2-key-pabrp IN s_pabrp.
*   finalize B2 key
    PERFORM check_cluster_b2.
  ENDSELECT.

* Call ABAP/4 List Viewer
  CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING




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

         ...

    IF ( s_repair = 'X' ) OR ( s_find = 'X' ).
*     import result without exceptions

         ...

  ELSEIF s_repai2 = 'X'.
*   import result directly from PCL2
    PERFORM pcl2_exp_imp USING 'READ'.
    sy-subrc = 1.
  ENDIF.
  IF sy-subrc <> 0.
*   show progress indicator
    CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              percentage = 60
              text       = pcl2-srtfd.

*     WRITE: / pcl2-srtfd(8), pcl2-srtfd+8(5).
      CLEAR: gs_data.
      MOVE-CORRESPONDING b2-key TO gs_data.
      APPEND gs_data TO gt_data.

      IF ( s_repair = 'X' ) OR ( s_repai2 = 'X' ).

*       BREAK-POINT.

*      export result to itself
         ...

*       import result from buffer as additional check before update

*       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

Contenu connexe

Tendances

Ascii adjust & decimal adjust
Ascii adjust & decimal adjustAscii adjust & decimal adjust
Ascii adjust & decimal adjustTech_MX
 
Basic of MODBUS Communication/Protocol
Basic of MODBUS Communication/ProtocolBasic of MODBUS Communication/Protocol
Basic of MODBUS Communication/ProtocolShivam Singh
 
Introduction to Bluetooth low energy
Introduction to Bluetooth low energyIntroduction to Bluetooth low energy
Introduction to Bluetooth low energyNEEVEE Technologies
 
Spi master core verification
Spi master core verificationSpi master core verification
Spi master core verificationMaulik Suthar
 
Honeywell PLC ML 200R ystem architecture &-installation
Honeywell PLC ML 200R ystem architecture &-installationHoneywell PLC ML 200R ystem architecture &-installation
Honeywell PLC ML 200R ystem architecture &-installationShivam Singh
 
I2C And SPI Part-23
I2C And  SPI Part-23I2C And  SPI Part-23
I2C And SPI Part-23Techvilla
 
SOUG Oracle Unified Audit for Multitenant Databases
SOUG Oracle Unified Audit for Multitenant DatabasesSOUG Oracle Unified Audit for Multitenant Databases
SOUG Oracle Unified Audit for Multitenant DatabasesStefan Oehrli
 
Top 5 product support engineer interview questions with answers
Top 5 product support engineer interview questions with answersTop 5 product support engineer interview questions with answers
Top 5 product support engineer interview questions with answersmariing869
 
8086 instructions
8086 instructions8086 instructions
8086 instructionsRavi Anand
 
Honeywell PLC TRAINING GUIDE created by deepak gorai
Honeywell PLC TRAINING GUIDE created by deepak goraiHoneywell PLC TRAINING GUIDE created by deepak gorai
Honeywell PLC TRAINING GUIDE created by deepak goraiDEEPAK GORAI
 
Understanding my database through SQL*Plus using the free tool eDB360
Understanding my database through SQL*Plus using the free tool eDB360Understanding my database through SQL*Plus using the free tool eDB360
Understanding my database through SQL*Plus using the free tool eDB360Carlos Sierra
 
Modbus communication protocol
Modbus communication protocolModbus communication protocol
Modbus communication protocolkevinpatel169
 
Session 8 assertion_based_verification_and_interfaces
Session 8 assertion_based_verification_and_interfacesSession 8 assertion_based_verification_and_interfaces
Session 8 assertion_based_verification_and_interfacesNirav Desai
 
Business value Drivers for IoT Solutions
Business value Drivers for IoT SolutionsBusiness value Drivers for IoT Solutions
Business value Drivers for IoT SolutionsIBM_Info_Management
 
4Sem VTU-HDL Programming Notes-Unit1-Introduction
4Sem VTU-HDL Programming Notes-Unit1-Introduction4Sem VTU-HDL Programming Notes-Unit1-Introduction
4Sem VTU-HDL Programming Notes-Unit1-IntroductionDr. Shivananda Koteshwar
 

Tendances (20)

Ascii adjust & decimal adjust
Ascii adjust & decimal adjustAscii adjust & decimal adjust
Ascii adjust & decimal adjust
 
Basic of MODBUS Communication/Protocol
Basic of MODBUS Communication/ProtocolBasic of MODBUS Communication/Protocol
Basic of MODBUS Communication/Protocol
 
Introduction to Bluetooth low energy
Introduction to Bluetooth low energyIntroduction to Bluetooth low energy
Introduction to Bluetooth low energy
 
Spi master core verification
Spi master core verificationSpi master core verification
Spi master core verification
 
Oracle Database 12c : Multitenant
Oracle Database 12c : MultitenantOracle Database 12c : Multitenant
Oracle Database 12c : Multitenant
 
Honeywell PLC ML 200R ystem architecture &-installation
Honeywell PLC ML 200R ystem architecture &-installationHoneywell PLC ML 200R ystem architecture &-installation
Honeywell PLC ML 200R ystem architecture &-installation
 
IoT with Arduino
IoT with ArduinoIoT with Arduino
IoT with Arduino
 
I2C And SPI Part-23
I2C And  SPI Part-23I2C And  SPI Part-23
I2C And SPI Part-23
 
SOUG Oracle Unified Audit for Multitenant Databases
SOUG Oracle Unified Audit for Multitenant DatabasesSOUG Oracle Unified Audit for Multitenant Databases
SOUG Oracle Unified Audit for Multitenant Databases
 
Top 5 product support engineer interview questions with answers
Top 5 product support engineer interview questions with answersTop 5 product support engineer interview questions with answers
Top 5 product support engineer interview questions with answers
 
8086 instructions
8086 instructions8086 instructions
8086 instructions
 
Honeywell PLC TRAINING GUIDE created by deepak gorai
Honeywell PLC TRAINING GUIDE created by deepak goraiHoneywell PLC TRAINING GUIDE created by deepak gorai
Honeywell PLC TRAINING GUIDE created by deepak gorai
 
FSM and ASM
FSM and ASMFSM and ASM
FSM and ASM
 
VHDL
VHDLVHDL
VHDL
 
Understanding my database through SQL*Plus using the free tool eDB360
Understanding my database through SQL*Plus using the free tool eDB360Understanding my database through SQL*Plus using the free tool eDB360
Understanding my database through SQL*Plus using the free tool eDB360
 
Modbus communication protocol
Modbus communication protocolModbus communication protocol
Modbus communication protocol
 
Session 8 assertion_based_verification_and_interfaces
Session 8 assertion_based_verification_and_interfacesSession 8 assertion_based_verification_and_interfaces
Session 8 assertion_based_verification_and_interfaces
 
Business value Drivers for IoT Solutions
Business value Drivers for IoT SolutionsBusiness value Drivers for IoT Solutions
Business value Drivers for IoT Solutions
 
Back end[1] debdeep
Back end[1]  debdeepBack end[1]  debdeep
Back end[1] debdeep
 
4Sem VTU-HDL Programming Notes-Unit1-Introduction
4Sem VTU-HDL Programming Notes-Unit1-Introduction4Sem VTU-HDL Programming Notes-Unit1-Introduction
4Sem VTU-HDL Programming Notes-Unit1-Introduction
 

Similaire à Payroll Cluster Repair Whitepaper

How to build tabular dashboards using proc report
How to build tabular dashboards using proc reportHow to build tabular dashboards using proc report
How to build tabular dashboards using proc reportFrank Bereznay
 
HR ABAP Technical Overview | http://sapdocs.info/
HR ABAP Technical Overview | http://sapdocs.info/HR ABAP Technical Overview | http://sapdocs.info/
HR ABAP Technical Overview | http://sapdocs.info/sapdocs. info
 
Recipes 8 of Data Warehouse and Business Intelligence - Naming convention tec...
Recipes 8 of Data Warehouse and Business Intelligence - Naming convention tec...Recipes 8 of Data Warehouse and Business Intelligence - Naming convention tec...
Recipes 8 of Data Warehouse and Business Intelligence - Naming convention tec...Massimo Cenci
 
Teradata 13.10
Teradata 13.10Teradata 13.10
Teradata 13.10Teradata
 
My SYSAUX tablespace is full - please help
My SYSAUX tablespace is full - please helpMy SYSAUX tablespace is full - please help
My SYSAUX tablespace is full - please helpMarkus Flechtner
 
An overview of fragmentation
An overview of fragmentationAn overview of fragmentation
An overview of fragmentationcsandit
 
An ai planning approach for generating
An ai planning approach for generatingAn ai planning approach for generating
An ai planning approach for generatingijaia
 
AN AI PLANNING APPROACH FOR GENERATING BIG DATA WORKFLOWS
AN AI PLANNING APPROACH FOR GENERATING BIG DATA WORKFLOWSAN AI PLANNING APPROACH FOR GENERATING BIG DATA WORKFLOWS
AN AI PLANNING APPROACH FOR GENERATING BIG DATA WORKFLOWSgerogepatton
 
Sap tr um_dm_meter reading order creation, assignment and meter reading sheet...
Sap tr um_dm_meter reading order creation, assignment and meter reading sheet...Sap tr um_dm_meter reading order creation, assignment and meter reading sheet...
Sap tr um_dm_meter reading order creation, assignment and meter reading sheet...UF Technology
 
NoSQL - A Closer Look to Couchbase
NoSQL - A Closer Look to CouchbaseNoSQL - A Closer Look to Couchbase
NoSQL - A Closer Look to CouchbaseMohammad Shaker
 
Best Practices for Migrating Legacy Data Warehouses into Amazon Redshift
Best Practices for Migrating Legacy Data Warehouses into Amazon RedshiftBest Practices for Migrating Legacy Data Warehouses into Amazon Redshift
Best Practices for Migrating Legacy Data Warehouses into Amazon RedshiftAmazon Web Services
 
It 302 computerized accounting (week 2) - sharifah
It 302   computerized accounting (week 2) - sharifahIt 302   computerized accounting (week 2) - sharifah
It 302 computerized accounting (week 2) - sharifahalish sha
 
ICDE2015 Research 3: Distributed Storage and Processing
ICDE2015 Research 3: Distributed Storage and ProcessingICDE2015 Research 3: Distributed Storage and Processing
ICDE2015 Research 3: Distributed Storage and ProcessingTakuma Wakamori
 
Bank Question Solution-ADBA Previous Year Question for AP, ANE, AME, ADA, AE
Bank Question Solution-ADBA Previous Year Question for AP, ANE, AME, ADA, AEBank Question Solution-ADBA Previous Year Question for AP, ANE, AME, ADA, AE
Bank Question Solution-ADBA Previous Year Question for AP, ANE, AME, ADA, AEEngr. Md. Jamal Uddin Rayhan
 

Similaire à Payroll Cluster Repair Whitepaper (20)

How to build tabular dashboards using proc report
How to build tabular dashboards using proc reportHow to build tabular dashboards using proc report
How to build tabular dashboards using proc report
 
Sap hr-programming
Sap hr-programmingSap hr-programming
Sap hr-programming
 
HR ABAP Technical Overview | http://sapdocs.info/
HR ABAP Technical Overview | http://sapdocs.info/HR ABAP Technical Overview | http://sapdocs.info/
HR ABAP Technical Overview | http://sapdocs.info/
 
Recipes 8 of Data Warehouse and Business Intelligence - Naming convention tec...
Recipes 8 of Data Warehouse and Business Intelligence - Naming convention tec...Recipes 8 of Data Warehouse and Business Intelligence - Naming convention tec...
Recipes 8 of Data Warehouse and Business Intelligence - Naming convention tec...
 
Teradata 13.10
Teradata 13.10Teradata 13.10
Teradata 13.10
 
My SYSAUX tablespace is full - please help
My SYSAUX tablespace is full - please helpMy SYSAUX tablespace is full - please help
My SYSAUX tablespace is full - please help
 
An overview of fragmentation
An overview of fragmentationAn overview of fragmentation
An overview of fragmentation
 
An ai planning approach for generating
An ai planning approach for generatingAn ai planning approach for generating
An ai planning approach for generating
 
AN AI PLANNING APPROACH FOR GENERATING BIG DATA WORKFLOWS
AN AI PLANNING APPROACH FOR GENERATING BIG DATA WORKFLOWSAN AI PLANNING APPROACH FOR GENERATING BIG DATA WORKFLOWS
AN AI PLANNING APPROACH FOR GENERATING BIG DATA WORKFLOWS
 
4.Database Management System.pdf
4.Database Management System.pdf4.Database Management System.pdf
4.Database Management System.pdf
 
Sap tr um_dm_meter reading order creation, assignment and meter reading sheet...
Sap tr um_dm_meter reading order creation, assignment and meter reading sheet...Sap tr um_dm_meter reading order creation, assignment and meter reading sheet...
Sap tr um_dm_meter reading order creation, assignment and meter reading sheet...
 
Database
DatabaseDatabase
Database
 
notes
notesnotes
notes
 
NoSQL - A Closer Look to Couchbase
NoSQL - A Closer Look to CouchbaseNoSQL - A Closer Look to Couchbase
NoSQL - A Closer Look to Couchbase
 
Best Practices for Migrating Legacy Data Warehouses into Amazon Redshift
Best Practices for Migrating Legacy Data Warehouses into Amazon RedshiftBest Practices for Migrating Legacy Data Warehouses into Amazon Redshift
Best Practices for Migrating Legacy Data Warehouses into Amazon Redshift
 
Sql
SqlSql
Sql
 
It 302 computerized accounting (week 2) - sharifah
It 302   computerized accounting (week 2) - sharifahIt 302   computerized accounting (week 2) - sharifah
It 302 computerized accounting (week 2) - sharifah
 
Proc sql tips
Proc sql tipsProc sql tips
Proc sql tips
 
ICDE2015 Research 3: Distributed Storage and Processing
ICDE2015 Research 3: Distributed Storage and ProcessingICDE2015 Research 3: Distributed Storage and Processing
ICDE2015 Research 3: Distributed Storage and Processing
 
Bank Question Solution-ADBA Previous Year Question for AP, ANE, AME, ADA, AE
Bank Question Solution-ADBA Previous Year Question for AP, ANE, AME, ADA, AEBank Question Solution-ADBA Previous Year Question for AP, ANE, AME, ADA, AE
Bank Question Solution-ADBA Previous Year Question for AP, ANE, AME, ADA, AE
 

Payroll Cluster Repair Whitepaper

  • 1. Payroll Cluster Repair Payroll Cluster Repair - Whitepaper - Author: Andreas Mau andreas@kdssc.com Klaus-Dieter Spatz klaus@kdssc.com KDS Software & Consulting, Inc 3715 Jefferson Court Redwood City, CA 94062 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
  • 2. 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
  • 3. 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. PCL1 TX Infotype texts TE Travel expenses TA General data for accounting of travel expenses PCL2 ID Interface toolbox – directory of interface results ZL Time wage types and work schedule RU Payroll results (US) PCL3 TY Applicant data texts AP Applicant actions PCL4 P2 Log for RPCALX0 and RPTIME00 U1 Tax reporter forms for US PCL5 PY Payroll data for personnel cost planning CP Planning run data for personnel cost planning STXL TX Notes related to infotypes Fig. 1.: Component diagram of a Payroll Posting Outsourcing Solution All these tables have a predefined structure. The structure of one of these tables is shown in Fig. 1. 07/09/09 Page 3
  • 4. Payroll Cluster Repair Fig. 2.: Structure of PCL1 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
  • 5. 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: EXPORT ITAB1 ITAB2 STRUC1 TO DATABASE TABNAME(CLUSTER_ID) ID KEY. 07/09/09 Page 5
  • 6. Payroll Cluster Repair 2 Payroll Cluster Repair 2.1 Rx and B2 Cluster Check and Repair In general any hardware based caused of defective database entries cannot be repaired. Damage of database content may have happened in single entries leading to incorrect data which cannot be corrected. Reconciliation of historic records may find errors in single entries. The procedures in this document can help to partially restore defective data but do not implicate correctness of all historic data. Usage of the programs herein should only be the very last resort to reconstruct and repair lost and damaged cluster entries. 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 2.2 Customer Priorities Here a comprehensive list of high customer priorities for Payroll Cluster Repair: 1. Easy to use applications 2. Fast determination of defective payroll clusters 3. Ability to monitor payroll results and details 4. Ability to extend the use of existing SAP components rather than solution replacements 5. Efficient performance 6. Standard look and feel of resulting applications 07/09/09 Page 6
  • 7. Payroll Cluster Repair 3 Definition and Specifications 3.1 Definition Two programs have been created to allow cluster checking and repair for RQ and B2 clusters. These are: ZP_TT_MAU_03 Cluster RQ check and repair Fig. 3.: Cluster Repair 1 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
  • 8. Payroll Cluster Repair ZP_TT_MAU_04 Cluster B2 check and repair Fig. 4.: Cluster Repair 2 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 3.2.1 Cluster Check The cluster check programs have an option “Find defect clusters” which allows finding defective clusters except those which cause an exception. Clusters with this exception are not recoverable as the cluster dictionary reference has been completely compromised and does not allow a reconstruction. In general repair of cluster entries should only be done via transport of the entry from a backup copy as described in section “Transport of Single Cluster entries from Backup”. 07/09/09 Page 8
  • 9. Payroll Cluster Repair Add-On Options Payroll Cluster Repair Payroll /KDSSC/… Results Cluster View Payroll Directory Fig. 5.: Data flow diagram of the Payroll Cluster Repair 3.2.1.1 Find defect Clusters Running the program will result in a list of defect cluster entries. These can be looked up with cluster programs RPCLSTRx and RPCLSTB2 for the respective cluster. Running these pro- grams and checking the cluster entries of the list will result in a short dump with the respective cluster error/exception. For repair of single cluster entries refer to section “ Transport of Single Cluster entries from Backup”. 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
  • 10. Payroll Cluster Repair 3.2.1.2 Handling exceptions If a short dump occurs with the exception you can retrieve the personnel key 1. On the short dump screen hit the “debugging” button. 2. For RQ cluster: by typing rx-key in the field content and hit enter. Write the entire key down. The first 8 digits are the personnel number, the next 5 are the sequence number. 3. For B2 cluster: by typing b2-key in the field content and hit enter. Write the entire key down. The first 8 digits are the personnel number, the next 6 are the year and period. 4. Exclude the entire personnel number causing the short dump from the next run by using the selection option (exclusion list) and run the program again either from this personnel number or entirely again. 5. Record all occurrences of this exception including the keys as described above. 3.2.2 Cluster Repair (Reconstruction) USE EXTREM CAUTION, PREFERABLY SKIP TO THE NEXT SECTION The incorrect use of this option may lead to further data loss. In general clusters should not be reconstructed with this method if an intact backup copy is available. This method should only be used to reconstruct a cluster if a backup copy is NOT available. If a backup copy of the cluster is available please skip this section and follow the steps in section „Transport of Single Cluster entries from Backup“. 3.2.2.1 Repair cluster This option allows to reconstruct damaged cluster entries by ignoring the danged portion of the entry. This reconstruction will have some data loss and is never a complete reconstruction. For complete reconstruction always use copies from a backup. After reconstruction a retro calculation may find differences which have to be carefully reviewed as the data may show differences to the original. 3.2.2.2 Create empty cluster In case the cluster cannot be reconstructed as described above this option allows to at least create an empty cluster which can be filled 07/09/09 Page 10
  • 11. Payroll Cluster Repair 3.2.2.3 Restrictions and Limitations Usage of this option may result in further loss of data if used incorrectly. Examples are: incorrect key specifications or range selections resulting in deletion of other data. 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.3 2.4 Transport of Single Cluster entries from Backup In case of total cluster destruction the original result cannot be reconstructed via repair and retro calculations. It is always recommended to use a backup copy to repair single results. For this the backup copy has to be restored to a different system in the same client as the original. If the production system is PRD client 010. Then the backup should be restored to a separate system BCK client 010. Otherwise the transport of single cluster entries will not work. The following steps are needed 1. Restore backup to separate system where PRD client (production system) = BCK client (backup system) 2. Create an workbench transport via transaction SE09. 3. Edit the transport entry and add an entry: R3TR TABU PCL2. 4. Add table keys for the damaged cluster entries only. Check your entries by utilizing transaction SE16 for cluster table PCL2 and the respective keys. Note that the key requires you to enter the client (e.g. ‘010’), the cluster (e.g. ‘RQ’), the cluster key (e.g. eeeeeeeesssss). Expertise in transporting table entries is required for this step! 5. CAUTION: During the transport confirm that only the entries selected are being transported! 6. Import the transport in the corruptive system. 7. Run the cluster check again for the entire population without any selections and make sure there are no further corruptions in the system. Should there be additional defects commence as described above until no further defects are found. 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
  • 12. 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. 3.7 Simplicity and Aesthetics It is a requirement that the solution will be easy to use and to maintain. There should be no special knowledge needed to run the application. All of this should ultimately lead to a good user-perceived quality of the solution. 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
  • 13. Payroll Cluster Repair 4 Serviceability and Maintenance As defined in the Solution Definition and Specifications above various objects are to be created to allow proper configuration of the solution. 07/09/09 Page 13
  • 14. Payroll Cluster Repair 5 Appendix 5.1 ZPTT_MAU_03 REPORT zptt_mau_03 . TABLES: pcl1, pcl2. DATA: pn-paper TYPE paper. INCLUDE rpc2rqq0. "Cluster RQ data definition INCLUDE rpc2rx09. "Cluster RX data definition internat. part INCLUDE rpppxd00. "Data definition buffer PCL1/PCL2 DATA: BEGIN OF COMMON PART buffer. INCLUDE rpppxd10. "Common part buffer PCL1/PCL2 DATA: END OF COMMON PART. INCLUDE rpppxm00. "Buffer handling routine DATA: gl_pernr TYPE p_pernr, gs_rgdir TYPE pc261, gt_rgdir TYPE pc261 OCCURS 0, gs_data TYPE hrpy_rgdir, gt_data TYPE hrpy_rgdir OCCURS 0. SELECTION-SCREEN BEGIN OF BLOCK s01 WITH FRAME TITLE text-001. SELECT-OPTIONS: s_pernr FOR gl_pernr NO INTERVALS. PARAMETERS: s_seqnr TYPE cdseq. SELECTION-SCREEN END OF BLOCK s01. SELECTION-SCREEN BEGIN OF BLOCK s02 WITH FRAME TITLE text-002. PARAMETERS: s_find TYPE xfeld RADIOBUTTON GROUP rd1 DEFAULT 'X', s_repair TYPE xfeld RADIOBUTTON GROUP rd1, s_repai2 TYPE xfeld RADIOBUTTON GROUP rd1, s_test TYPE xfeld DEFAULT 'X'. SELECTION-SCREEN END OF BLOCK s02. 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. * show progress indicator 07/09/09 Page 14
  • 15. Payroll Cluster Repair CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR' EXPORTING percentage = 30 text = 'Checking clusters ...'. SELECT * FROM pcl2 WHERE relid = 'Rx'. gl_pernr = pcl2-srtfd(8). CHECK gl_pernr IN s_pernr. * initialize buffer * refresh cluster tables before accessing new result IF ( s_repair = 'X' ) OR ( s_find = 'X' ). * set keys rx-key-pernr = pcl2-srtfd(8). " '01900117'. rx-key-seqno = pcl2-srtfd+8(5). " '00176' . IF NOT s_seqnr IS INITIAL. CHECK rx-key-seqno = s_seqnr. ENDIF. * import result without exceptions ... 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' . IF NOT s_seqnr IS INITIAL. CHECK rx-key-seqno = s_seqnr. ENDIF. rx-key-seqno = s_seqnr. " '00176' . * import result directly from PCL2 ... sy-subrc = 1. ENDIF. IF sy-subrc <> 0. * show progress indicator CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR' EXPORTING percentage = 60 text = pcl2-srtfd. * WRITE: / pcl2-srtfd(8), pcl2-srtfd+8(5). CLEAR: gs_data. gs_data-pernr = pcl2-srtfd(8). gs_data-seqnr = pcl2-srtfd+8(5). ... 07/09/09 Page 15
  • 16. Payroll Cluster Repair MOVE-CORRESPONDING gs_rgdir TO gs_data. APPEND gs_data TO gt_data. IF ( s_repair = 'X' ) OR ( s_repai2 = 'X' ). * BREAK-POINT. * export result to itself (in case of s_repai2 tables and * structures will be empty!!!) ... * import result from buffer as additional check before update * update cluster IF s_test IS INITIAL. ... ENDIF. ENDIF. ENDIF. ENDSELECT. * Call ABAP/4 List Viewer CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY' EXPORTING i_callback_program = sy-cprog i_structure_name = 'HRPY_RGDIR' i_save = 'A' " A = All => Standard & User TABLES t_outtab = gt_data. 5.2 ZPT_MAU_04 REPORT zptt_mau_04 . TABLES: pcl1, pcl2. DATA: pn-paper TYPE paper. DATA: pn-begda TYPE begda. DATA: pn-endda TYPE endda. INCLUDE rpc2rqq0. "Cluster RQ data definition INCLUDE rpc2rx09. "Cluster RX data definition internat. part INCLUDE rpppxd00. "Data definition buffer PCL1/PCL2 DATA: BEGIN OF COMMON PART buffer. INCLUDE rpppxd10. "Common part buffer PCL1/PCL2 DATA: END OF COMMON PART. INCLUDE rpppxm00. "Buffer handling routine *INCLUDE rpc2ps00. *INCLUDE rpcfdc10. 07/09/09 Page 16
  • 17. Payroll Cluster Repair *INCLUDE rpcfdc09. INCLUDE rpc2b201. INCLUDE rpc2b202. INCLUDE rptdat00. " common part otables, additional fields DATA: gl_pernr TYPE p_pernr, gs_data TYPE pc2b0, gt_data TYPE pc2b0 OCCURS 0. SELECTION-SCREEN BEGIN OF BLOCK s01 WITH FRAME TITLE text-001. SELECT-OPTIONS: s_pernr FOR gl_pernr NO INTERVALS. SELECT-OPTIONS: s_pabrj FOR gs_data-pabrj NO INTERVALS, s_pabrp FOR gs_data-pabrp NO INTERVALS. SELECTION-SCREEN END OF BLOCK s01. SELECTION-SCREEN BEGIN OF BLOCK s02 WITH FRAME TITLE text-002. PARAMETERS: s_find TYPE xfeld RADIOBUTTON GROUP rd1 DEFAULT 'X', s_repair TYPE xfeld RADIOBUTTON GROUP rd1, s_repai2 TYPE xfeld RADIOBUTTON GROUP rd1, s_test TYPE xfeld DEFAULT 'X'. SELECTION-SCREEN END OF BLOCK s02. 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. * show progress indicator CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR' EXPORTING percentage = 30 text = 'Checking clusters ...'. SELECT * FROM pcl2 WHERE relid = 'B2'. gl_pernr = pcl2-srtfd(8). CHECK gl_pernr IN s_pernr. * initialize buffer * set keys b2-key = pcl2-srtfd. CHECK b2-key-pabrj IN s_pabrj. CHECK b2-key-pabrp IN s_pabrp. * finalize B2 key PERFORM check_cluster_b2. ENDSELECT. * Call ABAP/4 List Viewer CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY' EXPORTING 07/09/09 Page 17
  • 18. 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 ... IF ( s_repair = 'X' ) OR ( s_find = 'X' ). * import result without exceptions ... ELSEIF s_repai2 = 'X'. * import result directly from PCL2 PERFORM pcl2_exp_imp USING 'READ'. sy-subrc = 1. ENDIF. IF sy-subrc <> 0. * show progress indicator CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR' EXPORTING percentage = 60 text = pcl2-srtfd. * WRITE: / pcl2-srtfd(8), pcl2-srtfd+8(5). CLEAR: gs_data. MOVE-CORRESPONDING b2-key TO gs_data. APPEND gs_data TO gt_data. IF ( s_repair = 'X' ) OR ( s_repai2 = 'X' ). * BREAK-POINT. * export result to itself ... * import result from buffer as additional check before update * update cluster IF s_test IS INITIAL. ... ENDIF. ENDIF. ENDIF. ENDFORM. 07/09/09 Page 18
  • 19. 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