| Home • Tips • Tutorials • Forums • Certification Q's • Interview Q's • Jobs • Testimonials • Contact Us | ||
Document Categories:
What's New?
Contribute?Sample SpecsWhat's Hot? |
Displaying a Smart form as PDF in Enterprise portal using WebDynpro for JavaIn NWDS (Net Weaver
Developer Studio) create an Adaptive RFC model which points to the FM created in
R/3.
Give model name
Now create an application
to display the PDF
Insert a frame inside the
view
Internal is a value node
and url is value attribute of type string. Place the following code in
Init method
public void
wdDoInit()
{
//@@begin wdDoInit()
Ynag_Test_Pdf_1_Input input
= new
Ynag_Test_Pdf_Input();
wdContext.nodeYnag_Test_Pdf_Input().bind(input);
try {
wdContext.currentYnag_Test_Pdf_InputElement().modelObject().execute();
} catch
(WDDynamicRFCExecuteException e)
{
e.printStackTrace();
wdContext.currentContextElement().setSdfgdsfsd(e.getMessage());
}
wdContext.currentInternalElement().setUrl(convertXStringToUrl(wdContext.currentOutputElement().getBin_File()));
//@@end }
//@@begin others
public String
convertXStringToUrl(byte[]
doc_content){
String url
= "";
WDWebResourceType webResType
= WDWebResourceType.PDF;
IWDWebResource webResource
= WDWebResource.getWebResource(doc_content,
webResType);
try {
url = webResource.getURL();
} catch
(WDURLException e)
{
e.printStackTrace();
}
return url;
} //@@end
If you are
using single sign on make sure to enable User authentication in the application
parameters. User
details are required for this as it is using Single sign on to connect to R/3. In this
case we have hard coded the Smart form to be used. If you
want it in dynamic way FM interfaces need to be changed accordingly.
|
|
|
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM Home • Contribute • About Us • Privacy • Terms Of Use • Disclaimer • Safe • Companies: Advertise on SAPTechnical.COM | Post Job • Contact Us ©2006-2007 SAPTechnical.COM. All rights reserved. All
product names are trademarks of their respective companies. SAPTechnical.COM
is in no way affiliated with SAP AG. Graphic Design by Round the Bend Wizards |
||