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 05/02/10, 11:37:47
turbo1959 turbo1959 is offline
Member
 
Fecha de Ingreso: feb 2006
Mensajes: 49
Icono en una Cabecera de ALV

Buenos dias. Tengo un ALV que en la cabecera del informe quiero sacar un icono.

Lo hago de la siguiente manera:

INCLUDE <icon>.
TABLES icon.
DATA icon_mrp LIKE icon-id.

Y cuando voy a sacar las cabeceras del ALV:

WRITE icon_display_more AS ICON TO icon_mrp.

i_heading-typ = 'S'.
i_heading-key = 'Icono :'
i_heading-info = icon_mrp.

Debugando me sale en icon_display_more el dibujito del icono, pero en ino_mrp @1E@

Y al sacarme la cabecera me sale @1E@ en vez del dibujito del icono.

En que me estoy equivocando?

Gracias y Saludos
Responder Con Cita
  #2  
Viejo 05/02/10, 13:59:30
VLozano VLozano is offline
Senior Member
 
Fecha de Ingreso: nov 2009
Mensajes: 124
Yo creo que aquí.
En los ejemplos del WRITE qué tipo de datos declara para el WRITE AS ICON?
__________________
"Porque algunos sabemos que somos parte del problema"
Responder Con Cita
  #3  
Viejo 05/02/10, 15:28:38
caralbgro caralbgro is offline
Senior Member
 
Fecha de Ingreso: sep 2007
Mensajes: 478
proba asi esto funciona!!!

DATA: p_heading TYPE SLIS_FORMNAME.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_BACKGROUND_ID = 'ALV_BACKGROUND'
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.


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 Pendientes de Solicitud de Pedido'.

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'.
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 12:11:01.


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