on 10-29-2014 11:01 AM
Hi experts, I included an OData service into a standard SAP OData service. The association I want to create is from standard SAP entity Contact to custom developped AttributeName and should be addressable by this URI /ContactCollection(contactID='2000000165',accountID='41000104')/Attributes. After importing my Odata service, I created an association, associationset and navigation property (Attributes). My navigation works and I can implement the get_entityset in my included OData service. However at runtime I do not receive the necessary contactID and accountID in my IT_KEY_TAB or any other variable. How can I know the contactID and accountID???
IT_KEY_TAB | [0x2(16)]Standard Table | |
IV_ENTITY_NAME | AttributeName | |
IV_SOURCE_NAME | Contact |
Your help is appreciated. Kind regards
Hi Mario,
This should work, passing you the keys in the navigation links, but doesn't work as expected in the current releases of Gateway. I've worked around this issue by creating properties in my target entity (called TempWorkAroundId(s) and mapped to these in the relationship. Dodgy but at least lets you identify what the key is from where you've come from (if that make sense).
I asked at TechEd about this lacking feature, and it's coming, but no real information on when this will actually be resolved. Very frustrating and means you can't do reuse very easily where there is a requirement to know where you've come from in the navigation.
Cheers,
Matt
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Matt, Ashwin,
thank you a lot for your valuable and fast responses. I did create the referential constraints from the start but did not fill in the dependent entity and property (as there was none). The behaviour that I than saw was that I only received 1 parameter in my included odata service in stead of 2. We are on SP07.
My problem was solved by including the accounttemp and contacttemp properties in the included odataservice entity (although it does not make any sense). I agree with Matt this is a dody fashion to solve this kind of problems but it works .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Mario,
U need to have contactID and accountID as referential constraints when u create association and navigation between the Contact and Attribute entities.
Read the keys now.
Please refer the below which will explain all the necessary details u are looking for and to get better understanding :
Search for the URL /sap/opu/odata/sap/ZTEST_DP_EXPAND_SRV/SalesOrderSet('500000008')/OrderToItems
in the below mentioned blog and see how its being modeled and ur scenario is same as this.
This should solve the problem.
Regards,
Ashwin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.