on 06-03-2014 2:04 PM
In the standard delivered Gateway Service for working with Launchpads there is a function import that updates the frequently used counter to whatever the current counter is +1.
I have a requirement to provide a button on the UI so that the end user can reset the counter. Theory being, there job may change and while they may have access to certain applications that are in their frequently used list, they may not need them as frequently any longer and they should have the option to remove them.
It would have been fabulous to redefine this standard delivered service and make the change, but given the current class inheritance and SAP's unwillingness to unmark a super class as final, this is not possible.
We are writing a new gateway service whose sole pupose is to update this counter to 0.
Most of the code to accomplish this can just be copied from existing classes.
I am struggling with how this should be structured.
I had put this together in an update entity method. However, this doesn't seem correct since we are basically passing a reference id like:
04ZESS0DZESS_MYHR_FPM20005056A51C9D1EE3AFFEA106D591C3EA
And expecting the code to update some obscure table with a value of 0 for the counter.
1) Is this a correct approach?
2) Should this be done in a function import given that we aren't really updating the entity per se but rather some end user personalization attribute?
3) Is there an issue with having a Gateway Service that is comprised of nothing but one function import?
Any thoughts on this requirement are appreciated, perhaps we are heading down the wrong path altogether....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Krishna,
Thanks so much for your reply. Exteremely helpful.
We have been struggling through some of the standard delivered services and UI5 applications (swim lanes).
I have created a REST service to handle updating the frequently used counter, so much smoother and easier. I think this is the route we will go.
However, not to hijack my own thread, but since we started down the oData route initially, I have not been able to get my gateway service to work. I started by creating an entity called linkid that is simply a string and an entity set that is made of those links. However, I have not been able to get the update entity method for the entity set to work.
I am trying to wrap my mind around what we are trying to do and that we aren't really working with an entity set in the traditional sense, but rather importing a key (reference id) and expecting something to happen in the backend but not really updating that entity.
We originally put this in the LINKS_UPDATE_ENTITY method. But we aren't even getting that far. I have googled the message returned but am still somewhat lost. I am back to wondering if this really shouldn't be in an update method at all, but rather in the execute_action method and whether we should just be doing this with a function import rather than trying to do a put.
We have created other GW services, but they all have traditional entity sets and there is a get implementation in addition to the update and deletes and that all seems to make sense. This one just seems odd as what we are trying to do is very focused and seems to be missing half the parts and I'm wondering if that's the problem....
EDIT: I should mention, that my understanding is that this is an issue with the body of the request, however, I'm not sure how to debug that.
Please let me know if I left something out:
Request Body
<?xml version="1.0"?>
<REQUEST_DATA>
<HTTP_HEADER>
<IHTTPNVP>
<NAME>~request_method</NAME>
<VALUE>PUT</VALUE>
</IHTTPNVP>
<IHTTPNVP>
<NAME>~request_uri</NAME>
<VALUE>/sap/opu/odata/sap/***Hide_due_to_secure_log_level***</VALUE>
</IHTTPNVP>
<IHTTPNVP>
<NAME>content-type</NAME>
<VALUE>application/atom+xml</VALUE>
</IHTTPNVP>
<IHTTPNVP>
<NAME>x-csrf-token</NAME>
<VALUE>0acWC3ESh6ga21O7QeEK2g==</VALUE>
</IHTTPNVP>
<IHTTPNVP>
<NAME>requestid</NAME>
<VALUE>005056A566911EE3BAE8DBBC7149B4A4</VALUE>
</IHTTPNVP>
<IHTTPNVP>
<NAME>host</NAME>
<VALUE>xxxxxxxxxx.itservices.xxx.edu:8011</VALUE>
</IHTTPNVP>
<IHTTPNVP>
<NAME>x-requested-with</NAME>
<VALUE>XMLHTTPRequest</VALUE>
</IHTTPNVP>
<IHTTPNVP>
<NAME>~remote_addr</NAME>
<VALUE>127.0.0.1</VALUE>
</IHTTPNVP>
<IHTTPNVP>
<NAME>~uri_scheme_expanded</NAME>
<VALUE>HTTP</VALUE>
</IHTTPNVP>
</HTTP_HEADER>
<HTTP_BODY/>
</REQUEST_DATA>
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.