cancel
Showing results for 
Search instead for 
Did you mean: 

DC reusability in webdynpro

Former Member
0 Kudos

HI,

T'm having two dcs DC1 and DC2

I have a scenario where i want to capture processid of the first dc in second dc wher processid is of type string

Plz any body help me how to do this

Thanks&Regards,

santhosh

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos
former_member365727
Active Contributor
0 Kudos

Hi,

This can be achieved by raising an event in DC1 and capture that event in DC2.

Regards

Srikanth

Former Member
0 Kudos

Hi srikanth,

thanks for your help and can you explain it some briefly plz

santhosh

former_member365727
Active Contributor
0 Kudos

Hi,

Imagine u have two DC's (DC1 and DC2).

DC1 passes data by using events to DC2.

1) In DC1 Interface controller, there will be a tab for events. Create a event and pass data as parameters for this event.

2) Now add DC1 as used DC in DC2.

3)In Component controller of DC2, create a event handler. In the drop down (event source) select DC1 and choose the event required for subscribing.

4) Now you can manipulate the event data as per the requirement.

(If you have N no. of DC's, each of them interacts with the other using events. Then it will be difficult to identify in which DC event handler is written)

Possible scenario's for passing data using events:

-Events can only be raised from Component or Interface controller. View controller cannot proceed with this approach.

-You can trigger a method of View controller from Component controller using events.

-Eventing is useful when u donot want to expose u'r code using interface methods or context.

Events provide unstructured way of interacting with components.

Regards

Srikanth

Former Member
0 Kudos

Hi Santhosh,

You can achieve this by Interface controller.

Follow these steps.....

1. Create a value attribute named processid in component controller context of DC1.

2. Create a value attribute named processid in interface controller context of DC1.

3. Map these two attributes.

4. Create component of DC1 where you have created processid as used webdynpro component in DC2.

5. Create a value attribute named processid in component controller of DC2.

6. Add the component controller of DC1as required controller of component of DC2 .

6. Map this attribute with interface controller's processid of DC1.

7. Now if you want to access it in a particular view of DC2.

8. Create a processid value attribute in view context and map it to comonent controller context.

This will solve your issue.

Regards

Madhu