You are on page 1of 10

Change the Status of an IDOC in SAP

INTRODUCTION
This article provides the step by step procedure to change the status of an IDOC in SAP using
program RC1_IDOC_SET_STATUS. An IDOC can have various status depending on whether it is
an inbound or an outbound IDOC. The partial listing of the various status an IDOC can have in
SAP, are shown in the screenshot below:

PARTIAL LISTING OF VARIOUS IDOC STATUS


BUSINESS SCENARIO / REQUIREMENT

Let us now take a look at an actual business scenario that would require us to change the status of an
IDOC in SAP manually. The status of an IDOC changes automatically during the various stages of its
processing. However, as mentioned above, at times there may be a requirement to manually change
the status of the IDOC in SAP to a particular value. As an example, let us consider the following
scenario where it would be advisable to change the status of an IDOC in SAP from 51(Application
Document not Posted) to 68 (Error – No Further Processing)

 Assume that we received an inbound IDOC from a vendor which was going to post an invoice i.e.
a financial document in our SAP system. This invoice would then be picked up by the automatic
payment program (T Code: F110) run for payment processing.
 The IDOC had some invalid data in one of its data segments due to which it went into error status
51.
 The same was informed to the vendor who had initially sent the IDOC to our SAP system.
 We could have manually corrected the data segment of the IDOC which had the error data and
subsequently reprocessed the IDOC. The reprocessed IDOC would result in the posting of the
vendor invoice in our SAP system.
 But let us assume in our case, the above approach of correcting the IDOC manually is not followed.
Rather, the vendor agrees to send a fresh IDOC again with the correct data.

In the above scenario, the vendor has agreed to send a fresh IDOC. So, the original IDOC is no longer
required to be corrected and processed. In such a case we would want to make sure that the original
IDOC which went into error is moved into status 68 (Error – No Further Processing). This would ensure
that the original IDOC is never manually corrected and processed to post the invoice. If the same were
allowed, then duplicate postings can happen, i.e. we would have two invoices posted for the same
item. During the automatic payment run for making vendor payments, both these invoices would be
picked up for processing. This would result in double payments being made to the vendor once the
IDOCs are processed. This objective to change the status of an IDOC in SAP manually can be
achieved using program RC1_IDOC_SET_STATUS.

Now, let us take a look at the detailed step by step procedure to change the status of an IDOC in SAP
using program RC1_IDOC_SET_STATUS.
STEP BY STEP PROCEDURE

STEP 1: Identify the IDOC number for which the status needs to be changed. Multiple IDOCs or a
range of IDOCs can also be selected. In our example, we will change the status of a single IDOC.

STEP 2: Identify the current status of the IDOC. The current status of and IDOC can be viewed using
T Code WE02. The current status of the IDOC shown in the screenshot below is 51 (Application
Document Not Posted). This is an error status for inbound IDOCs.

IDOC IN ERROR STATUS 51

STEP 3: Identify the new status to be applied to the IDOC. As mentioned in the business scenario
earlier, in our case we will be updating the status of the above IDOC to 68.

STEP 4: Go to T Code SE38 in SAP. Enter the program RC1_IDOC_SET_STATUS as shown in the
screenshot below. As mentioned before, the program RC1_IDOC_SET_STATUS can be used to
change the status of one or more IDOCs to a desired valid value.
T CODE SE38 – EXECUTE PROGRAM RC1_IDOC_SET_STATUS

STEP 5: Enter the IDOC number for which the status needs to be changed on the selection screen of
program RC1_IDOC_SET_STATUS. Enter the current status and the new status to be applied to the
IDOC.

SE38 – PROGRAM RC1_IDOC_SET_STATUS SELECTION SCREEN


STEP 6: Multiple IDOCs can be entered by using the multiple selection button shown below on the
selection screen of program RC1_IDOC_SET_STATUS. The new status will be applied to all the
IDOCs selected using multiple selection.

