on 07-24-2008 5:25 AM
Hi,
We have a PDF smart form in the r/3.we want to call the PDF from WD View without using PDF interactive form.
Could any one give me soln for this??
Thanks
Hi ,
Insert IFrame UI Element and bind the Resource property to the value attribute PdfUrl of type String .
Define a Output parameter of type Binary in RFC .
Insert the following code to dispaly the smart form.
byte[] pdfContent = wdContext.currentOutput<node>().get<Binary>();
IWDCachedWebResource pdfResource = WDWebResource.getWebResource(pdfContent,WDWebResourceType.PDF);
try
{
wdContext.currentContextElement().setPdfUrl(pdfResource.getURL());
}
catch(Exception e)
{
wdComponentAPI.getMessageManager().reportException(e.getMessage(),true);
}
Regards,
Sunitha Hari
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The webdynpro should call an ABAP function module which will process the smart form -> PDF conversion and return a binary stream as an export parameter. (use function CONVERT_OTF to convert samrt form to PDF stream)
The following sample webdynpro code is how I use to display the PDF form in a new window.
IWDCachedWebResource resource;
String fileName = "pdf_file_name"
//Get PFC web resource URL, you need the PDF stream return from ABAP RFC
resource = WDWebResource.getWebResource(wdContext.currentY_PDFElement().getPdfStream(), WDWebResourceType.PDF);
resource.setResourceName(fileName);
String PDF_URL = resource.getURL());
//Open the PDF in new window
IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(resource.getURL(), "PDF File");
window.setWindowPosition(5, 5);
window.setWindowSize(600, 600);
window.open();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.