MUNDOSAP

MUNDOSAP (foro/index.php)
-   Programación ABAP IV (foro/forumdisplay.php?f=4)
-   -   Problemas con ALV (foro/showthread.php?t=1955)

yozgart 22/09/08 22:25:17

Ninguna de las soluciones me ha funcionado
 
Estimados todos,

He tratado de solucionar el mismo problema con las soluciones antes expuestas sin exito.

Quisiera saber si alguién más tine otra solución que pueda yo aplicar.

Este es el código que utilizo para escribir el ALV.

FORM write_report.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = repname
i_save = 'A'
is_layout = layout
it_fieldcat = gt_fieldcat[]
it_events = events[]
is_variant = variante
* it_sort = ordena
* it_filter = filter
i_callback_pf_status_set = formname_pf_status
i_callback_user_command = formname_user_command
i_bypassing_buffer = 'X'
i_buffer_active = 'X'
TABLES
t_outtab = it_alv
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
WRITE: 'SY-SUBRC: ', sy-subrc, 'REUSE_ALV_LIST_DISPLAY'.
ENDIF.


Este es el código que utilizó para llenar el fieldcat, pongo el ejemplo de la variable MATNR.

*Material
CLEAR: l_fieldcat, fieldcat_ln.
fieldcat_ln-seltext_l = ' Material '.
fieldcat_ln-fieldname = 'MATNR'.
fieldcat_ln-tabname = 'TI_ALV'.
fieldcat_ln-inttype = 'C'.
fieldcat_ln-intlen = 18.
APPEND fieldcat_ln TO gt_fieldcat.


Muchísimas gracias de antemano, esperando que alguién me pueda ayudar.

Saludos cordiales a todos.

ibecerra 23/09/08 12:51:25

hola yo lo hago de esta manera y me funciona bien

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_repid
i_structure_name = 'TI_ORDENES' ---> te falta esto
is_layout = gs_layout
it_fieldcat = gt_fieldcat[]
i_save = g_save
* is_variant = g_variant
it_events = gt_events[]
is_print = gs_print
TABLES
t_outtab = TI_ORDENES
EXCEPTIONS
program_error = 1
OTHERS

yozgart 23/09/08 17:35:41

Solución encontrada.
 
Antes que nada, muchísimas gracias a Israel, que si no fuese por su asesoría, no hubiese encontrado esta solución.

Les adhiero aquí el código con el que me funcionarón los filtros.

Primero, el llamado de la función de ALV quedó como sigue.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = repname
i_save = 'A'
i_structure_name = 'IT_ALV'
is_layout = layout
it_fieldcat = gt_fieldcat[]
it_events = events[]
is_variant = variante
it_sort = ordena
it_filter = filter
i_callback_pf_status_set = formname_pf_status
i_callback_user_command = formname_user_command
i_bypassing_buffer = 'X'
i_buffer_active = 'X'
TABLES
t_outtab = it_alv
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
WRITE: 'SY-SUBRC: ', sy-subrc, 'REUSE_ALV_LIST_DISPLAY'.
ENDIF.

El fieldcat es muy amplio, así que solo colocaré uno ejemplo.

*Cant x Comp
CLEAR: l_fieldcat, fieldcat_ln.
fieldcat_ln-fieldname = 'INPCOM'.
fieldcat_ln-tabname = 'IT_ALV'.
fieldcat_ln-key = 'X'.
fieldcat_ln-seltext_s = ' Cant x Comp '.---┐
fieldcat_ln-seltext_m = ' Cant x Comp '.---┼-- Estos tres campos los tienes que colocar
fieldcat_ln-seltext_l = ' Cant x Comp '.---┘
fieldcat_ln-reptext_ddic = ' Cant x Comp '.
fieldcat_ln-ref_tabname = 'ZMXSD005'. -- > Esta tabla es la que utilizó para llenar la tabla del ALV.
fieldcat_ln-ref_fieldname = 'INPCOM'. -- > Campo referencia.
APPEND fieldcat_ln TO gt_fieldcat.

Muchísimas gracias Israel.

ibecerra 23/09/08 18:15:39

por nada socio, estamos para apoyarnos

ccpmad 29/04/09 07:39:27

El problema se soluciona marcando con 'X' el campo LOWERCASE del fieldcat.

Un saludo.

FuryNocturn 29/11/17 10:01:16

el problema también puede derivar si la tabla tiene registros en minúscula, sap al escribir el en el filtro el internamente lo que escribes lo pone en mayúsculas por el motivo de no mostrar ningún resultado, tendrás que ir rellenando toda la tabla en mayúsculas.


Husos Horarios son GMT. La hora en este momento es 08:23:44.

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