Skip to Content
author's profile photo Former Member
Former Member

OO ALV in Background - Control Framework Fatal Error GUI not reached

Hi

I'm using OO in background via the OFFLINE method but the program still won't run in the background

any idea what's wrong as this IMO should work according to the "sparse" documentation available.

Here's the relevant bit of code



MODULE status_0100 OUTPUT.
data: off type int4.
if sy-batch = 'X'.
 CALL METHOD cl_gui_alv_grid=>offline
RECEIVING
e_offline = off.
endif.



  IF grid_container1 IS INITIAL.
    CREATE OBJECT grid_container1
            EXPORTING
               container_name = 'CCONTAINER1'.
    CREATE OBJECT  grid1
       EXPORTING
          i_parent = grid_container1.
    struct_grid_lset-edit = 'X'.    "To enable editing in ALV

    CALL METHOD grid1->set_table_for_first_display
      EXPORTING is_layout =  struct_grid_lset
      CHANGING
                 it_outtab       = <dyn_table>
                 it_fieldcatalog = it_fldcat.


  ENDIF.
  SET PF-STATUS '001'.
  SET TITLEBAR '000'.

ENDMODULE.


Cheers

jimbo

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Jan 09, 2008 at 08:58 PM

    Hello James

    I have not yet used ALV list in background but I found the solution in thread:

    [background processing in ALV Oops|background processing in ALV Oops;

    According to the answer in this thread you have to change your coding like this:

    " Create container only in dialog, not in background
    IF ( off IS INITIAL ).
        CREATE OBJECT grid_container1
                EXPORTING
                   container_name = 'CCONTAINER1'.
        CREATE OBJECT  grid1
           EXPORTING
              i_parent = grid_container1.
    ENDIF.
    
      CREATE OBJECT  grid1
         EXPORTING
            i_parent = grid_container1.  " container initial in background!
    ...
    

    Regards,

    Uwe

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.