Hi SCN community!
Ever wanted to get the line in a table where the max value for a certain field was? I had to last week, and I remembered just how awful it was to do it. Declare an auxiliary table of the same structure, copy the entire contents, sort for the right field, get the first line, correct?
I thought that there had to be a better way to do this, and I searched for it, and couldn't find it. And I was actually challenged by manish.kumar19 to create a class for this, and so I did.
What I'm sharing is a simple class for internal table manipulations. So far it has 5 methods:
I'm trying to set up github so that we can all work on this together, hopefully we will be able to work on other utility classes like this one.
EDIT: Github successfully set up! You can follow this project here:
EsperancaB/sap_project_object · GitHub
Thanks!
For revision 3 I have changed the exception throwing strategy (much cleaner now) and taken shai.sinai's suggestion of using the component's name instead of looking for its index. GREAT catch!!
If you have any suggestions or contributions please feel free to join :smile:
Best,
Bruno
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
5 | |
3 | |
3 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 |