4 minute read

How to Delete an IDoc in an SAP ERP System

Working with IDocs

An IDoc (Intermediate Document) is the central import and export format of an SAP ERP system. By using IDocs, you can export and import any type of data from an SAP system. In addition to the pre-defined IDoc formats, such as ORDERS, ORDRSP, DESADV, etc, you can also define your own IDoc formats.

In the SAP system, transaction BD87 is a useful tool for the administration of IDocs (see here for our article on IDoc processing SAP ERP with transaction BD87). Ideally, all IDocs have a green or yellow status in transaction BD87.

The following screenshot shows transaction BD87 in a test system. As you can see, some IDocs are in an error status. The status below would not be acceptable in a production system, as it would mean that important data would potentially not leave the system or were not received by it.


Transaction BD87 with Faulty IDocs
Transaction BD87 with Faulty IDocs

© 2020. SAP SE or an SAP affiliate company. All rights reserved. Used with permission of SAP SE.

There are two options to correct the red status in a production system. Either the IDoc can be edited and processed again, or the faulty IDoc can be deleted and the data regenerated. For outbound IDocs this means that the generating process in SAP needs to be started again (e.g., retriggering of DESADV IDoc generation using new LALE message entry). However, for inbound documents, this means that the data needs to be sent to the SAP system again, e.g., from the EDI system.

But first you want to delete the old IDoc, to keep a clean transaction BD87.

White Paper - EDI Integration in SAP

Deleting IDocs

There are two options to delete an IDoc.

The first option is to change the IDoc status, e.g. reset it to status 31 (error, no more processing) or to status 38 (IDoc archived). The IDoc is not physically deleted, but the status is reset, so that the IDoc does not stay in a defective status in transaction BD87.

The other option is to physically delete the IDoc. SAP provides transaction WE11 for this purpose, as shown in the Figure below.


Transaction WE11 to Delete IDocs
Transaction WE11 to Delete IDocs

© 2020. SAP SE or an SAP affiliate company. All rights reserved. Used with permission of SAP SE.

Similar to transaction BD87, you can select IDocs using several different parameters. Just as with transaction BD87, it is highly recommended to use extreme caution when using transaction WE11, as you could accidentally delete many IDocs. Fortunately, after clicking on execute (alternatively pressing F8), transaction WE11 will issue a confirmation prompt, as shown in the following screenshot.


Confirmation Prompt in Transaction WE11 when Deleting IDocs
Confirmation Prompt in Transaction WE11 when Deleting IDocs

© 2020. SAP SE or an SAP affiliate company. All rights reserved. Used with permission of SAP SE.

If you are not sure, you can alternatively start a test run instead of deleting. In this case, the deletion is only simulated, and you can see how many IDocs would be deleted. Since deleting is a potentially irreversible action, one should be very careful about what exactly is selected for deletion.

After the deletion, an overview of the deleted artifacts will be displayed.


Transaction WE11 Results
Transaction WE11 Results

© 2020. SAP SE or an SAP affiliate company. All rights reserved. Used with permission of SAP SE.

Which of the two methods is used to delete an IDoc depends primarily on the compliance rules of the respective company. For example, transaction WE11 may be deactivated in the production system because, for audit reasons, you want to prevent something from being removed from SAP. Furthermore, access to transaction WE11 may only be possible for a small group of users (e.g., EDI administrators), as one would like to prevent the business units from accidentally cleaning up the system.

Any questions about IDocs or SAP?

You still have questions about SAP, IDocs or EDI? Please contact us or use our chat — we’re more than happy to help!

You may also find the following articles helpful:

 

SAP ERP and SAP S/4HANA are the trademarks or registered trademarks of SAP SE or its affiliates in Germany and in several other countries.

Subjects

most read

Keep on reading

4 minute read

What Does a Web EDI System Look Like?

A Web EDI system can be hugely useful in helping you to extend automation across your partner network. But what does a system look like?

8 minute read

Peppol Message Responses - A Helpful Guide

Peppol acknowledgements, message level responses and business level responses are a key part of what makes Peppol such an attractive prospect for modern B2B data exchange. Find out how they...

7 minute read

Sending Electronic Invoices in Spain Using the FacturaE Format via the FACeB2B System

We present the status of e-Invoicing in Spain and give an outlook on the future implications if the current regulation will be extended to all companies in Spain.

10 minute read

Alternative Solutions for EDI Data Exchange with SAP PI

Many companies use SAP PI to enable data exchange between a given SAP ERP system and its connecting systems. Discover the options available.

5 minute read

What is Master Data and Why Does it Matter?

Efficient master data is crucial to successful EDI processes and a streamlined supply chain. Find what you can do to improve yours.

7 minute read

E-invoicing in Poland

Big changes are planned for e-invoicing in Poland over the next few years. Find out what's ahead and how long you have to implement changes.

5 minute read

E-invoicing in Spain

What are the regulations when it comes to e-invoicing in Spain? Find out what's required and what changes are likely in the future.

5 minute read

E-invoicing in France

Is e-invoicing in France mandatory? Read our article to find out what you need to do to achieve compliance and prepare for the future.

8 minute read

An Introduction to the Four Main EDI Methods

Do you know which of the main EDI methods makes most sense for your business? To help, in this article we break each method down one by one.

20 minute read

The Future of EDI

Debunking the myths and building a realistic picture of what the next decade will bring for B2B integration.

We use cookies to provide an optimal website experience. You decide which one you want to allow. Depending on the setting, however, not all functionalities may be available to you. Data protection & imprint.