MULTIPLE INPUT SELECTION SCREEN FOR IDOC NUMBER

STEP 7: Make sure the “Test” checkbox is selected on the selection screen of program
RC1_IDOC_SET_STATUS. This will ensure that the program is first executed in test mode. This will
not change the status of the IDOC, but will show any error that were to appear if the program was
executed.

STEP 8: The output of the test run of program RC1_IDOC_SET_STATUS is shown below. It shows
that the IDOC status is changed successfully. This implies that there are no errors and we can proceed
with the production run to actually change the status of the IDOC.

TEST RUN SUCCESS MESSAGE


STEP 9: Now execute the program RC1_IDOC_SET_STATUS again with the same parameters as
above but with the “Test” checkbox unselected. This is called the production run of the program
RC1_IDOC_SET_STATUS since we are not running the program in test mode any more.

PRODUCTION RUN (“TEST” CHECKBOX UNCHECKED)

STEP 10: The success message showing that the IDOC status has been changed is displayed for the
production run.

SUCCESS MESSAGE DISPLAYED


STEP 11: Go to T Code WE02 to confirm that the IDOC status has now been changed to the new
value. It can be seen in the screenshot below that the new status value is 68.

T CODE WE02 – IDOC STATUS UPDATED TO 68

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.
Real World Practical Business Scenarios Requiring IDOC Status Change

INTRODUCTION
There are many occasions where there may be a need to change the status of an IDOC manually.
The status of an IDOC can be changed manually using the program RC1_IDOC_SET_STATUS. The
detailed step by step procedure to change the status of the IDOC using
program RC1_IDOC_SET_STATUS is discussed in the article: Change the Status of an IDOC in SAP.
While the above article provides the basics, the article: Program RC1_IDOC_SET_STATUS – Mass
Change Status of IDOCs covers the advanced features of program RC1_IDOC_SET_STATUS and how
it can be used under various business scenarios.

In this article, we will take a look in detail at various real world scenario for IDOC status change. This
article is written to provide the understanding from a functional and business perspective about when
it may actually be required to use the procedures detailed in the articles mentioned above.

BUSINESS SCENARIO / REQUIREMENT


The status of an IDOC is stored in table EDIDS in SAP. The contents of this table can be viewed using
T Code SE16. There may be many reasons and scenarios which may require the change in the status
of an IDOC to some value, say 64 or 68 or any other value. This can be accomplished using program
RC1_IDOC_SET_STATUS.

We will be taking a look at these scenarios in detail in this article in the following sections. Please note
that ideally IDOCs are expected to have their status change from one value to another automatically
during the course of their creation and subsequent processing. The status of an IDOC should be
changed manually taking into account the implications of the same only after due diligence by
authorized users.

REAL WORLD SCENARIO FOR IDOC STATUS CHANGE —-> MOVING IDOCS TO
STATUS 68

It may be required to move some inbound IDOCs to status 68 since they are no longer required to be
processed. Such a case study is discussed in detail under the BUSINESS SCENARIO /
REQUIREMENT section in the article Change the Status of an IDOC in SAP. Please refer to this article
for more details.

REAL WORLD SCENARIO FOR IDOC STATUS CHANGE —-> MOVING IDOCS TO
STATUS 64 FOR REPROCESSING ERROR IDOCS

In most SAP installations, the inbound IDOCs are processed automatically by background
jobs. Usually when there are no errors, the inbound IDOCs are received in the SAP system and put
in status 64 (IDoc ready to be transferred to application). The background jobs keep looking for IDOCs
in status 64. Background jobs can be scheduled to pick up all IDOCs in 64 status and process them
to post the application documents.
If due to some intermittent issue, say process termination or due to a memory issue, the processing
was not successful, then these IDOCs will be moved to error status 51 (Application document not
posted). There is no issue with the data in the segments of the IDOC. The only reason they went into
error status is because of the intermittent / temporary system issue. These IDOCs will no longer be
picked up by the background jobs for processing since the background jobs only look for IDOCs with
status 64.

