on 09-07-2015 3:15 PM
Hi Everyone,
i need to implement a Create deep entity implementation for the below structure.
i have implemented the Header to Item deep insert.
based on the below example.
this only handles the implementation from Header--> Item.
but i have a requirement where in i need to implement, Item-->Component also.
is it possible?
Kind Regards,
Vamsi
Hi, thank you for your inputs, they were helpful in making me arrive at a solution for my requirement.
Due to time constraints we figured out a work around for my requirement
will definitely try your method and see if that works.
but present we are defining component as a separate entity at the same level as Item.
howeve the Component Entity has the added fields of AUFNR/POSNR to be able to map each component to it's parent AUFNR/POSNR.
so the structure definition is something like this.
types: being of ty_component,"Component structure
aufnr type aufnr,
posnr type posnr
component type string,
end of ty_component,
t_components type standard table of ty_component with default key." Table Type
types: begin of t_item,"Item Structure
posnr type posnr,
end of t_item.
types: begin of deep_entity," required structure of Deep_entity
include structure header.
types: item type t_item,
types components type t_components,
end of deep_entity.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Vamsi,
There was no need of a workaround here as your scenario can be achieved with correct Data Modelling, defining appropriate Cardinality between the entities and correct Deep Structure at the Back-End.
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 Vamsi,
Yes it is possible. It should be handled in CREATE_DEEP_ENTITY method. If the payload is passes correctly, and the structure to hold the data is in DPC is defined correctly things will work.
Regards
Atanu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Atanu,
thank you for your input.
I have implemented the association and navigation properties between the item and the component entities. I have also defined the association and navigation properties from header to Item.
it is working from the header to item part of it's functionality.
The structures are getting filled as expected in the CREATE_DEEP_ENTITY method. But Gateway Client is not showing any Components Data in the response generated.
I have declared my entity structure as below.
types: being of ty_component,"Component structure
component type string,
end of ty_component,
t_component type standard table of ty_component with default key." Table Type
types: begin of t_item,"Item Structure
posnr type posnr,
components type t_components,
end of t_item.
types: begin of deep_entity," required structure of Deep_entity
include structure header.
types: item type t_item,
end of deep_entity.
the place where i need guidance is on how to define the model provider to achieve this hierarchy.
Any input will be highly apprecaited.
Kind Regards,
Vamsi
Hi Vamsi,
You don't need to define model provider to achieve this. Multilevel deep structures can be defined in the same method easily.
Your deep structure should be an ideal nested structure like this-
Data: begin of ls_header,
include type zproject_mpc=>ts_header, "header data
begin of ls_item,
include type zproject_mpc=>ts_item, "item data
lt_component type standard table of zproject_mpc=>ts_component, "component data
end of ls_item,
lt_item type standard table of ls_item, "component data
end of ls_header.
Hope this helps.
Cheers,
-NK
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.