Hi,
I know that this Topic was raised million times, but still raising this query. I have already consulted http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e0d92637-3d0d-2f10-ebb2-efc1f40a85e8?QuickLink=index&… link.
Requirement: Create Header and Item Odata THROUGH SEGW.
Steps I have followed:
1. Created Header and Item Structure and have added them in the Export Parameters of an RFC.
2. Created the RFC and have populated the the internal tables corresponding to the Header and Item structures.
3. Go to Transaction SEGW and Imported the Header from the RFC. Then created Read and Query mapping for Header.
4. Go to Transaction SEGW and Imported the Item from the RFC. Then created Read and Query mapping for Item.
5. Created an association between "ID" of Header with "ID" of Item. Cardinality- 1:N
Observation:
Now when I run the Odata and execute /sap/opu/odata/sap/ZTEST_SRV/HDRSet(2)/ITEMSet, I get all the Items from the Item table for Each and every Header. But I guess for every header corresponding Items should have been enlisted.
Is there any step that I am missing?
Important: In the MPC class(ZCL_TEST_MPC), I could see a method named DEFINE_ASSOCIATION. I have put an external Breakpoint in it, but this breakpoint is not triggered.
-Regards
Dhrubajyoti