Hi Mihika,
Try using SELECT SINGLE and wild cart % to get the contract as in DB Table
DATA lv_contract TYPE ztable-CONTRACT.
LOOP AT et_zlicconthdr INTO lw_zlicconthdr.
CONCATENATE '%' lw_zlicconthdr-contract INTO lv_contract
SELECT SINGLE *
FROM zlicconthdr
INTO <Wa>
WHERE Contract LIKE lv_contract.
ENDLOOP.
Though it is not advisable to have select inside loop for your requirement this is one of the suggestion.
If still you you want avoid the SELECT within LOOP you can have the SELECT SINGLE with Wildcart entry by comparing the your flat file internal table and DB internal table which you got by using FOR ALL ENTRIES and only for entries which were not fetched USE SELECT SINGLE as above.
Regards,
Vasanth