Interface ID_UKM_ATTRIBUTE_CONVERT
Meaning
As part of the Unified Key Mapping Service (UKMS), interface IF_UKM_ATTRIBUTE_CONVERT provides methods that permit you to convert cct:identifier attributes into Universal Unique Identifiers (UUIDs) and to convert them back again.
Use
Class CL_UKM_FACTORY provides context-dependent instances of the interface.
Example
* Reference to the common ukms exception class DATA: lx_ukm_exception TYPE REF TO cx_ukm_exception. TRY. * Reference to the conversion interface DATA: lr_conv TYPE REF TO if_ukm_attribute_convert. * Retrieve the context dependent interface instance CALL METHOD cl_ukm_factory=>get_instance_attribute_convert EXPORTING iv_main_context_id = 'MyContext' iv_runtime_generated_context = abap_true IMPORTING er_if_ukm_attribute_convert = lr_conv. * GUID (raw16) for internal agency DATA: lv_int_agency TYPE ukm_e_agency_id. * Convert a combination of schemeAgencyID + schemeAgencySchemeID + * schemeAgencySchemeAgencyID to an internal agency lv_int_agency = lr_conv->convert_agency_ext2int( iv_cct_sagency_id = 'AE1_000' iv_cct_sascheme_id = '' iv_cct_sasagency_id = 'ZZZ' ). * schemeAgencyID + schemeAgencySchemeID + schemeAgencySchemeAgencyID DATA: lv_cct_sagency_id TYPE ukm_e_cct_id_sa_id, lv_cct_sascheme_id TYPE ukm_e_cct_id_sas_id, lv_cct_sasagency_id TYPE ukm_e_cct_id_sasa_id. * Convert an internal agency back to the combination of * schemeAgencyID + schemeAgencySchemeID + schemeAgencySchemeAgencyID CALL METHOD lr_conv->convert_agency_int2ext EXPORTING iv_agency_id = lv_int_agency CHANGING cv_cct_sagency_id = lv_cct_sagency_id cv_cct_sascheme_id = lv_cct_sascheme_id cv_cct_sasagency_id = lv_cct_sasagency_id. * GUID (raw16) for internal scheme DATA: lv_int_scheme TYPE ukm_e_agency_id. * Convert a combination of schemeID + schemeVersionID * to an internal scheme lv_int_scheme = lr_conv->convert_scheme_ext2int( iv_cct_scheme_id = 'ProductID' iv_cct_sversion_id = '' ). * schemeID + schemeVersionID DATA: lv_cct_scheme_id TYPE ukm_e_cct_id_s_id, lv_cct_sversion_id TYPE ukm_e_cct_id_sv_id. * Convert an internal scheme back to the combination of * schemeID + schemeVersionID CALL METHOD lr_conv->convert_scheme_int2ext EXPORTING iv_scheme_id = lv_int_scheme CHANGING cv_cct_scheme_id = lv_cct_scheme_id cv_cct_sversion_id = lv_cct_sversion_id. CATCH cx_ukm_context_unknown INTO lx_ukm_exception. * If iv_runtime_generated_context is set to false, the specified * main context id has to be customized. * If iv_runtime_generated_context is set to true, * the system has to allow the generation of database tables. DATA: lv_error_text TYPE string. lv_error_text = lx_ukm_exception->if_message~get_text( ). CATCH cx_ukm_conversion_failed INTO lx_ukm_exception. * The internal scheme or agency could not be found or another serious * exception during conversion occurred. DATA: lv_failure_text TYPE string. lv_failure_text = lx_ukm_exception->if_message~get_text( ). ENDTRY.
Additional Information
For details about the functions of interface IF_UKM_ATTRIBUTE_CONVERT, see the relevant method documentation.
UKMS provides additional interfaces that can be instantiated with class CL_UKM_FACTORY. These are also documented. You can find an overview of the interfaces in the documentation for class CL_UKM_FACTORY.