‎2008 Feb 27 2:42 PM
Hi,
I create a Adobe Interactive Form, I need to display this PDF in SAP portal, then I need to develop a RFC to return this PDF file, I read in other post that the way is to convert de PDF to binary file a return this binary file like a paremeter in the RFC.
Someone have an example about this?
Regards
Eduardo Campos
‎2008 Feb 27 4:42 PM
‎2008 Feb 29 7:26 PM
‎2008 Feb 29 9:04 PM
This works for me, it copies an excel file into another excel file.
You can keep the binary information as long as you want and later download the file to another place.
You can try it to see if it works for you.
Remember to keep the file lenght.
types: stringa(4096).
data: tabla type standard table of stringa.
DATA: FILE TYPE STRING.
DATA: LENGHT TYPE I.
fILE = 'C:\DOCUMENTS AND SETTINGS\myuser\MY DOCUMENTS\BOOK1.XLS'.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = FILE
FILETYPE = 'BIN'
* HAS_FIELD_SEPARATOR = ' '
* HEADER_LENGTH = 0
* READ_BY_LINE = 'X'
* DAT_MODE = ' '
IMPORTING
FILELENGTH = LENGHT
* HEADER =
TABLES
DATA_TAB = tabla.
BREAK RJESCISL.
fILE = 'C:\DOCUMENTS AND SETTINGS\myuser\MY DOCUMENTS\BOOK2.XLS'.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = LENGHT
FILENAME = file
FILETYPE = 'BIN'
* APPEND = ' '
* WRITE_FIELD_SEPARATOR = ' '
* HEADER = '00'
* TRUNC_TRAILING_BLANKS = ' '
* WRITE_LF = 'X'
* COL_SELECT = ' '
* COL_SELECT_MASK = ' '
* DAT_MODE = ' '
* IMPORTING
* FILELENGTH =
TABLES
DATA_TAB = TABLA
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22.
Edit: Sorry, didn't read the question right.
Well, is almost the same way, just use Open dataset dsn in binary mode. That way you'll get your file in binary mode.
I was supossing you were usen a local file but now I see you want it in the application server
Edited by: Ramiro Escamilla on Feb 29, 2008 10:11 PM