How to get quickly OpenSQL queries for your ABAP programs
As impossible as it may seem, we sometimes forget the way in which a query should be constructed in openSQL. Have you ever wondered if there is an easy way to build queries to use in your programs?
Well, the answer is YES, in this post I will show you how to get simple queries (nothing too complex) for your programs.
After reading this post you easily will build your SELECT statements and you could also modify it for UPDATE or INSERT statements.
Let’s get into that.
Step 1: Go to transaction SE16N
Step 2: Choose your table
For this example let’s use SFLIGHT
Step 3: Choose your fields for filtering (in this case I’m using the field date)
Step 4: Visualize your data
Step 5: Visualize your script
Now just click the Display selection Criteria button or SHIFT + F1
And visualize your script
Now just copy the script and use it where you need it.
With this few steps yo can now get simple queries for your programs in no time.
IMPORTANT: the key is to know the fields of the table that you want to use in your program (for correct filtering).
I hope this information can be useful for your projects as it has been for me.
Share this post with whoever needs it
See you next time.