cancel
Showing results for 
Search instead for 
Did you mean: 

Customer GET_EXPANDED_ENTITYSET - prevent call to children Entits Set?

Former Member
0 Kudos

Hi,

I have a OData Gateway Service with nested entities (Entity A can be expanded with Entities B and C; natigation properties "Bs" and "Cs").

Now I redefined GET_EXPANDED_ENTITYSET and call in there a method that fills the complete return structure (including the expanded entities).

After that I something like "APPEND 'BS' TO et_expanded_tech_clauses" (and same for Cs). But still the framework calls GET_EXPANDED_ENTITYSET for entities A and B - which I don't want since everything is already completely filled.

What am I doing wrong?

Thanks in advance!

Accepted Solutions (0)

Answers (1)

Answers (1)

kammaje_cis
Active Contributor
0 Kudos

Hi Daniel,

"All expand paths (separated by comma) which are handled by the implementation have to be passed back to the framework via the parameter ET_EXPANDED_TECH_CLAUSES."

Reference:

/IWBEP/IF_MGW_APPL_SRV_RUNTIME - SAP NetWeaver Gateway - SAP Library

/IWBEP/IF_MGW_ODATA_EXPAND - SAP NetWeaver Gateway - SAP Library

Second link above will tell you how to populate ET_EXPANDED_TECH_CLAUSES.

Thanks

Krishna

Former Member
0 Kudos

Hi Krishna,

so how would I then need to fill ET_EXPANDED_TECH_CLAUSES in my case? With one entry containing all expanded entities ("BS,CS") or two entries (one for each expanded entity)?

I tried both, but both don't work...

In debugging I found out that the order of the expected and checked entities is different (in method MARK_AS_EXPANDED_TECH_NAMES of class /IWBEP/CL_MGW_EXPAND_NODE, line 31 [mt_children and lt_foreign_children have the same entries, but in a different order]).

Is that a know problem?

I also tried to use the obsolete parameter ET_EXPANDED_CLAUSES - with that it works...

Regards,

Daniel

kammaje_cis
Active Contributor
0 Kudos

Did you try /IWBEP/IF_MGW_ODATA_EXPAND - SAP NetWeaver Gateway - SAP Library and search for 'ET_EXPANDED_TECH_CLAUSES' ?

It says that you need to have technical names (all CAPS) and one entry for each navigation property.

Former Member
0 Kudos

Absolutely agree with you, that MARK_AS_EXPANDED_TECH_NAMES doesn't work correctly - I've got the same situation:

In my system to fill ET_EXPANDED_CLAUSES doesn't help already - MARK_AS_EXPANDED has been changed by SAP at 06.09.2014. Now its code is identical to MARK_AS_EXPANDED_TECH_NAMES.

Daniel, have you got any solution for your case? Could you, please, share the code of MARK_AS_EXPANDED on your system, if it's not changed since your post

Former Member
0 Kudos

I used this code and it worked!

DATA(lv_expand) = lo_req->/iwbep/if_mgw_req_entityset~get_expand( ).
TRANSLATE lv_expand TO UPPER CASE.
Split lv_expand at ',' into TABLE ET_EXPANDED_TECH_CLAUSES.