Skip to Content
0
Former Member
Aug 09, 2005 at 09:52 PM

Field symbol

19 Views

Hi,

Can someone tell me what is the exaxt use of field symbols ?

I was trying to debug some code as follows and I encountered field symbol stuff:

FORM ARRANGE_DATA_FOR_SMARTFORM .

FIELD-SYMBOLS : <FS_FIELDNAME>,

<ZPLMECFORMS>.

DATA: SYTABIX LIKE SY-TABIX,

TABNAME LIKE DD02L-TABNAME VALUE 'ZPLMECFORMS',

DDFIELD LIKE DDFIELD OCCURS 50 WITH HEADER LINE,

T_DATE LIKE CAWN-ATWRT.

CALL FUNCTION 'DD_NAMETAB_TO_DDFIELDS'

EXPORTING

  • KEYFIELDS = 'X'

  • NULLABLE = 'X'

TABNAME = TABNAME

  • IMPORTING

  • SUBRC =

TABLES

DDFIELDS = DDFIELD

.

  • LOGIC FOR DYNAMIC ASSIGNMENT OF THE CHARATERISTICS VALUES TO THE

  • SMARTFORM INTERFACE STRUCTURE

LOOP AT DDFIELD ASSIGNING <FS_FIELDNAME>.

SYTABIX = SY-TABIX.

  • READ THE CHARACTERISTICS VALUES MAINTAINED IN 'CHAR' TYPE IN

  • STRUCTURE BAPI1003_ALLOC_VALUES_CHAR

READ TABLE T_CHAR_CHR WITH KEY CHARACT = <FS_FIELDNAME>(35).

IF SY-SUBRC = 0.

ASSIGN COMPONENT SYTABIX OF STRUCTURE T_ZPLMECFORMS TO <ZPLMECFORMS>.

<ZPLMECFORMS> = T_CHAR_CHR-VALUE_CHAR.

ENDIF.

.

.

.

.

.

Tushar