on 06-23-2017 5:59 AM
Hello Experts,
We have a requirement to filter/restrict the Sales Order/Quotation based on user default plant.
In the standard CDS view C_SALESORDERWL_F1873 we do not have the option to filter based on plant.
So how can we achieve this in CDS view extension to restrict the result set based on user plant. This user plant will be enhanced at FIORI app side and passed from Manage Sales Order and Sales Quotation app.
I'm new to CDS, please let me know your inputs.
I think you're trying to say passed to, not from, right?
"This user plant will be enhanced at FIORI app side and passed from Manage Sales Order and Sales Quotation app."
If YES, then did you want to get the filtered list from the UI?
IF NO, then did you want to the filtered list from the CDS?
I don't think you could reach this by standard CDS extension(maybe, I didn't get the extension point you meant ), how about create your own CDS view if you just want to filter the value?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
let me summarize my understanding, you would like to directly reuse the CDS like C_SALESORDERWL_F1873 not the OData, not the UI, but you would like to add a filter: Plant in the CDS, and the filter will get a default value by some logic.
Firstly, if Plant is not available in the C_SALESORDERWL_F1873, which you want to directly use, then I don't think it's a feasible way.
In order to extend CDS, official ways are here:
Then you might ask, the plant field could be introduced by the extension.
Yes, it's possible to introduce field by extension. but it would not possible to have a filter taken effect directly, because, the filter would need some kind of inner join logic to take effect(the words might not precise).
Then, maybe build your own view might be the only way, if my previous assumption is correct.
And I have additional information for you(which might not help your problem, maybe some hints for you), there is some way to have default value by annotation. but the filter will not take influence in direct access from your ABAP code(if you want to consume it in your own ABAP code).
Consumption.defaultValue
Hello Rahul ,
Just giving a wild thought
For the consumption view C_SALESORDERWL_F1873 is there any DCL ( data control language ) associated ( please check for annotation for authorization in C_SALESORDERWL_F1873 ) if yes....please navigate to the DCL and check the authorization object used in DCL and check if the data can be controlled via authorization object .
please check the below link for details
Hope this helps ,
Anup D
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ooh Okay,
Option of modifying ( adding palnt with a custom authorization object )DCL can be considered instead of changing the actual CDS . any ways the outcome would be same but insted of hard filter you will have a better control
Changing CDS might affect all the Odata services where CDS it is referred .
Hope this helps,
Anup D
User | Count |
---|---|
102 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.