cancel
Showing results for 
Search instead for 
Did you mean: 

Search without leading zeroes

Former Member
0 Kudos

Hi,

I have a field called Reference_Number which is part of Search and Result section also. The Reference_Number is a 50 char length and can have varied values like 0005, 06, 000000000009, apha numeric..etc. USer has a reuqirement that he should be able to search by just giving value for .e.g, 6 and it should retrieve the value 06 but not addign leadign zeroes in the Search field.

In Configure display i have checked the Leading Zeroes  indicator in the Search Fields. But the solution is not working.

Can anybody suggest a standard way of achieving this result.

Thanks

Radhika

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Radhika,

Are you refering to a WCL reporting?

I'm using a WCL web in which the Field for selection is a Control parameter defined as text and the tick 'Lead Zeros indicator' is selected.

In the EH, the parameter is captured with all the zeros 0000689147, but in the seach i can just enter 689147 and it find it.

Please try defining the parameter as 'text'

Thanks and regards,

Iñigo

Former Member
0 Kudos

Hi,

The parameters are already defined as Text. The sceanrio is that the value for my parameter can have 1, 2, 3, ... zeroes before the number. In such situation search is not workign, even though Leading Zero indicator is set.

Thanks

Radhika

former_member186607
Active Contributor
0 Kudos

Hi,

the standard "leading zeros" functionality works only if the parameter has a fixed length. E.g. if length is 10 and user searches with '6', then this value is converted internally to '0000000006'. If I understand correctly in your case there is no fixed length available. Is there a maximum length available? Then you could maybe implement BAdI method BEFORE_EH_SEARCH of BAdI /SAPTRX/BADI_EH_S. Inside the method you could change the parameter CT_SELECTIONFIELDS by adding all the possible values to the VALUE_RANGE_TAB of the corresponding entry.

Cheers, Daniel

former_member190756
Active Contributor
0 Kudos

Hello Radhika,

in the standard this is so not possible.

I think what you would need is a Select with LIKE '%6' that would find all entries with a 6 at the end of a field.

EM builds the Selects generically based on the selection profile and the parameters. But there is no Like option foreseen. Only possibility would be to replace the standard search module /SAPTRX/EH_RETRIEVE_GUIDS with your own one. But this would be very complicated to achieve so that all the other options still work.

Best regards,

Steffen