<?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: submit query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-query/m-p/2836931#M664267</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;You can use the ABAP Memory to EXPORT this internal table in the Submitted Report and IMPORT it from the Calling program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP MEMORY:To transfer the Data between the Programs Running in the Same Session We can use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg:&lt;/P&gt;&lt;P&gt;Calling Report.&lt;/P&gt;&lt;P&gt;REPORT ZREP1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : ITAB TYPE TABLE OF MARA.&lt;/P&gt;&lt;P&gt;SELECT * FROM MARA INTO TABLE ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXPORT TEMPTAB FROM ITAB TO MEMORY ID 'M1'.&lt;/P&gt;&lt;P&gt;SUBMIT ZREP2 AND RETURN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Called report&lt;/P&gt;&lt;P&gt;REPORT ZREP2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: IT_MARA TYPE TABLE OF MARA.&lt;/P&gt;&lt;P&gt;DATA WA TYPE MARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMPORT TEMPTAB TO IT_MARA FROM MEMORY ID 'M1'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_MARA INTO WA.&lt;/P&gt;&lt;P&gt;WRITE:/ WA-MATNR.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;REWARD IF HELPFUL.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Oct 2007 09:52:32 GMT</pubDate>
    <dc:creator>varma_narayana</dc:creator>
    <dc:date>2007-10-01T09:52:32Z</dc:date>
    <item>
      <title>submit query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-query/m-p/2836930#M664266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Experts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I am using the below statement to execute the program in background&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUBMIT RIAUFK20 and return&lt;/P&gt;&lt;P&gt;                with lead_auf in lead_auf&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;               with p_param2 = 'value'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                user sy-uname&lt;/P&gt;&lt;P&gt;                via job jobname&lt;/P&gt;&lt;P&gt;                number jobcount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    My problem is the program which I am submiting is a report and after excecuting the report in background, I need the final internal table values in my Program for another calculation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible and If so let me know with the example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;&lt;P&gt;\karthik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 09:47:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-query/m-p/2836930#M664266</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-01T09:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: submit query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-query/m-p/2836931#M664267</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;You can use the ABAP Memory to EXPORT this internal table in the Submitted Report and IMPORT it from the Calling program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP MEMORY:To transfer the Data between the Programs Running in the Same Session We can use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg:&lt;/P&gt;&lt;P&gt;Calling Report.&lt;/P&gt;&lt;P&gt;REPORT ZREP1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : ITAB TYPE TABLE OF MARA.&lt;/P&gt;&lt;P&gt;SELECT * FROM MARA INTO TABLE ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXPORT TEMPTAB FROM ITAB TO MEMORY ID 'M1'.&lt;/P&gt;&lt;P&gt;SUBMIT ZREP2 AND RETURN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Called report&lt;/P&gt;&lt;P&gt;REPORT ZREP2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: IT_MARA TYPE TABLE OF MARA.&lt;/P&gt;&lt;P&gt;DATA WA TYPE MARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMPORT TEMPTAB TO IT_MARA FROM MEMORY ID 'M1'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_MARA INTO WA.&lt;/P&gt;&lt;P&gt;WRITE:/ WA-MATNR.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;REWARD IF HELPFUL.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 09:52:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-query/m-p/2836931#M664267</guid>
      <dc:creator>varma_narayana</dc:creator>
      <dc:date>2007-10-01T09:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: submit query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-query/m-p/2836932#M664268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;submit &amp;lt;report_name&amp;gt;&lt;/P&gt;&lt;P&gt;         with &amp;lt;parameters&amp;gt;&lt;/P&gt;&lt;P&gt;         exporting list to memory&lt;/P&gt;&lt;P&gt;         and return.&lt;/P&gt;&lt;P&gt;now call the fms:LIST_FROM_MEMORY, LIST_TO_ASCI to get the data.&lt;/P&gt;&lt;P&gt;Now you will have to manually split the data accordingly into individual fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
" See sample code below
data : it_abaplist      type table of abaplist.
data : it_text(255)     type c occurs 0 with header line.
* Submitting the report output to memory
  submit rsstat20
         with rstartti = p_stime
         with rday     = p_sdate
         with rendti   = p_etime
         with rendday  = p_edate
         with rmaxcnt  = p_cnt
         exporting list to memory
         and return.

* Retrieves the Report List from memory
  call function 'LIST_FROM_MEMORY'
       tables
            listobject = it_abaplist
       exceptions
            not_found  = 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.

* Converts the memory output to Asci output
  call function 'LIST_TO_ASCI'
       tables
            listasci           = it_text
            listobject         = it_abaplist
       exceptions
            empty_list         = 1
            list_index_invalid = 2
            others             = 3.
  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;Regards&lt;/P&gt;&lt;P&gt;Gopi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 09:54:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-query/m-p/2836932#M664268</guid>
      <dc:creator>gopi_narendra</dc:creator>
      <dc:date>2007-10-01T09:54:41Z</dc:date>
    </item>
  </channel>
</rss>

