|
#1
|
|||
|
|||
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 |
Herramientas | Buscar en Tema |
Desplegado | |
|
|