Dynamically get a method's parameter
I have a very strange problem that no-one was able to help me with so far. I need to implement some code inside a method, which is based on a method's parameter that may or may not be in the method's signature.
This situation has arisen because the method in question is a BAdI implementation that needs to be enhanced, but the BAdI's interface is off-limits. At some point an extra parameter was added to the BAdI's interface, but it is possible that the application will be in a state where this change will not be applied. At the same time, the BAdI's implementation should make use of this parameter, if it's available.
So, in my method code I need smth like:
data: var1 type any. if ( 'param1' ) exists var1 = me->getThisMethodsParameterByName( 'param1' ) * do smth with var1 endif
where param1 is this fuzzy parameter, that may or may not be in the method's signature.
In other words, I need to shut the compiler up when the parameter is not in the method's signature, but at the same time I need to access it inside the method.
Any pointers will be greatly appreciated!
Edited by: Oksana Korol on Sep 30, 2008 10:56 PM
Edited by: Oksana Korol on Sep 30, 2008 10:57 PM
Edited by: Oksana Korol on Sep 30, 2008 10:58 PM