Hi,
I wonder how you will carry out the syntax checks in this case. Any way, there are a couple of options available:
1. Use statement GENERATE SUBROUTNE POOL to dynamically generate a transient program and obtain its output in your own program.
2. The other way is that you can obtain column names, table name and where clause from the user in separate fields on screen and use them to construct an OpenSQL statement like <b>SELECT (fieldlist) FROM (tablename) INTO (targetarea) WHERE (whereclause)</b>.
For both options, you can take a look at the document https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/advanced and generic programming in abap.pdf or TechEd session https://www.sdn.sap.com/sdn/elearning.sdn?class=/public/eclasses/teched04/ABAP351.htm> on generic programming.
Hope this helps.
Regards
Add a comment