Hi,
I're lucky if you have own workflow task for each step
Table SWWWIHEAD contains all the Workitems
Table SWWLOGHIST contains a log of every workitem processing
Table SWW_WI2OBJ contains assignments of the workitems to the documents
if not - selection could be complicated:
You may nedd to use tables /SAPSRM/D_WF_*** for complete workflow log.
Alternativelly you could try to use the class /SAPSRM/CL_WF_PROCESS_MANAGER to get the workflow information.
Regards
Konstantin