At times it may be required to move inbound IDOCs which have gone into error status 51 to status 64
so that they may be picked up again for processing by background jobs. As mentioned above, if it is
ascertained that the IDOCs do not have errors in any of its segments and the earlier issue of the
IDOCs going into error status 51 was only due to an intermittent problem, then these IDOCs simply
need to be processed again to post the application documents like orders, invoices, etc.
To accomplish this program RC1_IDOC_SET_STATUS can be used to manually update the status of
all such IDOCs from 51 to 64. Once the status is updated to 64, these IDOCs will be picked up for
processing by the background jobs.

REAL WORLD SCENARIO FOR IDOC STATUS CHANGE —-> MOVING IDOCS TO
STATUS 68 FOR DELETION

It may be required to mark some IDOCs for deletion. These will include IDOCs which are no longer
required in the system. Again in these cases the status needs to be updated to 68 manually using
program RC1_IDOC_SET_STATUS. Extreme caution should be taken while changing the status of
the IDOCs for deletion. Data once deleted cannot be recovered.

REAL WORLD SCENARIO FOR IDOC STATUS CHANGE —-> MOVING IDOCS TO
STATUS 59 FOR ARCHIVING

It may be required to change the IDOC status to status 59 (Not used) to archive at a future date. Again
this can be accomplished via program RC1_IDOC_SET_STATUS.

REAL WORLD SCENARIO FOR IDOC STATUS CHANGE —-> MOVING IDOCS TO
STATUS 64 TO REPROCESS SUCCESSFUL IDOCS

It may be required to reprocess IDOCs which have already been processed. All inbound IDOCs which
have been successfully processed are in status 53 (Application Document Posted). In some cases it
may be required to process the IDOC again. However, this cannot be done by the standard T Code
BD87 since this T Code does not pick up IDOCs in status 53 for processing.

In such a scenario, first the status of the IDOC needs to be changed from 53 (Application Document
Posted) to 64 (IDoc ready to be transferred to application) using program RC1_IDOC_SET_STATUS,
and then the same needs to be reprocessed using T Code BD87.
REAL WORLD SCENARIO FOR IDOC STATUS CHANGE —-> MOVING IDOCS TO
STATUS 32 TO RESEND OUTBOUND IDOCS

It may be required to resend outbound IDOCs to partners such as vendors, customers, banks etc. as
the IDOCs may have been lost in transit. To achieve this objective the outbound IDOCs can be moved
to any intermediate status in the successful outbound dispatch, say status 32 (IDOC Was Edited).
Later the same IDOC can be processed using program RC1_IDOC_SET_STATUS to resend the
information to the destination partner.

REAL WORLD SCENARIO FOR IDOC STATUS CHANGE —-> MOVING IDOCS TO
STATUS 32 TO CREATE DATA SET FOR PERFORMANCE TESTING FOR
OUTBOUND IDOCS
Program RC1_IDOC_SET_STATUS can assist in carrying out the performance testing again for IDOC
transmission between two systems using the same set of previous IDOC data. This removes the re-
effort to create huge volumes of test IDOCs when performance testing as mentioned above is to be
carried out. Instead of creating the entire set of outbound IDOCs again, the status of the IDOC set
used in the previous performance test can be changed to 32 and the same set can then be
reprocessed.

SUMMARY OF LEARNINGS

The above article provided detailed explanation of the practical real world business scenarios requiring
the status of an IDOC to be changed manually. The following points were covered:

 Various practical real world scenarios where the IDOC status is required to be changed manually.
 When and how IDOCs are marked for deletion or no further processing.
 Reprocessing of IDOCs which have gone into error due to temporary system issues.
 Reprocessing of already successfully processed IDOCs.
 How change in IDOC status can save a lot of effort in performance testing of outbound IDOCs.
 How to resend already sent IDOCs to an external business partner by changing its status.

You might also like