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 03/12/09, 12:38:33
yapbig yapbig is offline
Senior Member
 
Fecha de Ingreso: may 2007
Localización: San Nicolás, Argentina
Mensajes: 261
Data Set

Tengo que leer y procesar un archivo plano con longitud variable con tabulación para la separación de campos, pero el proceso me cancela cuando intenta hacer el READ de c/u de las líneas para insertarlas en una tabla interna.
El error que me está dando dice algo del juego de caracteres, como que no pude interpretar determinado caracter y convertirlo. ¿Aguna idea?

OPEN DATASET pFile FOR INPUT IN LEGACY TEXT MODE CODE PAGE '4110' . " '4103'.

IF SY-SUBRC <> 0.
MESSAGE E000(ZFI_RET) with pfile.
ENDIF.

DO.
READ DATASET pfile INTO recline.
append recLine to REC_AUX.
IF sy-subrc <> 0.
EXIT.
ENDIF.
ENDDO.


Texto breve
A character set conversion is not possible.



¿Qué ha sucedido?
At the conversion of a text from codepage '4110' to codepage '4103':

- a character was found that cannot be displayed in one of the two
codepages;
- or it was detected that this conversion is not supported

The running ABAP program 'ZFI_RET_UPDEXENCION' had to be terminated as the
conversion
would have produced incorrect data.

The number of characters that could not be displayed (and therefore not
be converted), is 1. If this number is 0, the second error case, as
mentioned above, has occurred.



¿Qué puede hacer?
Please make a note of the actions and input which caused the error.
-

To resolve the problem, contact your
SAP system administrator.

With transaction ST22 for the ABAP dump analysis, you can analyze and
administrate termination messages, or store them for a longer time
period.

If you were requested by the application to enter a codepage, the
termination may be avoided after the restart of the application if you
enter a different codepage.

