top of page

Change the Status of an IDOC in SAP

This article explains how to update the status of an IDOC in SAP using the program RC1_IDOC_SET_STATUS. An IDOC can have different statuses depending on whether it is incoming or outbound. The screenshot below shows a limited list of the many statuses that an IDOC can have in SAP:



Let us now consider a real-world business scenario in which we would need to manually update the status of an IDOC in SAP. The state of an IDOC changes automatically as it progresses through the various steps of processing. However, as previously said, there may be situations when it is necessary to manually modify the status of the IDOC in SAP to a specific value. Consider the following case, in which it would be prudent to alter the status of an IDOC in SAP from 51 (Application Document not Posted) to 68 (Error - No Further Processing).

  • Assume we received an inbound IDOC from a vendor with the intent of posting an invoice, i.e. a financial record, in our SAP system. This invoice would then be picked up by the automated payment program (T Code: F110) and processed for payment.

  • The IDOC encountered some erroneous data in one of its data segments, resulting in error status 51.

  • The vendor who had first supplied the IDOC to our SAP system was advised of this as well.

  • We may have manually repaired the data segment of the IDOC that contained the incorrect data and then reprocessed the IDOC. The reprocessed IDOC would result in the vendor invoice being posted in our SAP system. But let us suppose that in our scenario, the above method of manually editing the IDOC is not used. Rather, the seller agrees to send a new IDOC with the correct information.Instead, the vendor agrees to send a new IDOC with the right data. In the scenario described above, the vendor has agreed to submit a new IDOC. As a result, the original IDOC no longer needs to be amended and processed. In such a circumstance, we would like to ensure that the original IDOC that was incorrectly processed is changed to status 68 (Error - No Further Processing). This prevents the original IDOC from being manually edited and processed to publish the invoice. If the same were permitted, multiple postings may occur, resulting in two invoices being posted for the same item. Both of these invoices would be picked up for processing during the automatic payment run for making vendor payments. This would result in Once the IDOCs are completed, this would result in double payments to the vendor. The program RC1_IDOC_SET_STATUS can be used to manually update the status of an IDOC in SAP. Let us now go over the detailed step-by-step approach for changing the status of an IDOC in SAP using the software RC1_IDOC_SET_STATUS.


STEP 1: Locate the IDOC number whose status has to be altered. It is also possible to pick multiple IDOCs or a range of IDOCs. We shall update the state of a single IDOC in our example.

STEP 2: Determine the current status of the IDOC. T Code WE02 can be used to check the current state of and IDOC. The current state of the IDOC, as seen in the screenshot below, is 51 (Application Document Not Posted). This is an error status for inbound IDOCs.


STEP 3: Determine the new status that will be applied to the IDOC. As described before in the business scenario, in our example, we will change the status of the above IDOC to 68.

STEP 4: In SAP, navigate to T Code SE38. As seen in the screenshot below, run the program RC1_IDOC_SET_STATUS. As previously stated, the program RC1_IDOC_SET_STATUS can be used to set the status of one or more IDOCs to a valid value.


STEP 5: On the program RC1_IDOC_SET_STATUS selection screen, enter the IDOC number for which the status has to be modified. Enter the existing status as well as the new status that will be applied to the IDOC.


STEP 6: On the selection screen of program RC1_IDOC_SET_STATUS, use the multiple selection button shown below to enter numerous IDOCs. The updated status will be applied to all IDOCs chosen via multiple selection.


STEP 7: On the program RC1_IDOC_SET_STATUS selection screen, make sure the "Test" checkbox is selected. This ensures that the software is run in test mode first. This will not affect the status of the IDOC, but will display any errors that may surface if the program is run.

STEP 8: The output of the program RC1_IDOC_SET_STATUS test run is displayed below. It indicates that the IDOC status has been successfully modified. This means there are no issues and we may continue with the production run to alter the status of the IDOC.


STEP 9: Run the application RC1_IDOC_SET_STATUS again with the same parameters as before, but this time leave the "Test" checkbox unchecked. Because we are no longer running the program in test mode, this is referred to as the production run of RC1_IDOC_SET_STATUS.


STEP 10: For the production run, the success message indicating that the IDOC status has been changed is displayed.


STEP 11: Navigate to T Code WE02 to verify that the IDOC status has been updated to the new value. The new status value is 68, as shown in the screenshot below.


SUMMARY OF LEARNINGS: The above article explained in detail the business scenario and the step by step procedure to manually change the status of an IDOC in SAP.

The following points were covered:

  • How to change the status of an IDOC manually in SAP.

  • Use of program RC1_IDOC_SET_STATUS in SAP.

  • How to modify the status of multiple IDOCs all at once.

  • A real world business scenario which initiated a requirement to manually change the status of an IDOC in SAP.

How to Basis troubleshoot IDOCS error status 51 and status 68


  1. From Basis point of view, the technical problem that we have to look at is the transmission of the IDOC.

  2. Firstly we execute BD87.

  3. Enter IDOCS status 51 and press enter. You shall see below screen shot. As we can see, error “Status 51″ are application or data related error.

4. We repeat the process for the status 68 mistake. On IDOC status, use BD87'Enter 68.

5. Because there isn't an error message. To view the IDOC details, we double-click 'Without error message'.

6. Check the status record to see what happened with the IDOC procedure. The error 68 was triggered by the IDOC having status 51, which is caused by an application/data issue, as shown in the image.

7. Examine transaction SM58 for any hanging or mistake tRFC (tRFC/Asynchronous is used by the majority of IDOC). Check the error message if any.

8. If the partner type is LS (logical system), you can inspect and test the RFC connection using SM59.

9. In this situation, there is no mistake tRFC on SM59, proving that the errors are not related to the Basis.

152 views0 comments

Recent Posts

See All


Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page