<?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: data global in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-global/m-p/4855651#M1135442</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannot check that condition before the at selection-screen event. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why do you want different data selection for background and foreground? Will not cause any issues with the data declaration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jayant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Nov 2008 09:24:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-28T09:24:33Z</dc:date>
    <item>
      <title>data global</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-global/m-p/4855650#M1135441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi abappers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any way for define data global into conditional before star-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try explain the problem...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I want execute the program in background the data:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPE-POOLS:   slis.
DATA: gt_fieldcat   TYPE slis_t_fieldcat_alv,
      gs_fieldcat LIKE LINE OF gt_fieldcat,
      gss_layout     TYPE slis_layout_alv,
      ls_print    TYPE slis_print_alv,
      gt_listheader TYPE slis_t_listheader.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if I wnat execute the program without background the data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:
  go_grid             TYPE REF TO cl_gui_alv_grid,
  fieldcat  TYPE lvc_t_fcat,             
 gs_layout   TYPE lvc_s_layo,
              
                   
*gt_sort TYPE lvc_t_sort, " Sorting Table
*  Internal table for storing info. for ALV grid
i_sort TYPE STANDARD TABLE OF lvc_s_sort INITIAL SIZE 0.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don´t know if with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; IF SY-BACH IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPE-POOLS:   slis.
DATA: gt_fieldcat   TYPE slis_t_fieldcat_alv,
      gs_fieldcat LIKE LINE OF gt_fieldcat,
      gss_layout     TYPE slis_layout_alv,
      ls_print    TYPE slis_print_alv,
      gt_listheader TYPE slis_t_listheader.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:
  go_grid             TYPE REF TO cl_gui_alv_grid,
  fieldcat  TYPE lvc_t_fcat,             
 gs_layout   TYPE lvc_s_layo,
              
                   
*gt_sort TYPE lvc_t_sort, " Sorting Table
*  Internal table for storing info. for ALV grid
i_sort TYPE STANDARD TABLE OF lvc_s_sort INITIAL SIZE 0.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help me, please.&lt;/P&gt;&lt;P&gt;Cordial greetings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2008 09:20:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-global/m-p/4855650#M1135441</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-28T09:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: data global</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-global/m-p/4855651#M1135442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannot check that condition before the at selection-screen event. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why do you want different data selection for background and foreground? Will not cause any issues with the data declaration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jayant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2008 09:24:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-global/m-p/4855651#M1135442</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-28T09:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: data global</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-global/m-p/4855652#M1135443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lopez &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked your code .Their is no need to declare the data seprately for foreground and background reports.&lt;/P&gt;&lt;P&gt;You can declare both the data globally it will not affect your program at all.&lt;/P&gt;&lt;P&gt;if you want to keep the tables seprate then you can do this by declaring two sets of data globally and use it in your program based on condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Neha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2008 09:28:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-global/m-p/4855652#M1135443</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-28T09:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: data global</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-global/m-p/4855653#M1135444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for your attention,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF sy-batch IS INITIAL.

TYPE-POOLS:   slis.
DATA: gt_fieldcat   TYPE slis_t_fieldcat_alv,
      gs_fieldcat LIKE LINE OF gt_fieldcat,
      gss_layout     TYPE slis_layout_alv,
      ls_print    TYPE slis_print_alv,
      gt_listheader TYPE slis_t_listheader.
else.

DATA:
  go_grid             TYPE REF TO cl_gui_alv_grid,
  fieldcat  TYPE lvc_t_fcat,              
  gs_layout   TYPE lvc_s_layo,                  
                 
i_sort TYPE STANDARD TABLE OF lvc_s_sort INITIAL SIZE 0,

  go_custom_container_kna TYPE REF TO cl_gui_custom_container,
  go_custom_container_sort TYPE REF TO cl_gui_custom_container,
  go_custom_container_lfa TYPE REF TO cl_gui_custom_container,
  go_custom_container_yxs TYPE REF TO cl_gui_custom_container.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;START-OF-SELECTION.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the problem is  if I whan execute the program with or without background the data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe that no is correct the conditional IF SY-TABIX but it execute correctelly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Really the program in background execute a ALV without container and the program with background is executed with other ALV with container.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then When I execute the ALV in background and read the data definition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:
  go_grid             TYPE REF TO cl_gui_alv_grid,
  fieldcat  TYPE lvc_t_fcat,              
  gs_layout   TYPE lvc_s_layo,                  
                 
i_sort TYPE STANDARD TABLE OF lvc_s_sort INITIAL SIZE 0,

  go_custom_container_kna TYPE REF TO cl_gui_custom_container,
  go_custom_container_sort TYPE REF TO cl_gui_custom_container,
  go_custom_container_lfa TYPE REF TO cl_gui_custom_container,
  go_custom_container_yxs TYPE REF TO cl_gui_custom_container.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and that the spool is cacel because error of SAPGUI (believe that read the data definition and then it detect that it is a ALV with container)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then with the code at first of the post I execute the program &lt;/P&gt;&lt;P&gt;with background and without background OK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is correct code ABAP?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cordial greetings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: lopez fernandez on Nov 28, 2008 11:10 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2008 10:09:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-global/m-p/4855653#M1135444</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-28T10:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: data global</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-global/m-p/4855654#M1135445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you getting a Dump in background? The error you are getting is because of the OOPS ALV that you have executed in background. If you are in ECC5.0 or higer version of SAP try to replace the OOPS ALV with Normal ALV/Classical report. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In background you are not allowed to create custom container. If you want to use OOPS method then better try for SALV. You will get a lot of demo program, try searching with SALV*.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jayant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2008 10:14:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-global/m-p/4855654#M1135445</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-28T10:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: data global</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-global/m-p/4855655#M1135446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks at all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at last, the problem is solved to make two programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the last solution that I post with the IF is ok on version 4.6c but before start-of-selection, the conditional is strange&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 18:08:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-global/m-p/4855655#M1135446</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-11T18:08:59Z</dc:date>
    </item>
  </channel>
</rss>

