avatar image
Former Member



I implemented a Sap netweaver gateway service in segw based on cds view in release 7.4. Service works fine. Now I wanted to implement Unit-Test like described here:

Integration With Unit Test Framework

My Unit test is here:

"$. Region Arrange
DATA: mo_data_provider          TYPE REF TO zcl_rech_pap_dpc_ext,

      ms_request_context_struct TYPE /iwbep/cl_mgw_request_unittst=>ty_s_mgw_request_context_unit.

ms_request_context_struct-technical_request-source_entity_type = 'Dokumentenklasse'.
ms_request_context_struct-technical_request-target_entity_type = 'Dokumentenklasse'.
ms_request_context_struct-technical_request-source_entity_set = 'Dokumentenklassen'.
ms_request_context_struct-technical_request-target_entity_set = 'Dokumentenklassen'.

*instantiate the Data Provider
CREATE OBJECT mo_data_provider .

DATA(mo_request_context_object) = mo_data_provider->/iwbep/if_mgw_conv_srv_runtime~init_dp_for_unit_test( ms_request_context_struct ).
"$. Endregion Arrange

"$. Region Act
      EXPORTING io_tech_request_context      = mo_request_context_object
      IMPORTING er_entityset                 = DATA(e_tab_result)
                es_response_context          = DATA(e_str_context) ).
"$. Endregion Act

"$. Region Assert
cl_abap_unit_assert=>assert_not_initial( act = e_tab_result
                                         msg = 'Keine Dokumentenklassen gefunden' ).
"$. Endregion Assert<br>

I get this error: 'Modell "OBJECT_MODEL_NAME", Version "OBJECT_MODEL_VERSION", nicht gefunden'

Anybody any idea?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers

Skip to Content