<?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: background grid in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/background-grid/m-p/1448607#M212623</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Heilman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't want to kick off background jobs in ABAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May job will be periodic and the spool will be send to users by mail sap (button spool list recipient in SM36).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Maria João Rocha&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Jun 2006 17:19:40 GMT</pubDate>
    <dc:creator>MariaJooRocha</dc:creator>
    <dc:date>2006-06-23T17:19:40Z</dc:date>
    <item>
      <title>background grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background-grid/m-p/1448600#M212616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SDN,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a ALV GRID report that can run on-line and background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In background I need to output the grid using &lt;/P&gt;&lt;P&gt; call method grid-&amp;gt;set_table_for_first_display &amp;#150; that&amp;#146;s ok&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And print other list, i.e. I&amp;#146;ve two lists for one step in my job!&lt;/P&gt;&lt;P&gt;How can I achive this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Maria João Rocha&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jun 2006 17:00:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background-grid/m-p/1448600#M212616</guid>
      <dc:creator>MariaJooRocha</dc:creator>
      <dc:date>2006-06-23T17:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: background grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background-grid/m-p/1448601#M212617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have a program which outputs an ALV grid as well as another list?  First, how are you doing that? Any you want them both to print to spool in the background.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jun 2006 17:04:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background-grid/m-p/1448601#M212617</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-06-23T17:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: background grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background-grid/m-p/1448602#M212618</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;Use OPEN_JOB to open the Job. &lt;/P&gt;&lt;P&gt;Then use FM GET_PRINT_PARAMETERS to get the print parameters. Pass PRINT immediately = 'X'.&lt;/P&gt;&lt;P&gt;Then use FM JOB_SUBMIT. " Pass the ALV program.&lt;/P&gt;&lt;P&gt;Then close job using JOB_CLOSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jun 2006 17:05:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background-grid/m-p/1448602#M212618</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-23T17:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: background grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background-grid/m-p/1448603#M212619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich Heilman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that I don't know how to print the 2nd list, via job.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help?&lt;/P&gt;&lt;P&gt;Maria João Rocha&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jun 2006 17:08:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background-grid/m-p/1448603#M212619</guid>
      <dc:creator>MariaJooRocha</dc:creator>
      <dc:date>2006-06-23T17:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: background grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background-grid/m-p/1448604#M212620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,Prashant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cant create a new job because I have already a job for this program that will be run every weekend and the data to print is in the main program!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Maria João Rocha&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jun 2006 17:09:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background-grid/m-p/1448604#M212620</guid>
      <dc:creator>MariaJooRocha</dc:creator>
      <dc:date>2006-06-23T17:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: background grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background-grid/m-p/1448605#M212621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can kick off background jobs like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

  data:   l_valid,
          ls_params like pri_params,
          l_jobcount like tbtcjob-jobcount,
          l_jobname  like tbtcjob-jobname.

* Get Print Parameters
  call function 'GET_PRINT_PARAMETERS'
       exporting
            no_dialog      = 'X'
       importing
            valid          = l_valid
            out_parameters = ls_params.

* Open Job
  l_jobname = 'ZRICH_0005'.
  call function 'JOB_OPEN'
       exporting
            jobname  = l_jobname
       importing
            jobcount = l_jobcount.

* Submit report to job
  submit zrich_0005
       via job     l_jobname
           number  l_jobcount
       to sap-spool without spool dynpro
           spool parameters ls_params
              and return.

