Use strings for DB selections SAP ABAP Programming language
one day, while refactoring an old report, It came to create a dedicated method for a select to MARC in a dedicated DB access class. The selection is done using a select range for material numbers. Until now, I always proceeded like this: search a ready-made ranges type for the needed data type (there is RANGE_T_MATNR) if not found, declare a ranges type myself use the type for passing the selection range. Now, depending on standard SAP DEV objects (be it function modules, classes, or DDIC types) always brings the slight danger of code crashes when something changes in the standard system. I also made already bad experience when trying to bring some home-made basic programming tools from ERP to other systems like APO or SCM. Many DDIC objects do not exist there. So I thought of reducing the dependencies. What about a “range of string”? Will it work in a selection? I wasn’t really sure, so I gave it a try: First, I defined the interface of my method using generic standar...