‎2006 Aug 07 9:44 AM
Hello,
is it possible to instantly do a method call on a returned reference in ABAP Objects? in this case i need it for singleton behaviour of "z_example", but the compiler wont allow me to call like this:
result = z_example=>get_instance( )->do_stuff( input_param another_param ).i tried several other syntaxes (is this the right plural ), but it wasn't successful. in java its a standard thing:
result = Example.getInstance().doStuff(inputParam, anotherParam);Thanks in advance,
Stefan
‎2006 Aug 15 9:30 PM
Hello Stefan
In 6.20 and 6.40 I do not think this is possible. In your example you have to invoke the method on result.
Perhaps with release >= 700 it may be possible.
Regards
Uwe
‎2006 Aug 15 9:30 PM
Hello Stefan
In 6.20 and 6.40 I do not think this is possible. In your example you have to invoke the method on result.
Perhaps with release >= 700 it may be possible.
Regards
Uwe
‎2006 Aug 15 9:37 PM
‎2006 Aug 16 7:10 AM
Thanks for the answers.
this means i always have to declare temporary variables for the returned references, a bit annoying, but O.K.