Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to iterate over internal table in SQL procedure?

Hello SDN.

I work on port some ABAP code to the HANA SQL stored procedure.

One of the input parameter has table type.

I want to know how I can iterate over this table?

In the ABAP I can write something like this:

LOOP AT lt_table ASSIGNING <fs_row>.

     <statements>...

ENDLOOP.

But I don't know how to do such loop in HANA.

My variant

lt_rows = SELECT * FROM :TBL_DATA;

FOR ls_rows AS :lt_rows DO

     <statements>...

END FOR;

leads to syntax error near lt_rows.

Regards,

Lev

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question