Hi Karthik,
This is because though you specified a filter that presumably contains all four key fields of your entity, you still perform a GET request on the resource /sap/opu/odata/SAP/ZMWM_SAMPLE/TagPrintSet.
As a result, the GET_ENTITYSET is called, and if being implemented, you would be able to retrieve the filter and search for the items for which the filter applies.
In order to get a single item, you have to specify the key in brackets as follows:
/sap/opu/odata/SAP/ZMWM_SAMPLE/TagPrintSet(f1='11111',f2='811',f3='11M1',f4='1')
In this case, the GET_ENTITY method will be called.
I suggest that you implement both, the GET_ENTITYSET as well as the GET_ENTITY method.
Then you can perform a GET request on the Entity set, get back a list, and select a single entry from the payload.
https://sapes5.sapdevcenter.com/sap/opu/odata/iwbep/GWSAMPLE_BASIC/SalesOrderLineItemSet(SalesOrderID='0500000001',ItemPosition='0000000010')
Will deliver the following Response (a single entry)
While
https://sapes5.sapdevcenter.com/sap/opu/odata/iwbep/GWSAMPLE_BASIC/SalesOrderLineItemSet?$filter=SalesOrderID%20eq%20'0500000001'%20and%20ItemPosition%20eq%20'0000000010'
Returns a list with just one entry, but a list (a feed in ATOM terms).
For more details on how to implement GET_ENTITY and GET_ENTITYSET, see my following blog:
https://blogs.sap.com/2016/05/31/odata-service-development-with-sap-gateway-code-based-service-devel...
Regards,
Andre