Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Can custom logic be added to filter a particular column in ALV?

My requirement is: My field has 'No. of days & hours' - Days/hh:mm:ss . When I try to filter this based on GE/LE/GT/LT, it compares char by char (ALV behavior). E.g.: If I filter GT 3 it will compare only the first char and filter. if I have 23/12:00:00 it will say this is lesser as it will compare only the first char 2 with my filter value 3. I wanted to know if we can add custom logic (Converting into days or hours, filtering and passing back the value) to get the desired result.

2 REPLIES 2

FredericGirod
Active Contributor
0 Kudos

Why didn't you create a TimeStamp ?

raymond_giuseppi
Active Contributor
0 Kudos

Consider using a domain with an internal format that allows filter and a conversion-exit to convert it to/from your format.

Suggestion: convert time to seconds and add nbdays * 84600 within two conversion exit FMs (Create CONVERSION_EXIT_ZDHMS_INPUT and CONVERSION_EXIT_ZDHMS_OUTPUT)