<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: OOps ALV in background in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/oops-alv-in-background/m-p/6691745#M1451227</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; But even in this case also my GRID is converted in to LIST display in spool and the job is successfully completed(But i haven't used the split container. I used only single normal container).&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hello Vinod,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. ALV grid will always be converted to List in background: A known fact.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Single normal container (it should be a docking container) can be displayed in BG. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The OP's req. to display splitter container in BG is something not possible in BG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Mar 2010 05:42:34 GMT</pubDate>
    <dc:creator>SuhaSaha</dc:creator>
    <dc:date>2010-03-17T05:42:34Z</dc:date>
    <item>
      <title>OOps ALV in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/oops-alv-in-background/m-p/6691735#M1451217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know it has been discussed several times but after going through all those threads I was still ot able to display My ALV in background:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

  IF cl_gui_alv_grid=&amp;gt;offline( ) IS INITIAL.

    CREATE OBJECT obj_container
      EXPORTING
        container_name = 'CC_CONTAINER'
        style          = cl_gui_custom_container=&amp;gt;ws_maximizebox.
* Splitter Container
    CREATE OBJECT obj_splitter
      EXPORTING
        parent  = obj_container
        rows    = 2
        columns = 1.
  ELSE.

    CREATE OBJECT obj_doc_cont.
* Create ALV grid Object
* Splitter Container
    CREATE OBJECT obj_splitter
      EXPORTING
        parent  = obj_doc_cont
        rows    = 2
        columns = 1.
  ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont know why is the job getting cancelled time and again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it because i am setting the PF status or I am using SPLITTER container?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i need this splitter container.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also i tried debugging SM 36 job with JDBG still no clue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What can be the reason?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ags.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Mar 2010 15:21:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/oops-alv-in-background/m-p/6691735#M1451217</guid>
      <dc:creator>agnihotro_sinha2</dc:creator>
      <dc:date>2010-03-15T15:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: OOps ALV in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/oops-alv-in-background/m-p/6691736#M1451218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wow...display in background...never seen that done....must be new technology.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seriously, in "background" e.g., offline, processing there is &lt;STRONG&gt;no Presentation server/client!&lt;/STRONG&gt;  So, how can you display an ALV where there is nothing to view it with?  ALV is essentially a &lt;STRONG&gt;foreground&lt;/STRONG&gt; processing tool, as the name says "LIST VIEWER".  If you're running in background always, make your life simple and write a tabular ("list") report.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Mar 2010 15:36:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/oops-alv-in-background/m-p/6691736#M1451218</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-15T15:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: OOps ALV in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/oops-alv-in-background/m-p/6691737#M1451219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why do you need a splitter if no one can make use of that (in Background)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You're wasting time, containers cannot be created in background.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Mar 2010 16:00:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/oops-alv-in-background/m-p/6691737#M1451219</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2010-03-15T16:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: OOps ALV in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/oops-alv-in-background/m-p/6691738#M1451220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@Breakpoint: Hey this is definitely not a new technology &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; When you schedule an ALV Grid is in background using REUSE_ALV_GRID_DISPLAY the FM automatically handles the background mode &amp;amp; switches to ALV list. But the OO ALVs cannot handle it explicitly. You have to create a docking container &amp;amp; print your ALV there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Rainer: Can we not use the splitter technique with a docking container?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Mar 2010 17:03:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/oops-alv-in-background/m-p/6691738#M1451220</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-03-15T17:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: OOps ALV in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/oops-alv-in-background/m-p/6691739#M1451221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have come across many Threads which says OOPs ALV can be generated in background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my case when i am running the program in background and checking SM36, it displays CANCELLED. Not sure where i am making the mistake.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Suhas you are right that ALV can be generated in background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and guys i just want to generate ALV in background not display. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to use the splitter as it generates the Header details. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if anyone has any clue why the program is getting cancelled?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ags.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Mar 2010 19:33:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/oops-alv-in-background/m-p/6691739#M1451221</guid>
      <dc:creator>agnihotro_sinha2</dc:creator>
      <dc:date>2010-03-15T19:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: OOps ALV in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/oops-alv-in-background/m-p/6691740#M1451222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is message in the job log when the job is getting cancelled ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Mar 2010 05:33:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/oops-alv-in-background/m-p/6691740#M1451222</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-03-16T05:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: OOps ALV in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/oops-alv-in-background/m-p/6691741#M1451223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;docking container will fail in background&lt;/P&gt;&lt;P&gt;when you use  list viewer it will be generated as a spool in background process.&lt;/P&gt;&lt;P&gt;you can use that for your output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;s.janagar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Mar 2010 06:11:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/oops-alv-in-background/m-p/6691741#M1451223</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-16T06:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: OOps ALV in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/oops-alv-in-background/m-p/6691742#M1451224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; docking container will fail in background&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check Rich's reply in this post: [&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="1780500"&gt;&lt;/A&gt;|&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="1780500"&gt;&lt;/A&gt;]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Mar 2010 07:36:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/oops-alv-in-background/m-p/6691742#M1451224</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-03-16T07:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: OOps ALV in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/oops-alv-in-background/m-p/6691743#M1451225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@Suhas I have done exactly as per Rich's code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I m getting an error message "Control Framework: Fatal error - GUI cannot be reached" in Job log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried debugging. i found Grid object is generated and everything is working fine. Somewhr inside the standard code its dumping.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ags.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Mar 2010 05:22:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/oops-alv-in-background/m-p/6691743#M1451225</guid>
      <dc:creator>agnihotro_sinha2</dc:creator>
      <dc:date>2010-03-17T05:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: OOps ALV in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/oops-alv-in-background/m-p/6691744#M1451226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suhas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After looking at mixed opinions about running an OOPs ALV in background will fail/won't fail, I have created a oops ALV report and ran in background. But even in this case also my GRID is converted in to LIST display in spool and the job is successfully completed(But i haven't used the split container. I used only single normal container). I will share this once i have access to SAP system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Mar 2010 05:28:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/oops-alv-in-background/m-p/6691744#M1451226</guid>
      <dc:creator>vinod_vemuru2</dc:creator>
      <dc:date>2010-03-17T05:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: OOps ALV in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/oops-alv-in-background/m-p/6691745#M1451227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; But even in this case also my GRID is converted in to LIST display in spool and the job is successfully completed(But i haven't used the split container. I used only single normal container).&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hello Vinod,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. ALV grid will always be converted to List in background: A known fact.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Single normal container (it should be a docking container) can be displayed in BG. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The OP's req. to display splitter container in BG is something not possible in BG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Mar 2010 05:42:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/oops-alv-in-background/m-p/6691745#M1451227</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-03-17T05:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: OOps ALV in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/oops-alv-in-background/m-p/6691746#M1451228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi AGS,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case of scheduling ALV as background job, we must take care that the container used is a docking container &lt;/P&gt;&lt;P&gt;and the reason for the same is, ALV Grid control is based on the custom controls on the screen. &lt;/P&gt;&lt;P&gt;When the program is scheduled in background, it tries to create GUI related front-end objects and hence the error &lt;/P&gt;&lt;P&gt;u201CFatal Error u2013 GUI cannot be reachedu201D. This type of problem is common with all the programs that use the ALV grid control &lt;/P&gt;&lt;P&gt;to display the output and the solution for the same isas follows :&lt;/P&gt;&lt;P&gt;Whenever we execute this type of programs in background, we should be passing a blank docking &lt;/P&gt;&lt;P&gt;container instead of the custom container as parent to our grid control. . &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 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=&amp;gt;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 . 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Abhinab Mishra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Mar 2010 06:16:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/oops-alv-in-background/m-p/6691746#M1451228</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-17T06:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: OOps ALV in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/oops-alv-in-background/m-p/6691747#M1451229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suhas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the code extraction i am using. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: wcl_container1 TYPE REF TO cl_gui_custom_container,
      wcl_alvgrid1   TYPE REF TO cl_gui_alv_grid.

