Programme SAP WTY_XPRA_002 - Programm WTY_XPRA_002

Purpose
XPRA for decoupling from iPPE and moving important iPPE field content tonew fields in the warranty tables.

Prerequisites
This XPRA should be executed from release DI 4.6C CRT7 and higher.
Any customer extensions to iPPE tables are not supported by this XPRA .In case such extensions exist, you have to create your own report(s) toconvert the data.

DESCRIPTION
This XPRA report moves field values from iPPE tables that are no longerused by the Warranty application to the new fields of the correspondingWarranty tables. Moreover, the report sets up direct links betweenwarranty tables instead of links through iPPE tables.
This XPRA report does not delete any data and can be safely restartedbefore productive use.
We do not recommend restarting this report after productive use, becauseolder values might overwrite timestamps and administrative data forexisting claims that were changed after execution of this XPRA and thatstill have corresponding entries in the iPPE tables.
The report has the following sections, which are marked with comments inthe report source code:
Section 1 Prepare field lists
This section prepares field lists for dynamic SELECT statements later inthe program. This improves performance, because these dynamic fieldlists allow execution of the command UPDATE ... FROM TABLE instead ofupdating single records. The following field lists are prepared:
PNWTYH
PNWTYV for SELECT/UPDATE of the HEADER_GUID field
PNWTYV for SELECT/UPDATE of the administrative fields
PVWTY
PRWTY for SELECT/UPDATE of the HEADER_GUID field
PRWTY to delete the header guid for the relationship between items indifferent claims
Section 2 Process PNWTYH table
In this section, administrative fields from the PNODID table and shorttexts from PNODTX are transferred to the corresponding new fields inPNWTYH.
Section 3 Process PNWTYV table
The PNWTYV table is processed in two steps for performance reasons:
The PNWTYV table is joined with PRWTY, and PRWTY is joined with PALTID.The system reads the header GUID from PALTID and writes it to theHEADER_GUID field in PNWTYV.
The PNWTYV table is joined with PNODID and PNODTX, and theadministrative data together with the short texts are transferred to thenew fields in PNWTYV.
Section 4 Process PVWTY table
In this section, PVWTY is joined with POSVID, and the administrativefields and version GUID are transferred to the corresponding new fieldsin PVWTY.
Section 5 Process the Version-Version relationship in the PRWTY table
This section contains two steps for performance reasons:
Transfer header GUID to the records in PRWTY with a Version-Versionrelationship
Delete header GUID for all relationships where GUID1 and GUID2 referencethe versions from the different claims
Section 6 Process the Item-Item relationship in the PRWTY table
This section contains two steps for performance reasons:
Transfer header GUID to the records in PRWTY with an Item-Itemrelationship
Delete header GUID for all relationships where GUID1 and GUID2 referencethe items from the different claims
Section 7 Save messages in the database

Output
When carrying out the XPRA, the system logs the start and finish of theprocess. Log entries are made in the following situations:

  • No warranty claims are found in the client. A message will be logged in
  • the clients in which the Warranty application is not used
    • For each processed table, the system logs a message containing the table
    • name and the total number of records
      If the system raises a catchable exception during execution, it writesthe exception text to the log as an error and terminates processing.