MUNDOSAP

MUNDOSAP (foro/index.php)
-   Programación ABAP IV (foro/forumdisplay.php?f=4)
-   -   Conversión Hexadecimal a Char. (foro/showthread.php?t=13900)

larmadovr 03/06/08 16:30:22

Conversión Hexadecimal a Char.
 
Que tal amigos:

Alguien sabe de alguna función para hacer esta conversión??

Desde ya muchas gracias.

Alfredosite 03/06/08 18:50:58

re:
 
Hola encontre esto en al red espero te siva en algo.

Saludos.

ibecerra 03/06/08 22:36:43

Esta funcion convierte a caracter ascii y hexadecimal

FUNCTION Z_CHARACTER_TO_ASCII_CODE.
*"----------------------------------------------------------------------
*"*"Interfase local
*" IMPORTING
*" REFERENCE(FI_CHARACTER) TYPE C
*" EXPORTING
*" REFERENCE(FE_ASCII_CODE_DEC) TYPE I
*" REFERENCE(FE_ASCII_CODE_HEX) TYPE C
*"----------------------------------------------------------------------
field-symbols <FS> type x.
*Have to use CASTING here to purposely force SAP to convert the
*character to an equivalent HEX value (using ASCII chart).
*Note that CASTING feature is not available prior release 4.6
assign fi_character(1) to <FS> casting.
*The type of the destination field will cause SAP to determine which
*type (Decimal/Hexadecimal) of ASCII code should be converted:
* X -> I gives Dec value
* X -> C gives Hex value
fe_ascii_code_dec = <FS>.
fe_ascii_code_hex = <FS>.



ENDFUNCTION.

larmadovr 03/06/08 23:13:35

Muchas gracias Ibecerra.
 
Voy a probar la función, después te cuento como me va...

Saludos.


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

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