*Create the container object reference
  CREATE OBJECT wcl_alvgrid1
    EXPORTING
      i_parent          = wcl_container1
    EXCEPTIONS
      error_cntl_create = 1
      error_cntl_init   = 2
      error_cntl_link   = 3
      error_dp_create   = 4
      OTHERS            = 5 .
  IF sy-subrc &amp;lt;&amp;gt; 0.
*      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

*Display the SD data in first screen
  CALL METHOD wcl_alvgrid1-&amp;gt;set_table_for_first_display
  EXPORTING
    I_BUFFER_ACTIVE               = space
    I_BYPASSING_BUFFER            = c_x
*    I_CONSISTENCY_CHECK           =
*    I_STRUCTURE_NAME              =
    IS_VARIANT                    = wa_variant
    i_save                        = c_x
    I_DEFAULT                     = c_X
    is_layout                      = wa_layout
*    IS_PRINT                      =
*    IT_SPECIAL_GROUPS             =
*    IT_TOOLBAR_EXCLUDING          =
    IT_TOOLBAR_EXCLUDING          = li_exclude 
*    IT_HYPERLINK                  =
*    IT_ALV_GRAPHICS               =
*    IT_EXCEPT_QINFO               =
  CHANGING
    it_outtab                      = i_output
    it_fieldcatalog                = i_fieldcat
    IT_SORT                       =  i_sort
*    IT_FILTER                     =
  EXCEPTIONS
    invalid_parameter_combination = 1
    program_error                 = 2
    too_many_lines                = 3
    OTHERS                        = 4
        .
  IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With the above code i am able to execute in background also. I understand that the question is about split container:-)&lt;/P&gt;&lt;P&gt;Need to try this aswell.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Mar 2010 08:19:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/oops-alv-in-background/m-p/6691747#M1451229</guid>
      <dc:creator>vinod_vemuru2</dc:creator>
      <dc:date>2010-03-17T08:19:37Z</dc:date>
    </item>
  </channel>
</rss>

