HI,
Change to "Collect Idocs" in WE20 and schedule the program RSEOUT00 to process the idocs in the background.
or
Use the below function modules in the program.
1.CALL FUNCTION 'DB_COMMIT'.
2.CALL FUNCTION 'DEQUEUE_ALL'. - Note: This will release all the locks,If u want to release only single idoc then use, EDI_DOCUMENT_DEQUEUE_LATER. This function module dequeues the IDoc with the imported IDoc number only
3.COMMIT WORK.