on 08-29-2007 11:50 AM
Hi experts,
it is possible to open a PDF-File in a WebDynpro application or from a WebDynpro application in a new window? How can I do this and what are the prerequisites?
Thanks in advance!
Hello!
Yes it is possible. You can use FileDownload UI Element for the same. This opens documents in a new window. You can refer to application WDR_TEST_UI_ELEMENTS. You can find the UI Element in view FileDownload in the component WDR_TEST_EVENTS.
Hope this helps.
Regards,
Neha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use the FileDownload UI element as pointed out above ....
You need to store the File in the MIME Reporsitory and use ABAP Function modules for Mime Repository to get the File, in XSTRING formet.
Try SAP_OI_LOAD_MIME_DATA. Then U can use the FM ECATT_CONV_STRING_TO_XSTRING to convert from string to XSTRING.
Create an Attribute in context of type XSTRING and bind it to the 'data' property of FileDownload. Fill this attribute with the output of ECATT_CONV_STRING_TO_XSTRING (in XSTRING format).
Set the MimeType property to 'application/pdf'. Check out the other prperties of FileDownload. Its fairly simple.
Another way is to set the reponse explicitly to PDF...without using FileDownload
CL_WD_RUNTIME_SERVICES=>ATTACH_FILE_TO_RESPONSE
(
FILENAME = whatever
I_CONTENT = this is the data u get from the above module in XSTRING format
I_MIME_TYPE = 'application/pdf'
I_IN_NEW_WINDOW = abap_true
).
Thanks
Anand
User | Count |
---|---|
91 | |
10 | |
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.