How to pass runtime variables into the Custom SQL

Hi Experts,

How to pass runtime variables in Custom SQL under Lookup_ext function.

Thanks,
Venki


ursfriend77 (BOB member since 2011-03-02)

I think I got that to work (with both variables and SQL) one time but have not been able to replicate it since. Now I just create the entire SQL as a global variable in a script and then put just the global in the custom SQL box. Like this:


$G_MSEG_Pre_Post_Value_SQL = 
   'Select MANDT, MJAHR, WERKS, LGORT, MATNR, LBKUM, SALK3, BUDAT_MKPF, CPUDT_MKPF, CPUTM_MKPF, CHARG ' ||
   'FROM DBO.MSEG '                                                                                     ||
   'Where MSEG.MANDT       = \'001\' '                                                                  ||
   '  and MSEG.BUDAT_MKPF >= \'' || $G_MSEG_Date_Star || '\' '                                          ||
   '  and MSEG.BUDAT_MKPF  < \'' || $G_MSEG_Date_End  || '\' '                                          ||
   '  and MSEG.WERKS      != \'0101\' '                                                                 ||
   '  and MSEG.CHARG      != \'EXCLUDE\'';

eepjr24 :us: (BOB member since 2005-09-16)