cancel
Showing results for 
Search instead for 
Did you mean: 

et_entityset having data but not displayed site-OData

former_member228514
Participant
0 Kudos
1,336

Hello ,

I have implemented GET_EXPANDED_ENTITYSET method. I can see header data in the ODAta output but not Item data.

Data is populated correclty in the er_entityset internal tabel but cant show,

cdprasanna
Active Participant
0 Kudos

Hi,

If you mention the URL that you are using for expanded entity set will help to check the issue.

View Entire Topic
cdprasanna
Active Participant

Hi,

Make sure you covered below steps.

1. While creating a structure in method get_expanded_entityset of DPC_EXT class make sure you used navigation name only as the name of your inner table.In below code snippet itemtoproduct is my navigation name.

DATA:  BEGIN OF t_orderitems.

  INCLUDE              TYPE  zcl_ztest_dp_expand_mpc_ext=>ts_salesorderitem.

  DATA: itemtoproduct TYPE  zcl_ztest_dp_expand_mpc_ext=>ts_product,

        END OF t_orderitems.

2. Make sure you filled exporting parameter et_expanded_tech_clauses with your navigation name.

* Insert Navigation property into ET_EXPANDED_TECH_CLAUSES
lc_expand_tech_clause = 'ITEMTOPRODUCT'.
INSERT lc_expand_tech_clause INTO TABLE et_expanded_tech_clauses.

3. if you are using multi level read then define like below.

***Data declaration
 DATA:  BEGIN OF t_orderitems.

  INCLUDE              TYPE  zcl_ztest_dp_expand_mpc_ext=>ts_salesorderitem.

  DATA: itemtoproduct TYPE  zcl_ztest_dp_expand_mpc_ext=>ts_product,

        END OF t_orderitems.

  DATA:  BEGIN OF t_expand_so.

  INCLUDE             TYPE zcl_ztest_dp_expand_mpc_ext=>ts_salesorder.

  DATA: ordertoitems  LIKE TABLE OF t_orderitems,

       END OF t_expand_so.


* Insert Navigation property into ET_EXPANDED_TECH_CLAUSES

lc_expand_tech_clause = 'ORDERTOITEMS/ITEMTOPRODUCT'.
  INSERT lc_expand_tech_clause INTO TABLE et_expanded_tech_clauses.


Hope this helps you.

Thanks,

Prasanna CD.