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 |
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; |
prueba asi
move: 'AND bsid-bukrs EQ ''4600'' ' into r_cond. <---aqui marca perform llena_where using r_cond. |
Husos Horarios son GMT. La hora en este momento es 23:57:41. |
www.mundosap.com 2006 - Spain
software crm, crm on demand, software call center, crm act, crm solutions, crm gratis, crm web