<?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: regarding extracts in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-extracts/m-p/3433646#M824683</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;EXTRACT&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Creates an extract dataset and adds lines to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Syntax&lt;/STRONG&gt;&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;With the first EXTRACT statement of a program, the system creates the extract dataset and adds the first extract record. In each subsequent EXTRACT statement, the new extract record is added to the dataset. 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).&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;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;&lt;STRONG&gt;Filling an Extract with Data&lt;/STRONG&gt;&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;&lt;STRONG&gt;EXTRACT&lt;/STRONG&gt;&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;&lt;STRONG&gt;EXTRACT HEADER.&lt;/STRONG&gt;&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;Check this link for sample program&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9f0535c111d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9f0535c111d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Feb 2008 21:49:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-08T21:49:22Z</dc:date>
    <item>
      <title>regarding extracts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-extracts/m-p/3433644#M824681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi friends,&lt;/P&gt;&lt;P&gt;i am working on reports, &lt;/P&gt;&lt;P&gt;i am wierdly confused as to how he extracts are used,&lt;/P&gt;&lt;P&gt;can some one help me understand how the data is stored in extracts, and how it can be retrieved, the below is the code i am trying to understand.\&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;code&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;field-groups: header, detail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;extract detail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at new mseg-werks.&lt;/P&gt;&lt;P&gt;..........&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at new mseg-matnr.&lt;/P&gt;&lt;P&gt;...................&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at detail.&lt;/P&gt;&lt;P&gt;..................&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2008 20:27:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-extracts/m-p/3433644#M824681</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-08T20:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: regarding extracts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-extracts/m-p/3433645#M824682</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;Hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement links the current content of the fields, which were until then included in the field group header resp. field_group via the statement INSERT , to the extract dataset of the program. If there is no field group specified after EXTRACT, then the field group header is implicitly added. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the first execution of the EXTRACT-statement of a program, the extract datset is created and the first line added. After execution of an EXTRACT-statement, it is not allowed to incorporate other fields to the specified field group field_group with the INSERT statement. If you do so, an uncatchable exception will be raised at the next EXTRACT-statement for the same field group. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes &lt;/P&gt;&lt;P&gt;As the field group header is the beginning part and sort key of every field group, it is not allowed to incorporate fields into header after execution of the first EXTRACT statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The lines of an extract dataset cannot be explicitly deleted and will be kept alive as long as the internal mode 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;Example &lt;/P&gt;&lt;P&gt;This example continues the example under INSERT. If the executable program is linked to a fitting logical data base, the fields of the field groups flight_info and flight_date are attached to the extract dataset during the GET-events. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT demo_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;START-OF-SELECTION. &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;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;Thanks,&lt;/P&gt;&lt;P&gt;-Anthony&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2008 21:38:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-extracts/m-p/3433645#M824682</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-08T21:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: regarding extracts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-extracts/m-p/3433646#M824683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;EXTRACT&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Creates an extract dataset and adds lines to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Syntax&lt;/STRONG&gt;&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;With the first EXTRACT statement of a program, the system creates the extract dataset and adds the first extract record. In each subsequent EXTRACT statement, the new extract record is added to the dataset. 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).&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;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;&lt;STRONG&gt;Filling an Extract with Data&lt;/STRONG&gt;&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;&lt;STRONG&gt;EXTRACT&lt;/STRONG&gt;&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;&lt;STRONG&gt;EXTRACT HEADER.&lt;/STRONG&gt;&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;Check this link for sample program&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9f0535c111d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9f0535c111d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2008 21:49:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-extracts/m-p/3433646#M824683</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-08T21:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: regarding extracts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-extracts/m-p/3433647#M824684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;anuy more inputs please&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 16:33:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-extracts/m-p/3433647#M824684</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-11T16:33:02Z</dc:date>
    </item>
  </channel>
</rss>

