cancel
Showing results for 
Search instead for 
Did you mean: 

ui5 app filter not working due to conversion routine abap

kjyothiraditya
Participant
0 Kudos

Hi,

We have created a custom fiori/ui5 app to display equipment as list using OData exposed and added equipment number(EQUNR) as filter. As its a 18-CHAR field, it will be internally stored with leading zeroes and displayed without leading zeroes.

Now when we try to filter based on equipment number it comes without leading zeroes. As filter works like a text filter and it have patterns also as filter, do you think its a good idea to convert the input using conversion routine in DPC_EXT class ? is there any alternative solution for this ? Please guide.

I also referred the blog https://blogs.sap.com/2016/10/21/conversions-sap-gateway-foundation-part-1/ but it is only when we pass a definite value, not for multiple/patterns.

thomas.nitschke : Any guidance here?

Regards

Aditya

nitschket
Advisor
Advisor

Hello Aditya,

you might want to have a look at the second blog post of the series: https://blogs.sap.com/2017/01/23/conversions-in-sap-gateway-foundation-part-2/

Or, rather at the comments to that blog post. Working with filters in the context of conversion is a tricky topic and there is a rarely a satisfying solutions. These things do not fit together very well. There are ideas for alpha conversion. Again, there are some comments at the mentioned blog post.

Thomas

Accepted Solutions (1)

Accepted Solutions (1)

nitschket
Advisor
Advisor

Did not post an explicit answer: please refer to my comment above for some ideas.

Thomas

kjyothiraditya
Participant
0 Kudos

Thanks thomas.nitschke : yes thats because filter basically works like string. Hope SAP comes up with alternate solution.

Answers (2)

Answers (2)

former_member667434
Active Participant

Hi jyothiraditya.k

Yes you can use conversion in DPC_EXT. Also, if it's a list / table, you can filter value at UI, if it's for display.

-Ashutosh

kjyothiraditya
Participant
0 Kudos

Yes, conversion filter works fine, but if the filter contains Patterns then it may not be as desired.

ThorstenHoefer
Active Contributor
0 Kudos

Hi,

please check the methods of io_tech_request_context

There is for example a Methode: get_converted_keys( ).

You will also find a method to get the where condition converted.

Best regards

Thorsten