on 01-26-2017 12:50 PM
We have created a lot of GET_ENTITY_SET methods that do selects from views we create.
A confusion I keep hitting is dealing with joins.
As far as I know SAP only supports inner joins when defining a view. This means if I define a view that way and there is data that does not exist on the second table I will end up losing rows.
For example if I want a view with:
QPGR SAP Table - Inspection catalog code groups
Joined to
QPGT (Code Group Texts)
And I hard code the language to 'E'
If QPGT is missing any language translations for english those rows will be lost.
I'm finding the lack of "left outer join" on views to be very frustrating.
Another option is to not join to that table and then write custom code to retrieve the code group text if it exists.
If we go with that approach then the regular odata filtering will not be supported for KURZTEXT, which is also annoying ( but maybe better than losing data? )
How do people deal with these sorts of issues?
The approach you are explaining is called as 'Inside Out' approach of Gateway service implementing, which I think that is not efficient. In my last 4-5 years of creating Gateway services, I have rarely done this way, but rather coded my DPC_EXT class.
I would suggest you to just manually create your entity with properties, generate runtime artefacts, and then goto *DPC_EXT class directly and code the operation you need.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As far as I know SAP only supports inner joins
I do not think this is right.
Check here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry. I meant when we create a view. Our typical approach to exposing data has been to model a view, create an RFC that can pull data from the view ( we have a reusable one that can work with any view name ) and then create an entity set that pulls data from that view. But when we create a view ( in SE80 ) in our package, I think we can only create views with inner joins.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.