Skip to Content
0
Former Member
Apr 12, 2012 at 10:43 AM

Can I use field-symbols in a class?

645 Views

Hi experts,

i have a class and i want to create a field-symbol but its showing syntax error

CLASS ZCL_COLLEGE DEFINITION ABSTRACT.

PUBLIC SECTION. " PUBLIC SCETION CONTAINS TWO ABSTRACT METHODS.

METHODS: SETVALUE IMPORTING LT_TBL1 TYPE ANY TABLE OPTIONAL,

GETVALUE IMPORTING LT_TBL2 TYPE ANY TABLE OPTIONAL

EXPORTING LT_RES TYPE ANY TABLE .

PRIVATE SECTION. "PRIVATE SECTION CONTAINS REF TYPE STRUCTURE.

FIELD-SYMBOLS: <FS_ITTAB> TYPE ANY,

<FS_WA> TYPE ANY.

DATA: LT_DYNTBL TYPE REF TO DATA,

LV_DYWA TYPE REF TO DATA.

ENDCLASS.

syntax error

Include ZZFMRASSIGN_TOP

You cannot use the current statement between "CLASS ... DEFINITION" and

"ENDCLASS".

Thanks.

Rohit Kumar