SAP Program /ISDFPS/TRANSFER_IT_1957 - Convert Infotype 1957 as Part of Operational/Exercise Relationships

Explanation
This report is used to convert data of HR infotype 1957 to HR infotype1985 and to adapt data in HR infotype 1956.
The relevant infotypes are part of the "Defense Forces & PublicSecurity" Enterprise Add-On (EA-DFPS) within the HR OrganizationalManagement framework.
Infotypes in HR Organizational Management describe object attributes(such as organizational units, positions, or persons). Individualrecords of the attributes for an object are stored in infotype tablesHRPxxxx, where xxxx is the infotype number. Some infotypes, "tableinfotypes," also have one or more records in table HRTxxxx for eachrecord in table HRPxxxx, that is, they are two dimensional.
The infotype adapted in this report, infotype 1956 ("Operation/Exercise"
), defines a force element (an organizational unit in the "DefenseForces & Public Security" industry solution) as an operation orexercise. In addition to the attributes (such as category and intensity)that are stored in table HRP1956, this infotype, as a table infotype,also contains definitions of one or more operation/exercise contingentsin table HRT1956.
In its table section in table HRT1957, infotype 1957 ("ContingentAssignment") describes the assignment of a force element to one or moreoperation/exercise contingents, which are described in more detail inthe infotype 1956 records of the corresponding operations/exercises.
Infotype 1985 ("Operational/Exercise Relationships") creates arelationship between two force elements or between a force element and aposition in an operational/exercise structure. The records thereforedetermine a hierarchy by defining the superiors and subordinates in thehierarchy. This infotype is not a table infotype, that is, its data iscontained in table HRP1985 only.
Since over time it has been established that exactly one table record ofinfotype 1957 logically describes exactly one relationship in infotype1985, but that, technically, the two datasets can be brought togetheronly at the expense of system performance, the data in infotype 1957 isstored directly in the relevant record in infotype 1985 as of EA-DFPS6.00. Infotype 1957 is then obsolete.
The purpose of this report is to convert the data currently stored ininfotype 1957 to infotype 1985 during the relevant upgrade. In addition,the last contingent in each operation or exercise (that is, each highestHRT1956 table record of an HRP1956 record) is to be extended to the endof the operational/exercise object.
Since only a few customers currently use the construct for infotype 1957(none of which use it in production) and because it can usually beassumed that all these customers have imported SP4 of the industrysolution IS-DFPS 4.71 before upgrading the industry solution to theEnterprise Add-On EA-DFPS 6.00 (only context in which conversion isrequired), SAP has not delivered this report as an XPRA, since the datahas already been converted. This report is used for the manualconversion of infotype 1957 only if SP4 of the industry solution is notimported before the upgrade of IS-DFPS 4.71 to EA-DFPS 6.00. If thereport is run inadvertently once data for infotype 1985 has already beenmaintained in the application, inconsistencies may arise.
If the report is started, a warning about possible inconsistencies isfirst output before the system starts converting the data of infotype1957 to the relevant records in infotype 1985. First, all records ofinfotype 1957 are determined across all clients. For each of theserecords, the contingent information about the referencedoperation/exercise contingent in the table section in infotype 1956 ofthe relevant operation or exercise is determined. If the information isnot found, a warning about this inconsistency of the initial data isoutput. The system terminates the conversion of this infotype 1957record and continues with the next record. If the relevant contingentinformation is found, the system determines whether the contingent is anoperation contingent or exercise contingent on the basis of the infotype1956 record. If this information cannot be determined, the systemoutputs a warning and continues with the next record. If the systemcould determine whether the contingent is an operation contingent orexercise contingent, the relevant relationship between two forceelements in infotype 1985 is determined that corresponds to the currentrecord in infotype 1957. The data for infotype 1957 is stored for therelationship. Any dependent relationships to positions are alsoadjusted. If no relationship can be determined, the system outputs awarning.
Once all infotype 1957 records have been converted, the table record foreach last contingent is extended to the end date of the operation orexercise for each operation/exercise definition in infotype 1956. Inaddition, the record with the highest row number in HRT1956 isdetermined for each record in HRP1956, and its contingent end date isset to the object end date. If no table row is found, the system outputsa warning about the inconsistency of the initial data.
Once the report has been run, the system outputs the usual log for XPRAin the SAP Memory or on the screen. All messages for this report can befound at level 3 (Info) or 4 (Debug), since no (new) inconsistencies canarise in the dataset as a result of this report. However, the warningsbriefly described above display any inconsistencies in initial data thatmust be dealt with. For this purpose, all warnings have a detailed longtext.