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

ALV In Background.

Hello Everybody,

ALV report when run in foreground is working fine.But when scheduled in background sm36 it is going to the shortdump,showing an error msg "control framework gui status not set".

Can anyone help me with this problem.

If the GUI controls in ALV are to b disabled in background and enabled in foreground what condition has to b used??

How can the GUI status be set according to the mode in which the program is being executed??

How to know as to when a program is being scheduled in background or foreground?

Thanking you in anticipation.

Regards,

Sirisha .

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Oct 18, 2006 at 06:15 PM

    Hi, implement this coding in the PBO of your screen and it should work fine.

    * ALV Grid
    DATA: R_GRID TYPE REF TO CL_GUI_ALV_GRID.
    DATA: R_CONTROL TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
    DATA: G_DOCK TYPE REF TO CL_GUI_DOCKING_CONTAINER.
    
    * Check whether the program is run in batch or foreground
        IF CL_GUI_ALV_GRID=>OFFLINE( ) IS INITIAL.
    * Run in foreground
          CREATE OBJECT R_CONTROL
                 EXPORTING CONTAINER_NAME = 'CONTAINER_1'.
          CREATE OBJECT R_GRID 
                 EXPORTING I_PARENT = R_CONTROL.
        ELSE.
    * Run in background
          CREATE OBJECT R_GRID 
                 EXPORTING I_PARENT = G_DOCK.
        ENDIF.

    Regards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks Rich. I have the same problem. I solved the problem with your code and i am using events double click in foreground. we have to remove this events when we are executing in background since these events are not supported by class CL_GUI_DOCKING_CONTAINER.

      thanks and regards,

      vamshi tallada

  • author's profile photo Former Member
    Former Member
    Posted on Oct 18, 2006 at 06:16 PM

    Hi,

    You can use SY-BATCH to check if the program is running in foreground or in background..SY-BATCH = 'X' means it is background..

    Thanks,

    Naren

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 18, 2006 at 06:15 PM

    Hi

    can you provide us the required short dump(Not everything)?

    Thanks,

    Ramakrishna

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2006 at 11:13 AM

    Thanks Rich.I really appreciate it.

    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.