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: 

issue with Field-Groups defining

Former Member
0 Kudos

In one z report I defined a field groups as

FIELD-GROUPS:

header, "Contains KEY information

accrdata. "Contains Item information

INSERT :

pcfno "Promotions Number

mvgr5 " Product Hierarchy

matkl " Material Group

matgr_desc " Material Group Description

linno "PCF Line Item Indicator

ctype "PCF Cost Type

pperd "PCF Period

nperd "Next Period Indicator

repgp "PCF Reporting Group

repgpdescr "Reporting Description

mvgr5 "DLS03 Product hierarchy

respi INTO header. "PCF Responsibility Indicator

INSERT:

percn "PCF Percentage of Funds

rtcur "Currency Key

nbamnt "PCF Met Bomus Stock Amount

damnt "PCF Discount Amount

prram "PCF PRR Amount

actual "Actual PCF Amount

famnt "PCF Forecast Amount

accrual "PCF Accrual Amount

vkorg "PCF Sales Organisation

vtweg "PCF Distribution Channel

spart "PCF Division

pcfdescr "PCF Description

cctdescr INTO accrdata. "PCF Cost Type Description

And inserted like above but while checking the code from SLIN

it is giving error ..

The error is the

Syntax check warning

INSERT :

PCFNO "Promotions Number

MVGR5 " Product Hierarchy

MATKL " Material Group

MATGR_DESC " Material Group Description

LINNO "PCF Line Item Indicator

CTYPE "PCF Cost Type

PPERD "PCF Period

NPERD "Next Period Indicator

REPGP "PCF Reporting Group

REPGPDESCR "Reporting Description

MVGR5 "DLS03 Product hierarchy

RESPI INTO HEADER. "PCF Responsibility Indicator

Messages:

Statement is not accessible.

Can somebody guide me to resolve this error.

I had used this code form one existing program but with some change.

Regards,

Sanjeev

2 REPLIES 2

Former Member
0 Kudos

HI sanjeev,

how about referring the fields with the respective table names....

below is the link which is self-explanatory..

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

hope this helps u a bit,

all the best,

regards,

sampath

  • mark helpful answers

Former Member
0 Kudos

Hi,

It appears that you have not declared the tables (from which you are taking the fields)in the NODES statements;

See the following simple example and write again.

REPORT demo_extract.

<b>NODES: spfli, sflight.</b>

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.

reward if useful.

Regards,

Anji