‎2020 Dec 29 8:02 AM
Hello experts,
I am not familiar with ABAP object oriented so please advise.
I want to write an interface to validate a user input. The interface has to include a method (is_values_exist) with an importing parameter. The parameter is a table. Every class, which implements this interface, has to deal with a different type of the parameter table. For example, one has to send BUKRS, another has to send BELNR etc… The problem is that in the interface I cannot leave the type of the parameter empty. (As I can in a Function Module). A workaround could be - In the interface create a parameter for every class (one parameter will have the type of BUKRS, the other BELNR, etc…) . All the parameters have to be optional. Disadvantages of this solution are:
1. The interface has to be changed (a new parameter has to be added) for every new class, which implements it.
2. The parameter should not be optional (but mandatory).
Thanks in advance
Hagit
‎2020 Dec 29 9:03 AM
There are some options. Please refer to the documentation of 'generic datatypes':
‎2020 Dec 29 9:03 AM
There are some options. Please refer to the documentation of 'generic datatypes':
‎2021 Jan 03 6:39 AM
‎2020 Dec 29 12:39 PM
It's not related to Object-Oriented, but you have generic types like "TYPE STANDARD TABLE" (without OF ...)
‎2020 Dec 30 5:37 AM
Some suggestions:
‎2021 Jan 03 6:39 AM