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: 

select into a field-symbols

Former Member
0 Kudos

I want to select data into a changeable struct so i used field-symbols but in select statement i got an error saying that "With an Open SQL select, the output area is too small"..i use ANY type in declaration of field-symbols.

What can i do correct this mistake?



    SELECT * INTO TABLE FIELDS FROM T682Z WHERE KOZGF = 'ZPPT' AND KOLNR = T682I-KOLNR
      ORDER BY ZAEHK.

        CONCATENATE 'CNCCRMPR' T682I-KOTABNR INTO TN.

        FIELD-SYMBOLS <FS> type  any.

        SELECT  * FROM (TN) INTO <FS>
        WHERE TIMESTAMP_TO >= time_stamp AND TIMESTAMP_FROM <= time_stamp.


     ENDSELECT.

1 ACCEPTED SOLUTION

varma_narayana
Active Contributor

Hi..

You can check this code to know how to use Field symbols in SELECt.

Try it....

DATA : REF_TAB TYPE REF TO DATA.

FIELD-SYMBOLS: <FTAB> TYPE TABLE.

DATA: L_TABNAME TYPE DD02L-TABNAME VALUE 'EKPO'.

CREATE DATA REF_TAB TYPE TABLE OF (L_TABNAME).

ASSIGN REF_TAB->* TO <FTAB>.

SELECT * FROM (L_TABNAME) INTO TABLE <FTAB>.

DESCRIBE TABLE <FTAB>.

WRITE:/ SY-TFILL.

REWARD IF HELPFUL.

2 REPLIES 2

varma_narayana
Active Contributor

Hi..

You can check this code to know how to use Field symbols in SELECt.

Try it....

DATA : REF_TAB TYPE REF TO DATA.

FIELD-SYMBOLS: <FTAB> TYPE TABLE.

DATA: L_TABNAME TYPE DD02L-TABNAME VALUE 'EKPO'.

CREATE DATA REF_TAB TYPE TABLE OF (L_TABNAME).

ASSIGN REF_TAB->* TO <FTAB>.

SELECT * FROM (L_TABNAME) INTO TABLE <FTAB>.

DESCRIBE TABLE <FTAB>.

WRITE:/ SY-TFILL.

REWARD IF HELPFUL.

JozsefSzikszai
Active Contributor
0 Kudos

hi Tuncer,

the field symbols is not assigned...

ec