<?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: Collect in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/collect/m-p/1884421#M371138</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;*collect will sum up the numeric fields with same non-numeric fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;collect itab.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Describe can be used many ways&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  below statement will give the number of records in internal table&lt;/P&gt;&lt;P&gt;describe table itab line v_lines&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*this statement will give the properties of field f&lt;/P&gt;&lt;P&gt;  describe field f type v_type&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Jan 2007 08:49:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-26T08:49:30Z</dc:date>
    <item>
      <title>Collect</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/collect/m-p/1884420#M371137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please explain me the diff betweem collect &amp;amp; Describe statement with some example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jan 2007 08:46:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/collect/m-p/1884420#M371137</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-26T08:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: Collect</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/collect/m-p/1884421#M371138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;*collect will sum up the numeric fields with same non-numeric fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;collect itab.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Describe can be used many ways&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  below statement will give the number of records in internal table&lt;/P&gt;&lt;P&gt;describe table itab line v_lines&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*this statement will give the properties of field f&lt;/P&gt;&lt;P&gt;  describe field f type v_type&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jan 2007 08:49:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/collect/m-p/1884421#M371138</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-26T08:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: Collect</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/collect/m-p/1884422#M371139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;DESCRIBE:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;DESCRIBE stmt is used to describe the attributes.&lt;/P&gt;&lt;P&gt;DESCRIBE FIELD - Describes the attributes of a field.&lt;/P&gt;&lt;P&gt;DESCRIBE LIST - Describes the attributes of a list.&lt;/P&gt;&lt;P&gt;DESCRIBE TABLE - Describes the attributes of the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Think of this scenario in dialog programming. While using Table control we need to find the number of lines , so that we can able to position our cursor for the deletion or updation of a record. To get the number of lines we use that Describe stmt. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;COLLECT:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;COLLECT is used to create unique or compressed datsets. The key fields are the default key fields of the internal table itab . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use only COLLECT to fill an internal table, COLLECT makes sure that the internal table does not contain two entries with the same default key fields. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If, besides its default key fields, the internal table contains number fields,the contents of these number fields are added together if the internal table already contains an entry with the same key fields. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the default key of an internal table processed with COLLECT is blank, all the values are added up in the first table line. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you specify wa INTO , the entry to be processed is taken from the explicitly specified work area wa . If not, it comes from the header line of the internal table itab . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After COLLECT , the system field SY-TABIX contains the index of the - existing or new - table entry with default key fields which match those of the entry to be processed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COLLECT can create unique or compressed datasets and should be used precisely for this purpose. If uniqueness or compression are unimportant, or two values with identical default key field values could not possibly occur in your particular task, you should use APPEND instead. However, for a unique or compressed dataset which is also efficient, COLLECT is the statement to use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you process a table with COLLECT , you should also use COLLECT to fill it. Only by doing this can you guarantee that the internal table will actually be unique or compressed, as described above and COLLECT will run very efficiently. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use COLLECT with an explicitly specified work area, it must be compatible with the line type of the internal table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jan 2007 08:49:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/collect/m-p/1884422#M371139</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-26T08:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: Collect</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/collect/m-p/1884423#M371140</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;COLLECT:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following special statement allows you to summate entries in an internal table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COLLECT wa INTO itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab must have a flat line type, and all of the fields that are not part of the table key must have a numeric type (f, i, p). You specify the line wathat you want to add as a work area that is compatible with the line type of itab.&lt;/P&gt;&lt;P&gt;Example is : demo_int_tables_COLLECT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE:&lt;/P&gt;&lt;P&gt;You may sometimes need to find out the attributes of a data object at runtime that were not statically available. For example, you may need to find out the type of a generic interface parameter in a subroutine. To do this, you would use the statement: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE FIELD &amp;lt;f&amp;gt; [LENGTH &amp;lt;l&amp;gt;] [TYPE &amp;lt;t&amp;gt; [COMPONENTS &amp;lt;n&amp;gt;]]&lt;/P&gt;&lt;P&gt;                   [OUTPUT-LENGTH &amp;lt;o&amp;gt;] [DECIMALS &amp;lt;d&amp;gt;]&lt;/P&gt;&lt;P&gt;                   [EDIT MASK &amp;lt;m&amp;gt;] [HELP-ID &amp;lt;h&amp;gt;].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: text(8) TYPE c, &lt;/P&gt;&lt;P&gt;      len TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE FIELD text LENGTH len IN CHARACTER MODE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field LEN contains the value 8. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it helps.&lt;/P&gt;&lt;P&gt;rgds.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jan 2007 08:56:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/collect/m-p/1884423#M371140</guid>
      <dc:creator>former_member188827</dc:creator>
      <dc:date>2007-01-26T08:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: Collect</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/collect/m-p/1884424#M371141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Johnn,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;b&amp;gt;Collect&amp;lt;/b&amp;gt; is used to sum the numeric column of your internal table ( it's used like "APPEND" )  for all lines with the same key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex : itab : using append&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;field1   |  10