If characters could not be converted: Please use transaction SCP to
analyse the codepages used by you. Search for characters you wanted to
convert, which are not entered in the table. (If you changed a codepage,
you can use transaction SP12 to invalidate the character set buffer
(CCC).

You find further help tools to codepages in transaction SNLS.





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 in
procedure "CARGAR_ARCHIVO" "(FORM)", 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:
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 '4103' is not known to the system.

If the conversion error occurred at read or write of screen, the file
name was '/home/exenciones/exenciones.txt'. (further information about the

file: "X 248 152976rwxrwx---200912030929092009120221320820091202213555")



Notas para corregir errores

If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:

"CONVT_CODEPAGE" "CX_SY_CONVERSION_CODEPAGE"
"ZFI_RET_UPDEXENCION" or "ZFI_RET_UPDEXENCION"
"CARGAR_ARCHIVO"


If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:

1. The description of the current problem (short dump)

To save the description, choose "System->List->Save->Local File
(Unconverted)".

2. Corresponding system log

Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
(Unconverted)".

3. If the problem occurs in a problem of your own or a modified SAP
program: The source code of the program
In the editor, choose "Utilities->More
Utilities->Upload/Download->Download".

4. Details about the conditions under which the error occurred or which
actions and input led to the error.

The exception must either be prevented, caught within proedure
"CARGAR_ARCHIVO" "(FORM)", or its possible occurrence must be declared in the
RAISING clause of the procedure.
To prevent the exception, note the following:



Propiedades fichero /home/exenciones/exenciones.txt
Autorizaciones rwxrwx---
Modificado el 02.12.2009 21:32:08
Último acceso 03.12.2009 09:29:09
Última modif.status 02.12.2009 21:35:55
Tam. 152976 Byte
Posición actual 248
__________________
Gustavo A. Biglia
Consultor SAP FI
Responder Con Cita
  #2  
Viejo 03/12/09, 13:11:05
ballan ballan is offline
Senior Member
 
Fecha de Ingreso: oct 2006
Mensajes: 671
Has probado a poner enconding default?
Responder Con Cita
  #3  
Viejo 03/12/09, 13:30:48
Avatar de mysmb2
mysmb2 mysmb2 is offline
Senior Member
 
Fecha de Ingreso: ene 2007
Localización: Cordoba
Mensajes: 406
al especificar el CODE PAGE '4110' estas determinando como leer el archivo a nivel de bytes, tal vez el archivo no respete este ordenamiento, proba quitando el adicional LEGACY y dejalo así
__________________
Sebastián Chiavia
Responder Con Cita
  #4  
Viejo 03/12/09, 13:37:54
yapbig yapbig is offline
Senior Member
 
Fecha de Ingreso: may 2007
Localización: San Nicolás, Argentina
Mensajes: 261
Seba:
Así estaba abierto el archivo originalmente y también cancelaba.
Ahora estoy probando con diferentes alternativas

* OPEN DATASET pFile FOR INPUT IN TEXT MODE ENCODING DEFAULT.
* OPEN DATASET pFile FOR INPUT IN TEXT MODE ENCODING UTF-8.
* OPEN DATASET pFile FOR INPUT IN LEGACY TEXT MODE CODE PAGE '4110'.

OPEN DATASET pFile FOR INPUT IN LEGACY TEXT MODE CODE PAGE '4110' . " '4103'.
__________________
Gustavo A. Biglia
Consultor SAP FI
Responder Con Cita
  #5  
Viejo 03/12/09, 13:43:33
yapbig yapbig is offline
Senior Member
 
Fecha de Ingreso: may 2007
Localización: San Nicolás, Argentina
Mensajes: 261
Les adjunto el archivo para que puedan analizarlo. Como ya comenté el error lo arroja al intentar leer el segundo registro

rg830.zip

Saludos, desde ya muchísimas gracias...
__________________
Gustavo A. Biglia
Consultor SAP FI
Responder Con Cita
  #6  
Viejo 03/12/09, 14:02:35
Avatar de DavidXD_XD
DavidXD_XD DavidXD_XD is offline
Moderator
 
Fecha de Ingreso: ago 2006
Localización: Lima - Perú
Mensajes: 1,251
Holas, una vez me sucedio algo parecido, tal vez puede q sea el atributo del programa, tiene activado el check de "Verif.unicode activa"?
__________________
David Carballido Córdova
Responder Con Cita
  #7  
Viejo 03/12/09, 14:14:24
yapbig yapbig is offline
Senior Member
 
Fecha de Ingreso: may 2007
Localización: San Nicolás, Argentina
Mensajes: 261
Sí, tiene ese check box activado. Sin el mismo no se activa el programa.
__________________
Gustavo A. Biglia
Consultor SAP FI
Responder Con Cita
  #8  
Viejo 04/12/09, 14:18:21
yapbig yapbig is offline
Senior Member
 
Fecha de Ingreso: may 2007
Localización: San Nicolás, Argentina
Mensajes: 261
Alguien tendrá alguna otra sugerencia sobre este tema.

Gracias....
__________________
Gustavo A. Biglia
Consultor SAP FI
Responder Con Cita
  #9  
Viejo 07/12/09, 16:14:54
yapbig yapbig is offline
Senior Member
 
Fecha de Ingreso: may 2007
Localización: San Nicolás, Argentina
Mensajes: 261
Siguiendo con este tema le saqué al archivo plano el primer registro de cabecera de título de campos y reemplazé en todos lados el caracter "é" por "e" y ahora se leen correctamente todos los registros del archivo sin ningún problema. Aún no sé si es por la cabecera que le saqué al archivo o por el caracter "é" que reemplacé, pero supongo que será por la segunda alternativa.
Ahora bien tengo todo esto en un línea cuyo separador de campor es el tab que en tiempo de ejecucución y debagueando el proceso me muestra como "#" el carácter numeral, pero no logro parsear este string con ninguna de las sentencias ABAP para lograr separar los valores en c/u de los campos correspondientes

La cadena de caracteres correspondientes es esta

2009-1-027-00019-2#20036915138#2009 #100#Regimen General#Definitivo con Provisorio#2776717 #09/10/2009#09/10/2009#31/05/2010

y las sentencias ABAP con las que estoy probando son: REPLACE, SPLIT, FIND. Algunas diréctamente es como que no reconocen el carácter "#" y directamente no lo encuentras y otras que lo encuentra como el FIND, pero en el offset me devuelven simpre cero.

replace '#' with space into rec_aux-linea.

find FIRST OCCURRENCE OF ' ' in rec_aux-linea match offset vl_offset.
find FIRST OCCURRENCE OF ' ' in rec_aux-linea results vl_result.

SPLIT rec_aux-linea AT ' ' INTO: table rec.

La idea y lo que necesito es separar esta cadena de valores en 10 campos con sus valores correspondientes. En este caso en particular debería quedarme:
campo1 = 2009-1-027-00019-2
campo2 = 20036915138
campo3 = 2009
campo4 = 100
campo5 = Regimen General
campo6 = Definitivo con Provisorio
campo7 = 2776717
campo8 = 09/10/2009
campo9 = 09/10/2009
campo10 = 31/05/2010


Saludos y desde ya muchísimas gracias....
__________________
Gustavo A. Biglia
Consultor SAP FI
Responder Con Cita
  #10  
Viejo 07/12/09, 18:20:24
yapbig yapbig is offline
Senior Member
 
Fecha de Ingreso: may 2007
Localización: San Nicolás, Argentina
Mensajes: 261
Pude comprobar definitivamente que el caracter que no reconoce el sistema es el "é"
¿Alguien sabe que es lo que puedo hacer para que deje de cancelar este proceso y no tener que pedirle al usuario o al responsable de BAISIS que antes de subir el archivo al servidor Linux x86_64 reemplace el caracter "é" por "e"?

Desde ya muchas gracias...
__________________
Gustavo A. Biglia
Consultor SAP FI
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 07:08:44.


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