<?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: PRoblem regarding Submit -&amp;gt; Open/Transfer/Close Dataset in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-regarding-submit-gt-open-transfer-close-dataset/m-p/1234149#M140196</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am concerned that his part does not work in background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
LISTOBJECT = ITAB_LIST
* 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.

IF SY-SUBRC = 0.
CALL FUNCTION 'WRITE_LIST'
TABLES
LISTOBJECT = ITAB_LIST.
ENDIF.

DATA: LD_FILENAME TYPE LOCALFILE.
DATA: I_MONTH TYPE TABLE OF T247 WITH HEADER LINE.
DATA: IHTML TYPE TABLE OF W3HTML WITH HEADER LINE.

&amp;lt;b&amp;gt;CALL FUNCTION 'WWW_LIST_TO_HTML'
* EXPORTING
* list_index = sy-lsind
TABLES
HTML = IHTML.
CLEAR IHTML.&amp;lt;/b&amp;gt;

LD_FILENAME = '\H******SAPReportdeath.html'.

OPEN DATASET LD_FILENAME FOR OUTPUT IN BINARY MODE.
LOOP AT IHTML.
TRANSFER IHTML TO LD_FILENAME.
ENDLOOP.
CLOSE DATASET LD_FILENAME.
CLEAR: LD_FILENAME.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ran across this before and I did find a solution, I'll get back.&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>Thu, 06 Apr 2006 01:42:04 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2006-04-06T01:42:04Z</dc:date>
    <item>
      <title>PRoblem regarding Submit -&gt; Open/Transfer/Close Dataset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-regarding-submit-gt-open-transfer-close-dataset/m-p/1234148#M140195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello again, I know I keep asking the same topic (regarding datasets) for the past week. Its been a new topic for me. However, I have a program which I am testing that is shown below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;REPORT ZPROG_COOL7 NO STANDARD PAGE HEADING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: ITAB_LIST TYPE STANDARD TABLE OF ABAPLIST WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;PARAMETERS: PNAME TYPE SYCPROG. (this does nothing yet ...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUBMIT ZPROGRAM EXPORTING LIST TO MEMORY AND RETURN&lt;/P&gt;&lt;P&gt;                    USING SELECTION-SET 'CEDEX'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'LIST_FROM_MEMORY'&lt;/P&gt;&lt;P&gt;     TABLES&lt;/P&gt;&lt;P&gt;          LISTOBJECT = ITAB_LIST&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        NOT_FOUND  = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        OTHERS     = 2&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'WRITE_LIST'&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            LISTOBJECT = ITAB_LIST.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: LD_FILENAME TYPE LOCALFILE.&lt;/P&gt;&lt;P&gt;DATA: I_MONTH TYPE TABLE OF T247 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA: IHTML   TYPE TABLE OF W3HTML  WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WWW_LIST_TO_HTML'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       list_index = sy-lsind&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     TABLES&lt;/P&gt;&lt;P&gt;          HTML       = IHTML.&lt;/P&gt;&lt;P&gt;CLEAR IHTML.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LD_FILENAME = '&lt;BR /&gt;H******\SAPReport\death.html'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET LD_FILENAME FOR OUTPUT  IN BINARY MODE.&lt;/P&gt;&lt;P&gt;LOOP AT IHTML.&lt;/P&gt;&lt;P&gt;  TRANSFER IHTML TO LD_FILENAME.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;CLOSE DATASET LD_FILENAME.&lt;/P&gt;&lt;P&gt;CLEAR: LD_FILENAME.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see it is suposed to get a list from a diffrent program, write the list, and then transfer the list into a directory in the SAP application server. This all works fine on foreground but in Background Proccessing the story is diffrent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the problem: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Iam to send a job in background, the report will generate fine if you view the spool list &amp;lt;b&amp;gt;but there HTML file that is supposed to be saved becomes blank.&amp;lt;/b&amp;gt; Is there a way to solve this issue? Thank you all take care, and good day.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Apr 2006 01:37:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-regarding-submit-gt-open-transfer-close-dataset/m-p/1234148#M140195</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-06T01:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: PRoblem regarding Submit -&gt; Open/Transfer/Close Dataset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-regarding-submit-gt-open-transfer-close-dataset/m-p/1234149#M140196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am concerned that his part does not work in background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
LISTOBJECT = ITAB_LIST
* 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.

IF SY-SUBRC = 0.
CALL FUNCTION 'WRITE_LIST'
TABLES
LISTOBJECT = ITAB_LIST.
ENDIF.

DATA: LD_FILENAME TYPE LOCALFILE.
DATA: I_MONTH TYPE TABLE OF T247 WITH HEADER LINE.
DATA: IHTML TYPE TABLE OF W3HTML WITH HEADER LINE.

&amp;lt;b&amp;gt;CALL FUNCTION 'WWW_LIST_TO_HTML'
* EXPORTING
* list_index = sy-lsind
TABLES
HTML = IHTML.
CLEAR IHTML.&amp;lt;/b&amp;gt;

LD_FILENAME = '\H******SAPReportdeath.html'.

OPEN DATASET LD_FILENAME FOR OUTPUT IN BINARY MODE.
LOOP AT IHTML.
TRANSFER IHTML TO LD_FILENAME.
ENDLOOP.
CLOSE DATASET LD_FILENAME.
CLEAR: LD_FILENAME.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ran across this before and I did find a solution, I'll get back.&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>Thu, 06 Apr 2006 01:42:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-regarding-submit-gt-open-transfer-close-dataset/m-p/1234149#M140196</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-04-06T01:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: PRoblem regarding Submit -&gt; Open/Transfer/Close Dataset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-regarding-submit-gt-open-transfer-close-dataset/m-p/1234150#M140197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please try this instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


  call function 'LIST_FROM_MEMORY'
       tables
            listobject = list
       exceptions
            not_found  = 1
            others     = 2.
 
&amp;lt;b&amp;gt;  call function 'WWW_HTML_FROM_LISTOBJECT'
       tables
            html       = htmllines
            listobject = list.&amp;lt;/b&amp;gt;


&lt;/CODE&gt;&lt;/PRE&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>Thu, 06 Apr 2006 01:45:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-regarding-submit-gt-open-transfer-close-dataset/m-p/1234150#M140197</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-04-06T01:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: PRoblem regarding Submit -&gt; Open/Transfer/Close Dataset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-regarding-submit-gt-open-transfer-close-dataset/m-p/1234151#M140198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rich, as always, you have been very helpful. Im thanks again Im sure to mention you and others in my special thanks section. &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Apr 2006 02:02:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-regarding-submit-gt-open-transfer-close-dataset/m-p/1234151#M140198</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-06T02:02:53Z</dc:date>
    </item>
  </channel>
</rss>

