on 10-22-2010 10:11 AM
Hi Experts,
I have a PDF document created in my PC, I need to put it into SAP Server .
Then I need that then, other external user be able to read this document.
Has anybody make something similar into A web dynpro abap???
Can you help me???
thanks anyway!
You can do an OPEN DATASET BINARY from application server
DATA: bin_cont TYPE TABLE OF orblk,
wa_bin TYPE orblk,
ln LIKE sy-tabix,
ln_size TYPE i.
OPEN DATASET file_pdf FOR INPUT IN BINARY MODE.
IF sy-subrc = 0.
CLEAR: ln_size, bin_cont[],wa_bin.
DO.
CLEAR: ln, wa_info.
READ DATASET file_pdf INTO wa_bin LENGTH ln.
IF sy-subrc <> 0.
**from function C13Z_RAWDATA_READ
* Begin Correction 20.11.2005 899632 *******************
IF ln > 0.
* End Correction 20.11.2005 899632 *********************
ln_size = ln_size + ln.
APPEND wa_bin TO bin_cont.
ENDIF.
EXIT.
ENDIF.
ln_size = ln_size + ln.
APPEND wa_bin TO bin_cont.
ENDDO.
CLOSE DATASET file_pdf.
ENDIF.
then using the Function SCMS_BINARY_TO_XSTRING to convert binary in HEX
and calling the method CL_WD_RUNTIME_SERVICES=>ATTACH_FILE_TO_RESPONSE to send the file to the browser
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi LydiaMM ,
Yes, you can easily do that. Actually, I've done in one of my project recently.
I would suggest you to follow the steps given in this link, as this is of great help --
[http://wiki.sdn.sap.com/wiki/display/WDABAP/UploadandDownloadfilesinWebdynproABAP]
This describes steps with screen-shots and would definitely be of good help.
Thanks.
Kumar Saurav.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lydia,
I am facing a similar issue , if u have any pointers for it. Please reply back asap. I am able to upload the files but after downloading from server when trying to read the contents of file. I am getting proper view of txt and pdf file but unable to get proper data in case of other formats like .xls/.doc/.docx etc
Thanks in advance.
Regards,
vishesh
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.