|
#1
|
||||
|
||||
Error de Sintaxis Help!!
Saludos!!
Tengo el siguiente codigo para un select donde el where es dinamico sin en cambio el unico problema es que me marca error de sintaxis en los del move ' ' . data: r_cond(80) type c. data: begin of itab_where occurs 0, cond(80) type c, end of itab_where. move: '( kunnr GE so_kunnr-low AND kunnr LE so_kunnr-high )' to r_cond. perform llena_where using r_cond. move: 'AND bsid-bukrs EQ '4600' ' into r_cond. <---aqui marca perform llena_where using r_cond. move: 'AND bsid-avgbl EQ SPACE' to r_cond. perform llena_where using r_cond. move: 'AND ( blart EQ 'dr' OR blart EQ 'rv' ) ' to r_cond. <---aqui marca perform llena_where using r_cond. move: 'AND shkzg EQ 's'. ' to r_cond. perform llena_where using r_cond. select belnr zuonr budat blart dmbtr into corresponding fields of itab_reporte from bsid where ( itab_where ). endselect. endif. *&---------------------------------------------------------------------* *& Form llena_where *&---------------------------------------------------------------------* form llena_where using r_cond. move: r_cond to itab_where-cond. append itab_where. endform. " llena_where
__________________
01010000 01001010 10011000 10100001 De Byte a Beat. |
#2
|
|||
|
|||
Holas;
yo lo haria asip.. CONCATENATE '' '( kunnr GE so_kunnr-low AND kunnr LE so_kunnr-high )' INTO itab_where-cond SEPARATED BY SPACE. append itab_where. CONCATENATE 'AND' 'bsid-bukrs = ''4600''' INTO itab_where-cond SEPARATED BY SPACE. append itab_where. CONCATENATE 'AND' 'bsid-avgbl = SPACE' INTO itab_where-cond SEPARATED BY SPACE. append itab_where. CONCATENATE 'AND ( bsid-blart = ''DR''' 'OR' 'bsid-blart = ''RV'' )' INTO itab_where-cond SEPARATED BY SPACE. append itab_where. espero te sirva.. Saludos; |
#3
|
|||
|
|||
prueba asi
move: 'AND bsid-bukrs EQ ''4600'' ' into r_cond. <---aqui marca perform llena_where using r_cond. |
Herramientas | Buscar en Tema |
Desplegado | |
|
|