on 12-29-2017 11:09 AM
Hello ,
I have a use case like example I have a table called Page , for that i have made odata service and in that table count field is their.
so when ever the services is called using the pageId in the Url the count field should get Increment so that we will get to know how many times the user has viewed the page.
how to know how many times odata service has been called for all the rows.
Thanks,
In your Page Table have at least two columns - Page Id and Counter. whenever a get call is triggered, after successful retrieval increment the counter by 1 and persist the same. On next call , the counter will hold the number of times the Page has been retrieved earlier and use the same for current processing. Also after successful retrieval increment the counter again by 1 and persist. Repeat this process for all calls.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I thought you were using NetWeaver Gateway and made my recommendation. For HANA try as this
Hi,
In the place where you issue your OData, you should have a mechanism that controls that - using some persist data structure, e.g. DB table (that could have other identifiers apart from the counter - like caller, current id, unique number etc.) for the case it is consumed from multiple resources.
In addition, there are many analytic tools to track user usage (like Google Analytics).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.