|
#1
|
|||
|
|||
Note 570051 - CX_SY_CONVERSION_CODEPAGE exception during TRANSFER
Hola:
Encontre esta nota en SAP, espero que te ayude. Summary Symptom An CX_SY_CONVERSION_CODEPAGE exception is triggered when data is written to a file using TRANSFER even though the file was opened with OPEN DATASET ... IGNORING CONVERSION ERRORS. Other terms Conversion error, multibyte code page, multibyte characters Reason and Prerequisites When data is written to files, characters may have to be converted because the file exists in a code page other than the code page used internally by the system that is running (system code page).Errors can naturally occur during conversion, for example, the character may not exist in the corresponding target code page or a character is invalid. In the latter, it may be a case that a field contains a truncated multibyte character in a multibyte code page because, for example, the field was not large enough to hold all of the character bytes. Errors detected during conversion result in the CX_SY_CONVERSION_CODEPAGE exception. You can prevent the exception from being triggered by using the IGNORING CONVERSION ERRORS addition with the OPEN DATASET. Due to a programming error, you cannot prevent the exception from being triggered in the case of truncated multibyte characters. Solution A patch is available. Patch comment: TRANSFER of broken characters 6.20 patch level: 463 Header Data Release Status: Released on: 11.11.2002 08:46:58 Master Language: Alemán Priority: Category: Primary Component: BC-ABA-LA Affected Releases |
#2
|
|||
|
|||
A ver si no he entendido mal, esto es una interfase
Lo que te esta diciendo el dump es que en el fichero (o cualquier otro contenedor de datos ) que viene de la interfase hay algun caracter que no puede interpretar Tienes que averiguar cual es el caracter que no puede interpretar y te esta dando el dump, para ello puedes ir a la transaccion SCP visualizar el codepage origen y el codepage destino y ver que caracteres existen en el origen que no estan en el destino Para corregir esto se puede hacer de varias maneras Si es posible y no afecta en los ficheros destino cuando abras el dataset hazlo con ENCODING DEFAULT para ver si asi se lo traga Si lo anterior no funciona lo que tendras que hacer es tratar el fichero origen y eliminar los caracteres que sean invalidos, hace poco alguien en este foro expuso un problema parecido en el que cuando venia una e con acento en el fichero le daba un dump, la solucion fue tratar la cadena y eliminar (o sustituir ) el caracter invalido Si quieres ver una manera de sustituir caracteres invalidos de una cadena echa un vistazo a este post |
#3
|
|||
|
|||
Continua El Error Pero En Otra Lugar
PUEDO EJECUTAR EL Z, PERO ME SALE UN MENU CON UNOS BOTENES
EDITAR Y GUARDAR, SI LOS PRESIONO ME SALE ESTO.- Anál.errores An exception occurred that is explained in detail below. The exception, which is assigned to class 'CX_SY_CONVERSION_CODEPAGE', was not caught and therefore caused a runtime error. The reason for the exception is: Characters are always displayed in only a certain codepage. Many codepages only define a limited set of characters. If a text from a codepage should be converted into another codepage, and if this text contains characters that are not defined in one of the two codepages, a conversion error occurs. Moreover, a conversion error can occur if one of the needed codepages '4110' or '4102' is not known to the system. If the conversion error occurred at read or write of screen, the file name was '/home/anonimo/'. (further information about the file: "X 162 4096rwxrwxrwx201001151316022010011509412520100115094125") Falta tratamiento de excepción de sistema Programa ZUNIXEDI Posición desencadenante de excepción Programa ZUNIXEDI Include ZUNIXEDI Línea 61 Nombre módulo START-OF-SELECTION +++++++++++++++++++++++++++++++++++++++++++++++++++++ 31 INITIALIZATION. 32 PROGRAM = 'C:\WINDOWS\NOTEPAD.EXE'. 33 FILETEMP = 'C:\WINDOWS\TEMP\SAPTEMP.TXT'. 34 STATUS = '0'. 35 36 START-OF-SELECTION. 37 38 *------------------------UNIX-->PC-------------------------------------* 39 * SUBMIT ZUNIX-PC 40 * WITH INFILE = INFILE 41 * WITH OUTFILE = 'C:\WINDOWS\TEMP\SAPTEMP.TXT' 42 * WITH MENSAJE = 'NO' 43 * AND RETURN. 44 45 IF STATUS <> '0'. 46 INFILE = INFILE2. 47 OUTFILE = OUTFILE2. 48 ENDIF. 49 50 *{ REPLACE SBXK900051 1 51 *\ OPEN DATASET INFILE FOR INPUT IN TEXT MODE. "MESSAGE MSG_TEXT. 52 OPEN DATASET INFILE FOR INPUT IN TEXT MODE encoding default. 53 *"MESSAGE MSG_TEXT. 54 *} REPLACE 55 56 IF SY-SUBRC NE 0. 57 MESSAGE A703 WITH INFILE. 58 ENDIF. 59 60 DO. >>>> READ DATASET INFILE INTO ARCHIVO. 62 IF SY-SUBRC NE 0. 63 EXIT. 64 ENDIF. 65 APPEND ARCHIVO. 66 ENDDO. 67 68 CALL FUNCTION 'WS_DOWNLOAD' 69 EXPORTING 70 FILENAME = FILETEMP 71 FILETYPE = 'ASC' 72 IMPORTING 73 FILELENGTH = LARGO 74 TABLES 75 DATA_TAB = ARCHIVO 76 EXCEPTIONS 77 FILE_OPEN_ERROR = 01 78 FILE_WRITE_ERROR = 02 79 INVALID_FILESIZE = 03 ******************************************************* Anál.errores An exception occurred that is explained in detail below. The exception, which is assigned to class 'CX_SY_FILE_OPEN', was not caught in procedure "UNIX_PC" "(FUNCTION)", nor was it propagated by a RAISING clause. Since the caller of the procedure could not have anticipated that the exception would occur, the current program is terminated. The reason for the exception is: The file with the name "/home/anonimo/" cannot be opened because it is already open . Falta cláusula RAISING en interface Programa SAPLZ001 Include LZ001U01 Línea 1 Tp.módulo (FUNCTION) Nombre módulo UNIX_PC Posición desencadenante de excepción Programa SAPLZ001 Include LZ001U01 Línea 27 Tp.módulo (FUNCTION) Nombre módulo UNIX_PC 1 FUNCTION UNIX_PC. 2 *"---------------------------------------------------------------------- 3 *"*"Interfase local 4 *" IMPORTING 5 *" VALUE(INFILE) 6 *" VALUE(OUTFILE) 7 *" VALUE(TYPE) 8 *" EXCEPTIONS 9 *" UNIX_FILE_OPEN_ERROR 10 *" WS_INVALID_FILESIZE 11 *" WS_INVALID_TABLE_WIDTH 12 *" WS_INVALID_TYPE 13 *" WS_NO_BATCH 14 *" WS_UNKNOWN_ERROR 15 *"---------------------------------------------------------------------- 16 17 DATA: BEGIN OF ARCHIVO OCCURS 100, 18 LINEA(560) TYPE C, 19 END OF ARCHIVO. 20 *{ INSERT PRDK901812 3 21 constants MAXLINES type I value 500. 22 data: lineas type i, 23 flag type i, 24 modo(1) type c. 25 *} INSERT 26 >>>> OPEN DATASET INFILE FOR INPUT IN TEXT MODE ENCODING DEFAULT. " MESSAGE MSG_TEXT. 28 29 IF SY-SUBRC NE 0. 30 RAISE UNIX_FILE_OPEN_ERROR. 31 ENDIF. 32 33 *{ DELETE PRDK901812 1 34 *\ DO. 35 *\ READ DATASET INFILE INTO ARCHIVO. 36 *\ IF SY-SUBRC NE 0. 37 *\ EXIT. 38 *\ ENDIF. 39 *\ APPEND ARCHIVO. 40 *\ ENDDO. 41 *\ 42 *\ CALL FUNCTION 'DOWNLOAD' 43 *\ EXPORTING 44 *\ FILENAME = OUTFILE 45 *\ FILETYPE = TYPE 46 *\ TABLES ****************************************************** |
#4
|
|||
|
|||
nombre erroneo
Hola, me da la impresion de que no le estas indicando el nombre del fichero, es decir lo que le esta llegando a la instruccion open data set es:"/home/anonimo/" Que es una carpeta. lo que debe de llegar es el nombre de un fichero, es decir "/home/anonimo/mifichero.txt"
Saludos.
__________________
el tema esta en hacer la pregunta correcta... |
Herramientas | Buscar en Tema |
Desplegado | |
|
|