field1   |  20
field2   |  15&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------" /&gt;&lt;P&gt;using collect :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;field1   |  30
field2   |  15&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;b&amp;gt;Describe&amp;lt;/b&amp;gt; is used to know the number of line in your internal table.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; describe table itab lines w_lines.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Erwan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jan 2007 09:07:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/collect/m-p/1884424#M371141</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-26T09:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: Collect</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/collect/m-p/1884425#M371142</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;Check the following Differences between Colloct &amp;amp; Describe Satements with Examples&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COLLECT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basic form&lt;/P&gt;&lt;P&gt;COLLECT [wa INTO] itab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... SORTED BY f &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;COLLECT is used to create unique or compressed datsets. The key fields are the default key fields of the internal table itab . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use only COLLECT to fill an internal table, COLLECT makes sure that the internal table does not contain two entries with the same default key fields. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If, besides its default key fields, the internal table contains number fields (see also ABAP/4 number types ), the contents of these number fields are added together if the internal table already contains an entry with the same key fields. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the default key of an internal table processed with COLLECT is blank, all the values are added up in the first table line. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you specify wa INTO , the entry to be processed is taken from the explicitly specified work area wa . If not, it comes from the header line of the internal table itab . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After COLLECT , the system field SY-TABIX contains the index of the - existing or new - table entry with default key fields which match those of the entry to be processed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes&lt;/P&gt;&lt;P&gt;COLLECT can create unique or compressed datasets and should be used precisely for this purpose. If uniqueness or compression are unimportant, or two values with identical default key field values could not possibly occur in your particular task, you should use APPEND instead. However, for a unique or compressed dataset which is also efficient, COLLECT is the statement to use. &lt;/P&gt;&lt;P&gt;If you process a table with COLLECT , you should also use COLLECT to fill it. Only by doing this can you guarantee that &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the internal table will actually be unique or compressed, as described above and &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COLLECT will run very efficiently. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use COLLECT with an explicitly specified work area, it must be compatible with the line type of the internal table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;Compressed sales figures for each company &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF COMPANIES OCCURS 10,&lt;/P&gt;&lt;P&gt;        NAME(20),&lt;/P&gt;&lt;P&gt;        SALES TYPE I,&lt;/P&gt;&lt;P&gt;      END   OF COMPANIES.&lt;/P&gt;&lt;P&gt;COMPANIES-NAME = 'Duck'.  COMPANIES-SALES = 10.&lt;/P&gt;&lt;P&gt;COLLECT COMPANIES.&lt;/P&gt;&lt;P&gt;COMPANIES-NAME = 'Tiger'. COMPANIES-SALES = 20.&lt;/P&gt;&lt;P&gt;COLLECT COMPANIES.&lt;/P&gt;&lt;P&gt;COMPANIES-NAME = 'Duck'.  COMPANIES-SALES = 30.&lt;/P&gt;&lt;P&gt;COLLECT COMPANIES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The table COMPANIES now has the following appearance: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NAME SALES &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Duck 40 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tiger 20 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition&lt;/P&gt;&lt;P&gt;... SORTED BY f &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;COLLECT ... SORTED BY f is obsolete and should no longer be used. Use APPEND ... SORTED BY f which has the same meaning. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note&lt;/P&gt;&lt;P&gt;Performance &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The cost of a COLLECT in terms of performance increases with the width of the default key needed in the search for table entries and the number of numeric fields with values which have to be added up, if an entry is found in the internal table to match the default key fields. &lt;/P&gt;&lt;P&gt;If no such entry is found, the cost is reduced to that required to append a new entry to the end of the table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A COLLECT statement used on a table which is 100 bytes wide and has a key which is 60 bytes wide and seven numeric fields is about approx. 50 msn (standardized microseconds). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note&lt;/P&gt;&lt;P&gt;Runtime errors &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COLLECT_OVERFLOW : Overflow in integer field when calculating totals. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COLLECT_OVERFLOW_TYPE_P : Overflow in type P field when calculating totals. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE - Supply attributes of a field &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basic form&lt;/P&gt;&lt;P&gt;DESCRIBE FIELD f. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Supplies the attributes of the field f . You must specify at least one of the additions: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. ... LENGTH len &lt;/P&gt;&lt;P&gt;2. ... TYPE typ &lt;/P&gt;&lt;P&gt;3. ... TYPE typ COMPONENTS n &lt;/P&gt;&lt;P&gt;4. ... OUTPUT-LENGTH len &lt;/P&gt;&lt;P&gt;5. ... DECIMALS n &lt;/P&gt;&lt;P&gt;6. ... EDIT MASK mask &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 1&lt;/P&gt;&lt;P&gt;... LENGTH len &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Returns the length of the field f in the field &lt;/P&gt;&lt;P&gt;len . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: FLD(8),&lt;/P&gt;&lt;P&gt;      LEN TYPE P.&lt;/P&gt;&lt;P&gt;DESCRIBE FIELD FLD LENGTH LEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result: LEN contains the value 8. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 2&lt;/P&gt;&lt;P&gt;... TYPE typ &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Returns the data type of f in the field typ &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: FLD(8) TYPE N,&lt;/P&gt;&lt;P&gt;      F_TYPE.&lt;/P&gt;&lt;P&gt;DESCRIBE FIELD FLD TYPE F_TYPE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result:  F_TYPE  contains the value  'N' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note&lt;/P&gt;&lt;P&gt;  Along with the elementary data types you can specify under&lt;/P&gt;&lt;P&gt; DATA  (C, N, etc.), several other data types are created either&lt;/P&gt;&lt;P&gt;with reference to Dictionary fields or during generation. These data&lt;/P&gt;&lt;P&gt;types, which are also returned by  DESCRIBE , have the following&lt;/P&gt;&lt;P&gt;type IDs:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;h Internal table s 2-byte integer with leading sign b 1-byte integer without leading sign u Structure without internal table v Structure containing at least one internal table &lt;/P&gt;&lt;P&gt;For compatibility reasons, ... TYPE typ returns C rather than u or v with structures. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 3&lt;/P&gt;&lt;P&gt;... TYPE typ COMPONENTS n &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Similar to ... TYPE typ except that, with structures in typ , u or v are returned and in the number of structure components is set in n . If f is not a structure, n is set to 0. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;Recursive processing of the pages of an ABAP/4 data structure: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM TEST USING F.&lt;/P&gt;&lt;P&gt;  DATA: TYP(1) TYPE C, N TYPE I.&lt;/P&gt;&lt;P&gt;  FIELD-SYMBOLS: &amp;lt;F&amp;gt;.&lt;/P&gt;&lt;P&gt;  DO.&lt;/P&gt;&lt;P&gt;    ASSIGN COMPONENT SY-INDEX OF STRUCTURE F TO &amp;lt;F&amp;gt;.&lt;/P&gt;&lt;P&gt;    IF SY-SUBRC &amp;lt;&amp;gt; 0. EXIT. ENDIF.&lt;/P&gt;&lt;P&gt;    DESCRIBE FIELD &amp;lt;F&amp;gt; TYPE TYP COMPONENTS N.&lt;/P&gt;&lt;P&gt;    IF N &amp;gt; 0. " Equivalent is TYP = 'u' OR TYP = 'v'&lt;/P&gt;&lt;P&gt;      PERFORM TEST USING &amp;lt;F&amp;gt;.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      PERFORM DO_SOMETHING USING &amp;lt;F&amp;gt;.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDDO.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 4&lt;/P&gt;&lt;P&gt;... OUTPUT-LENGTH len &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Enters the output length of the field f in the variable len . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: FLD(4) TYPE P,&lt;/P&gt;&lt;P&gt;      O_LEN TYPE P.&lt;/P&gt;&lt;P&gt;DESCRIBE FIELD FLD OUTPUT-LENGTH O_LEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result: O_LEN contains the value 8. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 5&lt;/P&gt;&lt;P&gt;... DECIMALS n &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Enters the number of decimal places for the field f (defined in addition ... DECIMALS of the DATA statement or in the ABAP/4 Dictionary ) in the variable n . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: FLD(8) TYPE P DECIMALS 2,&lt;/P&gt;&lt;P&gt;      DEC TYPE P.&lt;/P&gt;&lt;P&gt;DESCRIBE FIELD FLD DECIMALS DEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resultat: DEC contains the value 2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 6&lt;/P&gt;&lt;P&gt;... EDIT MASK mask &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;If the field f has a conversion routine in the ABAP/4 Dictionary , this is placed in the field mask in the form " ==conv ". " conv " stands for the name of the conversion routine, e.g. " ==ALPHA " in the conversion routine " ALPHA ". In this form, mask can then be used in the addition USING EDIT MASK mask of the WRITE statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;Check whether there is a conversion routine for the field "customer number" in the table SBOOK : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES SBOOK.&lt;/P&gt;&lt;P&gt;DATA: CONV_EXIT(10).&lt;/P&gt;&lt;P&gt;DESCRIBE FIELD SBOOK-CUSTOMID EDIT MASK CONV_EXIT.&lt;/P&gt;&lt;P&gt;IF CONV_EXIT &amp;lt;&amp;gt; SPACE. ... ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result: CONV_EXIT contains the value " ==ALPHA ". &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basic form&lt;/P&gt;&lt;P&gt;DESCRIBE TABLE itab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Returns the attributes of the internal table itab . You must use at least one of the additions listed below. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. ... LINES lin &lt;/P&gt;&lt;P&gt;2. ... OCCURS n &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 1&lt;/P&gt;&lt;P&gt;... LINES lin &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Places the number of filled lines of the table t in the field lin . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF TAB OCCURS 10,&lt;/P&gt;&lt;P&gt;        X,&lt;/P&gt;&lt;P&gt;      END OF TAB.&lt;/P&gt;&lt;P&gt;DATA: LIN TYPE P.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;CLEAR TAB. REFRESH TAB.&lt;/P&gt;&lt;P&gt;MOVE '?' TO TAB-X.&lt;/P&gt;&lt;P&gt;APPEND TAB.&lt;/P&gt;&lt;P&gt;DESCRIBE TABLE TAB LINES LIN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result: LIN contains the value 1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 2&lt;/P&gt;&lt;P&gt;... OCCURS n &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Transfers the size of the OCCURS parameter from the table definition to the variable n . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF TAB OCCURS 10,&lt;/P&gt;&lt;P&gt;        X,&lt;/P&gt;&lt;P&gt;      END OF TAB.&lt;/P&gt;&lt;P&gt;      OCC TYPE P.&lt;/P&gt;&lt;P&gt;DESCRIBE TABLE TAB OCCURS OCC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result: OCC contains the value 10. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note&lt;/P&gt;&lt;P&gt;If the table is meant to accept more lines than specified by the OCCURS parameter, the parameter value is roughly doubled as long as the table size remains smaller than 8 KB; this table area is held in the roll area. If the table exceeds the maximum permitted size, the OCCURS parameter is not increased and the remaining part of the table is rolled out to the paging area (see DATA ). &lt;/P&gt;&lt;P&gt;For this reason, the OCCURS value determined by the DESCRIBE statement may differ from that in the DATA statement. &lt;/P&gt;&lt;P&gt;The runtime required to execute the DESCRIBE TABLE statement is approx. 4 msn (standardized microseconds). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basic form&lt;/P&gt;&lt;P&gt;DESCRIBE DISTANCE BETWEEN f1 AND f2 INTO f3. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Determines the distance between the fields f1 and f2 and places the result (in bytes) in f3 . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;Determine the distance between two components of the demo table SBOOK in the flight reservation system: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES SBOOK.&lt;/P&gt;&lt;P&gt;DATA DIST TYPE I.&lt;/P&gt;&lt;P&gt;DESCRIBE DISTANCE BETWEEN SBOOK-CARRID&lt;/P&gt;&lt;P&gt;                  AND     SBOOK-BOOKID&lt;/P&gt;&lt;P&gt;                  INTO    DIST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result: DIST contains the value 15 because exactly two fields, SFLIGHT-CONNID (4 bytes) and SBOOK-FLDATE (8 bytes), lie between the SBOOK components CARRID and BOOKID ; also, SBOOK-CARRID is itself 3 bytes long. The sum of these values gives the distance between the two components in bytes. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variants&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. DESCRIBE LIST NUMBER OF LINES lin. &lt;/P&gt;&lt;P&gt;2. DESCRIBE LIST NUMBER OF PAGES n. &lt;/P&gt;&lt;P&gt;3. DESCRIBE LIST LINE lin PAGE pag. &lt;/P&gt;&lt;P&gt;4. DESCRIBE LIST PAGE pag. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Returns the attributes of a list. All variants have the addition ... INDEX idx allowing you to determine the attributes of a particular list level ( SY-LSIND = 0,1,2,3,... ). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note&lt;/P&gt;&lt;P&gt;You should use this key word only in exceptional cases (e.g. when editing an 'anonymous' list in a program other than that which generated the list). In all other cases, you should save the relevant values when you generate the list. &lt;/P&gt;&lt;P&gt;Take care when attempting to retrieve the list attributes being set up ( ...INDEX SY-LSIND ), since some attributes (number of pages, number of lines, ...) may not have been updated yet. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variant 1&lt;/P&gt;&lt;P&gt;DESCRIBE LIST NUMBER OF LINES lin. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition&lt;/P&gt;&lt;P&gt;... INDEX idx &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Returns the number of lines in the list. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The return code value is set as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-SUBRC = 0 OK &lt;/P&gt;&lt;P&gt;SY-SUBRC &amp;lt;&amp;gt; 0 List does not exist (only with the addition INDEX ) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition&lt;/P&gt;&lt;P&gt;... INDEX idx &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Returns the attributes of the list level idx (0, 1,2,3,...). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;After line selection, determine the number of lines in the displayed list: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: LN LIKE SY-PAGNO. ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT LINE-SELECTION.&lt;/P&gt;&lt;P&gt;  DESCRIBE LIST NUMBER OF LINES LN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The variable LN now contains the number of lines in the displayed list. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variant 2&lt;/P&gt;&lt;P&gt;DESCRIBE LIST NUMBER OF PAGES n. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition&lt;/P&gt;&lt;P&gt;... INDEX idx &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Returns the number of pages in the list. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The return code value is set as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-SUBRC = 0 OK &lt;/P&gt;&lt;P&gt;SY-SUBRC &amp;lt;&amp;gt; 0 List does not exist (only with the addition INDEX ) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition&lt;/P&gt;&lt;P&gt;... INDEX idx &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Returns the attributes of the list level idx (0, 1,2,3,...). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;After line selection, determine the number of pages in the displayed list: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: PN LIKE SY-PAGNO. ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT LINE-SELECTION.&lt;/P&gt;&lt;P&gt;  DESCRIBE LIST NUMBER OF PAGES PN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The variable PN now contains the number of pages in the displayed list (i.e. the contents of the system field SY-PAGNO after the list has been generated!). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variant 3&lt;/P&gt;&lt;P&gt;DESCRIBE LIST LINE lin PAGE pag. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition&lt;/P&gt;&lt;P&gt;... INDEX idx &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Returns the number of the page for the line lin in the list. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note&lt;/P&gt;&lt;P&gt;In interactive reporting, line selection causes a value to be assigned to the system field SY-LILLI (absolute number of selected list line). The system field SY-CPAGE contains the page number for the first displayed line in the list. The selected line does not have to belong to this page (in cases where several pages are displayed at the same time). The page number may be of interest even with direct reading of lines (see READ LINE ). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The return code value is set as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-SUBRC = 0 OK &lt;/P&gt;&lt;P&gt;SY_SUBRC = 4 Line does not exist &lt;/P&gt;&lt;P&gt;SY-SUBRC = 8 List does not exist &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition&lt;/P&gt;&lt;P&gt;... INDEX idx &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Returns the attributes of the list level idx (0, 1,2,3,...). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;After line selection, determine the page number for the selected line (SY-LILLI) : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: PAGENUMBER LIKE SY-PAGNO. ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT LINE-SELECTION.&lt;/P&gt;&lt;P&gt;  DESCRIBE LIST LINE SY-LILLI PAGE PAGENUMBER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The variable PAGENUMBER now contains the page number for the line SY-LILLI (i.e. the contents of the system field SY-PAGNO when outputting the line SY-LILLI !). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variant 4&lt;/P&gt;&lt;P&gt;DESCRIBE LIST PAGE pag &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. ... INDEX idx &lt;/P&gt;&lt;P&gt;2. ... LINE-SIZE col &lt;/P&gt;&lt;P&gt;3. ... LINE-COUNT lin &lt;/P&gt;&lt;P&gt;4. ... LINES lin &lt;/P&gt;&lt;P&gt;5. ... FIRST-LINE lin &lt;/P&gt;&lt;P&gt;6. ... TOP-LINES lin &lt;/P&gt;&lt;P&gt;7. ... TITLE-LINES lin &lt;/P&gt;&lt;P&gt;8. ... HEAD-LINES lin &lt;/P&gt;&lt;P&gt;9. ... END-LINES lin &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Returns the attributes of the page pag in the list. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The return code value is set as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-SUBRC = 0 OK &lt;/P&gt;&lt;P&gt;SY_SUBRC = 4 Page does not exist &lt;/P&gt;&lt;P&gt;SY-SUBRC = 8 List does not exist &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 1&lt;/P&gt;&lt;P&gt;... INDEX idx &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Returns the attributes of the list level idx (0, 1,2,3,...). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 2&lt;/P&gt;&lt;P&gt;... LINE-SIZE col &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Returns the line length for the page pag (see NEW-PAGE...LINE-SIZE ). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 3&lt;/P&gt;&lt;P&gt;... LINE-COUNT lin &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Returns the permitted number of lines for the page pag (see NEW-PAGE...LINE-COUNT ). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 4&lt;/P&gt;&lt;P&gt;... LINES lin &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Returns the number of lines output on the page pag . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 5&lt;/P&gt;&lt;P&gt;... FIRST-LINE lin &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Returns the absolute line number of the first line of the page pag . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 6&lt;/P&gt;&lt;P&gt;... TOP-LINES lin &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Returns the number of lines output by page header processing (i.e. standard title + column headers + TOP-OF-PAGE ). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 7&lt;/P&gt;&lt;P&gt;... TITLE-LINES lin &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Returns the number of lines output as standard title lines by page header processing (see NEW-PAGE...NO-TITLE/WITH-TITLE ). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note&lt;/P&gt;&lt;P&gt;The value of TITLE-LINES is contained in TOP-LINES . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 8&lt;/P&gt;&lt;P&gt;... HEAD-LINES lin &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Returns the number of lines output as column headers by page header processing (see NEW-PAGE...NO-HEADING/WITH-HEADING ). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note&lt;/P&gt;&lt;P&gt;The value of HEAD-LINES is contained in TOP-LINES . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 9&lt;/P&gt;&lt;P&gt;... END-LINES lin &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Returns the number of lines reserved for end-of-page processing (see END-OF-PAGE ). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;Determine the number of lines output on the third page of the basic list ( SY-LSIND = 0) in the event TOP-OF-PAGE : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: TOP TYPE I,&lt;/P&gt;&lt;P&gt;      HEAD TYPE I,&lt;/P&gt;&lt;P&gt;      TITLE TYPE I,&lt;/P&gt;&lt;P&gt;      REAL_TOP TYPE I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE LIST INDEX 0 PAGE 3&lt;/P&gt;&lt;P&gt;         TOP-LINES TOP&lt;/P&gt;&lt;P&gt;         HEAD-LINES HEAD&lt;/P&gt;&lt;P&gt;         TITLE-LINES TITLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REAL_TOP = TOP - TITLE - HEAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Examples&lt;/P&gt;&lt;P&gt;Determine the absolute number of lines in the displayed list: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: LN  TYPE I,          "number of lines on a page&lt;/P&gt;&lt;P&gt;      FLN TYPE I,          "number of first line on a page&lt;/P&gt;&lt;P&gt;      PN  TYPE I,          "number of a page&lt;/P&gt;&lt;P&gt;      LIST_LINES TYPE I.   "total number of lines in list&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Determine number of last page: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE LIST NUMBER OF PAGES PN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Determine number of first line of last page and number of lines on that page: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE LIST PAGE PN FIRST-LINE FLN LINES LN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Number of list lines = number of first line of last page + number of lines - 1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LIST_LINES = FLN + LN - 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or: Count lines of all pages in a loop: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR LIST_LINES.&lt;/P&gt;&lt;P&gt;DO PN TIMES.&lt;/P&gt;&lt;P&gt;   DESCRIBE LIST PAGE SY-INDEX LINES LN.&lt;/P&gt;&lt;P&gt;   ADD LN TO LIST_LINES.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE LIST NUMBER OF LINES LIST_LINES.&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;Sreeni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jan 2007 14:01:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/collect/m-p/1884425#M371142</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-26T14:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: Collect</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/collect/m-p/1884426#M371143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sreeni,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope John isn't in a hurry, because if he must read your reply...&lt;/P&gt;&lt;P&gt;&lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jan 2007 14:26:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/collect/m-p/1884426#M371143</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-26T14:26:32Z</dc:date>
    </item>
  </channel>
</rss>

