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 23/04/09, 16:27:35
sykey sykey is offline
Junior Member
 
Fecha de Ingreso: jul 2006
Mensajes: 17
Thumbs up Solucion a concatenar dos hexadecimales

Espero que te sea de utilidad.

* Convert XString to String
data: loc_conv type ref to CL_ABAP_CONV_IN_CE,
loc_xstring type xstring,
loc_xstring1 type string,
loc_xstring2 type string,

loc_string type string.


loc_xstring1 = '5061736F0D0A5061736F0D0A'.
loc_xstring2 = '0D0A0D0A5061736F0D0A5061736F0D0A'.
concatenate loc_xstring1 loc_xstring2 into loc_xstring1.

loc_xstring = loc_xstring1.

CALL METHOD CL_ABAP_CONV_IN_CE=>CREATE
EXPORTING
INPUT = loc_xstring
ENCODING = 'UTF-8'
REPLACEMENT = '?'
IGNORE_CERR = ABAP_TRUE
RECEIVING
CONV = loc_CONV.

TRY.
CALL METHOD loc_CONV->READ
IMPORTING
DATA = loc_string.
CATCH CX_SY_CONVERSION_CODEPAGE.
*-- Should ignore errors in code conversions
CATCH CX_SY_CODEPAGE_CONVERTER_INIT.
*-- Should ignore errors in code conversions
CATCH CX_PARAMETER_INVALID_TYPE.
CATCH CX_PARAMETER_INVALID_RANGE.



ENDTRY.
write loc_string(4).
write loc_string.

PD. la parte de convertir de hexadecimal a caracter lo he sacado de otra web.

Saludos, SyKeY
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:00:18.


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