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

Selecting into an internal table with deep structure

Former Member
0 Likes
1,894

Hi,

I am working in ECC 6.0 now and it is giving me a syntax error for the following code.

types: tt_bdc type standard table of bdcmsgcoll
      with default key.
     
data:  begin of t_test occurs 0,
        vbeln like vbak-vbeln,
        tab   type tt_bdc,
      end of t_test.
     
select vbeln from vbak into table t_test
  where aedat > '20081101'.

The error is:

+The work area (or internal table) "T_TEST" is not flat, or contains

reference or internal tables as components . components. components.

components. components.+

I've done this in countless other programs in the past. How can I use a deep structure this way? What am I missing?

Thanks very much!

1 ACCEPTED SOLUTION
Read only

amit_khare
Active Contributor
0 Likes
754

Will this solve ur requirement -

types: tt_bdc type standard table of bdcmsgcoll

with default key.

data: begin of t_test occurs 0,

vbeln like vbak-vbeln,

tab type tt_bdc,

end of t_test.

select vbeln from vbak into

CORRESPONDING FIELDS OF TABLE t_test

where aedat > '20081101'.

Hi,

I am working in ECC 6.0 now and it is giving me a syntax error for the following code.

types: tt_bdc type standard table of bdcmsgcoll
      with default key.
     
data:  begin of t_test occurs 0,
        vbeln like vbak-vbeln,
        tab   type tt_bdc,
      end of t_test.
     
select vbeln from vbak into table t_test
  where aedat > '20081101'.

The error is:

+The work area (or internal table) "T_TEST" is not flat, or contains

reference or internal tables as components . components. components.

components. components.+

I've done this in countless other programs in the past. How can I use a deep structure this way? What am I missing?

Thanks very much!

2 REPLIES 2
Read only

amit_khare
Active Contributor
0 Likes
755

Will this solve ur requirement -

types: tt_bdc type standard table of bdcmsgcoll

with default key.

data: begin of t_test occurs 0,

vbeln like vbak-vbeln,

tab type tt_bdc,

end of t_test.

select vbeln from vbak into

CORRESPONDING FIELDS OF TABLE t_test

where aedat > '20081101'.

Read only

Former Member
0 Likes
754

Thank you Amit,

I guessed at this after reading this page:

http://help.sap.com/saphelp_nw04/helpdata/EN/fc/eb39eb358411d1829f0000e829fbfe/frameset.htm

I hate into corresponding fields due to the overhead, but I see no other option. For now, this gets me done though so thanks very much!

Ray