‎2009 Jan 20 11:32 AM
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
‎2009 Jan 20 11:39 AM
‎2009 Jan 20 11:40 AM
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
‎2009 Jan 20 11:46 AM
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
‎2009 Jan 20 11:49 AM
I hope u wer modifying some standard code.
ADDFIELD might be a macro then.
‎2009 Jan 20 12:17 PM
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.