cancel
Showing results for 
Search instead for 
Did you mean: 

Error in external context mapping

Former Member
0 Kudos

Hi

I want to send some data to a used web dynpro DC from the embedding DC. I tried using external context mapping by performing the below steps.

created a value node and attribute at interface controller of the used DC

set isInitial property to true for the value node in interface controller

created context node and attribute with same name inside component controller of the embedding DC

defined mapping between the nodes and attributes; which looks like

UsedComponentInterface----


>EmbeddingComponentController

At run time I can't find any value inside the node in used DC. The used DC interface controller node is not getting populated with data from the embedding DC component controller node value.

Can any one let me know the exact appraoch for this and where I did mistake in the above steps?

Thanks in advance

Cheers

Sudip

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Sanyev

This is exactly what I did. My mistake; in my previous note it would be "input elemet" not "initial".

Thanks

Sudip

sanyev
Active Participant
0 Kudos

Hi Sudip,

Once you do all the steps mentioned in my above post external context mapping should start working.

You can go through this recent post on the same topic. [;

[This|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/8881] [original link is broken] [original link is broken] [original link is broken]; blog mentioned by Fazal above also mentions the steps to follow for external mapping to work properly. If this doesn't work then post the code as done in the above forum post link.

Regards,

Sanyev

sanyev
Active Participant
0 Kudos

Hi Sudip,

First make sure in your used DC interface controller context for the nodes that you need to populate data the inputElement property is set to true. The inputElement property for a node and attribute means that the data for those nodes are going to come from and external source. Nodes where the inputElement is set to true will not be initialized even if the cardianaliy is 1:1 or 1:n. The data instance has to come from an external source.

Make sure that you create a public part for your used DC and add the component to the public part.

If the input element property is set correctly in the interface controller of the used DC make sure that the data mapping between the interface controller of the used DC and you component/custom controller is correct. The data mapping arrow should point from your used DC interface to your component/custom controller. You can see this in your data modeler. Once you create the data link the mapping window will clearly say that this is an external mapping and only inputElements can be dragged.

Once all the above are done if you add data instances to the external mapped node in your controller it will be available in your used DC context also.

Hope this helps,

Sanyev

former_member201361
Active Contributor
0 Kudos

Hi,

please follow this link for external context mapping .

[https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/8881] [original link is broken] [original link is broken] [original link is broken];

Thanks and Regards