<?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: Binary table length in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-table-length/m-p/5430061#M1245979</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Resolved myself. But the help is equally useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Apr 2009 10:09:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-02T10:09:27Z</dc:date>
    <item>
      <title>Binary table length</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-table-length/m-p/5430058#M1245976</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;i have an internal table it_content (it_content   type standard table of sdokcntbin)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the lines in this are type raw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I read a file from the appln server in binary mode and build this table .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to know the total length of this table . How do i get the total length of the table contents?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2009 12:34:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/binary-table-length/m-p/5430058#M1245976</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-01T12:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: Binary table length</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-table-length/m-p/5430059#M1245977</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;When you declare your internal table, its row type is fixed (here RAW type). &lt;/P&gt;&lt;P&gt;Determining the table's content size is probably not impossible, but somewhat difficult and is not effective. &lt;/P&gt;&lt;P&gt;I guess your goal is to get total size of read file. For this count the bytes while reading the file.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: itab TYPE TABLE OF sdokcntbin WITH HEADER LINE.

DATA: file TYPE rlgrap-filename VALUE '/some_application_server_file.txt',
      curr_bytes TYPE i,
      tot_bytes TYPE i.

OPEN DATASET file FOR INPUT IN BINARY MODE.
IF sy-subrc = 0.
  DO.
    READ DATASET file INTO itab ACTUAL LENGTH curr_bytes.   "when reading the file obtain read bytes
    IF sy-subrc &amp;lt;&amp;gt; 0.
      EXIT.
    ELSE.
      APPEND itab.
      ADD curr_bytes TO tot_bytes.       "...and count them all
    ENDIF.
  ENDDO.

  "all data read in one shot 
  IF curr_bytes &amp;lt;&amp;gt; 0.     
    APPEND itab.
    ADD curr_bytes TO tot_bytes.
  ENDIF.

  WRITE: 'In table there are ', tot_bytes, ' bytes'.
  CLOSE DATASET file.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2009 13:21:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/binary-table-length/m-p/5430059#M1245977</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-04-01T13:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Binary table length</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-table-length/m-p/5430060#M1245978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;to check the no of records in the table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use: &lt;/P&gt;&lt;P&gt;data: n type  i . &lt;/P&gt;&lt;P&gt;Describe table Itab  lines n.&lt;/P&gt;&lt;P&gt;and check the system variable.&lt;/P&gt;&lt;P&gt;sy-tfill and sy-tleng. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regds&lt;/P&gt;&lt;P&gt;Sachhi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2009 13:40:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/binary-table-length/m-p/5430060#M1245978</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-01T13:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: Binary table length</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-table-length/m-p/5430061#M1245979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Resolved myself. But the help is equally useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2009 10:09:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/binary-table-length/m-p/5430061#M1245979</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-02T10:09:27Z</dc:date>
    </item>
  </channel>
</rss>

