<?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 Submit Report Issue ! in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-issue/m-p/6640202#M1443369</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;               I am calling a report using submit statement with dynamic value for selection screen..&lt;/P&gt;&lt;P&gt;Here is my code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;isels-selname = 'AUFNR'.&lt;/P&gt;&lt;P&gt;  isels-kind    = 'S'.&lt;/P&gt;&lt;P&gt;  isels-sign    = 'I'.&lt;/P&gt;&lt;P&gt;  isels-option  = 'BT'.&lt;/P&gt;&lt;P&gt;  isels-low     = internal_order.&lt;/P&gt;&lt;P&gt;**isels-HIGH    = sy-datum .&lt;/P&gt;&lt;P&gt;  APPEND isels.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SUBMIT y_test  " using SELECTION-SCREEN&lt;/P&gt;&lt;P&gt;              WITH SELECTION-TABLE isels&lt;/P&gt;&lt;P&gt;              EXPORTING LIST TO MEMORY&lt;/P&gt;&lt;P&gt;              AND RETURN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want this report to run in background.. but instead its showing the report on the screen and its not exporting the list to memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Feb 2010 02:55:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-02-10T02:55:26Z</dc:date>
    <item>
      <title>Submit Report Issue !</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-issue/m-p/6640202#M1443369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;               I am calling a report using submit statement with dynamic value for selection screen..&lt;/P&gt;&lt;P&gt;Here is my code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;isels-selname = 'AUFNR'.&lt;/P&gt;&lt;P&gt;  isels-kind    = 'S'.&lt;/P&gt;&lt;P&gt;  isels-sign    = 'I'.&lt;/P&gt;&lt;P&gt;  isels-option  = 'BT'.&lt;/P&gt;&lt;P&gt;  isels-low     = internal_order.&lt;/P&gt;&lt;P&gt;**isels-HIGH    = sy-datum .&lt;/P&gt;&lt;P&gt;  APPEND isels.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SUBMIT y_test  " using SELECTION-SCREEN&lt;/P&gt;&lt;P&gt;              WITH SELECTION-TABLE isels&lt;/P&gt;&lt;P&gt;              EXPORTING LIST TO MEMORY&lt;/P&gt;&lt;P&gt;              AND RETURN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want this report to run in background.. but instead its showing the report on the screen and its not exporting the list to memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2010 02:55:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-issue/m-p/6640202#M1443369</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-10T02:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: Submit Report Issue !</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-issue/m-p/6640203#M1443370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;1. Create new function module and put your SUBMIT code there&lt;/P&gt;&lt;P&gt;2. Back to your main program to call your function module with option IN BACKGROUND TASK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2010 03:09:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-issue/m-p/6640203#M1443370</guid>
      <dc:creator>former_member371913</dc:creator>
      <dc:date>2010-02-10T03:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: Submit Report Issue !</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-issue/m-p/6640204#M1443371</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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;isels-selname = 'AUFNR'.
isels-kind = 'S'.
isels-sign = 'I'.
isels-option = 'BT'.
isels-low = internal_order.
**isels-HIGH = sy-datum .
APPEND isels.

SUBMIT y_test  TO SAP-SPOOL
WITH SELECTION-TABLE isels
EXPORTING LIST TO MEMORY
AND RETURN.&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;Thanks,&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>Wed, 10 Feb 2010 03:29:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-issue/m-p/6640204#M1443371</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-10T03:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: Submit Report Issue !</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-issue/m-p/6640205#M1443372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.. I am getting an error message that To SAP-SPOOL can't be used with export list to memory..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am calling the report for tcode MB25.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this statement work all kind of ALV output of a report.. even if its a OO ALV ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2010 03:59:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-issue/m-p/6640205#M1443372</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-10T03:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: Submit Report Issue !</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-issue/m-p/6640206#M1443373</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;Following code helps you run it in background,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

  DATA:  lw_number  TYPE tbtcjob-jobcount.

  CONSTANTS:  lc_name  TYPE tbtcjob-jobname VALUE 'JOB_1'.

