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

filedgroups

Former Member
0 Likes
843

hi toi all what r the field groups . are the field groups and extracts both r same ?

pls give indetail dedscrption .

6 REPLIES 6
Read only

Former Member
0 Likes
760

Hi

Extract is the key command used while working with field groups

Field groups are useful when the data handled by internal tables is very high and creating problem with memeory we use field groups

see the sample code using field groups

REPORT demo_extract.

NODES: spfli, sflight.

FIELD-GROUPS: header, flight_info, flight_date.

START-OF-SELECTION.

INSERT: spfli-carrid spfli-connid sflight-fldate

INTO header,

spfli-cityfrom spfli-cityto

INTO flight_info.

GET spfli.

EXTRACT flight_info.

GET sflight.

EXTRACT flight_date.

END-OF-SELECTION.

SORT STABLE.

LOOP.

AT FIRST.

WRITE / 'Flight list'.

ULINE.

ENDAT.

AT flight_info WITH flight_date.

WRITE: / spfli-carrid , spfli-connid, sflight-fldate,

spfli-cityfrom, spfli-cityto.

ENDAT.

AT flight_date.

WRITE: / spfli-carrid , spfli-connid, sflight-fldate.

ENDAT.

AT LAST.

ULINE.

WRITE: cnt(spfli-carrid), 'Airlines'.

ULINE.

ENDAT.

ENDLOOP.

<b>Reward points for useful Answers</b>

Regards

Anji

Read only

Former Member
0 Likes
760

Hi,

Field groups use a mechanism called extract to store and process data. You define a header and then line structure and the fields that you would liek those to have and process them fairly similarly to a table. Unless you are dealing with millions of records.

Since internal tables have fixed line structures, they are not suited to handle data sets with varying structures.

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.

<b>Reward points if useful</b>

Regards

Ashu

Read only

0 Likes
760

thnkx ashu for ur enormous help for letting us all know about FIELD GROUPS

it really takes great efforts to copy paste the same thread answers just below the

same 1

thnkx

bhanu malik

Read only

Former Member
0 Likes
760

Hi,

Field Groups:

A field group is a user-defined grouping of characteristics and basic key figures from the EC-EIS or EC-BP field catalog.

Use

The field catalog contains the fields that are used in the aspects. As the number of fields grows, the field catalog becomes very large and unclear. To simplify maintenance of the aspects, you can group fields in a field group. You can group the fields as you wish, for example, by subject area or responsibility area. A field may be included in several field groups.

When maintaining the data structure of an aspect, you can select the field group that contains the relevant characteristics and basic key figures. This way you limit the number of fields offered.

Field groups use a mechanism called extract to store and process data. You define a header and then line structure and the fields that you would liek those to have and process them fairly similarly to a table. Unless you are dealing with millions of records.

Since internal tables have fixed line structures, they are not suited to handle data sets with varying structures.

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.

Field Groups / Extracts

http://help.sap.com/saphelp_46c/helpdata/EN/9f/db9ede35c111d1829f0000e829fbfe/frameset.htm

Regards,

PAdmam.

Read only

Former Member
0 Likes
760

Hi,

Field groups:

You can assign fields of different tables to one field group. In this way, you can treat fields of linked additional tables, additional structures and additional fields in the same way as true logical database fields.

To assign a field to a field group, proceed as follows:

Click on the field you want to select in the data source.

Use drag&drop to move the field into the field group of your choice.

Field groups are used to group similar fields together into one name

Notes & Sample Code Using Field-Groups :

http://www.geocities.com/SiliconValley/Grid/4858/sap/ABAPCode/Fieldgroups.htm

this link will show about the FIELD-GROUPS,EXTRACT,FIELD-SYMBOL and ASSIGN statments.

http://sap.niraj.tripod.com/id26.html

<b>Reward points</b>

Regards

Read only

Former Member
0 Likes
760

Hi sunil,

What does an extract statement do in the ABAP program?

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: EXTRACT . 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 EXTRACT HEADER. When you extract the data, the record is filled with the current values of the corresponding fields. As soon as the system has processed the first EXTRACT statement for a field group , the structure of the corresponding extract record in the extract dataset is fixed. You can no longer insert new fields into the field groups and HEADER. If you try to modify one of the field groups afterwards and use it in another EXTRACT statement, a runtime error occurs. 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.

Use this link,