on 02-05-2016 7:36 PM
Hi everyone,
i have a question for you.
Is it possible to create a dynamic entity type based on dynamic structure? Or just a static structure can be used?
Let me know please.
Thanks in advance.
Regards.
Dario.
What the service builder(SEGW) does is , it will create Model provider code based on the entities you are importing to it. Instead, if you can code the MPC class directly , it is possible to have the dynamic structure. But ,you need to disable the metadata cache etc, because, the metadata here itself is dynamic..
Sree
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all, thanks for your responses.
I have another question for you, is it possible to call method "DEFINE" by abap code to create model or not?
Thanks in advance.
Regards.
Dario.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can call super->define( ) form a class
1. if the class is a child of /IWBEP/CL_MGW_ABS_MODEL
2. the child class is to be used as a model provider class (MPC) in the Gateway Framework
You can not directly call DEFINE( ) method from just any other ABAP code.
The reason is, DEFINE method of /IWBEP/CL_MGW_ABS_MODEL is meant to be invoked from the $metadata flow during the Gateway OData service call. Specifically the class has attributes which are being created by the framework and only available during the context of Gateway Service call.
Hello Dario,
Please have a look at Former Member reply in the below discussion.
Regards,
Ashwin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Dario,
Best to my knowledge, Once you generated the RUNTIME ARTIFACTS (assuming you have mapped data sources to respective CRUDQ operations)...The Model Provider class is is created with the defined structure (Which are static in nature, Until and Unless you again REGENERATE the Runtime artifacts after changing the structure as in below image)
Although to handle Dynamicity of structure might be possible via programming under MPC_EXT class but I am not sure about this approach...
Let me know if it helps.
--PG
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.