Ver Mensaje Individual
  #5  
Viejo 13/11/07, 08:25:38
pafú pafú is offline
Member
 
Fecha de Ingreso: sep 2007
Mensajes: 49
Si los dos resultado de las select tienen la misma clave que tu tabla interna, podrias almacenar el resultado de estas en un tabla interna_auxiliar y luego hacer un collect de tu itab_aux to i_tab. Aqui te pongo un ejemplo que hice yo.

SELECT * FROM yvp_ta_0104b
WHERE zfuente = yvp_ta_0104-zfuente
AND ztipo = 'G'.

i_detalle_aux-zfuente = yvp_ta_0104b-zfuente.
i_detalle_aux-zdescrip = i_salida-zdescrip_pot.
i_detalle_aux-zano = yvp_ta_0104b-zano.
i_detalle_aux-zgasto = yvp_ta_0104b-zimpor.

APPEND i_detalle_aux.

SELECT * FROM yvp_ta_0104b
WHERE zfuente = yvp_ta_0104-zfuente
AND zano = yvp_ta_0104b-zano
AND ztipo = 'A'.

i_detalle_aux-zfuente = yvp_ta_0104b-zfuente.
i_detalle_aux-zdescrip = i_salida-zdescrip_pot.
i_detalle_aux-zano = yvp_ta_0104b-zano.
i_detalle_aux-zayuda = yvp_ta_0104b-zimpor.

APPEND i_detalle_aux.

COLLECT i_detalle_aux INTO i_detalle.

ENDSELECT.

ENDSELECT.
Responder Con Cita