cancel
Showing results for 
Search instead for 
Did you mean: 

Call Another DC from one DC.

Former Member
0 Kudos

Hi,

I have a scenario where I have an application DC. In that, I have a button which is suppose to call another DC. On click of the button a View in the second DC should appear as a pop-up. How to I go about it?

Thanks,

Prasanna

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

I have the interface View of the second DC. Now the issue is that I have the button calling the view in the second DC. But the requirement is that the window should come as a modal Window. I want to remove Status bar, Menu bar and other properties from the window. How do I go about it?

Thanks,

Prasanna.

arun_srinivasan
Contributor
0 Kudos

Hi prasanna

1) In the dc1 (popup dc)

Component controller

Create a pop up calling method

//@@begin javadoc:Callpopup()

/** Declared method. */

//@@end

public void Callpopup( )

{

//@@begin Callpopup()

//popup steps

//@@end

}

2) component interface controller

Add the usage of component controller of model dc component

create a method in interface controller for calling the method Callpopup in component controller

//@@begin javadoc:Interfa_ctl_mthd()

/** Declared method. */

//@@end

public void Interfa_ctl_mthd( )

{

//@@begin Interfa_ctl_mthd()

wdThis.wdGet<modeldc>Controller().Callpopup();

//@@end

}

3) Open the DC Metadata>Public Part>New public part

Give a name and Select the API and in the Select Entity type, select the web dynpro component and in the select entity which is at the bottom of select entity select the dc1/component (Ie component inside the web dynpro component)

4) Build and deploy the dc1

DC2

1) Expand the DC metedata > used DC >right click and select add used dc and select the dc1 and select the build type in dependency tab

2) Expand the web dynpro component structure and Select the Used web dynpro component and right click and select used webdynpro component and browse the component and give a name ie popupcomp

3)In the view of project dc define the usage of the component popupcomp

In any action of button , call the popupcomp comp like this

//@@begin javadoc:onActionGo(ServerEvent)

/** Declared validating event handler. */

//@@end

public void onActionGo(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onActionGo(ServerEvent)

wdThis.wdGetpopupcompInterface().Interfa_ctl_mthd();

//@@end

}

for popup code look at this thread

Hope this helps,

Regards,

Arun

former_member186016
Active Contributor
0 Kudos

You dont call a dc but i think you want to call component from other dc or window from other dc.

Follow this tutorial:

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94a...

This tutorial shows how to create pop-up:

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94a...

Regards,

Ashwani Kr Sharma