cancel
Showing results for 
Search instead for 
Did you mean: 

Close Functionality in an iview

former_member645692
Participant
0 Kudos

HI,

i have an iview which i was opening as an external vindow. now my issue is need to close this iview using a close button. can any one

Accepted Solutions (0)

Answers (1)

Answers (1)

gautam_singh
Participant
0 Kudos

Hi,

Please provide your SAP NetWeaver Version and SP Level .

Thanks

Gautam Singh

gautam_singh
Participant
0 Kudos

HI JEGADHEESAN,

For SAP NetWeaver 7.0, you can perform the following activities step by step:

1.Create close.html file and write javascript code for closing window.

2.Place this close.html in \src\mimes\Components\<component_name>\

3.Create CLOSE button in view and assign corresponding action (e.g. onActionClose)

4.Now write code for closing external window (i.e. Web Dynpro Window).

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

{

//@@begin onActionClose(ServerEvent)

try {

String URL = WDURLGenerator.getAbsoluteWebResourceURL(wdComponentAPI.getComponent().getDeployableObjectPart(),"close.html");

TaskBinder.getCurrentTask().getClient().sendRedirect(URL, 0);

} catch (WDURLException e)

{

e.printStackTrace();

} catch (IOException e)

{

e.printStackTrace();

}

//@@end

}

Thanks

Gautam Singh