2008 Jan 16 4:13 AM
Hi all,
Can any body explain me what is field group
Thanks in advns,
Rachita.
2008 Jan 16 6:53 AM
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.
2008 Jan 16 4:15 AM
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.
2008 Jan 16 4:15 AM
Hi ,
Field Groups / Extracts
http://help.sap.com/saphelp_46c/helpdata/EN/9f/db9ede35c111d1829f0000e829fbfe/frameset.htm
Field Symbols
http://help.sap.com/saphelp_46c/helpdata/EN/fc/eb387a358411d1829f0000e829fbfe/frameset.htm
Reward points for helpful answers
2008 Jan 16 4:21 AM
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.
2008 Jan 16 6:53 AM
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.