Method CONVERT_AGENCY_EXT2INT
Function
Method CONVERT_AGENCY_EXT2INT offers a function for converting combinations of cct:identifier attributes schemeAgencyID, schemeAgencySchemeID and SchemeAgencySchemeAgencyID 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_SAGENCY_ID |
This optional parameter passes the value of attribute schemeAgencyID to the method. |
|
Import |
IV_CCT_SASCHEME_ID |
This optional parameter passes the value of attribute schemeAgencySchemeID to the method. |
|
Import |
IV_CCT_SASAGENCY_ID |
This optional parameter passes the value of attribute schemeAgencySchemeID to the method. |
|
Return |
RV_AGENCY_ID |
In this parameter, the method passes the Raw16 ID it assigned for the attribute combination. |
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_AGENCY_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_AGENCY_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 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' ). 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.