Application Development 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: 

pdf file uploading

former_member487858
Active Participant
0 Kudos

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

former_member487858
Active Participant
0 Kudos

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

7 REPLIES 7

Former Member
0 Kudos

Use transaction CG3Z.

former_member487858
Active Participant
0 Kudos

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

0 Kudos

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

0 Kudos

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

former_member487858
Active Participant
0 Kudos

HI muthappan,

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

0 Kudos

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

Read the GUI_UPLOAD function documentation.

former_member487858
Active Participant
0 Kudos

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

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

Bye

Shree