cancel
Showing results for 
Search instead for 
Did you mean: 

Display External Window file in View Assembly

Former Member
0 Kudos

Hi experts ,

I am accessing file from KM folder and showing thru String Path as shown below in the code :

try

{

//wdContext.currentContextElement().setCurrentpath("/documents/PublicDocuments/SHAZ/TamilNadu.xls");

wdContext.currentContextElement().setCurrentpath("/documents");

//LoadContent();

KMrep( );

wdComponentAPI.getMessageManager().reportWarning("KM Folder");

}

catch(Exception e)

{

wdComponentAPI.getMessageManager().reportWarning("Problem in getting KM Folder");

}

try{

IWDClientUser wduser= WDClientUser.getCurrentUser();

IUser usr = wduser.getSAPUser();

com.sapportals.portal.security.usermanagement.IUser epusr = WPUMFactory.getUserFactory().getEP5User(usr);

ResourceContext ctx = new ResourceContext(epusr);

RID parent = RID.getRID(wdContext.currentContextElement().getCurrentpath());

RID child = null;

child = RID.getRID( parent.getPath() + "/DhoniSahrukh.jpg");

com.sapportals.wcm.repository.IResource resource = com.sapportals.wcm.repository.ResourceFactory.getInstance().getResource(parent,ctx);

String CompPath = "http://epqas:50000/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs" + child.getPath();

IWDWindow openwin = wdComponentAPI.getWindowManager().createExternalWindow(CompPath, "Resume", true);

// IWDWindow openInwin = wdComponentAPI.getWindowManager().createWindow(CompPath);

openwin.open();

The given File is getting access , but the file is running in external window not in the view.

Can anyone pl. guide how to display the KM folder file in View Assembly rather External Window.

Regards:

Hanif

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos
try
{

wdContext.currentContextElement().setCurrentpath("/documents");

}
catch(Exception e)
{
wdComponentAPI.getMessageManager().reportWarning("Problem in getting KM Folder");
}

try

{

IWDClientUser wduser= WDClientUser.getCurrentUser();

IUser usr = wduser.getSAPUser();

com.sapportals.portal.security.usermanagement.IUser epusr = WPUMFactory.getUserFactory().getEP5User(usr);

ResourceContext ctx = new ResourceContext(epusr);

RID parent = RID.getRID(wdContext.currentContextElement().getCurrentpath());

RID child = null;

child = RID.getRID( parent.getPath() + "/DhoniSahrukh.jpg");

com.sapportals.wcm.repository.IResource resource = com.sapportals.wcm.repository.ResourceFactory.getInstance().getResource(parent,ctx);

String CompPath = "http://epqas:50000/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs" + child.getPath();

IWDWindow openwin = wdComponentAPI.getWindowManager().createExternalWindow(CompPath, "Resume", true);

openwin.open();
Former Member
0 Kudos

Please use tags when posting code.

Former Member
0 Kudos

Hi llan ,

Now hope things are better now...

Please guide how to display External Window generated in default run View Assembly...

Regards:

SK.H

Former Member
0 Kudos

A solution to this is given in this thread : [t-1600325] .

The various options depending on different requirements are provided.

(Did you try and search for an answer?)

Former Member
0 Kudos

Hi llan,

Well my requirement is to display the PDF from the KM folder...And as code above is displaying the PDF file from KM folder in External Window,,but i want to display this PDF in the current View Assembly of my Default Webdynpro application rather in external window.

Regards:

Hanif