If I understand you correctly, during Payroll Calculation, WT 6999 is read from table ZL while WT 6998 is generated through function P0014, P0015 or P2010, and both WTs end up in the Input Table (IT) at some point.
After the point in your schema where WT 6999 is read (from ZL) and transfered to the IT, use a PCR to create a temporary variable (using operation ADDWT&6999) if it exists.
After the point in your schema where WT 6998 is created in the IT, add a PCR to process WT 6998 and query the temporary variable. If WT 6998 exists and the temporary variable exist, generate your message.
For more information on operation XMES, there is an interresting wiki on this site