02-19-2014 5:14 AM
Hello everybody,
in JAVA all classes inherited from the superclass <object>.
So it is possible to get the information/metadata abound the object within a method by processing
e.g.
if (obj instanceof String) {
Is there a analogon in ABAP?
Wghen yes, how has the coding to be?
Thanks
Regards
Mario
02-19-2014 5:41 AM
Hi Mario,
Yes its the same in ABAP also. All classes inherit from superclass OBJECT. The root node of all inheritance trees in ABAP objects is the pre-defined empty class OBJECT.
Hoping this helps you
Inheritance (SAP Library - ABAP Programming (BC-ABA))
Regards,
Sheetal.
02-19-2014 5:41 AM
Hi Mario,
Yes its the same in ABAP also. All classes inherit from superclass OBJECT. The root node of all inheritance trees in ABAP objects is the pre-defined empty class OBJECT.
Hoping this helps you
Inheritance (SAP Library - ABAP Programming (BC-ABA))
Regards,
Sheetal.
02-19-2014 5:48 AM
Hi Sheetal,
Is there any sample coding? I do not know how to write the coding.
Regards Mario
02-19-2014 5:58 AM
Hi Mario,
You can get lot of sample coding based on what you want specifically. Like if you give an example scenario i can help you further
Regards,
Sheetal.
02-19-2014 6:34 AM
Hi Sheetal,
asuming I have a method with just one import-Parameter.
The Client is passing either a string or a integer to the method.
So the import-Parameter has to be from type object. OK?
Inside the method the coding has to fin out if a string or an int is passed.
How do I have to define the Import Parameter?
How can I figure out string or int (like JAVA: instanceOf)
Thanks
Regards
Mario
02-19-2014 6:47 AM
02-19-2014 7:57 AM