<?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 + LIST_FROM_MEMORY in background mode in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-list-from-memory-in-background-mode/m-p/7610656#M1569309</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Grame,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;insert before SUBMIT:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SY-SUBRC = 3.
WHILE SY-SUBRC ÍS NOT INITIAL.
ENDWHILE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This triggers an endless loop. You can Capture the job in job overview or debug the process from SM50 process view. In debugger, clear SY-SUBRC and then step thru relevant codes sections. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First thing you may do is checking if correct parameters are used as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that way you find a solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Jan 2011 20:59:24 GMT</pubDate>
    <dc:creator>Clemenss</dc:creator>
    <dc:date>2011-01-31T20:59:24Z</dc:date>
    <item>
      <title>Submit + LIST_FROM_MEMORY in background mode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-list-from-memory-in-background-mode/m-p/7610653#M1569306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I need to capture the output results from standard program RFKORK00 and hence I designed a wrapper program that calls the standard program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RFKORK00 generates a report output and I am able to capture the results correctly using the FM LIST_FROM_MEMORY and FM LIST_FROM_ASCI in foreground mode. But when I try to run the same job in background, the FM LIST_FROM_MEMORY does not return any results (I have checked the log by inserting information messages at various points in the program).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have searched for similar contexts here on SDN and everyone is in agreement that LIST_FROM_MEMORY would work well even in the background mode too but I am unable to find the fault in this case. Could you please help, attached is the code -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SUBMIT RFKORK00
      USING SELECTION-SET c_variant
      EXPORTING LIST TO MEMORY
      AND RETURN.

    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject = lt_abaplist
      EXCEPTIONS
        not_found  = 1
        OTHERS     = 2.

    IF sy-subrc = 0.

      CALL FUNCTION 'LIST_TO_ASCI'
        EXPORTING
          list_index         = '-1'
          with_line_break    = ' '
        TABLES
          listasci           = lt_vlist[]
          listobject         = lt_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.

      MESSAGE i099(z1) WITH 'LIST TO ASCI CALL'.

   ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Jan 2011 19:19:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-list-from-memory-in-background-mode/m-p/7610653#M1569306</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-31T19:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: Submit + LIST_FROM_MEMORY in background mode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-list-from-memory-in-background-mode/m-p/7610654#M1569307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;maybe totally off the wall, but in background why wouldn't we let the report spool, then when we see that the spool exists, import the spool content?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Jan 2011 20:25:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-list-from-memory-in-background-mode/m-p/7610654#M1569307</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-31T20:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: Submit + LIST_FROM_MEMORY in background mode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-list-from-memory-in-background-mode/m-p/7610655#M1569308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think RFKORK00 is a print program - not sure if it has any restrictions for abckground execution &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you getting any report output in spool?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Jan 2011 20:45:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-list-from-memory-in-background-mode/m-p/7610655#M1569308</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-31T20:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: Submit + LIST_FROM_MEMORY in background mode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-list-from-memory-in-background-mode/m-p/7610656#M1569309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Grame,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;insert before SUBMIT:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SY-SUBRC = 3.
WHILE SY-SUBRC ÍS NOT INITIAL.
ENDWHILE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This triggers an endless loop. You can Capture the job in job overview or debug the process from SM50 process view. In debugger, clear SY-SUBRC and then step thru relevant codes sections. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First thing you may do is checking if correct parameters are used as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that way you find a solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Jan 2011 20:59:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-list-from-memory-in-background-mode/m-p/7610656#M1569309</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2011-01-31T20:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: Submit + LIST_FROM_MEMORY in background mode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-list-from-memory-in-background-mode/m-p/7610657#M1569310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Grame,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not that this will help you but I noticed a lot of unanswered questions with the excat same problem statement on this site and others. So unfortunately it appears not to be as straightforward as one thinks :-).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Submit exporting list to memory and return; background execution|&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1618229"&gt;&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Submit ALV report in Background &amp;amp; exporting list to memory and return   |&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1122382"&gt;&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reading the various posts, it seems that the one thing they have in common is that in case the output is an ALV list the &lt;EM&gt;exporting list to memory&lt;/EM&gt; option does not work in background, only classical lists (see last link).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe this is the case for RFKORK00?.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Feb 2011 00:23:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-list-from-memory-in-background-mode/m-p/7610657#M1569310</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-01T00:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: Submit + LIST_FROM_MEMORY in background mode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-list-from-memory-in-background-mode/m-p/7610658#M1569311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, RFKORK00 is indeed a print program that triggers spool in the background. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I gave up playing around memory id, instead I am using the following code to check whether a spool was created in table TSP03.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CLEAR r_rqcretime[].
    r_rqcretime-sign    = 'I'.
    r_rqcretime-option  = 'BT'.

    CALL FUNCTION 'IB_CONVERT_INTO_TIMESTAMP'
      EXPORTING
        i_datlo     = sy-datlo
        i_timlo     = sy-uzeit
        i_tzone     = 'EST'
      IMPORTING
        e_timestamp = v_tzntstmps.

    r_rqcretime-low = v_tzntstmps.

**Submit job with changed variant
    SUBMIT (p_prog)
      USING SELECTION-SET c_variant
      EXPORTING LIST TO MEMORY
      AND RETURN.

    WAIT UP TO 5 SECONDS.

**Fetch the spool number generated by the program
    CALL FUNCTION 'IB_CONVERT_INTO_TIMESTAMP'
      EXPORTING
        i_datlo     = sy-datlo
        i_timlo     = sy-uzeit
        i_tzone     = 'EST'
      IMPORTING
        e_timestamp = v_tzntstmps.

    r_rqcretime-high = v_tzntstmps.

    CONDENSE: r_rqcretime-low,r_rqcretime-high.
    CONCATENATE r_rqcretime-low   '00' INTO r_rqcretime-low.
    CONCATENATE r_rqcretime-high  '00' INTO r_rqcretime-high.

    APPEND r_rqcretime.

    SELECT SINGLE rqident FROM tsp01
                  INTO v_rqident
                 WHERE rqowner = sy-uname
                   AND rqcretime IN r_rqcretime.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Feb 2011 18:38:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-list-from-memory-in-background-mode/m-p/7610658#M1569311</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-01T18:38:56Z</dc:date>
    </item>
  </channel>
</rss>

