OData FW Logo

SADL

The Service Adaptation Definition Language or SADL feature was introduced with version 1.2.0 of this framework. And is used for the Analytical table in UI5.

The Service Adaptation Definition Language or SADL feature was introduced with version 1.2.0 of this framework. And is used for the Analytical table in UI5.

SADL XML

The SADL XML is automatically generated by the framework. No need to add there something manually.

Define Keys

Every dimension annoation will be a key in the SADL framework.

Example:

DATA(lo_entity_type_inv) = model->get_entity_type( 'invoicesDocuments' ).
lo_entity_type_inv->set_semantic( /iwbep/if_ana_odata_types=>gcs_ana_odata_semantic_value-query-aggregate ).

DATA(lo_property_inv) = lo_entity_type_inv->get_property( 'accountingArea' ).
DATA(lo_annotation_inv) =
    lo_property_inv->/iwbep/if_mgw_odata_annotatabl~create_annotation(
        /iwbep/if_mgw_med_odata_types=>gc_sap_namespace ).
lo_annotation_inv->add(
    iv_key   = /iwbep/if_ana_odata_types=>gcs_ana_odata_annotation_key-aggregation_role
    iv_value = /iwbep/if_ana_odata_types=>gcs_ana_odata_annotation_value-dimension-dimension ).

Structure

In the structure that is used for the entity you should create a property GENERATED_KEY in the ABAP and GeneratedKey in the odata customizing. The key value is generated by the SADL framework.

How it knows when to use SADL?

If you use the if_sadl_gw_dpc_util~get_dpc method that is shipped with the ZCL_ODATA_MAIN class, the framework will automatically use the SADL framework.

if_sadl_gw_dpc_util~get_dpc( )->get_entityset( 
    EXPORTING 
        io_tech_request_context = io_tech_request_context
    IMPORTING 
        et_data                 = lt_invoices
        es_response_context     = es_response_context ).