on 10-10-2015 3:48 PM
Hello Experts,
My current question is more like a conceptual question. SAPGateway delivers an OData service with an entity type containing the following Properties:
The values of this entityset do never change and are as follows:
ATNAM | ATWRT | ATWTB |
FIORI_PRG | BA | Barcelona |
FIORI_PRG | BE | Berlin |
FIORI_PRG | HA | Havanna |
FIORI_TYP | SE | Sessel |
FIORI_TYP | ZW | Zweisitzer |
FIORI_TYP | DR | Dreisitzer |
FIORI_FARBE | BL | Blau |
FIORI_FARBE | BR | Braun |
FIORI_FARBE | GR | Grün |
FIORI_FARBE | SW | Schwarz |
FIORI_BEZUGSSTOFF | ST | Stoff |
FIORI_BEZUGSSTOFF | KL | Kunstleder |
FIORI_BEZUGSSTOFF | NL | Naturleder |
In UI5-Frontend, the data is consumed in different lists that filter the values of the property ATNAM and display accordingly the values of ATWTB just like you can see it in here: JS Bin - Collaborative JavaScript Debugging
Now the question: is it possible for this OData service to “be informed” of the selected value from any of these lists? (assuming that UI5 can send a value).
Clarification: the service has only the get and getentityset methods redefined. Or same question formulated differently: can the OData service save the result of a selection of a filtered list?
If someone wants to take a look at the metadata, the file can be seen in: https://goo.gl/pAE4qz
Thank you very much for your support,
Gabriel
Hi Gabriel,
I did not get you. let me explain what i understood. you have field in the UI. Which is drop down list, Let us say from example list contains ,1,2,3,4,5. Now if select 1, Odata should be able to post this.
is this what you are looking for ? Or Can explain us what you are expecting once more.
Thanking you
Vengaiah
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much Vengaiah for your answer. You understood right. OData should post this, but the values delivered by Odata are never supposed to change (because are options that user should choose, but not edit).
What I am looking for?
I am expecting that OData delivers some values based on a previous selection. Graphically seen: there are four drop down lists. After selecting "Barcelona" in the first list and "Sessel" in the second one, then the OData delivers one particular value in the third list (for instance "Blau").
My question is: how can this OData obtain the selected value of user under described conditions (no create/update methods are redefined and no additional field to send the selection). Is it even possible?
Thank you and kind regards,
Gabriel
Hello Vengaiah and I apologize for the delay to answer. The Odata Service delivers the values described. Those values are used in the UI for displaying options to choose (like in this bin).
My question: how the UI can transmit the result of a selection to this Odata service? I understand is not possible because This OData has not update-method available and also because this values are not supposed to be edited (only the result of the choice is to be transmitted).
Your answer helped me to understand I was requesting something that is not possible. Thank you again and kind regards,
Gabriel
Hello Gabriel,
I think you need code dependent filters. What I understand is, suppose you have two items in a facet filter, say state and city and you want to filter the list of cities based on the currently chosen state. If its so, then it is very much possible.
You can implement a Function Import in OData and call it when the first value is selected. In the function import, you send a read request to the collection for second list passing the value of first selection as the filter parameter and you will get the results with which you should do the binding.
Alternatively, you can simply call the Get Entityset method of the second collection passing the chosen value as filter.
BR.
Hello Gabriel,
As suggested, you can implement a Function Import (passing the first filter as importing parameter and returning the dependent entity's table type) and call the same on the list close event of the facet filter. In the Function Import you can write a select query where you use the importing value in the where clause of the filter and export the table with second dependent entity. Then do the binding in the UI with the result set returned by the function import.
Function Import - https://help.sap.com/saphelp_nw74/helpdata/en/c5/dc22512c312314e10000000a44176d/content.htm
BR.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
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.