URL Call from Gateway
/sap/opu/odata/sap/ZMU_SHOP_MENU_SRV/ShopMenuSet?$expand=Menu/Menu_Section/Menu_Content/Menu_Item_Deal/Deal_Articles/Article_Modifier/Modifier_Class/Modifier_Group/Modifier_Options,Menu/Menu_Section/Menu_Content/Menu_Item_Deal/Prices,Menu/Menu_Section/Menu_Content/Article_Modifier/Modifier_Class/Modifier_Group/Modifier_Options.
DDIC Structures for the above were imported individually in SAP Gateway Service Builder (SEGW) and linked via associations.
This calls the /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_EXPANDED_ENTITYSET method in SAP.
DATA: ls_shop_menu TYPE zmu_s_shop_menu.
APPEND 'MENU/MENU_SECTION/MENU_CONTENT/MENU_ITEM_DEAL/DEAL_ARTICLES/ARTICLE_MODIFIER/MODIFIER_CLASS/MODIFIER_GROUP/MODIFIER_OPTIONS' TO et_expanded_tech_clauses.
APPEND 'MENU/MENU_SECTION/MENU_CONTENT/MENU_ITEM_DEAL/PRICES' TO et_expanded_tech_clauses.
APPEND 'MENU/MENU_SECTION/MENU_CONTENT/ARTICLE_MODIFIER/MODIFIER_CLASS/MODIFIER_GROUP/MODIFIER_OPTIONS' TO et_expanded_tech_clauses.
CALL METHOD zmu_menu_ctrl=>get_menu_for_shop
EXPORTING
iv_shop = '0005'
iv_date = sy-datum
iv_price_condition = ''
iv_price_list_type = ''
IMPORTING
rs_shop = ls_shop_menu.
copy_data_to_ref(
EXPORTING
is_data = ls_shop_menu
CHANGING
cr_data = er_entityset
).
ER_ENTITYSET is populated fine.
The 500 error occurs in MOVE_CORRESPONDING (/IWBEP/CL_MGW_DATA_HELPER) - Unexpected text for XML-ABAP transformation
lo_xml_reader = cl_sxml_string_reader=>create( lv_xdoc ).
lo_xml_reader->next_node( ).
CALL TRANSFORMATION /iwbep/st_any_data
SOURCE XML lo_xml_reader
RESULT data = <ls_target_data>.
Does anyone have any advice on how to correctly set up a nested structure on SEGW side which can handle the structure passed back?
I've no idea where I'm going wrong.