MUNDOSAP

MUNDOSAP (foro/index.php)
-   Programación ABAP IV (foro/forumdisplay.php?f=4)
-   -   Ayuda ALV Oo - REUSE_ALV_FIELDCATALOG_MERGE - Urgente!!! (foro/showthread.php?t=27848)

miguel.esteban.martin 04/02/09 14:45:53

Ayuda ALV Oo - REUSE_ALV_FIELDCATALOG_MERGE - Urgente!!!
 
alguien me podria esplicar el funcionamiento de esta funcion.
cuando la tengo que llamar y como si estoy usando un alv Oo

DavidXD_XD 04/02/09 15:00:58

Hola, esta funcion sirve para poder llenar el catalogo de un ALV pero del tipo slis_t_fieldcat_alv, pero si estas usando objetos, tu catalogo debe ser del tipo lvc_t_fcat, y para poder llenarla con una funcion debes usar LVC_FIELDCATALOG_MERGE, espero te sirva la info ... :D

miguel.esteban.martin 04/02/09 15:07:47

ok muchas gracias voy a probrar

miguel.esteban.martin 04/02/09 15:20:43

me da un error.

"No es posible determinar un catalogo de campo"

este es mi codigo para que sea mas facil.

*Inicializar el container
IF g_custom_container IS INITIAL.
g_repid = sy-repid.
CREATE OBJECT g_custom_container
EXPORTING
container_name = 'MUESTRA_ALV'.
*Crear objeto
CREATE OBJECT g_grid
EXPORTING
i_parent = g_custom_container.
*Creo el manejador de eventos
CREATE OBJECT gr_event_handler.
SET HANDLER gr_event_handler->handle_double_click FOR g_grid.
SET HANDLER gr_event_handler->handle_hotspot_click FOR g_grid .
*Definicion de datos
PERFORM definir_alv.
PERFORM layout_alv.
.
*ALV GRID
CALL METHOD g_grid->set_table_for_first_display
EXPORTING
i_save = 'X'
i_default = 'X'
is_layout = gs_layout
CHANGING
it_outtab = i_cab_bulto[]
it_fieldcatalog = gt_fieldcat[].

CALL METHOD g_grid->set_toolbar_interactive.
ELSE.
CALL METHOD g_grid->refresh_table_display.
ENDIF.

*-------------------------------------------------------------
form definir_alv.
data ct_fieldcat type LVC_T_FCAT.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
* I_BUFFER_ACTIVE =
I_STRUCTURE_NAME = 'ZCS_CAB_BULTO'
* I_CLIENT_NEVER_DISPLAY = 'X'
* I_BYPASSING_BUFFER =
* I_INTERNAL_TABNAME =
CHANGING
ct_fieldcat = ct_fieldcat[]
* EXCEPTIONS
* INCONSISTENT_INTERFACE = 1
* PROGRAM_ERROR = 2
* OTHERS = 3
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

hanzzou 04/02/09 18:56:57

sera esto?
 
fijate la tabla que le pasas al alv no es la de la funcion que creas... Hace la variable global (ponela en el top) y usa el mismo nombre para el changing de la funcion merge y para la que pasas al alv.. seguro es eso.
Podes obviar los corchetes ([]) si los datos son tablas no habria problemas.


Husos Horarios son GMT. La hora en este momento es 18:32:29.

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