Alv Fatal Error

  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Alv Fatal Error as PDF for free.

More details

  • Words: 451
  • Pages: 3
ALV Fatal Error - GUI Cannot be reached By Suresh Kumar Parvathaneni This Tutorial gives us a procedure to track most common occurring error in ALV and in an easy way. Purpose: This document details about the common problem faced by many consultants: “Fatal Error – GUI cannot be reached” in ALV Grid Control. Pre-requisites: The reader of this Tutorial is assumed to have some basic knowledge regarding ALV and ALV grid controls. The problem: SAP® has provided us with some demo programs on ALV. We would use one of them in our scenario. BCALV_GRID_DEMO is the demo program provided by SAP® for ALV Grid Control. When you execute the program in foreground, you get the similar following output:

When you schedule the same program in background, your job is cancelled due to an error. Screenshot of the same is shown below:

Reason: ALV Grid control is based on the custom controls on the screen. When the program is scheduled in background, it tries to create GUI related front-end objects and hence the error “Fatal Error – GUI cannot be reached”. This type of problem is common with all the programs that use the ALV grid control to display the output. Solution: Whenever we execute this type of programs in background, we should be passing a blank docking container instead of the custom container as parent to our grid control. 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. Let us modify the standard program (by taking a copy of it) to enable it to execute it in background. Following modifications have to be made: •

Define a docking container in the program data: or_doc

type ref to cl_gui_docking_container .



At the time of creating a custom container, check if the program is being executed in background or foreground. If the program is scheduled in background, then create a docking container instead of custom container. if cl_gui_alv_grid=>offline( ) 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 .

Now test executing the program in background. The report would be generated. Have a problem??. Click here for the complete modified program

Related Documents

Alv Fatal Error
June 2020 3
Alv
November 2019 5
Alv
August 2019 8
Orden Fatal
April 2020 19
Alv Material
November 2019 5
Alv-exe
May 2020 23