MUNDOSAP

Regresar   MUNDOSAP > DESARROLLO > Programación ABAP IV
Nombre de Usuario
Contraseña
Home Descargas Registrar FAQ Miembros Calendario Buscar Temas de Hoy Marcar Foros Como Leídos




 
Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Viejo 07/04/10, 09:00:23
AntonioRamirez AntonioRamirez is offline
Junior Member
 
Fecha de Ingreso: jun 2006
Mensajes: 4
Semaforo ALV

Buenas,

Tengo un ALV de pedidos y quiero añadirle una columna que tenga un semáforo, con tres estados y que al modificar su estado, el campo al que está asociado la columna se actualice en la base de datos.

Gracias.
Responder Con Cita
  #2  
Viejo 07/04/10, 13:57:12
caralbgro caralbgro is offline
Senior Member
 
Fecha de Ingreso: sep 2007
Mensajes: 478
mira este ejemplo que hice hace tiempo y funciona

en la funcion de salida copmenta esto
* i_callback_top_of_page = 'TOP_OF_PAGE'
lo reemplazas por este
i_callback_html_top_of_page = p_heading

FORM REPORTE.

p_heading = 'HTML_TOP_OF_PAGE'.

PERFORM build_layout USING s_layout.
PERFORM build_comment USING heading[].
PERFORM build_eventtab USING events[].

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_interface_check = 'X'
i_callback_program = g_repit
it_fieldcat = LISTADO[]
* i_callback_top_of_page = 'TOP_OF_PAGE'
i_callback_html_top_of_page = p_heading
is_layout = s_layout
i_save = 'A'
it_events = events[]
i_callback_user_command = 'USER_COMMAND'
TABLES
t_outtab = T_LISTADO
EXCEPTIONS
program_error = 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.

ENDFORM.

y agrega este codigo!!!

form html_top_of_page using document type ref to cl_dd_document.
data: text type sdydo_text_element,
R_AREA TYPE REF TO CL_DD_AREA.

CALL METHOD document->INITIALIZE_DOCUMENT.
CALL METHOD document->VERTICAL_SPLIT
EXPORTING SPLIT_AREA = document
SPLIT_WIDTH = '100%'
IMPORTING RIGHT_AREA = R_AREA.

CALL METHOD R_AREA->ADD_PICTURE
EXPORTING PICTURE_ID = 'ZLOGO'
WIDTH ='150'.

text = 'Listado de Notas de Pedidos Pendientes'.

call method document->add_text
exporting
text = text
sap_style = 'HEADING'
sap_color = space
sap_fontsize = cl_dd_document=>SANS_SERIF
sap_emphasis = cl_dd_document=>strong
style_class = space.

call method document->new_line.
call method document->new_line.

concatenate 'Usuario: ' sy-uname INTO text SEPARATED BY space.
call method document->add_text
exporting
text = text
sap_style = space
sap_color = space
sap_fontsize = cl_dd_document=>large
sap_emphasis = space
style_class = space.

call method document->add_gap
exporting
width = 10.
call method document->new_line.


concatenate 'Fecha: ' sy-datum INTO text SEPARATED BY space.
call method document->add_text
exporting
text = text
sap_style = space
sap_color = space
sap_fontsize = cl_dd_document=>large
sap_emphasis = space
style_class = space.

call method document->add_gap
exporting
width = 10.

call method document->new_line.
call method document->new_line.
call method document->new_line.

call method document->add_icon
exporting
sap_icon = 'ICON_RED_LIGHT'.
call method document->add_gap
exporting
width = 2.
text = 'No Autorizado'.

call method document->add_text
exporting
text = text
sap_style = space
sap_color = space
sap_fontsize = cl_dd_document=>large
sap_emphasis = cl_dd_document=>strong
style_class = space.

call method document->add_gap
exporting
width = 10.

call method document->add_icon
exporting
sap_icon = 'ICON_GREEN_LIGHT'.
call method document->add_gap
exporting
width = 2.
text = 'Autorizado'.
call method document->add_text
exporting
text = text
sap_style = space
sap_color = space
sap_fontsize = cl_dd_document=>large
sap_emphasis = cl_dd_document=>strong
style_class = space.


call method document->add_gap
exporting
width = 10.

call method document->add_icon
exporting
sap_icon = 'ICON_YELLOW_LIGHT'.
en la función de salida comenta esto

FORM REPORTE.

p_heading = 'HTML_TOP_OF_PAGE'.

PERFORM build_layout USING s_layout.
PERFORM build_comment USING heading[].
PERFORM build_eventtab USING events[].

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_interface_check = 'X'
i_callback_program = g_repit
it_fieldcat = LISTADO[]
* i_callback_top_of_page = 'TOP_OF_PAGE'
i_callback_html_top_of_page = p_heading
is_layout = s_layout
i_save = 'A'
it_events = events[]
i_callback_user_command = 'USER_COMMAND'
TABLES
t_outtab = T_LISTADO
EXCEPTIONS
program_error = 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.

ENDFORM.
call method document->add_gap
exporting
width = 2.
text = 'Rechazado'.

call method document->add_text
exporting
text = text
sap_style = space
sap_color = space
sap_fontsize = cl_dd_document=>large
sap_emphasis = cl_dd_document=>strong
style_class = space.

endform. " Html_top_of_page
Responder Con Cita
Respuesta


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Reglas de Mensajes
no puedes crear nuevos temas
no puedes responder temas
no puedes adjuntar archivos
no puedes editar tus mensajes

El código vB está On
Las caritas están On
Código [IMG] está On
Código HTML está Off
Saltar a Foro


Husos Horarios son GMT. La hora en este momento es 19:35:37.


www.mundosap.com 2006 - Spain
software crm, crm on demand, software call center, crm act, crm solutions, crm gratis, crm web