09-05-2014 2:56 PM
Hello masters,
i am giving parameters to filter my search in sql statement but i want to change it to select-options.
i have searched the web but i couldnt find anything.
here is my code:
EXEC SQL.
OPEN C FOR
SELECT MAGAZAKOD, STOKKOD, ADET, BRUTTUTAR,
INDIRIM, NETTUTAR, PROMOTIP, PROMOKOD
from [dbMAROFIS_POS].[dbo].[PromoSorgu]
WHERE MAGAZAKOD = :P_WERKS AND
TARIH = :p_budat
ENDEXEC.
i want to change p_budat and p_werks.
thanks in advance.
09-05-2014 3:31 PM
Hi,
See FORM run_statment
I am using there:
cl_sql_connection
cl_sql_statement
cl_sql_result_set
cx_sql_exception
ob_sql_result_set = ob_sql_statement->execute_query( sql_statment ).
sql_statment is a string.
You can convert the select-options to the equivalent SQL syntax (you have to do the programing).
Regards.
09-07-2014 5:21 AM
Hi,
Done some testing.
Found released function FREE_SELECTIONS_RANGE_2_WHERE
Sample program included please test.
Check the content of where_string at the BREAK-POINT .
Mind you this is still OPEN SQL dialect but it reduce some work .
Regards.
09-09-2014 3:33 PM
Hi,
i solved my problem like this :
my select option was werks.I have assigned werks-low and werks-high to global datas and used these datas as sql_werks<werks-high and sql_werks > werks-low in sql selection.
thanks for your reply.
regards.
cem.