Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ABAP program

Former Member
0 Likes
1,104

What does an extract statement do in abap program ?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
996

Hi,

EXTRACT is used with datasets to get the data

Regards,

Gaurav

8 REPLIES 8
Read only

Former Member
0 Likes
997

Hi,

EXTRACT is used with datasets to get the data

Regards,

Gaurav

Read only

Former Member
0 Likes
996

Hi Lakshmanan,

Since internal tables have fixed line structures, they are not suited to handle data sets with varying structures. Instead, you can use extract datasets for this purpose.

Go through the following link:

http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9ed135c111d1829f0000e829fbfe/frameset.htm

<b>

Reward all helpful answers</b>

Regards,

V.Raghavender.

Read only

Former Member
0 Likes
996

hi,

Extracts are dynamic sequential datasets in which different lines can have different structures. Each ABAP program may currently only have a single extract dataset. You cannot access the individual records in an extract using key or index. Instead, you always process them using a loop.

Read only

former_member198270
Active Contributor
0 Likes
996

hi Narasimhan,

Since internal tables have fixed line structures, they are not suited to handle data sets with varying structures. Instead, you can use extract datasets for this purpose.

An extract is a sequential dataset in the memory area of the program. You can only address the entries in the dataset within a special loop. The index or key access permitted with internal tables is not allowed. You may only create one extract in any ABAP program. The size of an extract dataset is, in principle, unlimited. Extracts larger than 500KB are stored in operating system files. The practical size of an extract is up to 2GB, as long as there is enough space in the filesystem.

An extract dataset consists of a sequence of records of a pre-defined structure. However, the structure need not be identical for all records. In one extract dataset, you can store records of different length and structure one after the other. You need not create an individual dataset for each different structure you want to store. This fact reduces the maintenance effort considerably.

In contrast to internal tables, the system partly compresses extract datasets when storing them. This reduces the storage space required. In addition, you need not specify the structure of an extract dataset at the beginning of the program, but you can determine it dynamically during the flow of the program.

You can use control level processing with extracts just as you can with internal tables. The internal administration for extract datasets is optimized so that it is quicker to use an extract for control level processing than an internal table.

Procedure for creating an extract:

Define the record types that you want to use in your extract by declaring them as field groups. The structure is defined by including fields in each field group.

Defining an Extract

Fill the extract line by line by extracting the required data.

Filling an Extract with Data

Once you have filled the extract, you can sort it and process it in a loop. At this stage, you can no longer change the contents of the extract.

Processing Extracts

<i>Reward points if helpful.</i>

Regards,

Amber S

Read only

Former Member
0 Likes
996

hi,

extract statement is used to extract data from datasets.

Reward points if helpful.

Read only

Former Member
0 Likes
996

Hai lakshmanan,

EXTRACT statement writes all fields of the field group fg as one record to a sequential dataset.If a field group HEADER has been defined, its fields prefix each record to form a sort key.

regards,

kavitha

Read only

Former Member
0 Likes
996

Hi Lakshmanan,

Extract is used for extracting data from data base using data set.

An extract is a sequential dataset in the memory area of the program. You can only address the entries in the dataset within a special loop. The index or key access permitted with internal tables is not allowed. You may only create one extract in any ABAP program. The size of an extract dataset is, in principle, unlimited. Extracts larger than 500KB are stored in operating system files. The practical size of an extract is up to 2GB, as long as there is enough space in the filesystem.

Regards,

Hemant

Read only

Former Member
0 Likes
996

answered