Quantcast
Channel: SCN : All Content - SAP Gateway
Viewing all articles
Browse latest Browse all 2823

$filter from UI5 - Filter Property name does not match model property

$
0
0


Hello,

 

we have quite a strange requirement. Due to some drill-downs from other applications it's not possible to specify the sPath of the filter in the filter object properly --> this means the parameter we will hand over will not always match the properties defined in the Odata Model.

 

We thought of some kind of workaround which might can help us. I have defined a dummy "FILTER" property in the model, which will contain a separate  filter string

 

--> e.g.

l_filter_string = "$filter=substringof(%27Source_Loc%27,SOURCE_LOC)%20and%20substringof(%27Act_Loc%27,ACT_LOC)%20and%20substringof(%27Del_no%27,DEL_NR)%20and%20substringof(%27Product_ID%27,PRODNR)%20and%20substringof(%27TRACKING_ID%27,TRXID)%20and%20substringof(%27PO_NO%27,PO_NR)%20and%20substringof(%27REason%27,REASON_CODE)%20and%20substringof(UPSsad9999hflhasdfjh,FILTER)%20and%20ONTIME_STATUS%20eq%20%27NOT_OK";

 

when receiving the data in the /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_ENTITYSET I will evaluate the it_filter_select_options which will be used to contruct the select to the DB. Is there a possibility to somehow append and split this filter string in a way that we get the separate values in the /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_ENTITYSET I will evaluate the it_filter_select_options table.

 

at the moment I receive the filter string in the Property "FILTER"

it_filter_select_options.jpg

 

this is what I want to split up and add to the it_filter_select_options table as separate properties:

it_filter_select_options_String.jpg

 

Thanks for your help.

Regards Marco


Viewing all articles
Browse latest Browse all 2823

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>