Convertion pdf file from App. server to Pre.server
Hi,
I have file pdf file in application server. i want to convert this PDF file into presention server.
plese send simple progrme.
Thank&
Regards,
Madhu
Also try
FYI
REPORT ztrans01 .
*Parameters(files)
PARAMETERS: ux_dir TYPE epsf-epsdirnam OBLIGATORY
DEFAULT '/usr/sap/trans',
filename TYPE epsf-epsfilnam OBLIGATORY DEFAULT 'test1',
pc_dir TYPE rlgrap-filename OBLIGATORY
DEFAULT 'c:\tmp'.
*DATA(Strings)
DATA itab TYPE TABLE OF string.
DATA wa TYPE string.
DATA file TYPE string.
DATA size TYPE epsf-epsfilsiz.
DATA ux_file TYPE epsf-epspath.
DATA mode TYPE epsf-epstxtmod.
*start-of-selection
START-OF-SELECTION.
*1) transfer
CONCATENATE ux_dir '/' filename INTO ux_file.
OPEN DATASET ux_file FOR INPUT IN TEXT MODE.
IF sy-subrc <> 0.
MESSAGE i502(me) WITH ux_file.
ENDIF.
DO.
READ DATASET ux_file INTO wa.
IF sy-subrc <> 0. EXIT . ENDIF.
APPEND wa TO itab.
ENDDO.
CLOSE DATASET ux_file.
*2)download
CONCATENATE pc_dir '\' filename INTO file.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = file
TABLES
data_tab = itab.
OR
*& Form f1104_download_to_lofile
Download to data from internal table to Logical File/application server
FORM f1104_download_to_lofile.
Open the file in application server
OPEN DATASET v_filepht FOR OUTPUT IN TEXT MODE.
IF sy-subrc <> 0.
MESSAGE s185 WITH v_filepht.
LEAVE LIST-PROCESSING.
ENDIF.
LOOP AT i_logfile INTO w_logfile.
TRANSFER w_logfile TO v_filepht.
CLEAR w_logfile.
ENDLOOP.
IF sy-subrc = 0.
WRITE:/ text-055, v_filepht, text-056.
ELSE.
WRITE:/ text-057, v_filepht.
ENDIF.
Closing the file
CLOSE DATASET v_filepht.
and also check link
http://sap.ittoolbox.com/code/archives.asp?d=2285&a=s
Hope thisll give you idea!!
<b>P.S award the points.</b>
Good luck
Thanks
Saquib Khan
"Some are wise and some are otherwise"
Similar Messages
-
Function module to fetch pdf file from App. Server and print/email?
Hi all,
Is there any function module to fetch a PDF file from APPLICATION SERVER and print the PDF file or send it as an attachment in an email?
Please help..
Thanks in advance.
Sandeep.Hi Sandeep,
Is there any function module to fetch a PDF file from APPLICATION SERVER
1) As far as i know there are no FMs to read a file from App server, you can do the same using *OPEN/READ/CLOSE dataset ABAP statements - There are tons of examples for this on the net.
and print the PDF file or send it as an attachment in an email?
You can send the file read from the app server(by the suggested method above) and use CL_BCS to send it as an attachment.
Again there are many examples on the net on how to use CL_BCS for the same.
Regards,
Chen -
Download PDF file from APP server!
Hi!
Has anyone tried uplaoding and downloding a PDF table from app server as I tried from a normal method by Open dataset, Transfer but it wont work.
Please provide any inputs.
Thanks.Hi park,
1. Using open data set, transfer , close etc,
also it will work.
( it will download / upload any kind of file from app server)
2. Just make sure the
FULL PATHNAME and the FILENAME
are mentioned in EXACT CASE
(small/CAPITAL).
3. U can check thru transaction AL11, to see the file and path.
regards,
amit m. -
Print PDF file from app.server
Hello,
I need to print a PDF file from the application server without any dialog for the user.
Is it possible? and if so- how?
Is it also possible to do the same with office file (DOC,XLS)?
Thanks
MosheHi,
CV150_RPINT_DOC for frontend execution.
FM SAP_PDF_VIEWER_DEMO- foreground only.
using fm SXPG_COMMAND_EXECUTE in background.
thanks & regards. -
Download PDF File from Archiv to SAP Application Server
Hi,
I need to download the PDF file from an NAST-Dataset (how is stored from the message via SAP ArchivLink) to the SAP Application Server.
1) At first i read the Archiv-Link data via function module WFMC_GET_ARCHIVE_OBJECT_TYPE
2) Then i get the Connection-Infos via function module ARCHIV_GET_CONNECTIONS_INT
3) Now i read the file from archiv as table via function module ARCHIVOBJECT_GET_BYTES
4) Save to the SAP Appl.Server via:
- OPEN DATASET ld_dpfad FOR OUTPUT IN BINARY MODE
- LOOP and TRANSFER lf_archivobject TO ld_dpfad.
- CLOSE DATASET ld_dpfad.
In the dialog of NAST-Dataset (Messages) i can open the PDF-File without any errors (display originals). But after the filetransfer to the SAP Appl.Server i get the following errors during the file opening dialog from Adobe Acrobat Reader:
- the embedded font u201CArialu201D cant to be extract
- not enough data for the picture
The reader can display the PDF-File but only without the picture (Logo) and with alternative font.
The same transfer from archiv and sending as an attachement to the BOR-Object via function module SO_DOCUMENT_INSERT_API1 works very fine and without any errors.
Can any one please help me to solve this Issue?
Thanks in Advance,
ThomasHello Keith,
Many thanks for your answer.
In the past i didnu2019t need the BINARCHIVOBJECT-Parameter and so i overlook this option.
Now, the File looks a little bit different, but only in the STREAM-section.
During the Fileopen-Dialog i get only one message now - "not enough data for image" and the image will not displayed. The rest seems to be correct.
The relevant coding is now:
ld_doc_typ = pf_connections-reserve.
CALL FUNCTION 'ARCHIVOBJECT_GET_BYTES'
EXPORTING
archiv_id = pf_connections-archiv_id
archiv_doc_id = pf_connections-arc_doc_id
document_type = ld_doc_typ
length = ld_length1
offset = ld_offset
IMPORTING
binlength = ld_length
offset = ld_offset
TABLES
binarchivobject = lt_binarchivobj
EXCEPTIONS
error_archiv = 1
error_communicationtable = 2
error_kernel = 3
OTHERS = 4.
Zieldatei zum Schreiben öffnen
OPEN DATASET ld_dpfad FOR OUTPUT IN BINARY MODE.
Inhalte in Zieldatei schreiben
LOOP AT lt_binarchivobj INTO lf_binarchivobj.
TRANSFER lf_binarchivobj TO ld_dpfad NO END OF LINE.
ENDLOOP.
Zieldatei schließen
CLOSE DATASET ld_dpfad.
Where is the error for the image data?
Ciao Thomas
Push up by: Thomas Engler on May 3, 2010 4:54 PM -
Transfer a file from App Server to a FTP site.
Hi, Abapers.
I need your help. Probably, this topic has already been posted in a similar way, but we need an answer to solve our problem.
We have to sent a PDF file from a directory of our app server (AIX) to a FTP directory... which would the FM sequence we should use to goal it?
Best Regards.Hi Santiago,
create fm to send file from APP server to FTP site.
if you want to Post file from desktop to Appl use Transaction - CG3Y
if you want to Post file from Appl to Desktop use Transaction - CG3Z
copy the code below....
* Author: Prabhudas Date: 02/21/2006 *
* Name: Z_FTP_FILE_TO_SERVER *
* Title: FTP File on R/3 Application Server to External Server *
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(DEST_HOST) TYPE C
*" REFERENCE(DEST_USER) TYPE C
*" REFERENCE(DEST_PASSWORD) TYPE C
*" REFERENCE(DEST_PATH) TYPE C
*" REFERENCE(SOURCE_PATH) TYPE C
*" REFERENCE(FILE) TYPE C
*" REFERENCE(BINARY) TYPE CHAR1 OPTIONAL
*" REFERENCE(REMOVE_FILE) TYPE CHAR1 OPTIONAL
*" TABLES
*" FTP_SESSION STRUCTURE ZMSG_TEXT OPTIONAL
*" EXCEPTIONS
*" CANNOT_CONNECT
*" SOURCE_PATH_UNKNOWN
*" DEST_PATH_UNKNOWN
*" TRANSFER_FAILED
*" COMMAND_FAILED
DATA: w_password TYPE zftppassword,
w_length TYPE i,
w_key TYPE i VALUE 26101957,
w_handle TYPE i,
w_command(500) TYPE c.
REFRESH ftp_session.
* Scramble password (new Unicode-compliant routine)
w_length = STRLEN( dest_password ).
CALL FUNCTION 'HTTP_SCRAMBLE'
EXPORTING
SOURCE = dest_password
sourcelen = w_length
key = w_key
IMPORTING
destination = w_password.
* Connect to FTP destination (DEST_HOST)
CALL FUNCTION 'FTP_CONNECT'
EXPORTING
user = dest_user
password = w_password
host = dest_host
rfc_destination = 'SAPFTPA'
IMPORTING
handle = w_handle
EXCEPTIONS
not_connected = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
RAISING cannot_connect.
ENDIF.
* Optionally, specify binary file transfer
IF binary = 'X'.
w_command = 'bin'.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = w_handle
command = w_command
TABLES
data = ftp_session
EXCEPTIONS
command_error = 1
tcpip_error = 2.
IF sy-subrc <> 0.
CONCATENATE 'FTP command failed:' w_command
INTO w_command SEPARATED BY space.
MESSAGE ID 'ZW' TYPE 'E' NUMBER '042'
WITH w_command
RAISING command_failed.
ENDIF.
ENDIF.
* Navigate to source directory
CONCATENATE 'lcd' source_path INTO w_command SEPARATED BY space.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = w_handle
command = w_command
TABLES
data = ftp_session
EXCEPTIONS
command_error = 1
tcpip_error = 2.
IF sy-subrc <> 0.
CONCATENATE 'FTP command failed:' w_command
INTO w_command SEPARATED BY space.
MESSAGE ID 'ZW' TYPE 'E' NUMBER '042'
WITH w_command
RAISING source_path_unknown.
ENDIF.
* Navigate to destination directory
CONCATENATE 'cd' dest_path INTO w_command SEPARATED BY space.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = w_handle
command = w_command
TABLES
data = ftp_session
EXCEPTIONS
command_error = 1
tcpip_error = 2.
IF sy-subrc <> 0.
CONCATENATE 'FTP command failed:' w_command
INTO w_command SEPARATED BY space.
MESSAGE ID 'ZW' TYPE 'E' NUMBER '042'
WITH w_command
RAISING dest_path_unknown.
ENDIF.
* Transfer file
CONCATENATE 'put' file INTO w_command SEPARATED BY space.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = w_handle
command = w_command
TABLES
data = ftp_session
EXCEPTIONS
command_error = 1
tcpip_error = 2.
IF sy-subrc <> 0.
CONCATENATE 'FTP command failed:' w_command
INTO w_command SEPARATED BY space.
MESSAGE ID 'ZW' TYPE 'E' NUMBER '042'
WITH w_command
RAISING transfer_failed.
ENDIF.
* Disconnect from destination host
CALL FUNCTION 'FTP_DISCONNECT'
EXPORTING
handle = w_handle.
* Optionally, remove file from source directory
IF remove_file = 'X'.
CONCATENATE source_path '/' file INTO w_command.
CONCATENATE 'rm' w_command INTO w_command SEPARATED BY space.
OPEN DATASET '/dev/null' FOR OUTPUT FILTER w_command.
CLOSE DATASET '/dev/null'.
ENDIF.
Regards,
Prabhudas -
How to move PDF file from Spool to Application Server?
How to move PDF file from Spool to Application Server?
Cannot use RSTXPDFT4 because that converts OTF to PDF and the file is already PDF.
RSTXPDFT5 doesn't work. It picks the file up and assigns it a 'text' type and outputs a 1 line txt (1kb in size) on the server with the spool number in it!
The program which outputs the file to the spool, in the first place, uses adobe forms and outputs to a printer of type PDF.Hi Gemini ,
Please refer the below links.
[http://sap.ittoolbox.com/groups/technical-functional/sap-hr/convert-a-spool-to-pdf-and-save-on-application-server-in-background-720959]
[http://www.sapfans.com/forums/viewtopic.php?f=13&t=325628&start=15]
Edited by: Prasath Arivazhagan on Apr 13, 2010 4:48 PM -
How to exreact multiple pdf files from a zip files from application server to presentation server
Hello exprts,
I am passing one pdf file and one text file to zip file in apllication server through my custom program and then downloading it using standard function module to my desktop. its working fine. Then I added another pdf file to my zip file. But only single pdf file is getting download . So can you please help me regardiong this issue?Dear Experts ,
I finded out the way to extrcat pdf files in presentation server. But now my problem is that I am not able to add multiple pdf files in a zip file. When I am adding new pdf file then older one is not coming in read data set. So please kindly tell me how can I add multiple pdf file in my zip file and again I can get all the pdf files from here. -
System exception while deleting the file from app server in background job
Hi All,
I have a issue while the deleting the file from application server.
I am using the statement DELETE DATASET in my program to delete the file from app server.
I am able to delete the file from the app server when i run the program from app server.
When i run the same report from background job i am getting the message called System exception.
Is there any secuirity which i need to get the issue.
Thank You,
TaraginiHi All,
I get all the authorization sto delete the file from application serever.
Thing is i am able to run the program sucessfully in foreground but not in the background .
It i snot giving any short dump also just JOB is cancelled with the exception 'Job cancelled after system exception ERROR_MESSAGE'.
Can anybody please give me suggestion
Thanks,
Taragini -
Problem in downloading file from app server using CG3Y in to .XLS fomat
hi All,
I have uploaded file in to application server through a program using open data set with the separater as "|" ( pipe ) . Now the user should be able to download the file from apps server to presenataion server in .XLS format using txn CG3Y. but when we download, the format appears wierd and the data is not consistent across columns in excel. i.e the data which is supposed to be in one column in the excel is in the other column. what precautaions should i take before moving data to apps server so that it will be downloaded in a good format.
Appreciate your help...
Regards,
Sreekanth.Separate each values with TAB space present in the application server .
Currently u r using | pipe character. Instead of that use CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB as delimiter.
Each value will displayed in separate cells in excel sheet when u download it frm app.server
Regards,
Lakshman. -
How to download a pdf file from the server from an strut application?
Hi,
I wan to download a pdf file from the server side to local system. Please help me how i use the down load option.Read up on the Struts download action [1].
And next time, please post in the relevant forum, one of the web-tier ones [2].
[1] http://wiki.apache.org/struts/StrutsFileDownload
[2] http://forum.java.sun.com/category.jspa?categoryID=20
People on the forum help others voluntarily, it's not their job.
Help them help you.
Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
---------------------------------------------------------------- -
How can I upload .pdf file from Mac to iPhone or is there an app for that?
How can I upload a .pdf file from my mac to iPhone 3G?
Or is there an app that will allow me to that?
Thanks in advance
ZiaThe app called "Air Sharing" allows you to do that. Connect to a wifi network, run the program and you can mount your iphone as a drive using Finder. Upload all the PDFs you like, and you can open them from within the Air Sharing app. Also, you can view most image files, most office files, etc.
-
How do I transfer a PDF file from an email to my Adobe Reader app.
HHow do I transfer a PDF file from an email to my Adobe Reader app.
You save the file from the email, open Adobe Reader then use File>Open to open the pdf.
-
How to access a PDF file from Oracle DATABASE SERVER
Hi
I have some pdf files in "\home2\docs" directory in Oracle database server 10g. (OS is Linux) I want to access those pdf files from my client system through Oracle Forms. How is it possible?
Please Help!!!! It is very urgent !!!
Expecting fast response!!!!!
Byehi
Thank u for ur response.
Initially i tried to access pdf file from database server. I didn't get any solution for that. So I copied all my pdf files to Application server which is in Linux environment at "/home2/docs" directory.
I gave the following command for accessing the pdf files kept in Lnux Application Server from Oracle 10g forms in a button press trigger.
web.show_document('http://192.168.1.53:7779/home2/docs/test.pdf');
It says "page cannot be found"
So I copied one of the pdf file named "test.pdf" to "/oracle/oas10g/IasHome/forms90/java" in Linux Application Server . Then the following command
web.show_document('http://192.168.1.53:7779/forms90/java/test.pdf');
has opened the the pdf file in browser.
192.168.1.53 is my Linux Application Server IP. and 7779 is the port.
Actually we have lacs of pdf files. So i cannot keep all the pdf files in "/oracle/oas10g/IasHome/forms90/java" directory in Linux Application Server. And also all the pdf files not in the same directory , "/home2/docs" some of the pdf files r in the subdirectories of "/home2/docs/" like /home2/docs/sub1, /home2/docs/sub2, /home2/docs/sub3 etc.
Then how to configure my "/oracle/oas10g/IasHome/forms90/server/forms90.conf" file for retrieving pdf files from "/home2/docs/" and its subdirectories. Is Anything other than this, required for solving my problems.
Now My PDF files r in LINUX APPLICATION SERVER not in database server.
Please help!! It is VERY URGENT!!! -
Why icannot export pdf file from other app to ibook (after update today)?. Please correct my problem.
iPad 2, iOS 5.0.1Why icannot export pdf file from other app to ibook (after update today)?. Please correct my problem.
iPad 2, iOS 5.0.1
Maybe you are looking for
-
Can't open file "~/Library/Application Support/iWeb/Domain.sites2."
Hello, I have been using iWeb for over a year and I have a lot of my work on it. But for some reason, when I went to open iWeb, I get the error message: +Can't open file "~/Library/Application Support/iWeb/Domain.sites2."+ Does anyone know how I can
-
In the below XQ, I am trying to learn making calls to local functions. I have tweaked my earlier XQ, which had a local variable defined [in xf:getCost() function] as XPath to Quantity. Now, I have modified the XQ to make a call to xf:getQty() from xf
-
System Copy results in Framework Error
Hi all, I've just done a System Copy for NW2004s system. I've been able to access the Portal fine from the Administrator account but I'm getting a "Error occurred while trying to access framework page" from any other account. I'm using a custom Por
-
Security questions not working- unable to set up rescue email and reset questions
I have been trying to buy things off of the app store for a few months now. Every time I am asked to answer my security questions, I will asnwer them (I know they are correct answers), but it keeps telling me they are wrong and then I get locked out
-
Hi Experts, I am integrating SAP ECC with MES.I am using POIT trannsaction to transfer the production order from ECC to MES through Middleware.When I transfer the order every time the planned routing and planned BOM is also coming to MES.Since I alwa