on 2018 Jan 18 10:05 AM
Just had a couple of days experience with Gateway service development, so apologies if this is a question that just goes against everything Gateway stands for 😉
Using manuals and blogs online, I've managed to create a service that will accept a deep entity (three simple fields and a table), convert that to the format the RFC function will accept and call the function. That works, awesome.
Now I would like to use the exact same deep entity to retrieve information from the backend system. So once again I redefine several methods in the DPC_EXT and MPC_EXT classes to get the deep entity populated. That works, but the result in the Gateway client only shows the simple fields. I assume this is because I cannot define the table in the entity properties, only the simple elements. Therefore the table doesn't get mapped and is lost in translation.
Of course there is Associations and the $expand option to combine Header and Item entities, but that seems like the long way around and will only work for GET_ENTITYSET. For CREATE, I haven't been able to find a solution, seems you can only create one record at a time. Can't imagine that's the way to go.
Am I on the right path here? Is it possible to re-use a deep entity for both GET and CREATE? Thanks in advance for the help!
Request clarification before answering.
Hi Egbert,
The appraoch you are following is not recommended.
You can use the same model - Same Parent Entity with Child entity for both Deep Create and $expand fetch but the GW framework has provided separate methods(Sepratation of concerns principle) for both these HTTP operations. Please have a look into <>GET_EXPANDED_ENTITYSET/<>GET_ENTITYSET or <>GET_EXPANDED_ENTITY/<>GET_ENTITY depending on your $expand use case. For Deep create there is only one method - <>_CREATE_DEEP_ENTITY.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 18 | |
| 6 | |
| 6 | |
| 6 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.