Ver Mensaje Individual
  #5  
Viejo 29/08/06, 13:35:25
Mauricio Hidalgo Mauricio Hidalgo is offline
Senior Member
 
Fecha de Ingreso: may 2006
Localización: Santiago, Chile
Mensajes: 481
Si estás usando la konv (como sospecho) en join no te va a funcionar, tampoco puedes usar en esta tabla funciones de agregación (SUM, COUNT, etc). Lo que tienes que hacer es accesar individualmente a esta tabla mediante el campo KNUMV que es comun a VBRK y KONV.

por ejemplo:
report ztest4
tables: vbrk,konv.

select-options p_vbeln for vbrk-vbeln.

data: begin of t_datos occurs 0.
include structure vbrk.
data: end of t_datos.

data: t_konv like konv occurs 0 with header line.

select * into corresponding fields of table t_datos from vbrk inner join
vbrp on vbrk~vbeln eq vbrp~vbeln
where vbrk~vbeln in p_vbeln.

loop at t_datos.
select * into table t_konv from konv where knumv eq t_datos-knumv.
loop at t_konv.
write: / t_datos-vbeln, t_konv-knumv, t_konv-kschl,
t_konv-kbetr, t_konv-kwert.
endloop.
endloop.

espero te ayude y aclare mejor
Responder Con Cita