<?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: need Help in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2635223#M606222</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi M,&lt;/P&gt;&lt;P&gt;An exception occurred. This exception is dealt with in more detail below&lt;/P&gt;&lt;P&gt;. The exception, which is assigned to the class 'CX_SY_FILE_OPEN_MODE', was&lt;/P&gt;&lt;P&gt; neither&lt;/P&gt;&lt;P&gt;caught nor passed along using a RAISING clause, in the procedure "UPLOAD_DATA"&lt;/P&gt;&lt;P&gt; "(FORM)"&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Since the caller of the procedure could not have expected this exception&lt;/P&gt;&lt;P&gt; to occur, the running program was terminated.&lt;/P&gt;&lt;P&gt;The reason for the exception is:&lt;/P&gt;&lt;P&gt;The system tried to access the file&lt;/P&gt;&lt;P&gt; "/feeds/KRD_810/interface/out/Visualparts/interface_XXXX_20070801.txt" but&lt;/P&gt;&lt;P&gt; found that this file was&lt;/P&gt;&lt;P&gt;not opened. For this reason, it could not access the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Ajay reddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Aug 2007 15:11:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-01T15:11:41Z</dc:date>
    <item>
      <title>need Help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2635221#M606220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;Below code giving the shot dump at transfer command. How can i rectify that.&lt;/P&gt;&lt;P&gt;FORM upload_data .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data lw_filename type string.&lt;/P&gt;&lt;P&gt;  data: lw_line(1024).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  move p_ofile to lw_filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*---Open file for output&lt;/P&gt;&lt;P&gt;  open dataset lw_filename for output in text mode encoding default.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*---Error opening file&lt;/P&gt;&lt;P&gt;  if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;    it_return-type = 'E'.&lt;/P&gt;&lt;P&gt;    concatenate 'Error opening file'(002) lw_filename&lt;/P&gt;&lt;P&gt;                into it_return-message.&lt;/P&gt;&lt;P&gt;    append it_return.&lt;/P&gt;&lt;P&gt;    clear  it_return.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;loop at it_material_data.&lt;/P&gt;&lt;P&gt;      concatenate&lt;/P&gt;&lt;P&gt;                  cl_abap_char_utilities=&amp;gt;horizontal_tab&lt;/P&gt;&lt;P&gt;                  it_material_data-matnr&lt;/P&gt;&lt;P&gt;                  cl_abap_char_utilities=&amp;gt;horizontal_tab&lt;/P&gt;&lt;P&gt;                  it_material_data-maktx&lt;/P&gt;&lt;P&gt;                  cl_abap_char_utilities=&amp;gt;horizontal_tab&lt;/P&gt;&lt;P&gt;                  it_material_data-ersda&lt;/P&gt;&lt;P&gt;                  cl_abap_char_utilities=&amp;gt;horizontal_tab&lt;/P&gt;&lt;P&gt;                  it_material_data-prod_family&lt;/P&gt;&lt;P&gt;                  cl_abap_char_utilities=&amp;gt;horizontal_tab&lt;/P&gt;&lt;P&gt;                  it_material_data-prod_line&lt;/P&gt;&lt;P&gt;                  cl_abap_char_utilities=&amp;gt;horizontal_tab&lt;/P&gt;&lt;P&gt;                  it_material_data-prod_model&lt;/P&gt;&lt;P&gt;                   into lw_line.&lt;/P&gt;&lt;P&gt;      transfer lw_line to lw_filename.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;  close dataset lw_filename.&lt;/P&gt;&lt;P&gt;ENDFORM.                    " upload_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you will get reward points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Ajay reddy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2007 15:05:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2635221#M606220</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-01T15:05:31Z</dc:date>
    </item>
    <item>
      <title>Re: need Help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2635222#M606221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What type of DUMP have you got ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2007 15:06:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2635222#M606221</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-01T15:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: need Help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2635223#M606222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi M,&lt;/P&gt;&lt;P&gt;An exception occurred. This exception is dealt with in more detail below&lt;/P&gt;&lt;P&gt;. The exception, which is assigned to the class 'CX_SY_FILE_OPEN_MODE', was&lt;/P&gt;&lt;P&gt; neither&lt;/P&gt;&lt;P&gt;caught nor passed along using a RAISING clause, in the procedure "UPLOAD_DATA"&lt;/P&gt;&lt;P&gt; "(FORM)"&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Since the caller of the procedure could not have expected this exception&lt;/P&gt;&lt;P&gt; to occur, the running program was terminated.&lt;/P&gt;&lt;P&gt;The reason for the exception is:&lt;/P&gt;&lt;P&gt;The system tried to access the file&lt;/P&gt;&lt;P&gt; "/feeds/KRD_810/interface/out/Visualparts/interface_XXXX_20070801.txt" but&lt;/P&gt;&lt;P&gt; found that this file was&lt;/P&gt;&lt;P&gt;not opened. For this reason, it could not access the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Ajay reddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2007 15:11:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2635223#M606222</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-01T15:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: need Help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2635224#M606223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ajay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use exit statement if sy-subrc is not 0. Check if you have proper authorization for access to application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer to the following link for file handling:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3d35358411d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3d35358411d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, try using character type for filename.&lt;/P&gt;&lt;P&gt;data : lw_filename(&amp;lt;length&amp;gt;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Srilatha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2007 15:13:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2635224#M606223</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-01T15:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: need Help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2635225#M606224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;put an exit statement inside IF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* Error opening file
  IF sy-subrc NE 0.
    it_return-type = 'E'.
    CONCATENATE 'Error opening file'(002) lw_filename
    INTO it_return-message.
    APPEND it_return.
    CLEAR it_return.
    EXIT.
  ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2007 15:15:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2635225#M606224</guid>
      <dc:creator>Pawan_Kesari</dc:creator>
      <dc:date>2007-08-01T15:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: need Help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2635226#M606225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you detect an error, but if you don't EXIT after the error, you will try to fil your inexisting file... And DUMP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Mathieu ILHE&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2007 15:17:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2635226#M606225</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-01T15:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: need Help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2635227#M606226</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;&lt;/P&gt;&lt;P&gt;What Does the dump say ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) put the else case for the sy-subrc check and do the transfer logic there.. with your code even though ur file is not open you r trying to transfer the data and that could cause the bump&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM upload_data .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data lw_filename type string.&lt;/P&gt;&lt;P&gt;data: lw_line(1024).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move p_ofile to lw_filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*---Open file for output&lt;/P&gt;&lt;P&gt;open dataset lw_filename for output in text mode encoding default.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*---Error opening file&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;if sy-subrc ne 0.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;it_return-type = 'E'.&lt;/P&gt;&lt;P&gt;concatenate 'Error opening file'(002) lw_filename&lt;/P&gt;&lt;P&gt;into it_return-message.&lt;/P&gt;&lt;P&gt;append it_return.&lt;/P&gt;&lt;P&gt;clear it_return.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;else.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;loop at it_material_data.&lt;/P&gt;&lt;P&gt;concatenate&lt;/P&gt;&lt;P&gt;cl_abap_char_utilities=&amp;gt;horizontal_tab&lt;/P&gt;&lt;P&gt;it_material_data-matnr&lt;/P&gt;&lt;P&gt;cl_abap_char_utilities=&amp;gt;horizontal_tab&lt;/P&gt;&lt;P&gt;it_material_data-maktx&lt;/P&gt;&lt;P&gt;cl_abap_char_utilities=&amp;gt;horizontal_tab&lt;/P&gt;&lt;P&gt;it_material_data-ersda&lt;/P&gt;&lt;P&gt;cl_abap_char_utilities=&amp;gt;horizontal_tab&lt;/P&gt;&lt;P&gt;it_material_data-prod_family&lt;/P&gt;&lt;P&gt;cl_abap_char_utilities=&amp;gt;horizontal_tab&lt;/P&gt;&lt;P&gt;it_material_data-prod_line&lt;/P&gt;&lt;P&gt;cl_abap_char_utilities=&amp;gt;horizontal_tab&lt;/P&gt;&lt;P&gt;it_material_data-prod_model&lt;/P&gt;&lt;P&gt;into lw_line.&lt;/P&gt;&lt;P&gt;transfer lw_line to lw_filename.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;close dataset lw_filename.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;endif.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " upload_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Try in Binary MOde to open the fie &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Mahesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2007 15:18:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2635227#M606226</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-01T15:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: need Help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2635228#M606227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks as if the open dataset is getting a non-zero return code. Check this portion in debugging.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2007 15:18:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2635228#M606227</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-01T15:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: need Help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2635229#M606228</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;&lt;/P&gt;&lt;P&gt;It clearly indicates that the file is not open and your trying to pass data into that file.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dump suggest u the possible cause do the changes i suggested you in my reply&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Mahesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2007 15:20:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2635229#M606228</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-01T15:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: need Help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2635230#M606229</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;This exceptions occurs whenever you try to transfer a data without open the file or an error was generated when you opening this file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look at the sy-subrc after OPEN DATASET, in your code you are trying to transfer the data without having exactly gotten success with OPEN DATASET.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In you code you placed:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
if sy-subrc ne 0.
   it_return-type = 'E'.  
      concatenate 'Error opening file'(002) lw_filename
                                 into it_return-message.
      append it_return.
      clear it_return.
   endif.

   loop at it_material_data.
     ....
     transfer lw_line to lw_filename. 
   endloop.

close dataset lw_filename.
ENDFORM. " upload_data
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you placed here a peace of this routine, that is, itsn't complete. Anyway....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
if sy-subrc ne 0.
   it_return-type = 'E'.  
      concatenate 'Error opening file'(002) lw_filename
                                 into it_return-message.
      append it_return.
      clear it_return.
   endif.

  else. "&amp;lt;------- you miss
    loop at it_material_data.
     ....
     transfer lw_line to lw_filename. 
   endloop.

close dataset lw_filename.

endif. "&amp;lt;------- you miss
ENDFORM. " upload_data
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marcelo Ramos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2007 15:30:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help/m-p/2635230#M606229</guid>
      <dc:creator>marcelo_ramos1</dc:creator>
      <dc:date>2007-08-01T15:30:19Z</dc:date>
    </item>
  </channel>
</rss>

