2014 Jan 27 1:34 AM
hello experts,
I have a confusing issue. When I run the program in the debugger it works fine but when I run it in the background or dialogue mode I get an ABAP dump with the following message:
CL_GUI_CUSTOM_CONTAINER----------------------------CP " CNTL_ERROR"
What does this error mean and what code could I insert in the program to avoid this error.
Thank you.
Regards
David Dittmer
2014 Jan 27 2:48 AM
2014 Jan 27 9:14 AM
2014 Jan 27 10:12 AM
Hi David,
May be this program has object oriented gird or OOPS object. In that case it wont run in background and results in the error you have mentioned. If you are using these containers for displaying 'any' kind of enjoy SAP GUI control you can use them in foreground. This is because these containers are created on a screen, and in background screens can not be processed.
Please go through Note 774172 - Runtime error when started in background. This gives the detailed explination for the dump you are getting.
Regards,
Kethan.
2014 Jan 27 10:16 AM
2014 Jan 27 10:25 AM
Hi David,
CL_GUI_CUSTOM_CONTAINER does not support for background process. You need to add the below code to work in background mode.
CALL METHOD cl_gui_alv_grid=>offline
RECEIVING e_offline = l_offline.
IF l_offline IS INITIAL.
CREATE OBJECT l_custom_container
EXPORTING container_name = l_container.
ENDIF.
ENDMETHOD.
Regards,
K.Srikanth Reddy.
2014 Jan 27 11:10 AM
Hi David ,
Before this container have you used any BAPI or FM modules to update or select the data.
if so you just use BAPI_Transaction_commit to make the control to be wait for some seconds.
Regards,
Hiriyappa.
2014 Jan 27 11:13 AM
Hi David,
Try using docking container's logic for creating ALV using oops in background mode.
Hope this helps.
Best Regards,
Subbu
2014 Feb 05 7:34 PM
Thank you all who replied....I have changed the container to run in the background
2014 Mar 13 8:50 AM
Hi David,
Would you be able to please help me as I'm aslo facing similar issue?
2014 Feb 17 12:46 PM
Hi David,
I'm also facing the same issue in a custom report program.
How did you solve this issue and what changes you made to the container to run in the background.
Regards,
Mandeeo
2014 Mar 13 9:40 AM
Change the GUI container present in your program to Docking container . Will execute in background without any problems.
Regards.
2014 Mar 13 10:34 AM
Hi Rojer,
I tried changing the GUI container to docking container implementing the below code:
gr_dockcontainer IS INITIAL.
**create the container where the work area control will reside
CREATE OBJECT gr_dockcontainer
EXPORTING
name = 'WORK_AREA_CONTAINER'.
ENDIF.
i_parent_control = gr_dockcontainer.
CREATE OBJECT m_base_splitter
EXPORTING
parent = i_parent_control
ROWS = 1
columns = 2
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
CALL METHOD m_base_splitter->get_container
EXPORTING
row = 1
column = 2
RECEIVING
container = m_splitter_right_part
EXCEPTIONS
OTHERS = 1.
When I ran it in background I again face the same error GUI cannot be reached.Attached is the snapshot of the job log. Please help.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |