Hi Anamika,
I think you should make use of the standard report which is available already. I'm making an assumption that you are looking to build a report of documents blocked for missing licenses.
Use transaction /SAPSLL/BL_DOCS_EXP, use reasons for blocking as "Export License Missing" and Deselect the remaining checkboxes. I believe it should provide you with the desired results.
-Shrini