Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Program works using debugger but dumps in background or dialogue

former_member852447
Active Participant
0 Likes
3,164

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


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


12 REPLIES 12
Read only

Former Member
0 Likes
2,768

This message was moderated.

Read only

GirieshM
Active Contributor
0 Likes
2,768

This message was moderated.

Read only

kethanuppalapati
Explorer
0 Likes
2,768

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.

Read only

gouravkumar64
Active Contributor
0 Likes
2,768

Hi David,

For this error ,SAP GUI functionality not works properly in background,

You have to little coding for that,if you are using OOPS concept.

see this link ,You will get more ideas.

Thanks

Gourav.

Read only

Former Member
0 Likes
2,768

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.

Read only

hiriyappa_myageri
Participant
0 Likes
2,768

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.

Read only

subbu4sap
Explorer
0 Likes
2,768

Hi David,

Try using docking container's logic for creating ALV using oops in background mode.

Hope this helps.

Best Regards,

Subbu

Read only

former_member852447
Active Participant
0 Likes
2,768

Thank you all who replied....I have changed the container to run in the background

Read only

0 Likes
2,768

Hi David,

Would you be able to please help me as I'm aslo facing similar issue?

Read only

mandeep_shrestha1
Participant
0 Likes
2,768

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

Read only

0 Likes
2,768

Change the GUI container present in your program to Docking container . Will execute in background without any problems.

Regards.

Read only

0 Likes
2,768

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.