Method CONVERT_SCHEME_EXT2INT
Function
Method CONVERT_SCHEME_EXT2INT offers a function to convert combinations of the cct:identifier attributes schemeID and schemeVersionID into a space-saving Raw16 ID. This assignment is stored in the background so that subsequent calls with the same attribute values or with the Raw16 ID return the same values.
Parameters
|
Type |
Name |
Description |
|---|---|---|
|
Import |
IV_CCT_SCHEME_ID |
This optional parameter passes the value of attribute schemeID to the method. |
|
Import |
IV_CCT_SVERSION_ID |
This optional parameter passes the value of attribute schemeVersionID to the method. |
|
Return |
RV_SCHEME_ID |
In this parameter, the method passes the Raw16 ID it assigned for the attribute combination. |
|
Changing |
CV_CCT_SASAGENCY_ID |
In this parameter the method passes the value of the cct:identifer attribute schemeAgencySchemeAgencyID belonging to the passed Raw16 ID IV_AGENCY_ID. |
Exceptions
Exception CX_UKM_CONVERSION_FAILED is triggered if an error occurs during the conversion. In this case the method cannot ensure that the Raw15 ID RV_SCHEME_ID was saved and can be found for future calls.
Notes
If all import parameters for cct:identifier attributes were passed as initial, the Raw16 ID RV_SCHEME_ID is 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. * 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 = '' ). 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.