2007 Sep 06 2:15 PM
Hello everybody,
my question is, is there any possibility to make an include for a method.
This means is it possible to define some types or datas in a include and involve this in one ore more methods.
I don't want to define this as global attributes of the class, because the values can be changed!
This is the case:
INCLUDE_1:
Data: wa_spfli TYPE spfli,
wa_spflight TYPE spflight.
METHOD_01:
INCLUDE include_01.
(This method should involve the include)
wa_spfli-...
METHOD_02:
(without the include)
it should be not possible to access the work area's!
Is there a possibility?
I have seen i can define the attribiutes only for interfaces. So a "work around" would be to sepparete the methods in different interfaces, isn't it?
But it is not nice to administrate a lot of typse there!
What is the meaning/functionality of "Type group" in "Properites" of a class/interface?
Can I involve a include there anyway?
Have somebody of you a other good idear?
Refards
Christian
2007 Sep 06 2:37 PM
The Type group on the properties tab is a way to include a type groups into the class. So if you want to use types from the type group SLIS in different methods, or even in the attribute definitions, you can add the type groups there. You could also use this to satisfy your requirement for the TYPES statements.
Regards,
Rich Heilman
2007 Sep 06 2:44 PM
Hello Christian
You can define all kinds of types in the "Types definition" section of your class. However, these types can only be used for <b>private </b>attributes methods.
As soon as you required them for <b>public </b>attributes or methods they must be globally known as described by Rich.
Regards
Uwe
2007 Sep 06 4:21 PM
Hello Rich, hello Uwe,
Thanks for your help, but this is not the solution which I search.
I have found a very easy solution by myself:
- create a include with all data decleration
- INCLUDE Include_name inside the method
So, with each call of the method the work areas will be new initialized and cleaned (if values are inside)
I thought that this is not possible in classes/methods, therefore the question! Sorry
But I have try it and it seems that it works.
Regards
Christian
2007 Nov 22 3:04 PM
2010 Dec 28 1:26 PM
Hi,
this post is longstanding but I'd like to know the answer to the original question.
Cheers.