Batch input session with status "incorrect / error" , we can delete directly from SM35. Follow on below steps :
1) Tcode SM35
3) we can delete manually by selection sessions or individually
The batch-input sessions are located in the tables APQI and APQD. If
that is so, please delete the corresponding entry from table APQL and
after that you will be able to delete the “In Process” sessions from
SM35 Tcode. Please use the session name to search the entry in table APQL.
For example : We try delete batch input session with "in process" and queue group name "REVAL CUST"
1) Choose "in process" tab on SM35
3) Delete the corresponding entry from table APQL with SE16
5) Now we can see all "REVAL CUST" batch session entry. Matching the date and time from data batch session on SM35. If result was match, we can delete the batch session entry on SE16 (makesure client setting to be open repository SCC4)
You can delete unwanted sessions with abap program RSBDCTL6 at once and then setup a background job that deletes the sessions for a specific session, user who created the session, date range, older than x days etc. that runs on a regular basis.
Alternatively way :
a) you can run program RSBDC_REORG. However, tests showed that this
program may not be suitable for sessions that have a status other than
processed.
b) you can run program RSBDCREO *only* deletes sessions which are in status “processed”. The reason for this is that this report is written for an automatic cleanup and therefore should never remove sessions that are not completely processed. The report also only deletes the logs for sessions which are already deleted (or scheduled for deletion in the same run).
This means that when you check both options on the initial screen of RSBDCREO, the following sessions and logs will be deleted:
1. Processed sessions and their logs
2. Logs for which no sessions exist anymore