Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

pdf file uploading

Former Member
0 Likes
895

HI ,

I need to store the "pdf " file from the PC to Unix directory. For this purpose what stanard program I can use.

Swarna

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
841

I am working in CRM 5.0 . I dont have this TCode.

7 REPLIES 7
Read only

Former Member
0 Likes
841

Use transaction CG3Z.

Read only

Former Member
0 Likes
842

I am working in CRM 5.0 . I dont have this TCode.

Read only

0 Likes
841

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

Read only

0 Likes
841

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

Read only

Former Member
0 Likes
841

HI muthappan,

I have used a program which is same as your program its not uploading the pictures in the pdf files.

Read only

0 Likes
841

The File type should be BIN then only you can load the pdf to itab.

Read the GUI_UPLOAD function documentation.

Read only

Former Member
0 Likes
841

Its uploaded but whenwe try to open it its not opening.

Its giving errors as " Error converting to PDF format ".

Bye

Shree