Method CONVERT_SCHEME_INT2EXT

Function

Method CONVERT_SCHEME_INT2EXT is the opposite of method CONVERT_SCHEME_EXT2INT. It offers a function to convert Raw16 IDs that were previously converted back to the original combination of cct:identifier attributes schemeID and SchemeVersionID.

Parameters

Type

Name

Description

Import

IV_SCHEME_ID

This parameter passes the value of the Raw16 ID to the method.

Changing

CV_CCT_SCHEME_ID

This parameter passes the value of the cct:identifer attribute schemeID belonging to the passed Raw16 ID IV_SCHEME_ID.

Changing

CV_CCT_SVERSION_ID

This parameter passes the value of the cct:identifer attribute schemeID belonging to the passed Raw16 ID IV_SCHEME_ID.

Exceptions

Exception CX_UKM_CONVERSION_FAILED is triggered if an error occurs during the conversion. In this case the passed Raw16 ID IV_SCHEME_ID was not found and thus was not converted into the cct:identifier attribute.

Notes

If import parameter IV_SCHEME_ID was passed as initial, the cct:identifier attributes are returned as initial. In this case no exception of type CX_UKM_CONVERSION_FAILED is triggered.

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 scheme
    DATA: lv_int_scheme TYPE ukm_e_agency_id value '47110815471108154711'.
*   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.
    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.
    DATA: lv_failure_text TYPE string.
    lv_failure_text = lx_ukm_exception->if_message~get_text( ).
ENDTRY.