<?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: How to send report output from SUBMIT statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-report-output-from-submit-statement/m-p/7803036#M1587321</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;solved&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Jun 2011 12:39:58 GMT</pubDate>
    <dc:creator>piyush_mathur</dc:creator>
    <dc:date>2011-06-03T12:39:58Z</dc:date>
    <item>
      <title>How to send report output from SUBMIT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-report-output-from-submit-statement/m-p/7803025#M1587310</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;I need to develop one report whcih can be use to send any report output in mail as attachment in txt of execl format. So i will be using SUBMIT statement to execute the report in my new report and i need to convert the reportout in txt or excel format and need to send as attachment in mail. This new report can be use to execute any report which may have ALV GRid, Normal outout screen. So what could be the best way to develop this kind of report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Br,&lt;/P&gt;&lt;P&gt;Piyush&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Mar 2011 06:14:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-report-output-from-submit-statement/m-p/7803025#M1587310</guid>
      <dc:creator>piyush_mathur</dc:creator>
      <dc:date>2011-03-24T06:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to send report output from SUBMIT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-report-output-from-submit-statement/m-p/7803026#M1587311</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;Please go through this link.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://wiki.sdn.sap.com/wiki/display/ABAP/Send" target="test_blank"&gt;http://wiki.sdn.sap.com/wiki/display/ABAP/Send&lt;/A&gt;&lt;EM&gt;External&lt;/EM&gt;Mail&lt;EM&gt;with&lt;/EM&gt;attachment&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Mar 2011 06:17:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-report-output-from-submit-statement/m-p/7803026#M1587311</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-24T06:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to send report output from SUBMIT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-report-output-from-submit-statement/m-p/7803027#M1587312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Suresh But i need to first filter output which i will get from SUBMIT statement and then i need to prepare file to send as attachment.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Mar 2011 06:38:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-report-output-from-submit-statement/m-p/7803027#M1587312</guid>
      <dc:creator>piyush_mathur</dc:creator>
      <dc:date>2011-03-24T06:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to send report output from SUBMIT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-report-output-from-submit-statement/m-p/7803028#M1587313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Piyush,&lt;/P&gt;&lt;P&gt;The below code snippet will give you the data of the called program using SUBMIT.&lt;/P&gt;&lt;P&gt;This will also display the data in a separate window.&lt;/P&gt;&lt;P&gt;After that you can add the logic of sendinf the data as mail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the below code, you will get the data in the internal table LIST_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA list_tab TYPE TABLE OF abaplist.

SUBMIT &amp;lt;YOURPROGRAM&amp;gt; EXPORTING LIST TO MEMORY
              AND RETURN.

CALL FUNCTION 'LIST_FROM_MEMORY'
  TABLES
    listobject = list_tab
  EXCEPTIONS
    not_found  = 1
    OTHERS     = 2.

CALL FUNCTION 'DISPLAY_LIST'
  TABLES
    listobject                  = list_tab.
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;&lt;STRONG&gt;Here add the code for sending as mail&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;For sending as EMAIL you can use the function module&lt;/P&gt;&lt;P&gt;SO_DOCUMENT_SEND_API1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;HM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Mar 2011 07:07:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-report-output-from-submit-statement/m-p/7803028#M1587313</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-24T07:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to send report output from SUBMIT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-report-output-from-submit-statement/m-p/7803029#M1587314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Piyush, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These are the steps you need to follow:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;1. SUBMIT the report with the addition EXPORTING LIST TO MEMORY addition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Call the FM 'LIST_FROM_MEMORY' to get the list object exported in Step1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Call the FM 'LIST_TO_ASCI' to convert the listobject from Step2 into ASCII format.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the internal table from Step3 to send the mail. Hope i'm clear.&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>Thu, 24 Mar 2011 07:10:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-report-output-from-submit-statement/m-p/7803029#M1587314</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2011-03-24T07:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to send report output from SUBMIT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-report-output-from-submit-statement/m-p/7803030#M1587315</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;LIST_TO_ASCI will give me data in lines. and its difficult to separate the columns in another internal table for attachment file. As this report is going to use to send any report output so i can not fixed the delimiter. So i am looking some function which can split the data in columns when I am reading from List.&lt;/P&gt;&lt;P&gt;Br,&lt;/P&gt;&lt;P&gt;Piyush&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Mar 2011 08:25:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-report-output-from-submit-statement/m-p/7803030#M1587315</guid>
      <dc:creator>piyush_mathur</dc:creator>
      <dc:date>2011-03-24T08:25:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to send report output from SUBMIT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-report-output-from-submit-statement/m-p/7803031#M1587316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would suggest to create a Spool of submitted report (Use PRINT NEW-PAGE...). Convert Spool to PDF and send PDF as attachment. It will be difficult to segregate data in structured column format from list / ALV particularly if Structure is not known.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mohaiyuddin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Mar 2011 08:30:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-report-output-from-submit-statement/m-p/7803031#M1587316</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-24T08:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to send report output from SUBMIT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-report-output-from-submit-statement/m-p/7803032#M1587317</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;But my requirement to get the data in excel or txt format for further processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Br,&lt;/P&gt;&lt;P&gt;Piyush&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Mar 2011 08:43:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-report-output-from-submit-statement/m-p/7803032#M1587317</guid>
      <dc:creator>piyush_mathur</dc:creator>
      <dc:date>2011-03-24T08:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to send report output from SUBMIT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-report-output-from-submit-statement/m-p/7803033#M1587318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think there is a way to cast the unstructured data in columnar format without knowing it's structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mohaiyuddin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Mar 2011 08:45:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-report-output-from-submit-statement/m-p/7803033#M1587318</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-24T08:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to send report output from SUBMIT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-report-output-from-submit-statement/m-p/7803034#M1587319</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; Hi Suhas,&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; LIST_TO_ASCI will give me data in lines. and its difficult to separate the columns in another internal table for attachment file. As this report is going to use to send any report output so i can not fixed the delimiter. So i am looking some function which can split the data in columns when I am reading from List.&lt;/P&gt;&lt;P&gt;&amp;gt; Br,&lt;/P&gt;&lt;P&gt;&amp;gt; Piyush&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;No need to seperate nothing additionally, this will come automatically in the attached file. Draft below&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA list_tab TYPE TABLE OF abaplist.

