2007 Nov 29 5:00 PM
I see that you cannot perform a 'CALL SCREEN XXXX' statement from within a method of a class since you cannot create a screen within a class. Is there any non-procedural way around this? I don't want to exit my oo-code by calling a function module that then calls a screen internally; and put all my code that should be in my class into this function module. I don't see any classes so far that I could call/instantiate to solve the problem. Any help would be appreciated.
2007 Nov 29 5:20 PM
You <b>have</b> to go through function modules. However, you use the FMs only for screen handling. Everything else should be done in your class. There's no need to put your class code into the FM.
You can always pass the FM a reference to "me" when you call it, so that you can "return" to the class.
matt
2007 Nov 29 5:20 PM
You <b>have</b> to go through function modules. However, you use the FMs only for screen handling. Everything else should be done in your class. There's no need to put your class code into the FM.
You can always pass the FM a reference to "me" when you call it, so that you can "return" to the class.
matt
2007 Nov 29 5:27 PM
Thank you; I'll investigate. To clarify, though, what I meant by "putting my OO code into the function module" is that on the screen I want to clal will be a custom container control, splitter control within that and then tree control and toolbar control within the splitter. That is the code that I assume I'd have to now put inside the FM, right? Or are you saying I could pass those references into the FM?
2007 Nov 30 6:37 AM
Hello Will, hello Rich,
couple of days ago I had the same problem. I have solved it,
and it is already in production system.
In your method use the coding:
WRITE space.
CREATE OBJECT go_grid
EXPORTING
i_parent = cl_gui_container=>screen0.
Hope it helps,
Peter
2007 Nov 30 9:57 AM
First I must say that I've not done this myself, but I have seen it done! But I can't see any particular reason why you couldn't just pass the references. It's only the connection to the screen that's non-oo.
matt
2007 Nov 29 6:13 PM