Application Development 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: 

Error in Field group

Former Member
0 Kudos

Hi Experts,

I have issue with field group. I declared like,

FIELD-GROUPS: header.

INSERT: ext-afaber

ext-ktogr

ext-afasl

ext-gsber

ext-fkber

ext-kostl

ext-fistl INTO header.

Its working fine for one first time. second time the same code will be executed with some other datas

and it throws a dump.

Error description is,

With field groups, INSERT is not supported after EXTRACT.

The current ABAP program "SAPLZALT_FG806" had to be terminated because it has

come across a statement that unfortunately cannot be executed.

The current ABAP program "SAPLZALT_FG806" uses field groups and

extract techniques.

Extracts consist of records of different types where the structure

of each record type is described by a field group.

If there is a field group HEADER, it precedes every record.

Although an extract dataset can contain different record types,

each individual record type must be consistent in its structure.

This means that you cannot modify a field group

when the first record of that type has been extracted.

This program attempts to place a new field "EXT-AFABER" in the field group

"\FUNCTION-POOL=ZALT_FG806\DATA=HEADER[]", although a record of type

"\FUNCTION-POOL=ZALT_FG806\DATA=HEADER[]" was already extracted.

Can anybody help me on this. After extracting the field group im in need of again insert data's to the same field group.

Thanks in advance,

Helps will be appreciated.

Edited by: Nandini on Feb 10, 2010 11:48 AM

8 REPLIES 8

Former Member
0 Kudos

Hi

It seems you're using INSERT twice, u should use it once at the begging

Max

0 Kudos

Hi,

Is there any way to insert into the field group that was already extracted.

Thanks.

0 Kudos

No

The INSERT can't be done after an extraction: why do u need to do it again?

From help:

The field group header can only be extended till a field group of the program is extracted because it is a part of all field groups. An INSERT statement for an already extracted field group causes an exception that cannot be handled.

Max

antony_paul2
Active Participant
0 Kudos

INSERT statment is used to define the structure of your Extract dataset.

EXTRACT statement is used to insert data to your extract dataset.

You can call n number of INSERT statement provided you havent called your first EXTRACT statement.

0 Kudos

Hi Experts thanks for your repies.

Im customizing standard program and that program has the field groups. They used it for a single display but i need to loop it for multiple times. So the first time its working fine and then the second time it goes to dump.

Program is RAPOST2000 & Subroutine is FORM INIT_EXT.

Is there any alternate available for field group.

Please Advice,

Thanks Again.

0 Kudos

Use statement.

LOOP.

ENDLOOP.

Thats how u get data out of your extract data set.

0 Kudos

Hi Antony,

I did search in that std program RAPOST2000. I didnt found any code like EXTRACT HEADER.

So whats the meaning. Extract is not yet done for the field group 'Header'. Right?

Thanks.

Edited by: Nandini on Feb 10, 2010 2:14 PM

0 Kudos

You dont have to explicitly say EXTRACT header.

The following code in the program RAPOST2000 will also extract data into header

   
 EXTRACT posten.

I think you are still not clear about how an extract dataset works

Go through the below link

[http://help.sap.com/saphelp_nw70/helpdata/EN/9f/db9ed135c111d1829f0000e829fbfe/content.htm]