Example: Customer Program for Change Validation 

The following example shows a possible structure for your user-defined program, which will be used to decide whether or not to activate change validation when the export program runs.

 

   REPORT ZPCIFP01.

   INCLUDE ZPCIFRX3.       "INCLUDE 3 from export program

   FORM DIFFERENCE_CHECK USING SWITCH.

      SWITCH = `1`.         "change validation is active

      READ TABLE NEW_WPBP INDEX 1.

         IF SY-SUBRC = 0.

         READ TABLE OLD_WPBP INDEX 1.

         IF SY-SUBRC = 0.

            IF ( NEW_WPBP-MASSN <> OLD_WPBP-MASSN) AND

               ( NEW_WPBP-MASSN = `05`).

               SWITCH = `0`. "change validation is not active

   ENDIF.

   ENDIF.

      ENDIF

ENDFORM.

 

Legend

The form routine uses the SWITCH parameter, which decides whether or not the change validation is active.

The change validation function is set to active as default (SWITCH = 1). If the MASSN field in the Work Center/Basic Pay (WPBP) table for the current export data differs from that in the comparison period, and if the current personnel action (MASSN) is ‘05’, then change validation is not active.