on 06-16-2016 7:00 PM
SAP gateway, how can I filter on items with 0 padding?
For example, we expose a list of equipment via an entityset. Equipment numbers are often padded with zeros ( width of 18 ).
If we don't turn off conversion factors in the define method of the model controller extension class (MPC_EXT), we could get 10006798 returned instead of 000000000010006798.
This would show up nicely in our UI. But then if we want to filter and we try to do an odata filter like:
(Equnr eq '10006060') we won't get any rows back.
We need to do (Equnr eq '000000000010006060') to get rows back.
In the gateway we are using get_osql_where_clause. Is there any way to get the where clause working with eq '10006060'?
Hi Derek,
Take a look a the method: get_osql_where_clause_convert( )
This should allow for the internal conversion from 10006060 to 000000000010006060 in the returned SQL where clause.
Cheers,
Dave
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.