#1
|
|||
|
|||
Problemas Con Rh_start_excel_with_data
Hola, estoy intentando volcar la informacion de una tabla interna, que previamente visualizo con un alv, a una tabla excel. Pero la funcion me da un dump en tiempo de ejecución. Me podríais echar un mano. Adjunto código. Muchas gracias.
DATA:BEGIN OF i_mara OCCURS 0. INCLUDE STRUCTURE mara. DATA: END OF i_mara. DATA: fichero TYPE string. fichero ='C:\Documents and Settings\rmrodriguez\Escritorio\prueba.xls'. CALL FUNCTION 'RH_START_EXCEL_WITH_DATA' EXPORTING DATA_FILENAME = fichero * DATA_PATH_FLAG = 'W' * DATA_ENVIRONMENT = DATA_TABLE = i_mara * MACRO_FILENAME = * MACRO_PATH_FLAG = 'E' * MACRO_ENVIRONMENT = * WAIT = 'X' * DELETE_FILE = 'X' * CODEPAGE = * EXCEPTIONS * NO_BATCH = 1 * EXCEL_NOT_INSTALLED = 2 * INTERNAL_ERROR = 3 * CANCELLED = 4 * DOWNLOAD_ERROR = 5 * NO_AUTHORITY = 6 * FILE_NOT_DELETED = 7 * OTHERS = 8 . IF sy-subrc <> 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF. Gracias de nuevo. |
#2
|
|||
|
|||
Nos pegas el DUMP ???
Saludos.
__________________
Lo importante no es saber sino saber quien es el que sabe |
#3
|
|||
|
|||
Aquí os dejo el dump.
También he probado poniendo en i_mara como i_mara[], en cuyo caso se ejecuta entero y da error interno desconocido en funcion gui_download... Texto breve Type conflict when calling function module "RH_START_EXCEL_WITH_DATA". Anál.errores An exception occurred that is explained in detail below. The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was not caught and therefore caused a runtime error. The reason for the exception is: You attempted to pass the field "DATA_TABLE" to the formal parameter "DATA_TABLE" but the formal parameter "DATA_TABLE" can accept only fields of type "h". The field "DATA_TABLE" has the type "u". Falta tratamiento de excepción de sistema Programa ZPRUEBA3 Posición desencadenante de excepción Programa ZPRUEBA3 Include ZPRUEBA3 Línea 121 Nombre módulo END-OF-SELECTION |
#4
|
|||
|
|||
Me parece que el problema es que pasaste una tabla que tiene Header line y eso no lo comprende la funcion. Proba declarar la tabla con "type of table".
Saludos. Javier
__________________
Lo importante no es saber sino saber quien es el que sabe |
#5
|
|||
|
|||
disculpa , la sentencia para declarar la tabla seria :
data : i_mara type table of MARA. Saludos.
__________________
Lo importante no es saber sino saber quien es el que sabe |
#6
|
|||
|
|||
Muchas gracias, pero no funciona. Intentaré con otra función.
Muchas gracias. |
Herramientas | Buscar en Tema |
Desplegado | |
|
|