cancel
Showing results for 
Search instead for 
Did you mean: 

SAP gateway, how can I filter on items with padded zeroes?

derek_morin
Participant
0 Kudos

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'?

Accepted Solutions (1)

Accepted Solutions (1)

Web
Explorer
0 Kudos

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

derek_morin
Participant
0 Kudos

Thanks!  This allowed me to filter using:  filter=(Equnr eq '10006060')

Answers (0)