2008 Jul 10 3:23 PM
Hi guys,
I am creating TEXT EDITOR in selection screen for this I'm doing it as below
CREATE OBJECT g_custcont
EXPORTING container_name = 'G_TXT_CUSTCONT'.
CREATE OBJECT g_editor
EXPORTING
wordwrap_mode = cl_gui_textedit=>wordwrap_at_fixed_position
wordwrap_position = line_length
wordwrap_to_linebreak_mode = cl_gui_textedit=>true
parent = g_custcont.
This is working fine in case of online execution, but giving Fatal error: GUI cannot be reached in background scheduling.
I know we can pass blank docking container in case of offline like code given below, but that is not working in case of selection screen.
data: g_doc_con1 TYPE REF TO cl_gui_docking_container.
CREATE OBJECT grid1
EXPORTING i_parent = g_doc_con1.
Thanks in advance...
2008 Jul 10 3:27 PM
HI,
ALV Grid cannot be displayed in background.
Use the REUSE_ALV...func,modules, that will take care of both foreground as well as background.
Regards,
Subramanian
2008 Jul 10 3:31 PM
My dear friend I'm not facing this problem in output display, this is problem in selection screen..
2008 Jul 10 3:39 PM
hi,
I am not able to post you a link for this.
Search for your "Fatal error: GUI cannot be reached in background scheduling" in google search engine.
You will get a document related to this posted in SAP technical.com
Refer to that.
Regards,
Subramanian
2008 Jul 10 3:57 PM
In ur case u r using text editor control in the selection screen. This control is nothing but OCX control that is stored in ur local PC. And u r using the class cl_gui_textedit(wrapper class) to send instructions to this control. In background SAP cannot access your ur local PC that's it is showing this error.
To avoid it u can try this code;
CREATE OBJECT g_editor
EXPORTING
wordwrap_mode = cl_gui_textedit=>wordwrap_at_fixed_position
wordwrap_position = line_length
wordwrap_to_linebreak_mode = cl_gui_textedit=>true
parent = cl_gui_custom_container=>screen0.
Regards,
Joy.