cancel
Showing results for 
Search instead for 
Did you mean: 

Select statement on a nested table in ABAP

carljschmidt
Participant
0 Kudos

Hi experts,

I am trying to query a nested table in ABAP. Something along the lines of:

 

 

SELECT action FROM lt_data
  WHERE lt_data-action = 'SU01'
  AND lt_data-timestamp-hour = '15'
INTO lt_action_at_15.

 

 

Where lt_data might look like this:

actiontimestamp
e.g. 'SU01'<some nested data here>

and timestamp might look like this:

datehourminutesecond
<some date>e.g. '15'<some minute value><some second value>

With this, I receive the error: Unkown column name "TIMESTAMP-HOUR"

I assume that one solution would be to flatten lt_data into:

actiondatehourminutesecond

However, the actual data I have is a bit more complex, so I would like to avoid flattenting out the table if possible.

Is there any way to use nested tables and their columns in SELECT statements in ABAP, even though this violates 1NF?

Thank you for your help!

  • SAP Managed Tags:

Accepted Solutions (0)

Answers (0)