Ver Mensaje Individual
  #6  
Viejo 23/10/06, 16:56:08
Garces Garces is offline
Senior Member
 
Fecha de Ingreso: ago 2006
Localización: Lima - Perú
Mensajes: 321
Wink Alv

Tu problema yo lo manejé usando eventos en un ALV List del siguiente modo:

*********************************************************
* Form para registrar que se va a controlar el evento "After Line Output" *
*********************************************************
form genera_tabla_eventos using t_eventos type slis_t_event.

data: s_evento type slis_alv_event.

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = t_eventos
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

read table t_eventos with key name = SLIS_EV_AFTER_LINE_OUTPUT
into s_evento.

if sy-subrc = 0.
s_evento-form = 'AFTER_LINE_OUTPUT'.
modify t_eventos from s_evento index sy-tabix.
endif.

endform. "genera_tabla_eventos


*******************************************************
* Form para indicar qué se debe hacer en el evento "After Line Output" *
*******************************************************
form AFTER_LINE_OUTPUT using p_tab type slis_lineinfo.

describe table t_output lines v_cant_reg_tot.

if p_tab-subtot <> 'X' and p_tab-endsum <> 'X'.

v_cant_reg = v_cant_reg + 1.

else.

if p_tab-subtot = 'X'.
write: 4(8) text-CAN,v_cant_reg.
v_cant_reg = 0.
endif.

if p_tab-endsum = 'X'.
write: 4(8) text-CAN,v_cant_reg_tot.
endif.

endif.

endform. "AFTER_LINE_OUTPUT


Espero que mi ayuda te sirva...
__________________
Miguel Ángel Garcés Ramírez
Responder Con Cita