I have built an unmanaged application using the ABAP RESTful Programming Model using the Flight Reference scenario.
No data is shown in the table in the object page which is supposed to show bookings for a travel.
When checking the SAP Gateway Error Log I found the following error message:
Backend Error: Duplicate resource, Service:/SAP/-ZUI_RAP_TRAVEL_U_O2_1234-0001
The source code extract was
IF lv_count = 0. " check whether this is a navigation: Lv_count = 0 is allowed for associations with target cardinality 0..1 " Probably the 100% correct behavior would be to throw an exception if the association has cardinality 'to 1' and not throw " it for cardinality 'to 0..1'. But interpreting the model is pretty complicated (association, navi property, association set, " left or right-end cardinality, ... IF ls_entity_path-navigation_steps IS INITIAL. RAISE EXCEPTION TYPE /iwbep/cx_mgw_busi_exception EXPORTING textid = /iwbep/cx_mgw_busi_exception=>resource_not_found entity_type = _get_type_name( ls_entity_path-entity_name ) http_status_code = /iwbep/cx_mgw_busi_exception=>gcs_http_status_codes-not_found. ENDIF. ELSEIF lv_count > 1. RAISE EXCEPTION TYPE /iwbep/cx_mgw_busi_exception EXPORTING textid = /iwbep/cx_mgw_busi_exception=>resource_duplicate entity_type = _get_type_name( ls_entity_path-entity_name ). ENDIF.