Ver Mensaje Individual
  #2  
Viejo 29/01/07, 15:45:57
Txelian Txelian is offline
Junior Member
 
Fecha de Ingreso: nov 2006
Localización: Madrid
Mensajes: 12
Wink

Te paso un código de una función Z.

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.
Responder Con Cita