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. 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

2 minute read

How to End Another User's SAP Session

Unable to edit a crucial document in SAP® because you're locked out? Learning how to end another user's SAP session will solve this issue.

3 minute read

Finding Translations for SAP® Terminology

Using the correct translations for SAP® terminology is important in international projects. Discover how to find these quickly.

2 minute read

How to Save an IDoc Parser Report to a Local File

In this short and simple guide we show you how to save an IDoc parser report to a local file in just a couple of easy steps.

6 minute read

How to Debug SAP Message ME161 - "The Notified Quantity Exceeds the Ordered Quantity"

Don't know how to fix SAP error message ME161 "The notified quantity exceeds the ordered quantity"? In this article we break it down.

3 minute read

ecosio to Host SAP/EDI Workshop at UKISUG Connect 2021

ecosio is exhibiting and running an SAP/EDI workshop at this year's UKISUG Connect conference. Find out what attendees can enjoy at the event.

6 minute read

SAP® EDI Project Roles - A Breakdown

Learn the various EDI project roles involved in achieving successful EDI integration in SAP systems and how the different roles interact.

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.

6 minute read

How do I Implement EDI with SAP Integration Suite®?

EDI with SAP Integration Suite®: take over internally yourself or hire a fully managed EDI service provider? In this article we explore the positives and negatives of these approaches.

3 minute read

How to create an SAP transaction code

Want to know how to create an SAP transaction code for an existing ABAP program so that you can easily call the program?

9 minute read

Alternative Solutions for EDI Data Exchange with SAP PI and SAP PO

Discover the three possibilities when it comes to implementation of electronic data interchange (EDI) in SAP Process Integration or SAP Process Orchestration (SAP PI/PO).

6 minute read

How to Set Up and Manage Automatic SAP Jobs

SAP jobs can be used to automate processes in SAP ERP so they can be carried out without user intervention. We explore the key features.

4 minute read

IDoc Status Change in SAP ERP

IDoc statuses are not always the clearest - particularly when errors occur. In this article we explain how to change IDoc status as required.

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.