SUBMIT your_report EXPORTING LIST TO MEMORY
              AND RETURN.

CALL FUNCTION 'LIST_FROM_MEMORY'
  TABLES
    listobject = list_tab
  EXCEPTIONS
    not_found  = 1
    OTHERS     = 2.

DATA string_tab TYPE list_string_table.
"use table type appropriate for attchement
DATA ascii_tab TYPE soli_tab.

CALL FUNCTION 'LIST_TO_ASCI'
 TABLES
   listasci                 = ascii_tab
   listobject               = list_tab.

CALL FUNCTION 'GUI_DOWNLOAD'
  EXPORTING
    filename = 'C:\test.txt'
    filetype = 'ASC'
  TABLES
    data_tab = ascii_tab.

DATA go_email_doc TYPE REF TO cl_document_bcs.

go_email_doc = cl_document_bcs=&amp;gt;create_document(
                                      i_type = 'TXT'
                                      ... ).

go_email_doc-&amp;gt;add_attachment( i_attachment_type = 'TXT'
                              i_attachment_subject = 'My Attachment'
                              i_att_content_text = ascii_tab ).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Mar 2011 09:33:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-report-output-from-submit-statement/m-p/7803034#M1587319</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2011-03-24T09:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to send report output from SUBMIT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-report-output-from-submit-statement/m-p/7803035#M1587320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its having the same problem. Is there any way to get all the data separated in columns i.e. in txt or excel. I will be runnig normally ALV reports in backgroud.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Br,&lt;/P&gt;&lt;P&gt;Piyush&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Mar 2011 10:42:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-report-output-from-submit-statement/m-p/7803035#M1587320</guid>
      <dc:creator>piyush_mathur</dc:creator>
      <dc:date>2011-03-24T10:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to send report output from SUBMIT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-report-output-from-submit-statement/m-p/7803036#M1587321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;solved&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2011 12:39:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-report-output-from-submit-statement/m-p/7803036#M1587321</guid>
      <dc:creator>piyush_mathur</dc:creator>
      <dc:date>2011-06-03T12:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to send report output from SUBMIT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-report-output-from-submit-statement/m-p/7803037#M1587322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hey Piyush,&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 am also using the submit statement with EXPORTING LIST TO MEMORY AND RETURN. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How did u divide the data which we get into sting format after   CALL FUNCTION 'LIST_TO_ASCII'  into an internal table whose structure i know ?&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;&lt;/P&gt;&lt;P&gt;Solanki Ritesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2012 18:46:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-report-output-from-submit-statement/m-p/7803037#M1587322</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-13T18:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to send report output from SUBMIT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-report-output-from-submit-statement/m-p/7803038#M1587323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Piyush,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a same requirement . Can you please tell how did you do to filter the data and manage to accept any report in the selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your inputs are much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nikhil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 13:49:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-send-report-output-from-submit-statement/m-p/7803038#M1587323</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-07-23T13:49:19Z</dc:date>
    </item>
  </channel>
</rss>