* Schedule and close job.
  call function 'JOB_CLOSE'
       exporting
            jobcount  = l_jobcount
            jobname   = l_jobname
            strtimmed = 'X'.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jun 2006 17:14:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background-grid/m-p/1448605#M212621</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-06-23T17:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: background grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background-grid/m-p/1448606#M212622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds like you need a driver program which will fire this separate reports for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jun 2006 17:15:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background-grid/m-p/1448606#M212622</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-06-23T17:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: background grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background-grid/m-p/1448607#M212623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Heilman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't want to kick off background jobs in ABAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May job will be periodic and the spool will be send to users by mail sap (button spool list recipient in SM36).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Maria João Rocha&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jun 2006 17:19:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background-grid/m-p/1448607#M212623</guid>
      <dc:creator>MariaJooRocha</dc:creator>
      <dc:date>2006-06-23T17:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: background grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background-grid/m-p/1448608#M212624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem is that I can get two spools but the job only recognises one spool for step! Is that correct? I only can have 1 step 1 spool?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was trying to use grid (because the program runs on-line) , of course I can use traditional lists!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Maria João Rocha&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jun 2006 17:23:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background-grid/m-p/1448608#M212624</guid>
      <dc:creator>MariaJooRocha</dc:creator>
      <dc:date>2006-06-23T17:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: background grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background-grid/m-p/1448609#M212625</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;If you only want the spool, then its possible. Get the spool number as follows :-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM get_spool_details .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR : w_spool_number.&lt;/P&gt;&lt;P&gt;  REFRESH : i_jobsteplist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CHECK WHETHER STATUS OF JOB IS COMPLETED OR CANCELLED&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  WHILE 1 = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;GET THE JOB STEPLIST WHICH HAS THE SPOOL NUMBER&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CALL FUNCTION 'BP_JOB_READ'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        job_read_jobcount           = w_jobcount&lt;/P&gt;&lt;P&gt;        job_read_jobname            = w_jobname&lt;/P&gt;&lt;P&gt;        job_read_opcode             = '35'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  JOB_STEP_NUMBER             =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     IMPORTING&lt;/P&gt;&lt;P&gt;       job_read_jobhead            = wa_jobhead&lt;/P&gt;&lt;P&gt;     TABLES&lt;/P&gt;&lt;P&gt;       job_read_steplist           = i_jobsteplist&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  RET                         =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   EXCEPTIONS&lt;/P&gt;&lt;P&gt;     invalid_opcode              = 1&lt;/P&gt;&lt;P&gt;     job_doesnt_exist            = 2&lt;/P&gt;&lt;P&gt;     job_doesnt_have_steps       = 3&lt;/P&gt;&lt;P&gt;     OTHERS                      = 4&lt;/P&gt;&lt;P&gt;              .&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IF STATUS OF JOB IS COMPLETED(F) OR CANCELLED(A)&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;READ THE JOBSTEPLIST &amp;amp; GET THE SPOOL NUMBER&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    IF wa_jobhead-status =  'A' OR wa_jobhead-status = 'F'.&lt;/P&gt;&lt;P&gt;      READ TABLE i_jobsteplist INTO wa_jobsteplist INDEX 1.&lt;/P&gt;&lt;P&gt;      CHECK wa_jobsteplist-listident &amp;lt;&amp;gt; space.&lt;/P&gt;&lt;P&gt;      w_spool_number = wa_jobsteplist-listident.&lt;/P&gt;&lt;P&gt;      EXIT.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDWHILE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want the spool content into an internal table, then use the following FM :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      rqident                    = w_spool_number&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FIRST_LINE                 = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  LAST_LINE                  =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      buffer                     = i_buffer&lt;/P&gt;&lt;P&gt;   EXCEPTIONS&lt;/P&gt;&lt;P&gt;     no_such_job                = 1&lt;/P&gt;&lt;P&gt;     not_abap_list              = 2&lt;/P&gt;&lt;P&gt;     job_contains_no_data       = 3&lt;/P&gt;&lt;P&gt;     selection_empty            = 4&lt;/P&gt;&lt;P&gt;     no_permission              = 5&lt;/P&gt;&lt;P&gt;     can_not_access             = 6&lt;/P&gt;&lt;P&gt;     read_error                 = 7&lt;/P&gt;&lt;P&gt;     OTHERS                     = 8&lt;/P&gt;&lt;P&gt;            .&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you get the spool content into an internal table, pass this data to the email FM 'SO_NEW_DOCUMENT_ATT_SEND_API1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA : l_spool_no TYPE tsp01_sp0r-rqid_char.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;AFTER SENDING MAIL DELETE THE CORRESPONDING SPOOL&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  l_spool_no = w_spool_number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      spoolid       = l_spool_no&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  RC            =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  STATUS        =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jun 2006 17:26:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background-grid/m-p/1448609#M212625</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-23T17:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: background grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background-grid/m-p/1448610#M212626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Maria,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume that you do not have any problems with your program when it is run in the foreground.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, the reason why we generally use the ALV grid is to make the output &amp;lt;i&amp;gt;interactive&amp;lt;/i&amp;gt;. That is, we would like to present it to an online user so that he can carry out some functions on it like SORTING etc.,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the program runs in the background, there's no user who's waiting to see the output. So you don't really need the ALV!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can structure your program as follows - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT ZTEST.

START-OF-SELECTION.

...
...
...

END-OF-SELECTION.

  IF SY-BATCH EQ 'X'.
    PERFORM DISPLAY_NORMAL_LIST. 
  ELSE.
    PERFORM DISPLAY_ALV_LIST.
  ENDIF.

FORM DISPLAY_NORMAL_LIST.

  LOOP AT ITAB.
    WRITE : ITAB-FIELD1  ....
  ENDLOOP.

ENDFORM.

FORM DISPLAY_ALV_LIST.
  
  CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
  .....
ENDFORM.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope the idea is clear...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jun 2006 17:54:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background-grid/m-p/1448610#M212626</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-23T17:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: background grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background-grid/m-p/1448611#M212627</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 all.&lt;/P&gt;&lt;P&gt;My solution is&lt;/P&gt;&lt;P&gt; 1st job step (prints alv grid)&lt;/P&gt;&lt;P&gt; 2nd job setp (prints the 2nd list). this step receive&lt;/P&gt;&lt;P&gt;the data from step 1 by using import/export to memory using shared buffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result is send by mail (job option).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Maria João Rocha&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jun 2006 11:38:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background-grid/m-p/1448611#M212627</guid>
      <dc:creator>MariaJooRocha</dc:creator>
      <dc:date>2006-06-26T11:38:27Z</dc:date>
    </item>
  </channel>
</rss>

