当前位置: 首页 > 工具软件 > CL-XML > 使用案例 >

SAP asXML-UUID映射为xml

冯玮
2023-12-01

1.代码

  • 注意 XSDUUID_CHAR 和 SYSUUID_C32 的变量对应关系,解析后两种数据类型生成的XML数据也有差异
    DATA: system_uuid TYPE REF TO if_system_uuid,
          uuid        TYPE xsduuid_char,
          uuid1       TYPE xsduuid_char,
          uuid2       TYPE xsduuid_char,
          uuid3       TYPE sysuuid_c32,
          xml_xstring TYPE xstring,
          exc_trafo   TYPE REF TO cx_transformation_error,
          exc_prev    TYPE REF TO cx_root,
          msg         TYPE string.
    
    FIELD-SYMBOLS <uuid1> TYPE any.
    FIELD-SYMBOLS <uuid2> TYPE sysuuid_c32.
    
    "获取UUID对象
    system_uuid = cl_uuid_factory=>create_system_uuid( ).
    
    TRY.
        "生成UUID
        uuid 
 类似资料: