SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Execution of ALV grid control in background



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ALV Grid / ALV Tree / ALV List
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1639

PostPosted: Sat Jan 31, 2009 3:55 pm    Post subject: Execution of ALV grid control in background Reply with quote

Author: Suresh Kumar Parvathaneni

Whenever an ALV grid control program is executed in background, a short dump occurs stating:
Fatal error: GUI cannot be reached
And whenever an ALV grid control program is executed, it tries to create some front-end related objects. But when the same program is executed in background, the above error occurs as it fails to create front-end objects (GUI objects). So in order to rectify this problem, we need to use the docking container instead of our custom container.

The docking container doesn't need any of the custom controls on the screen; instead it attaches an area to any or all of the four edges of the screen (top, left, right or bottom). The behavior of the areas in the container is determined by the sequence in which they are initialized. Docking Containers are attached to the screen from the inside out. This means that when you create a second container, it is attached to the edge of the screen, and the container that was already there is pushed outwards.

Here is a sample code we use in our programs:

Code:
data: or_doc  type ref to cl_gui_docking_container .
if cl_gui_alv_grid=&gtoffline( ) is initial.
    create object or_custom_container
           exporting container_name = c_container.
  create object or_grid
         exporting i_parent = or_custom_container.
else .
create object or_grid
         exporting i_parent = or_doc .
endif .


We can use either cl_gui_alv_grid=&gtoffline() or SY-BATCH is 'X' to check if the program is being executed in background or not.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ALV Grid / ALV Tree / ALV List All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.