Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to convert select into native SQL

Former Member
0 Likes
432

Hi All

I have a requirement to convert crtain statments to Native SQL

select * from zabc into table it_zabc

where a in s_oa

and b in s_ob

and c ge date_time-datefrom

and d le date_time-dateto

and e in admin_st.

How to handle selct options in Native SQL

1 REPLY 1
Read only

matt
Active Contributor
0 Likes
292

Select options are internal tables with header lines. You'll have to got through each line in the table, and process it according to type.

So, say you have selopt S for field F.

If you've got S-SIGN = I, S-OPTION = BT, S-LOW = 1, S-HIGH = 3 that'll be an SQL where clause of F GE 1 AND F LE 3.

If you've got S-SIGN = E, S-OPTION = EQ, S-LOW = 1, that'll be an SQL where clause of F NE 1

You need to work out then what the appropriate SQL is for Including/Excluding for all the possible options - if you don't know what the options are then read the help on SELECT-OPTIONS.

matt