on 12-29-2020 1:47 PM
when I open the oData service URL directly, I am able to access the data inside an entity by passing the required parameter as -
../odata/SAP/SERVICE_NAME/EntitySetName?$filter=Plant eq '1001'
This entity set doesn't return any result unless we pass the 'Plant' filter.
Now, when I do the same thing using SAP MDK, I am not getting data in my list picker. What I am doing is that I am using object binding for the list picker, and I am selecting the service, entity set and adding the same queryOption as above ($filter=Plant eq '1001') but it is not returning any data. Seems like this filter works only when the data is coming at first place. Since in my case, the entity set will send data only when we pass the plant filter, it is not returning any data, and as such this filter doesnt seem to be working.
I even tried to add this filter in query option in InitializeOffline.action but that seems to have no effect.
Can anyone help me understand how do I pass 'parameter' and not the filter to the oData service entity set so that I get back the data?
After making the change to the initialize offline action to add the filter have to reset your client to re-onboard to rebuild the offline database with the new parameter?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi there,
You have a question and need help by the community? Instead of posting into an old question thread, it is more helpful for you, if you create your own question. Here is how to get started:
That's it. Thank you!
Best regards
Your SAP Community moderator
Hi rajeevparmar,
Firstly, could you please activate a trace in /n/iwfnd/traces (for your username) and see if the correct data is sent when you do the reset from the app. If the data is sent for the Plants, then we can assume that the request from MDK is correct and the data is sent to the local store correctly.
If this works without an issue, try to write a basic test rule in MDK to see if data is available for the plant you are passing.
var query = "$filter=Plant eq '1001'";
return context.read('/Services/yourservicename.service', 'EntitySetName', [], query).then(
function (results) {
if (results && results.length > 0) {
results.forEach(function (value) {
alert(value.anypropertynameyouhave);
}
);
}
});
}
Ideally for you, one of these should not work. Try it and see where it is really failing.
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.