IDOC Related programs
1. Archive RSEXARCA and RSEXARCB
2. Delete RSEXARCD
3. Read archiveRSEXARCR
4. Restore RSEXARCL
use FM EDI_DOCUMENT_DELETE .
pass the IDoc Number to it and delete the one which you want.
use the tcode WE11 or program RSETESTD to delete an IDOC
but iDocs don't actually get deleted, just flagged with a deleted status (68). Transaction BD87 can do it, it does depend though on the existing Status of the iDoc though.
Using BD87, You can mark the status as deleted instead of IDOC deletion.
check this for more info..
Status monitoring is nothing but BD87 tcode..