Ver Mensaje Individual
  #2  
Viejo 13/09/10, 15:29:31
Avatar de Fabian leonardo velasquez
Fabian leonardo velasquez Fabian leonardo velasquez is offline
Member
 
Fecha de Ingreso: sep 2007
Localización: Facatativa
Mensajes: 62
Cuál menu quieres poner el boton?

Hola ivansap1 para agregar botones al ALV en a barra de herramientas del mismo, este es un ejemplo que cambia unos botones y elimina otros. pero esta el metodo que puedes controlar



method handle_toolbar.
data: ls_toolbar type stb_button.
clear ls_toolbar.
case sy-dynnr.
when 2000 or 3000 or 3100.
move 'AGRE' to ls_toolbar-function.
move icon_create to ls_toolbar-icon.
move 'Agregar Registros' to ls_toolbar-quickinfo.
move 'Crear' to ls_toolbar-text.
move ' ' to ls_toolbar-disabled.
* APPEND ls_toolbar TO e_object->mt_toolbar.

modify e_object->mt_toolbar from ls_toolbar
transporting function icon quickinfo text
where function = '&LOCAL&INSERT_ROW' .

clear ls_toolbar.
move 'DELETE' to ls_toolbar-function.
move icon_delete to ls_toolbar-icon.
move 'Eliminar Registros' to ls_toolbar-quickinfo.
move 'Borrar' to ls_toolbar-text.
move ' ' to ls_toolbar-disabled.


modify e_object->mt_toolbar from ls_toolbar
transporting function icon quickinfo text
where function = '&LOCAL&DELETE_ROW'.


delete e_object->mt_toolbar
where function = '&LOCAL&APPEND'.

delete e_object->mt_toolbar
where function = '&LOCAL&COPY_ROW'.
endcase.
endmethod.
__________________
Cordialmente
Fabián Leonardo Velásquez P.
Consultor SAP ABAP
Bogota - Colombia
Responder Con Cita