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

ECC syntax error for ADDFIELD.

Former Member
0 Likes
653

Dear Friends,

I am getting a syntax error in ECC, for ADDFIELD.

My original code is :

data: XI_SELTAB LIKE RSPARAMS OCCURS 0 WITH HEADER LINE.

ADDFIELD XI_SELTAB 'ARBPL' V_GEWRK.

Changed code is :

*data: XI_SELTAB LIKE RSPARAMS OCCURS 0 WITH HEADER LINE.

TYPES: ty_XI_SELTAB TYPE RSPARAMS.

Data: XI_SELTAB TYPE standard table of ty_XI_SELTAB.

Data: wa_XI_SELTAB type ty_XI_SELTAB.

ADDFIELD WA_XI_SELTAB 'ARBPL' V_GEWRK.

What is the exact syntax at here?? it not taking from work area.

Thanks,

Sridhar

5 REPLIES 5
Read only

Former Member
0 Likes
624

is ADDFIELD a macro??

have u defined the macro at first?

Read only

Former Member
0 Likes
624

Hi,

When I check in ECC getting syntax error ADDFIELD is not defined.

Is it SAP standard statement.

If it is a Macro, loop the itab ans pass Work area.

Regards,

Sunil

Edited by: Sunil Reddy Sibbala on Jan 20, 2009 12:41 PM

Read only

0 Likes
624

Thanks for the reply,

When I have commented this part and brings to old one :

*TYPES: ty_XI_SELTAB TYPE RSPARAMS.

*Data: XI_SELTAB TYPE standard table of ty_XI_SELTAB.

*Data: wa_XI_SELTAB type ty_XI_SELTAB.

XI_SELTAB LIKE RSPARAMS OCCURS 0 WITH HEADER LINE.

ADDFIELD XI_SELTAB 'ARBPL' V_GEWRK.

Then there is no error but u can see it in Extended syntax errors.

I think ADDFIELD is SAP standard statement.

Thanks,

Sridhar

Read only

0 Likes
624

I hope u wer modifying some standard code.

ADDFIELD might be a macro then.

Read only

0 Likes
624

Sorry to all,

Yes Its Micro and defined a like this :

*----


  • Macros

*----


DEFINE addfield.

&1-sign = 'I'.

&1-kind = 'S'.

  • use operation cp if the value contains wildcards

if &3 ca '*'.

&1-option = 'CP'.

else.

&1-option = 'EQ'.

endif.

  • append the field name/value to the selection table

if not &3 is initial.

&1-selname = &2.

&1-low = &3.

append &1.

endif.

clear &1.