Sie sind auf Seite 1von 9

Association and Navigation in Odata Service –

SAP Netweaver Gateway


What is meant by Association and Navigation Property?

Associations define the relationship between two or more Entity


Types.
Instances of associations are grouped in Association Sets.

Navigation Properties are special properties on Entity Types


which are bound to a specific association and can be used to refer
to associations of an entity.
How to do it?

Association based
Sales Header on Key
Sales Item Entity
Entity Type
Type

2 Footer Copyright © 2014 Deloitte Development LLC. All rights reserved.


Create a New Project. Create an Entity Type along with Entity Set.

3 Footer Copyright © 2014 Deloitte Development LLC. All rights reserved.


Create one more Entity type which has a common field with the previous Entity type. Example : Vbeln.

4 Footer Copyright © 2014 Deloitte Development LLC. All rights reserved.


Right click on the Association Folder and create based on the Common field between the 2 entity sets.
i.e Vbeln. Once Association is created then it will show in the Navigation properties of the Entity set from
which we made Association.
Association Set is also created along with the Association. Referantial Constraints will have the key field
based on which we created Association.

5 Footer Copyright © 2014 Deloitte Development LLC. All rights reserved.


Create GetEntity(Read)/ GetEntitySet(Query) service operations for each EntitySet based on the RFC
that we want to implement and Map it.

6 Footer Copyright © 2014 Deloitte Development LLC. All rights reserved.


7 Footer Copyright © 2014 Deloitte Development LLC. All rights reserved.
Now Goto SAP Gateway Client and select the EntitySets. Now add the input value and add the Associationname to
it then execute. Here we can see the data based on the Association.

8 Footer Copyright © 2014 Deloitte Development LLC. All rights reserved.


Thank you.

Any Questions?

9 Footer Copyright © 2014 Deloitte Development LLC. All rights reserved.

Das könnte Ihnen auch gefallen