cancel
Showing results for 
Search instead for 
Did you mean: 

Select With Internal Table

mark_fryu
Participant
0 Kudos
264

hi,

I have to do a Select with an internal table in Inner Join, but I get this error:

mark_fryu_1-1726134013926.png

mark_fryu_0-1726134199119.png

 

This is how I build the internal table:

mark_fryu_2-1726134062109.png

 

Sandra_Rossi
Active Contributor
0 Kudos
Please paste the code in text format, because people generally don't spend time in retyping the code to test on their system.
raymond_giuseppi
Active Contributor
0 Kudos

Could you paste the code in text, definition of lt_odv (explicit or inplicit) and the long text on the second line of error (after 'or it is a')

Accepted Solutions (1)

Accepted Solutions (1)

turkaj
Active Participant
0 Kudos

Hi,

The following coding should work. However, if you are in S/4HANA, then CDS views are recommended.

    SELECT vbeln
      INTO TABLE @DATA(lt_odv)
        FROM vbak .

    "Important to check, otherwise everything will be read.
    IF lt_odv IS NOT INITIAL.
      SELECT kunnr, land1
        INTO TABLE @DATA(lt_vbpa)
          FROM vbpa
            FOR ALL ENTRIES IN @LT_odv
              WHERE vbeln = @LT_odv-vbeln.
    ENDIF.

lt_odv is not a database table but an internal table. Hence the error message.

Answers (0)