Skip to Content
Technical Articles

Peppol – How to test XML files created by SAP Document Compliance with external tools?

The validation of Peppol messages is one of the functionalities that the Peppol service of SAP Document Compliance, cloud edition offers. Validation results are directly available in the eDocument cockpit of your backend system (ECC, SAP S/4HANA, SAP S/4HANA Cloud) for users to take action on.

But how to do a first check of a UBL invoice or of a XRechnung before the Peppol service is connected? That would e.g. make possible to work on extending the Peppol message (if applicable) while another colleague proceeds with the cloud integration. For that, many consultants would like to upload files to an online Peppol validator such as the one made available by Philip Helger.

Here is the trick: remove the document header while giving its properties to the Invoice tag.

From the eDocument Cockpit, export the Invoice file[1]. It will have the following structure:

<n0:StandardBusinessDocument xmlns:n0="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader" xmlns:prx="urn:sap.com:proxy:CCF:/1SAI/TAS9290DB4E2471E379E3D0:779" xmlns:n1="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:n2="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:n3="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
<n0:StandardBusinessDocumentHeader>
[…]
</n0:StandardBusinessDocumentHeader>

                <n3:Invoice > 
[…]
                </n3:Invoice>

</n0:StandardBusinessDocument>

 

Using a tool such as Notepad++[2], you need to remove the header parts (don’t forget the last </n0:StandardBusinessDocument> at the end of the file) and copy the properties to the Invoice tag. Only the bold parts should remain.

The new file looks like this:

<n3:Invoice xmlns:n0="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader" xmlns:prx="urn:sap.com:proxy:CCF:/1SAI/TAS9290DB4E2471E379E3D0:779" xmlns:n1="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:n2="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:n3="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">

[…]

</n3:Invoice>

 

Save the file locally. Now before proceeding, check if uploading such a file complies with your company policies related to data protection and confidentiality.

If the approach is acceptable, upload the file to the external tool. Select the right rule set, e.g.:

  • for the mandatory Peppol invoice profile, OpenPEPPOL Invoice,
  • for Germany, XRechnung UBL Invoice

The tool should now provide a detailed validation report and give you hints on whether there is a need to adjust the message and where exactly.

Happy testing!

If you have questions, please use the Ask a Question link in the top right corner.

For more information on SAP Document Compliance visit this Community page. For further context details on XRechnung, see the blog series All you wanted to know about the electronic invoice in Germany (English, German). For details on testing Peppol, see Peppol – Attention points for testing. For details on testing ZUGFeRD, see the blog How to change E-Mail during test phase?

 

[1]  The cockpit can be accessed with transaction EDOC_Cockpit. To export a file, select its line then click the menu item Go To > eDocument History > select the third line > Export file.

[2] For nicer formatting, use the plugin XML Tools (Plugins > XML Tools > Pretty print).

This blog has been written with input from Gabor Nagy.

Be the first to leave a comment
You must be Logged on to comment or reply to a post.