2025 Oct 06 4:56 PM
I want to query the API States (contracts) of function modules.
How can I do it?
Thanks
Sandra
2025 Oct 06 4:56 PM - edited 2025 Oct 06 4:57 PM
You may do this query:
SELECT *
FROM ars_w_api_state
WHERE sub_object_type = 'FUNC'
INTO TABLE (function_module_api_states).Result:
Sandra_Rossi_0-1759764939700.png
Verification for BAPI_CONVERSION_EXT2INT1:
Sandra_Rossi_1-1759764986741.png
The released API to read the API State of a given function module is:
DATA(function_module) = xco_cp_abap_repository=>object->fugr->for( 'BACV'
)->function_module( 'BAPI_CONVERSION_EXT2INT1' ).
DATA(api_state) = function_module->get_api_state( ).
DATA(release_state) = api_state->get_release_state( ).
ASSERT release_state->value = 'RELEASED'.
2025 Oct 06 4:56 PM - edited 2025 Oct 06 4:57 PM
You may do this query:
SELECT *
FROM ars_w_api_state
WHERE sub_object_type = 'FUNC'
INTO TABLE (function_module_api_states).Result:
Sandra_Rossi_0-1759764939700.png
Verification for BAPI_CONVERSION_EXT2INT1:
Sandra_Rossi_1-1759764986741.png
The released API to read the API State of a given function module is:
DATA(function_module) = xco_cp_abap_repository=>object->fugr->for( 'BACV'
)->function_module( 'BAPI_CONVERSION_EXT2INT1' ).
DATA(api_state) = function_module->get_api_state( ).
DATA(release_state) = api_state->get_release_state( ).
ASSERT release_state->value = 'RELEASED'.
2025 Oct 07 4:49 PM
This is a great post, Sandra. Thanks for sharing this information. Last year I used the mentioned DB Table to create a program to scan CDS view code looking for DB Table usage and then highlight if the CDS view was released or not. This because where-used-list doesn't work accordingly for CDS views.
Anyways, just to compliment this post, I'd like to add following CDS views which are very useful in Public Cloud to find a list of APIs released for Cloud and Objects with their corresponding successor:
I_APIsForCloudDevelopment
I_APIsWithCloudDevSuccessor