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

ALV Tree in Background

Is it possible to run an ALV Tree report in background? I tried using these codes:

IF cl_gui_alv_grid=>ontrol

EXPORTING container_name = 'CONTAINER_1'.

CREATE OBJECT l_grid

EXPORTING i_parent = l_control.

ELSE.

CREATE OBJECT l_grid

EXPORTING i_parent = l_dock.

ENDIF.

But I'm getting an error. Is there a way on how I can run this report in background?

Thanks in advance!

Beth

Add a comment
10|10000 characters needed characters exceeded

Related questions

7 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 15, 2005 at 09:49 PM

    I'm using 4.7 and I've run this program several times in background and I don't get any spool everytime. It just says COMPLETE but no spool.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Check your spool settings via SYSTEM->USER PROFILE->OWN DATA, tab DEFAULTS. I found that if I have Output Immediately and Delete After Output checked then I get no spool file from my batch job. If I uncheck both of them, then the spool file is available via SM37.

      Let us know how it goes.

  • Posted on Feb 14, 2005 at 10:40 PM

    Hi Beth

    These controls require frontend to function. However, as I can remember if you pass a dummy container you can still instantiate the control object. Following is an ALV grid example.

    <u>e.g.</u>

    DATA: g_dock TYPE REF TO cl_gui_docking_container,
          g_grid TYPE REF TO cl_gui_alv_grid.
    
    IF cl_gui_alv_grid=>offline( ) is initial.
        CREATE OBJECT g_dock.
    ENDIF.
    
    CREATE OBJECT g_grid
        EXPORTING I_PARENT = g_dock.
    

    You can also check whether it is a background task with the system parameter <b>"sy-batch"</b>.

    Hope these may helpyou to construct a similar procedure for ALV Tree.

    Kind Regards

    *--Serdar

    ssimsekler@yahoo.com

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 15, 2005 at 05:54 PM

    I tried your suggestion but it still didn't work.

    My program is a replica of the program BCALV_TREE_DEMO. I tried running this demo program in background and it completed but I didn't get any spool. Why is that so?

    Any help on how to get my program or this demo program running in background would really be appreciated.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Beth, in my 4.7 system, I ran BCALV_TREE_DEMO from SE38 using PROGRAM->EXECUTE->BACKGROUND. It finished successfully and I got a report in the spool. Have you executed it successfully online? In a non-training system, the data tables that this report reads are usually empty so maybe that is why you did not get a report. There is a utility program that will populate the tables. Take a look at table SFLIGHT via transaction SE16 and see if it has any data.

  • author's profile photo Former Member
    Former Member
    Posted on Feb 15, 2005 at 07:49 PM

    Hi Charles! I ran the BCALV_TREE_DEMO program in foreground and got data. But if I ran it in background using the path you gave, I don't get any spool. It just tells me that it's complete.

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Beth,

      Charles is correct. I ran the report in the background and got the spool. When you run it in the background, the job is scheduled and you can see its status in SM37.

      Did you go to SM37 and check the job? Check the job log. See if there is a message there that is preventing the spool creation.

      Regards,

      Srinivas

  • Posted on Feb 16, 2005 at 09:26 AM

    Hi Beth,

    maybe you are printing and deleting your output immediately.

    Check, which output parameters are defined in job planning. If there is:

    - immediate output

    - deletion after output

    - a printer somewhere else in the building

    you won't find any paper or spool in your system.

    Just an idea,

    Christian

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 16, 2005 at 05:15 PM

    Thanks Charles. I unchecked the Output Immediately and Delete After Output boxes and now I'm getting the spools. But i usually gets spools from my batch jobs so why did I have to unchecked those 2 options?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 16, 2005 at 06:16 PM

    Hi Beth,

    normally you plan your jobs with SM36 - here transaction defaults are without immediate deletion.

    If you use SE38, F8, F9, then you are not specifying print options separately -> user settings are used.

    Regards,

    Christian

    P.S.: Lucky Charles, who brought up the topic of print options? 😉

    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.