SAP - Error Handling in Batch Input Session
SAP - Error Handling in Batch Input Session
Batch input is one of the primary ways in which bulk (large) data can be transferred into the SAP system.
For Legacy data transfer - new tools like LTMC are available in SAP HANA which are superior. In some
cases (like custom fields or updating master data) batch input method can still be useful.
Typical uses of batch input include the one-time import of data from a legacy system into a newly
installed SAP system. In LSMW tool we can create a batch input session in the last step. We can also
create custom transaction/report based on batch input recording (BDC) method. ABAP team will ask
functional consultant to create a recording. Transaction SHDB can be used to create such recording.
Background
In this document, we will discuss how to do error recording and handling in Batch Input Sessions.
Common problem faced in executing the batch input session is how to handle errors.
If there are several records in batch input template file and error is encountered by system on some
records, then all the records after that are stopped from posting. Ability to “Skip” that record and still
process further transactions will be very useful.
We will discuss one effective technique by which we can perform error handling in Batch input sessions.
Contents
Overview of Batch Input Method .................................................................................................................. 1
Background .................................................................................................................................................... 1
1. Processing batch input session. ............................................................................................................ 2
2. Error handling in Batch input session ................................................................................................... 3
Page 1|5
Error Handling in SAP Batch Input Session | Shreyas Patwardhan
Use transaction code SM35. System will open the Batch input session overview.
Select processing mode as “display errors only” and then click on process.
Page 2|5
Error Handling in SAP Batch Input Session | Shreyas Patwardhan
NOTE : There could be some cases system will encounter error while processing batch input session.
Ideally, these should be avoided by proper validation of the data while preparing the template file.
Also, it is necessary to first test the error handling method with OKCODE mentioned below on some
small number of records in sandbox or test environment to check and verify feasibility.
A. Error Recording:
If for certain record from template file, there is an error (possible reason could be due to incorrect data
provided in template program is stuck with error message and not going the correct next screen).
Then program will stop and show screen capture of the data filled along with the error message in
message bar at bottom in SAP GUI.
It is important to take screen capture of SAP GUI showing data and error message as below:
Page 3|5
Error Handling in SAP Batch Input Session | Shreyas Patwardhan
B. Further Processing:
To skip such records and further process the batch input session with remaining transactions – try
putting OKCODE – “/EE” in command prompt in SAP GUI and then click continue. This is one useful
BDC_OKCODE.
Page 4|5
Error Handling in SAP Batch Input Session | Shreyas Patwardhan
In this way system will skip current record and proceed with further transactions.
Repeat these steps if multiple errors are found.
In the end system with show popup that batch input session completed.
Select “session overview”.
Two transactions were failed out of five in above example case. Those two records can be taken
individually for detailed analysis.
Page 5|5