Skip to content

Latest commit

 

History

History
44 lines (27 loc) · 1.29 KB

File metadata and controls

44 lines (27 loc) · 1.29 KB

API Release Framework

Find out how to set the API state.

Setting and getting API states programmatically is supported for the following objects:

  • Classes (IF_XCO_AO_CLASS)

  • Entities of data definitions (IF_XCO_CDS_ENTITY)

  • Domains (IF_XCO_DOMAIN)

  • Data elements (IF_XCO_AD_DATA_ELEMENT)

  • Function modules of function groups (IF_XCO_FUNCTION_MODULE)

  • Interfaces (IF_XCO_AO_INTERFACE)

  • Structures (IF_XCO_AD_STRUCTURE)

  • Database tables (IF_XCO_DATABASE_TABLE)

  • Table types (IF_XCO_AD_TABLE_TYPE)

  • Transformations (IF_XCO_TRANSFORMATION)

Each of the above interfaces defines the two methods SET_API_STATE and GET_API_STATE to programmatically set or get the API state of the represented object. For data elements, for example, this looks like:

Sample Code:

DATA(lo_transport) = xco_cp_cts=>transport->for( '...' ).
DATA(lo_api_state) = xco_cp_ars=>api_state->released( VALUE #( ( xco_cp_ars=>visibility->sap_cloud_platform ) ) ).
 
DATA(lo_data_element) = xco_cp_abap_repository=>object->dtel->for( 'ZMY_DATA_ELEMENT' ).
lo_data_element->set_api_state(
  io_change_scenario = lo_transport
  io_api_state       = lo_api_state
).