Delete Entries in NAST Table using RSCLNAST ABAP Program
To delete NAST entries in SAP system, developers can run RSCLNAST ABAP program. RSCLNAST enables to delete data from NAST table where output message status records are stored. ABAP report RSCLNAST provides a selection screen which enables SAP developer to choose the NAST entries to delete using output application, object key, output type (output message type), transmission medium of output message, etc. These selection criteria makes deleting output status records in NAST table easier.
Recently, I had to delete incorrectly processed output messages from productive SAP system. I experienced that using RSCLNAST ABAP report is very handy for the deletion of NAST entries that cause problems. Later on I had to trigger output determination procedure for creation of deleted NAST entries for billing documents (invoices) in our SD system. Now in this SAP tutorial, I want to show you how you can use RSCLNAST ABAP program in case you need to delete output messages in SAP.
Please note that this ABAP program is deletes entries in NAST table, so take care of consistency of your application before executing on your productive systems. RSCLNAST will delete output messages in NAST table without checking if they're processed correctly, or processed incorrectly or waiting in unprocessed status if they match the criteria you provide in selection screen.
Call transaction SE38 to activate ABAP Editor initial screen. Type the RSCLNAST ABAP report.
RSCLNAST is a standard ABAP report in SAP systems. We are now ready to execute and run ABAP program titled "Report for Deleting Output Status Records (Note Consistency)" by pressing F8
Provide the required information to filter ABAP NAST table entries. This will enable us to delete NAST entries we want to remove from NAST table.
As ABAP developers will realize, there are 3 options for the execution of RSCLNAST program.
Normal deletion process,
Simulation only, no deletion,
Confirm each deletion options
Normal deletion process can be selected if you want to delete NAST entries or output messages matching with your filter criterias at once.
Confirm each deletion selection will request the executing SAP user's approval for each NAST record one by one before removing it from ABAP NAST table.
If you just want to test the report, choose the Simulation only option for a test run.
When DELETE process is approved the ABAP codes in CLEANSWEEP form routine is executed. I think is is useful to see the ABAP codes in this form routine
If ABAP developers want to see all codes of the ABAP program RSCLNAST, they can display source codes in ABAP Editor using SAP transactions SE80 or SE38