‎2009 Jan 30 2:11 AM
Does anyone know a way to achieve the following?
INCLUDE ONCE YCL_MYCLASS.
I know how to do it in PHP... Thanks a lot.
Peter
‎2009 Jan 30 3:15 AM
‎2009 Jan 30 3:15 AM
‎2009 Jan 30 4:12 AM
Thanks Avinash.
That works if an include may or may not exists.
I assume the included object already exists. What I don't know is if it has already been included.
If it was included already, I want ABAP to ignore it this time.
Regards
Peter
‎2009 Feb 02 8:22 AM
If the include contains data declarations, or subroutines, or class definitions etc. you'll get a syntax error if you try to include it more than once.
But there is nothing like the "include once" statement.
matt
‎2009 Feb 02 10:10 AM
Thanks Matt. I thought as much. I prefer to develop objects in includes rather than SE24, because I can see my code at a glance. But this option is severely constrained without an "INCLUDE ONCE" type statement.
‎2009 Feb 02 12:47 PM
If you're shifting over to doing more ABAP, it might be beneficial for you to do things the standard way - i.e. not using includes so much... Otherwise you might find people find your code hard to maintain and, worse for you, you're not used to the standard ways of doing thing!
Personally, I use SE24 but always switch on the object browser for easy navigation. ( Display Object List - Ctrl-Shift-F5 ). But I do wish we had the Eclipse environment...
matt