Skip to Content

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

SELECT TOP with parameter by using native SQL

Hi Guys,

I'um using native sql to select data from external database. I need use SELECT TOP statement with parameter. I used below code for this purpose.

EXEC SQL PERFORMING do_work.

         SELECT TOP :gs_row INVOICE_DETAIL_ID
           INTO :gs_ids        
           FROM CUSTOMER_PRODUCTS
          WHERE CREATED_AT IS NULL OR CREATED_AT='1900-01-01 00:00:00.000'

ENDEXEC.


But ABAP gives me error and show :gs_row as ? in Query. I can run same query like SELECT TOP 1000.... and it runs with no errors.


isnt it possible with ABAP?

Tags:

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question