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: 

Refer to a column without a name

Former Member
0 Kudos
148

Hello,

i want to refer to the column of an internal table that only has this single column and do not know how to do it. The following code should clarify things:

SELECT ex1 ex2 FROM example_db_table INTO TABLE target FOR ALL ENTRIES IN deep_structure-single_column_table WHERE ex1 = ...?.

...? should refer to the single column of single_column_table. Unfortunately the column does not have a name to refer to. If there would be two columns with names col1 and col2, ex1= deep_structure-two_column_table-col1 would work. Can anyone help?

Cheers

Felix

1 ACCEPTED SOLUTION

Former Member
0 Kudos
85

Hallo, Felix.

please try using the "metacolumn" TABLE_LINE:


SELECT ex1 ex2
  FROM example_db_table
  INTO TABLE target
  FOR ALL ENTRIES IN deep_structure-single_column_table
  WHERE ex1 = deep_structure-single_column_table-TABLE_LINE.  "<-- here

...as the internal table has only one column.

Kind regards,

Alvaro

2 REPLIES 2

Former Member
0 Kudos
86

Hallo, Felix.

please try using the "metacolumn" TABLE_LINE:


SELECT ex1 ex2
  FROM example_db_table
  INTO TABLE target
  FOR ALL ENTRIES IN deep_structure-single_column_table
  WHERE ex1 = deep_structure-single_column_table-TABLE_LINE.  "<-- here

...as the internal table has only one column.

Kind regards,

Alvaro

0 Kudos
85

Hello Alvaro,

thats a solution. Thank you.

KR,

Felix