<?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: generate file in background runing in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-file-in-background-runing/m-p/12561274#M2007682</link>
    <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;chkoupi&lt;/SPAN&gt;&lt;/P&gt;By debugging your program, even if it runs in background, you will solve the issue on your own.</description>
    <pubDate>Wed, 29 Jun 2022 17:10:25 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2022-06-29T17:10:25Z</dc:date>
    <item>
      <title>generate file in background runing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-file-in-background-runing/m-p/12561268#M2007676</link>
      <description>&lt;P&gt;Hi everyone&lt;/P&gt;
  &lt;P&gt;in this code i want to generate file when my program is runing in background, i don't have any error but the file is not generated when i double-click in path from TVARVC.&lt;/P&gt;
  &lt;P&gt;plz help to understand it and if u want more details about problem i remain available.&lt;/P&gt;
  &lt;P&gt;Thnx a lot.&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;    IF p_sfl = 'X'.&amp;lt;br&amp;gt;      DATA lv_low TYPE rvari_val_255.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;      SELECT SINGLE low&amp;lt;br&amp;gt;        FROM tvarvc&amp;lt;br&amp;gt;        INTO lv_low&amp;lt;br&amp;gt;        WHERE name = 'ZTAI'.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;      OPEN DATASET lv_low FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.&amp;lt;br&amp;gt;      CHECK sy-subrc EQ 0.&amp;lt;br&amp;gt;      LOOP AT gt_flight INTO gs_flight.&amp;lt;br&amp;gt;        TRANSFER gs_flight TO lv_low.&amp;lt;br&amp;gt;      ENDLOOP.&amp;lt;br&amp;gt;      CLOSE DATASET lv_low.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;    ELSEIF p_spfli = 'X'.&amp;lt;br&amp;gt;      OPEN DATASET lv_low FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.&amp;lt;br&amp;gt;      CHECK sy-subrc EQ 0.&amp;lt;br&amp;gt;      LOOP AT it_spfli INTO wa_spfli.&amp;lt;br&amp;gt;        TRANSFER wa_spfli TO lv_low.&amp;lt;br&amp;gt;      ENDLOOP.&amp;lt;br&amp;gt;      CLOSE DATASET lv_low.&amp;lt;br&amp;gt;    ENDIF.&amp;lt;br&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Jun 2022 18:14:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-file-in-background-runing/m-p/12561268#M2007676</guid>
      <dc:creator>former_member810309</dc:creator>
      <dc:date>2022-06-28T18:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: generate file in background runing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-file-in-background-runing/m-p/12561269#M2007677</link>
      <description>&lt;P&gt;Debug it and handle better the exceptions so that you get a log.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2022 18:25:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-file-in-background-runing/m-p/12561269#M2007677</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-06-28T18:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: generate file in background runing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-file-in-background-runing/m-p/12561270#M2007678</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You need to check the file in Application server. Run Tcode AL11 and check if the files present in the file path or not.&lt;/P&gt;&lt;P&gt;Provide some error message if open dataset fails. There could be authorization issue to access the file.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aditya.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2022 21:28:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-file-in-background-runing/m-p/12561270#M2007678</guid>
      <dc:creator>former_member751463</dc:creator>
      <dc:date>2022-06-28T21:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: generate file in background runing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-file-in-background-runing/m-p/12561271#M2007679</link>
      <description>&lt;P&gt;thanks&lt;BR /&gt;In AL11 the file didn't appear !&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2022 13:02:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-file-in-background-runing/m-p/12561271#M2007679</guid>
      <dc:creator>former_member810309</dc:creator>
      <dc:date>2022-06-29T13:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: generate file in background runing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-file-in-background-runing/m-p/12561272#M2007680</link>
      <description>&lt;P&gt;Put a error message after sy-subrc check. if open dataset fails, then you may have authrisation issue. in that case you need to check with your basis or security team.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2022 16:49:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-file-in-background-runing/m-p/12561272#M2007680</guid>
      <dc:creator>former_member751463</dc:creator>
      <dc:date>2022-06-29T16:49:47Z</dc:date>
    </item>
    <item>
      <title>Re: generate file in background runing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-file-in-background-runing/m-p/12561273#M2007681</link>
      <description>&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;the problem is the authorization, so i change path and the file is created, now the problem is that my file is empty ^^ if u can give me some help plz !&lt;/P&gt;&lt;P&gt;thanks for all your answers.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2022 17:01:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-file-in-background-runing/m-p/12561273#M2007681</guid>
      <dc:creator>former_member810309</dc:creator>
      <dc:date>2022-06-29T17:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: generate file in background runing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-file-in-background-runing/m-p/12561274#M2007682</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;chkoupi&lt;/SPAN&gt;&lt;/P&gt;By debugging your program, even if it runs in background, you will solve the issue on your own.</description>
      <pubDate>Wed, 29 Jun 2022 17:10:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-file-in-background-runing/m-p/12561274#M2007682</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-06-29T17:10:25Z</dc:date>
    </item>
    <item>
      <title>Re: generate file in background runing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-file-in-background-runing/m-p/12561275#M2007683</link>
      <description>&lt;P&gt;Did you try to add a call of AUTHORITY_CHECK_DATASET before OPEN or handling return code / exception from the OPEN DATASET and TRANSFER statements (and other part of your code)&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;example to illustrate&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;&lt;CODE&gt;      OPEN DATASET lv_low FOR OUTPUT IN TEXT MODE ENCODING DEFAULT MESSAGE mess.
      IF sy-subrc = 8.
        MESSAGE mess TYPE 'E'.
      ELSE.
        LOOP AT gt_flight INTO gs_flight.
          TRY.
            TRANSFER gs_flight TO lv_low.
          CATCH cx_dynamic_check INTO lo_cx_ref.
            mess = lo_cx_ref-&amp;gt;if_message~get_text( ).
            MESSAGE mess TYPE 'E'.
          ENDTRY       
        ENDLOOP.
        IF sy-subrc NE 0.
          MESSAGE 'No data read, D''oh!, did I forget to check?' TYPE 'E'.
        ENDIF.
        CLOSE DATASET lv_low.
      ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Jul 2022 09:52:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-file-in-background-runing/m-p/12561275#M2007683</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2022-07-01T09:52:19Z</dc:date>
    </item>
  </channel>
</rss>

