<?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: Extracts in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/extracts/m-p/2130100#M447693</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;extracts are sequential data sets, whos structre need not be identical like in internal table.&lt;/P&gt;&lt;P&gt;In one extract dataset u can store records of different length and structure one by one. this is not possible with internal tables.internal tables have fixed line structure.this also reduces the storage space as the &amp;lt;i&amp;gt;system partly compresses the datasets&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One limitation is that you can create only one extract in a program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**reward if helpful&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;madhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Apr 2007 09:00:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-18T09:00:01Z</dc:date>
    <item>
      <title>Extracts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extracts/m-p/2130099#M447692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is meant by extracts&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2007 08:50:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extracts/m-p/2130099#M447692</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-18T08:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: Extracts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extracts/m-p/2130100#M447693</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;extracts are sequential data sets, whos structre need not be identical like in internal table.&lt;/P&gt;&lt;P&gt;In one extract dataset u can store records of different length and structure one by one. this is not possible with internal tables.internal tables have fixed line structure.this also reduces the storage space as the &amp;lt;i&amp;gt;system partly compresses the datasets&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One limitation is that you can create only one extract in a program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**reward if helpful&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;madhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2007 09:00:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extracts/m-p/2130100#M447693</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-18T09:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: Extracts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extracts/m-p/2130101#M447694</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;An extract is a sequential dataset in the memory area of the program. Greater than 500 KB are stored on O/s&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Writes all fields of the field group fg (see FIELD-GROUPS) as one record to a sequential dataset (paging). If a field group HEADER has been defined, its fields prefix each record to form a sort key. You can then sort this dataset using SORT and process it with LOOP ... ENDLOOP. After this, EXTRACT cannot be executed again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As soon as the first dataset for a field group has been extracted with EXTRACT, the field group cannot be expanded using INSERT. The field group HEADER, in particular, cannot be expanded after the first EXTRACT (regardless of field group).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Large extract datasets are not kept in main memory; instead, they are written to an external help file. You can specify the directory in which this file is to be stored using the SAP profile parameter DIR_EXTRACT. By default, the system uses the SAP file directory SAP profile parameter DIR_DATA).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Filling an Extract with Data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you have declared the possible record types as field groups and defined their structure, you can fill the extract dataset using the following statements:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXTRACT &amp;lt;fg&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the first EXTRACT statement occurs in a program, the system creates the extract dataset and adds the first extract record to it. In each subsequent EXTRACT statement, the new extract record is added to the dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each extract record contains exactly those fields that are contained in the field group &amp;lt;fg&amp;gt;, plus the fields of the field group HEADER (if one exists). The fields from HEADER occur as a sort key at the beginning of the record. If you do not explicitly specify a field group &amp;lt;fg&amp;gt;, the&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXTRACT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;statement is a shortened form of the statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXTRACT HEADER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you extract the data, the record is filled with the current values of the corresponding fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As soon as the system has processed the first EXTRACT statement for a field group &amp;lt;fg&amp;gt;, the structure of the corresponding extract record in the extract dataset is fixed. You can no longer insert new fields into the field groups &amp;lt;fg&amp;gt; and HEADER. If you try to modify one of the field groups afterwards and use it in another EXTRACT statement, a runtime error occurs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By processing EXTRACT statements several times using different field groups, you fill the extract dataset with records of different length and structure. Since you can modify field groups dynamically up to their first usage in an EXTRACT statement, extract datasets provide the advantage that you need not determine the structure at the beginning of the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assume the following program is linked to the logical database F1S.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT demo_extract_extract.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NODES: spfli, sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-GROUPS: header, flight_info, flight_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT: spfli-carrid spfli-connid sflight-fldate&lt;/P&gt;&lt;P&gt;INTO header,&lt;/P&gt;&lt;P&gt;spfli-cityfrom spfli-cityto&lt;/P&gt;&lt;P&gt;INTO flight_info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GET spfli.&lt;/P&gt;&lt;P&gt;EXTRACT flight_info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GET sflight.&lt;/P&gt;&lt;P&gt;EXTRACT flight_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are three field groups. The INSERT statement assigns fields to two of the field groups. During the GET events, the system fills the extract dataset with two different record types. The records of the field group FLIGHT_INFO consist of five fields: SPFLI-CARRID, SPFLI-CONNID, SFLIGHT-FLDATE, SPFLI-CITYFROM, and SPFLI-CITYTO. The first three fields belong to the prefixed field group HEADER. The records of the field group FLIGHT_DATE consist only of the three fields of field group HEADER. The following figure shows the structure of the extract dataset:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can have only one extract per program&lt;/P&gt;&lt;P&gt;Check this out -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com//saphelp_470/helpdata/EN/9f/db9ed135c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com//saphelp_470/helpdata/EN/9f/db9ed135c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards Rk&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Rk Pasupuleti&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2007 09:06:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extracts/m-p/2130101#M447694</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-18T09:06:00Z</dc:date>
    </item>
  </channel>
</rss>

