09-16-2008 6:17 PM
HI ,
I need to store the "pdf " file from the PC to Unix directory. For this purpose what stanard program I can use.
Swarna
09-16-2008 6:41 PM
09-16-2008 6:33 PM
09-16-2008 6:41 PM
09-16-2008 7:02 PM
There is not standard program i believe. And also i am not sure about the PDF file update. but we are using for txt file. check the code below to upload a file from PC to unix server.
REPORT ZCOPY_PC_TO_UNIX LINE-SIZE 255
LINE-COUNT 65 MESSAGE-ID ZCRM_DEVELOP.
DATA: BEGIN OF zfred OCCURS 0,
z(1500),
END OF zfred.
DATA: filename like RLGRAP-FILENAME,
w_filesize like sy-index,
w_cancel,
w_mess type string.
PARAMETERS: P_unix(255) lower case memory id ZUNIX.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_unix.
get parameter id 'ZUNIX' field p_unix.
CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
EXPORTING
I_LOCATION_FLAG = 'A'
I_PATH = P_UNIX
fileoperation = 'W'
IMPORTING
O_PATH = P_UNIX
EXCEPTIONS
others = 1.
IF sy-subrc = 0.
set parameter id 'ZUNIX' field p_unix.
ENDIF.
start-of-selection.
CALL FUNCTION 'UPLOAD'
EXPORTING
filename = filename
filetype = 'ASC'
IMPORTING
act_filename = filename
FILESIZE = w_filesize
cancel = w_cancel
TABLES
data_tab = zfred
EXCEPTIONS
conversion_error = 1
invalid_table_width = 2
invalid_type = 3
no_batch = 4
unknown_error = 5
OTHERS = 6.
IF sy-subrc NE 0.
MESSAGE s001 DISPLAY LIKE 'E' WITH 'Upload Error:' sy-subrc.
ENDIF.
check w_cancel is initial.
OPEN DATASET p_unix FOR OUTPUT IN TEXT MODE ENCODING DEFAULT message w_mess.
IF sy-subrc NE 0.
MESSAGE S001 DISPLAY LIKE 'E' WITH
w_mess '-' P_UNIX(50) p_unix+50(50).
stop.
ELSE.
LOOP AT zfred.
TRANSFER zfred TO p_unix.
ENDLOOP.
MESSAGE s001 WITH w_filesize 'bytes transfered'.
ENDIF.
Regards
Muthu
09-16-2008 7:03 PM
use GUI_UPLOAD function load the pdf file , with the filetype 'BIN'. and then use the Binary data and Transfer the data to Application server using the OPEN DATASET/TRANSFER/CLOSE DATASET
09-16-2008 7:24 PM
HI muthappan,
I have used a program which is same as your program its not uploading the pictures in the pdf files.
09-16-2008 7:29 PM
The File type should be BIN then only you can load the pdf to itab.
Read the GUI_UPLOAD function documentation.
09-16-2008 9:14 PM
Its uploaded but whenwe try to open it its not opening.
Its giving errors as " Error converting to PDF format ".
Bye
Shree