on 09-12-2009 1:51 PM
Hi Experts,
I have strored PDF in SAP EP KM at following location.
I have created LinktoURL UI element in my WD program. I have set property 'Reference' of LinktoURL UI element as https://aass_dev.mycompany.com:50001/irj/go/km/docs/documents/mycompany/ess%20files/mycompany%20glob...
The PDF stored in WD screen is getting called when user clicks on the link.
I have to transport the WD program from DEv to Quality. When I am transporting the program, the value of 'Reference" is hard coded. How I can avoid hard coding. I want the PDF stored in SAP EP Quality env to be called. The link will be like this
Please help
Regards,
Gary
Use the KM class URLGenerator to generate the URL at runtime.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have created one valuenode in the context called Url. I have used following code:
String hostName = TaskBinder.getCurrentTask().getProtocolAdapter().getServerName();
if (hostName.equalsIgnoreCase("ruepd.mycompany.com"))
{
wdContext.currentContextElement().setUrl("https://ruepd.mycompany.com:50001/irj/go/km/docs/documents/mycompany/ess%20files/mycompany%20global%20offices%20map.pdf");
}
This code is working fine. How I can use the following code to get rid of hardcoding https://ruepd.mycompany.com:50001
To obtain a valid instance of an URL generator, proceed as follows:
IURLGeneratorService ug = (IURLGeneratorService)ResourceFactory
.getInstance()
.getServiceFactory()
.getService(IServiceTypesConst.URLGENERATOR_SERVICE);
To set a link from one page to another on the same server, we only need a relative URI; proceed as follows:
RID rid = ;
IUriReference uriRef = ug.getResourcePageUri(PathKey.DETAILS_PAGE, rid,null);
com.sapportals.htmlb.Link link = new Link("detail", "Details");
link.setReference( uriRef.toString() );
Following portion of code is not getting compiled.
RID rid = ;
Please help.
Regards,
Gary
Hi Experts,
The following code is not getting compiled. I am getting error on .getInstance() line. The error is "The method getInstance is undefined for the type ResourceFactory. Please help.
public static void wdDoModifyView(IPrivateFirstView wdThis, IPrivateFirstView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
{
//@@begin wdDoModifyView
IURLGeneratorService ug = (IURLGeneratorService)ResourceFactory
.getInstance()
.getServiceFactory()
.getService(IServiceTypesConst.URLGENERATOR_SERVICE);
Regards,
Gary
Hi,
I am working for a support project. The code was already there in wdDoModify. I put the code in wdDoInit as well for testing. The code is not working in wdDoInit as well.
For testing purpose. I tried to use following code
IResourceFactory resourseFactory = ResourceFactory.getInstance();
Above code is also not getting compiled. I have imported the APIs bc.rf.framework_api etc
Pls help
Regards,
Gary
Hi Gary,
I have successfully implemented KM api in my Web Dynpro DC.
Following are the ONLY JARs needed for it.
1.
bc.rf.framework_api.jar
bc.rf.global.service.urlgenerator_api.jar
bc.sf.framework_api.jar
bc.util.public_api.jar
com.sap.security.api.ep5.jar
com.sap.security.api.jar
prtapi.jar
Location for above JARS : - C:\Program Files\SAP\IDE\IDE70\eclipse\plugins\com.sap.km.rfwizard_7.1.5\lib
2. km.shared.ui.released_api.jar
Location of this JAR :- \usr\sap\J2E\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps\com.sap.km.cm.ui\lib\
3. km.shared.service.indexmanagement_api.jar
Location of this JAR :- \usr\sap\J2E\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps\com.sap.km.cm.service\lib
Let me know if you need any further help.
Thanks and regards,
Amey Mogare
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.