How to edit idoc in we02

Edit the contents of IDoc segments and fields

Why incorrect IDocs can occur

Incorrect IDocs are a typical side effect of a SAP ERP system. However, the ERP system itself is not to blame. In most cases, incomplete data is generated by application modules (for outgoing IDocs) or incomplete data is sent by business partners (for incoming IDocs). Transaction provides an overview of the current IDoc status in a SAP system. By the way: You can read in this article how you can easily delete incorrect IDocs.



BD87 transaction with IDoc overview

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

In any case, the incorrect IDocs must be corrected so that they can be processed again. In the following, we differentiate between two types of post-processing, for each of which different procedures are necessary or possible.

In the first case, only existing data in segments and fields should be corrected. We use transaction for this. In the second case, in addition to correcting existing data, new segments should also be added. We use Transaction for this purpose.

The most important difference: in the case of a transaction, the existing IDoc is processed - i.e. no copy is created. During the transaction, the original IDoc remains untouched and a copy of the IDoc is automatically generated and the copy processed.

Correction of existing data

If you only want to edit existing data in an IDoc, but not add new segments, you can initiate processing of the IDoc directly via transaction. To do this, double-click on the required IDoc type.



BD87 transaction with affected IDoc type

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

An overview then opens with the affected IDocs. Here again click on the desired IDoc number. In the overview shown below, only one IDoc is simply affected.



BD87 transaction with IDoc overview

The IDoc detail view then opens, which reveals the internal details of the IDoc.



IDoc detail view

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

The control record at the top provides information about the details that are hidden in an IDoc in the segment. We presented in an earlier article how you can see the description of the individual IDoc segments.

Under Records you can see the individual data segments. In the delivery schedule type shown, the ROOT segment is. With a click on a subnode you can expand the tree further, if this is possible. Existing subnodes are indicated by the symbol. In the IDoc shown above, for example, the segment has additional subsegments.

The status records of an IDoc, which are shown at the bottom, are of particular interest for troubleshooting. The last and therefore most current status of an IDoc is listed at the top. Clicking on the status record takes you to the detailed view, from which you can see the exact error message. If an error status can be assigned directly to a segment, the segment is also marked in red.

Depending on the error status, the error messages are more or less meaningful. If you do not come across the error or the faulty segment based on the error message, it helps to ask a SAP professional in the company who can debug the IDoc processing sequence in ABAP.

Once you have identified the faulty segment, you can start correcting it. With a double click on the paper symbol the detailed view of a certain segment opens.



IDoc detail view with opened subsegment

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

You can then activate editing via the menu bar.



IDoc detail view with editing option

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

The response "Changes to the IDoc will be written to the database" must be confirmed. Existing values ​​can then be edited and empty fields filled.

The status of the IDoc changes when it is processed.

For incoming IDocs, the IDoc changes to status 69 (IDoc has been edited). At the same time, a copy of the original IDoc is saved under status 70 (original of an IDoc that has been edited).

For outgoing IDocs, the IDoc changes to status 32 (IDoc has been edited). At the same time, a copy of the original IDoc is saved under status 33 (original of an IDoc that has been edited).

Processing of the IDoc with status 69 or 32 can then be triggered again in the transaction.

Adding new segments

New segments cannot be added directly in the IDoc detail view; instead, transaction must be used for this.

To ask?

Do you still have questions about IDoc processing or electronic data exchange with a SAP ERP system? Do not hesitate to contact us or use our chat - we will be happy to help you!

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