SAP Knowledge Base Article - Preview

2365765 - ELM 4.0: WHT - due to an invalid municipality code, no valid XML notification can be created


You create a monthly withholding tax return (ELM 4.0 and domain QST) using the program RPLELMC0, and the system issues the following warning or error message:

  1. Warning: "Municipality number as per MDS directory is blank"
  2. Error message: "Entry does not exist in T5C1O_EX: Canton**, Postal code****, Municipality ****"

The messages in the log display of the program RPLELMC0 are also displayed for the following checks due to the validity checks of the municipality codes:

  1. Check of the work center based on the data of the payroll unit (application key: ELWP)
  2. Check of the person liable to withholding tax based on the data from the payroll results (not on the basis of the master data)

 -> errors that are displayed due to the check of the work center can be corrected by adjusting the payroll unit (application key: ELWP) or the Customizing settings in the view V_T5C1O_EX (TaxCanton/Municipalities/PostalCode). The affected payroll unit is part of the message in the log display.

-> Errors during the check of the person subject to withholding tax require a further analysis. Since the check of the municipality codes for the person subject to withholding tax is executed on the basis of the payroll results (important for retroactive changes), you cannot correct an incorrect municipality assignment (or an empty municipality code) by changing master data (infotype "Tax", IT0038). In this case, you must proceed as follows:

  1. If the payroll was run for the employee with a correct combination of canton, postal code, and municipality code, it must be assumed that the Customizing settings of the view V_T5C1O_EX are incorrect. Check whether the Customizing settings were postprocessed and update correctly after a municipality merger. In this case, it would be sufficient to adjust Customizing.
  2. If the payroll was run with an incorrect combination of canton, postal code, and municipality code, however, the error can currently be corrected only using a BAdI implementation. A possible BAdI implementation is available in the attachment of this article. However, note that this sample implementation is not maintained by SAP. In the sample BAdI implementation, the system selects the municipality code from the master data. If you cannot enter valid master data (IT0006, IT0038) for retroactive (for-) periods, for example, for retroactive accounting, this data may have to be set in the BAdI explicitly and specifically for the period.
  3. You report this employee manually.

A retroactive correction of the master data with a forced retroactive accounting run of the employee does not solve this problem because a WHT ELM 4.0 notification reads and validates previous periods with a for-period view. This means that the "A" results of the payroll results are not evaluated for the validation of periods of the past.

Selection period in RPLELMC0: 04_2016
Current payroll period: 05_2016 with forced retroactive accounting run to 01_2016.
The system evaluates all the FOR-results that have been generated IN 04_2016. For example, a P-result IN 04_2016 FOR 01_2016 that still contains old or uncorrected results, is also processed.
The forced retroactive accounting IN 05_2016 becomes effective only for selection period RPLELMC0 05_2016.

If you have not entered a municipality code and the error or warning message is displayed in the log, but you create an XML notification despite this, the system issues the following message (or similar) during an XML check against the schema depending on the used XML check program: "Mandatory field initial: TaxAtSourceMunicipalityID". 



  • SAP Release 6.0 and higher
  • Human Resources / HR / HCM


RPLELMC0, T5C1O_EX, WHTM, municipality code, canton, postal code, PLZ, entry, exists, MDS, directory, ELWP, obligatory, initial, TaxAtSourceMunicipalityID, HRPAYCHELM01, HRPAYCHELM05 , KBA , PY-CH , Switzerland , PA-PA-CH , Switzerland , How To

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.