<?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: Converting Errors (type Time) in Excel Class ( cl_fdt_xl_spreadsheet ) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-errors-type-time-in-excel-class-cl-fdt-xl-spreadsheet/m-p/11585973#M1939136</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So after debuging the&amp;nbsp; cl_fdt_xl_spreadsheet class, we found the issues in the private method "CONVERT_DEC_TIME_TO_HHMMSS". This method is a complete joke. Catching randomly like 1-2 of 3-4 cases. Line 28-47 checks, if the seconds are higher then 59, when true, they add 1 to the minutes. Not checking if minutes then are higher 59 and adding 1 to hour, checking if hour is 24 and so on. Concatenating hours minutes and seconds, they check if minutes and hours are under 10 so they add a '0' before the minute and hour, but not for seconds (why ?).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Apr 2016 12:29:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2016-04-06T12:29:22Z</dc:date>
    <item>
      <title>Converting Errors (type Time) in Excel Class ( cl_fdt_xl_spreadsheet )</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-errors-type-time-in-excel-class-cl-fdt-xl-spreadsheet/m-p/11585971#M1939134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333;"&gt;Hey everybody,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333;"&gt;i'm using the&amp;nbsp; cl_fdt_xl_spreadsheet class (SAP 7.3) to upload an excel sheet (xstring) to an internal table :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333;"&gt;&amp;nbsp; DATA&amp;nbsp; lr_excel&amp;nbsp; &lt;SPAN class="l0s52"&gt;TYPE REF TO &lt;/SPAN&gt;cl_fdt_xl_spreadsheet.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333;"&gt;&amp;nbsp; DATA&amp;nbsp; lr_data&amp;nbsp;&amp;nbsp; &lt;SPAN class="l0s52"&gt;TYPE REF TO data.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 9.0pt; font-family: 'Arial','sans-serif';"&gt;&amp;nbsp; CREATE &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333;"&gt;OBJECT lr_excel&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="l0s52"&gt;EXPORTING&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document_name &lt;SPAN class="l0s55"&gt;= &lt;/SPAN&gt;ls_file_upload&lt;SPAN class="l0s70"&gt;-&lt;/SPAN&gt;file_name&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xdocument&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="l0s55"&gt;= &lt;/SPAN&gt;ls_file_upload&lt;SPAN class="l0s70"&gt;-&lt;/SPAN&gt;file_data&lt;SPAN class="l0s55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333;"&gt;&amp;nbsp;&amp;nbsp; lr_data &lt;SPAN class="l0s55"&gt;= &lt;/SPAN&gt;lr_excel&lt;SPAN class="l0s70"&gt;-&amp;gt;&lt;/SPAN&gt;if_fdt_doc_spreadsheet&lt;SPAN class="l0s70"&gt;~&lt;/SPAN&gt;get_itab_from_worksheet&lt;SPAN class="l0s55"&gt;( &lt;/SPAN&gt;lv_name &lt;SPAN class="l0s55"&gt;).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333;"&gt;Now we get the excel sheet as itab in lr_data.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333;"&gt;But after some test cases i noticed some issues.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333;"&gt;The time changes in some cases wrong:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: #333333;"&gt;1. The time begins everytime with a whitespace for example: '13:12:00' converts to ' 13:12:00'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333;"&gt;2. The time '14:00:00' converts to '13:60:00', '17:00:00' to '16:60:00' (every 3 hour)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333;"&gt;3. '00:00:00' converts to '0' or '1900-01-01'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333;"&gt;4. 1 second to 9 seconds changes it value to 10 to 90 seconds. That is the biggest problem. For example '13:12:02' converts to '13:12:20'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333;"&gt;Some issues i can repair, but the issue with the changing seconds i can only fix between 6 and 9 seconds.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333;"&gt;Does anyone now why this issue occurs ? Converting the time as 'Text' in excel helps, but this is not a possible solution.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333;"&gt;Has somebody an idea how i could fix it ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: #333333;"&gt;Thank you&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2016 07:56:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-errors-type-time-in-excel-class-cl-fdt-xl-spreadsheet/m-p/11585971#M1939134</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-03-31T07:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Errors (type Time) in Excel Class ( cl_fdt_xl_spreadsheet )</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-errors-type-time-in-excel-class-cl-fdt-xl-spreadsheet/m-p/11585972#M1939135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think these issues are related to the conversions happening in the FDT classes. I had faced some other issue also while using FDT classes to read XLSX file. I raised a OSS message for that. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP came back saying FDT is specifically designed for Excel files generated by FDT tools only and is not for public use. They said they won't support, because it was used for a purpose that it was not originally designed for. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yet, you may give it a try - raise a OSS message and see what happens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, Juwin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2016 13:00:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-errors-type-time-in-excel-class-cl-fdt-xl-spreadsheet/m-p/11585972#M1939135</guid>
      <dc:creator>Juwin</dc:creator>
      <dc:date>2016-03-31T13:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Errors (type Time) in Excel Class ( cl_fdt_xl_spreadsheet )</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-errors-type-time-in-excel-class-cl-fdt-xl-spreadsheet/m-p/11585973#M1939136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So after debuging the&amp;nbsp; cl_fdt_xl_spreadsheet class, we found the issues in the private method "CONVERT_DEC_TIME_TO_HHMMSS". This method is a complete joke. Catching randomly like 1-2 of 3-4 cases. Line 28-47 checks, if the seconds are higher then 59, when true, they add 1 to the minutes. Not checking if minutes then are higher 59 and adding 1 to hour, checking if hour is 24 and so on. Concatenating hours minutes and seconds, they check if minutes and hours are under 10 so they add a '0' before the minute and hour, but not for seconds (why ?).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 12:29:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-errors-type-time-in-excel-class-cl-fdt-xl-spreadsheet/m-p/11585973#M1939136</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-04-06T12:29:22Z</dc:date>
    </item>
  </channel>
</rss>

