Hey all,
I have a function import and want to expand the answer by some entities. The URL is accepted just fine, but no method is called for the $expand option (neither entry_getentity, nor entry_getentityset). The URL is:
/sap/opu/odata/sap/ZCATALOG_RFC_SRV/Catalog?department='ZDEP1'&store='0001'&$expand=Entries
There is a 1:M association between the two entities and a navigation property is set.
When I debug the code I see that the problem is in
/IWBEP/CL_MGW_ABS_DATA->/IWBEP/IF_MGW_CORE_SRV_RUNTIME~EXEC_SERVICE_OPERATION, line 156:
IF lo_expand_root->get_no_conversion( ) = abap_false. [...] CASE lv_multiplicity. [...] IF lv_expand_string IS NOT INITIAL. *-------------expand the entity (recursively if required) expand_entity( EXPORTING io_expand_node = lo_expand_root iv_source_entity_type = lv_entity_type iv_tech_source_entity_type = lv_tech_entity_type iv_tech_source_entity_set = ls_request_context-technical_request-target_entity_set CHANGING cs_entity = <ls_target_structure> ). ENDIF. [...] ENDCASE. ENDIF.
Apparently lo_expand_root->get_no_conversion( ) returns abap_true and therefore the expand doesn't take place. While debugging I didn't understand what get_no_conversion even does! Did anyone get an expand to work with function imports?
Thanks,
Marcus