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

Field Group

Former Member
0 Likes
776

Hi all,

Can any body explain me what is field group

Thanks in advns,

Rachita.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
742

Hi,

Field groups are groups similar fields together into one name. Field group works in conjuction with

INSERT f1 f2 INTO fg

EXTRACT fg

SORT BY fg

LOOP ... ENDLOOP

INSERT f1 f2 INTO fg

-


The insert statement is used to create a field group dynamically by inserting the field into it. Only global data fields can be inserted and not local data fields eg : in form modules.

EXTRACT fg

-


This will combine all the fields in the fieldgroup and write them to a sequential dataset as a single record.

SORT BY fg

-


Sorting of sequential dataset by field group.

LOOP AND ENDLOOP

-


LOOP.

AT ***

......

....

ENDAT.

AT ***

.....

....

ENDAT.

ENDLOOP. *

Reward points if found helpfull...

Cheers,

siva.

Hi all,

Can any body explain me what is field group

Thanks in advns,

Rachita.

4 REPLIES 4
Read only

Former Member
0 Likes
742

Field group:

It combines the related fields together into meaningful unit.

It provides the pre-selection so that we do not have to search through all fields of data source.

End user only has access to those fields assigned to field group.

Field symbols :

Field symbols are placeholders for other fields.

Field symbols use the memory to directly access the data from the internal table.

We do not pass the data to the header and from where we read the data which takes more time.

As a result Field Symbol is similar to a Pointer in C-Language. We can directly get the data from the memory which is very convenient.

A field symbol can point to any data object.

Does not occupy memory for the data objects.

Field should be assigned to field symbol before it is addressed in the program.

Regards.

Read only

Former Member
Read only

Former Member
0 Likes
742

Hi Rachita

hope this code will help you.

fieldgroups

http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/field_gr.htm

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

Sample Report Code

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.

Read only

Former Member
0 Likes
743

Hi,

Field groups are groups similar fields together into one name. Field group works in conjuction with

INSERT f1 f2 INTO fg

EXTRACT fg

SORT BY fg

LOOP ... ENDLOOP

INSERT f1 f2 INTO fg

-


The insert statement is used to create a field group dynamically by inserting the field into it. Only global data fields can be inserted and not local data fields eg : in form modules.

EXTRACT fg

-


This will combine all the fields in the fieldgroup and write them to a sequential dataset as a single record.

SORT BY fg

-


Sorting of sequential dataset by field group.

LOOP AND ENDLOOP

-


LOOP.

AT ***

......

....

ENDAT.

AT ***

.....

....

ENDAT.

ENDLOOP. *

Reward points if found helpfull...

Cheers,

siva.