*  Calling FM to open job
  CALL FUNCTION 'JOB_OPEN'
    EXPORTING
      jobname          = lc_name
    IMPORTING
      jobcount         = lw_number
    EXCEPTIONS
      cant_create_job  = 1
      invalid_job_data = 2
      jobname_missing  = 3
      OTHERS           = 4.

  IF sy-subrc = 0.
*  Calling the background report and passing it a SELECTION-TABLE
    SUBMIT zreport1
      WITH SELECTION-TABLE int_rspar
        VIA JOB lc_name  NUMBER lw_number
                        AND RETURN.

*  Calling FM to close job
    IF sy-subrc = 0.
      CALL FUNCTION 'JOB_CLOSE'
        EXPORTING
          jobcount             = lw_number
          jobname              = lc_name
          strtimmed            = 'X'
        EXCEPTIONS
          cant_start_immediate = 1
          invalid_startdate    = 2
          jobname_missing      = 3
          job_close_failed     = 4
          job_nosteps          = 5
          job_notex            = 6
          lock_failed          = 7
          OTHERS               = 8.
      IF sy-subrc &amp;lt;&amp;gt; 0.

      ENDIF.
    ENDIF.
  ENDIF.



***This will effect running of report completely in background under the Job name that You will give, U can later go and check in T-code - 'SM37'

***For sending the output list to memory and later retrieving it : 

*Example Code (Retrieving list from memory)
*This internal table stores the value 
*	Of output listed to memory
DATA  BEGIN OF itab_list OCCURS 0.
        INCLUDE STRUCTURE abaplist.
DATA  END OF itab_list.
* To load into ascii file format
DATA: BEGIN OF vlist OCCURS 0,
   line(256),
      END OF vlist.

SUBMIT zreport1
  WITH selection-table int_rspar 
    EXPORTING LIST TO MEMORY
      AND RETURN.
* To read from the memory
CALL FUNCTION 'LIST_FROM_MEMORY'
  TABLES
    listobject = itab_list
  EXCEPTIONS
    not_found  = 4
    OTHERS     = 8.

* To write it onto the output
CALL FUNCTION 'WRITE_LIST'
 EXPORTING
   WRITE_ONLY       = 'X'
  TABLES
    listobject       = itab_list
 EXCEPTIONS
   EMPTY_LIST       = 1
   OTHERS           = 2
          .
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.
* OR use following
* Display the output list on  a different screen.
CALL FUNCTION 'DISPLAY_LIST'
* EXPORTING
*   FULLSCREEN                  =
*   CALLER_HANDLES_EVENTS       =
*   STARTING_X                  = 10
*   STARTING_Y                  = 10
*   ENDING_X                    = 60
*   ENDING_Y                    = 20
* IMPORTING
*   USER_COMMAND                =
  TABLES
    listobject                  = itab_list
* EXCEPTIONS
*   EMPTY_LIST                  = 1
*   OTHERS                      = 2
          .
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.
* also can get into ascii file

* This can be used to write the output data to vlist in ascii format

CALL FUNCTION 'LIST_TO_ASCI'
  EXPORTING
    list_index         = -1
  TABLES
    listasci           = vlist
    listobject         = itab_list
  EXCEPTIONS
    empty_list         = 1
    list_index_invalid = 2
    OTHERS             = 3.

IF sy-subrc NE '0'.
  WRITE:/ 'LIST_TO_ASCI error !! ', sy-subrc.
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;P&gt;I hope you can use this to best suit your requirement !!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Salil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2010 04:04:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-issue/m-p/6640206#M1443373</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-10T04:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: Submit Report Issue !</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-issue/m-p/6640207#M1443374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the report uses new OO ALV.. it can't export the list to memory.. its possible only with the classic ALV reports.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Feb 2010 04:57:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-issue/m-p/6640207#M1443374</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-11T04:57:40Z</dc:date>
    </item>
  </channel>
</rss>

