Urgent: loading a pdf file to presentation server at the end of the day
hi
I got a requirement like smartform will be converted into pdf file and it will loaded into application server, at the End of the day all the pdf files which are generated on that day will be loaded to in file at presentation server ,
so please help me out regarding
Thanks in advance
regards
krishna
Hi Chris,
this problems are in fact new to me, but I'm just starting on a new workplace where they have these issues since forever.
I'm hoping that new point of view may find a solution to it ;-)
I'll try to watch the traffic - it could be related to the particular network we have. Will ask and post some more info tomorrow.
Thank you!
/best
/j
Similar Messages
-
Downloaded PDF file and try to type the form or sign the form, it it will not let me?
From: Pat Willener [email protected]
Sent: 11 December 2012 02:36
To: chandabajaj
Subject: I have just load form Pdf file and saved try to sign or type the form,it will not let me?
Re: I have just load form Pdf file and saved try to sign or type the form,it will not let me?
created by Pat Willener <http://forums.adobe.com/people/pwillener> in Adobe Reader - View the full discussion <http://forums.adobe.com/message/4911163#4911163 -
Error while downloading the PDF file on presentation server
Hi all,
i have converted OTF file into PDF one and then downloading it to the presentation server . But it gives the error as follows
'Access to file denied' . Can anyone tell me what may be the issue ? Below is my code
DATA: i_lines TYPE tline OCCURS 0 WITH HEADER LINE.
DATA: ws_bin_size TYPE i.
DATA: t_otf TYPE TABLE OF itcoo,
ws_filename TYPE string.
t_otf[] = wa_job_info-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = ws_bin_size
TABLES
otf = t_otf
lines = i_lines.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = ws_bin_size
filename = 'C:\ABC.PDF'
filetype = 'BIN'
TABLES
data_tab = i_lines.Hi Sayeed,
You may not having the permissions to create files in 'C' folder. Change the path and try again. -
How to send a local PDF file(on presentation Serv) as attachment in a mail.
Hi,
This is urgent requirement..
Please help.. Some scanned document is saved as PDF file locally (on Presentation Server) that i want to send as attachment in mail.
I tried with SO_NEW_DOCUMENT_ATT_SEND_API1 Function Module but
It is just sending the file as attachement, but when i open that file into mail..it is not opening. Is there anythign so that i can just give filepath and that file can go to mail.
I am selecting the filepath in selection screen but in FM SO_NEW_DOCUMENT_ATT_SEND_API1 there is no option of giving the file path. So it is not taking right file.
Is there any other function module ?http://www.sap-img.com/abap/sending-email-with-attachment.htm
-
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,
MadhuAlso 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" -
Move pdf file into application server
Hi ABAP Gurus,
i want your valuable help in solving my problem.
i tried to create PDF file in application server and its creating as
PDF file in Application server..but i am unable to see the content in text ,
instead it is displaying in binary content...but when i tried to create
in presentation server i am able to see it as text in PDF file....
Can u please let me know whats wrong in my work and how to create a PDF file
in Application server with text content
with regards,
Gowri.Hi Gowri,
Check this example....
report ztest.
data: begin of itab occurs 0,
field(256),
end of itab.
data: dsn(100) value '/usr/sap/xfr/FIS/testpdf',
length like sy-tabix,
lengthn like sy-tabix.
call function 'GUI_UPLOAD'
exporting
filename = 'c:\temp\test.pdf'
filetype = 'BIN'
importing
filelength = length
tables
data_tab = itab.
open dataset dsn for output in binary mode.
loop at itab.
transfer itab-field to dsn.
endloop.
close dataset dsn.
clear itab.
refresh itab.
*- To crosscheck if it went well
open dataset dsn for input in binary mode.
do.
read dataset dsn into itab-field.
if sy-subrc = 0.
append itab.
else.
exit.
endif.
enddo.
call function 'GUI_DOWNLOAD'
exporting
filename = 'c:\temp\testn.pdf'
filetype = 'BIN'
bin_filesize = length
importing
filelength = lengthn
tables
data_tab = itab.
Or
Use the TCode
CG3Z or CG3Y
for downloading to Application Server.
Thanks,
Reward If helpful. -
No Data in PDF file in FTP server
Hi All,
I am trying to place a PDF file in FTP server.
Used
CONVERT_OTFSPOOLJOB_2_PDF to convert spool to PDF
SCMS_TEXT_TO_XSTRING
FTP_R3_TO_SERVER to transfer data to FTP.
I am able to see PDF file in FTP and no of pages matches with that of R/3 but there is no data in PDF file.To get pdf file , you need to set the itcpo-tdgetotf = 'X' and need to pass in the exporting parameter (options in open_form function module ).Then in close_form function module take all the data of otfdata table into an internal table . Then use SX_OBJECT_CONVERT_OTF_PDF function module to convert it to pdf.
I will show with an example.
tables itcpo.
DATA: ch_otf TYPE STANDARD TABLE OF itcoo.
DATA: w_otf TYPE itcoo.
DATA: w_pdf TYPE solisti1. "For PDF
DATA: i_content_txt TYPE soli_tab.
DATA: temp1 TYPE sx_format VALUE 'OTF',
temp2 TYPE sx_format VALUE 'PDF'.
DATA: c_printer TYPE sx_devtype VALUE 'PRINTER'.
DATA: w_transfer_bin TYPE sx_boolean. "Content
DATA: i_content_bin TYPE solix_tab, "Content
wa_content_bin TYPE solix,
i_objhead TYPE soli_tab.
itcpo-tdnoprint = 'X'.
itcpo-tdpreview = 'X'.
itcpo-tdgetotf = 'X'.
These three parameters need to be passed along with other required parameters
CALL FUNCTION 'OPEN_FORM'
EXPORTING form = xformular
language = ekko-spras
OPTIONS = itcpo
archive_index = toa_dara
archive_params = arc_params
device = xdevice
dialog = xdialog
mail_sender = sender
mail_recipient = recipient
EXCEPTIONS canceled = 01.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT = RESULT
tables
otfdata = ch_otf.
LOOP AT ch_otf INTO w_otf.
CONCATENATE w_otf-tdprintcom w_otf-tdprintpar
INTO w_pdf.
APPEND w_pdf TO i_content_txt.
ENDLOOP.
converting otf file to pdf file
CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
EXPORTING
format_src = temp1 "'OTF'
format_dst = temp2 "'PDF'
devtype = c_printer
CHANGING
transfer_bin = w_transfer_bin
content_txt = i_content_txt
content_bin = i_content_bin
objhead = i_objhead
len = v_len_in
EXCEPTIONS
err_conv_failed = 1
OTHERS = 2.
Then open dataset and transfer to ftp of the content of table content_bin(i_content_bin) as shown in above example.
I think this will be helpful for you -
Copy File from Presentation Server to Application Server in Background
Hi,
I need to copy Image file from Presentation Server to Application Server.
The below given code is workking fine in Foreground but whenevr I am trying to execute in Background, the job is cancelled and I am getting a dump.
data : wa_source type string,
wa_destination type string.
wa_source = 'C:\PARBIND.BMP'.
wa_destination = 'D:\PARBIND.BMP'.
start-of-selection.
call method cl_gui_frontend_services=>file_copy
exporting
source = wa_source
destination = wa_destination
* overwrite = SPACE
* EXCEPTIONS
* cntl_error = 1
* error_no_gui = 2
* wrong_parameter = 3
* disk_full = 4
* access_denied = 5
* file_not_found = 6
* destination_exists = 7
* unknown_error = 8
* path_not_found = 9
* disk_write_protect = 10
* drive_not_ready = 11
* not_supported_by_gui = 12
* others = 13
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
In backgound Error is....
Exception condition "CNTL_ERROR" raised.*
Any solution is appreciated.
Thanks
ArbindHi Arbind,
Just realize... when you run it in foreground, you have a foreground to capture the file location. so it runs fine..
but when you are running it in background, there is no foreground to check that is no gui present... how can it check where the C:\.... location is??
no need of reading any oss note... just see.. the name is cl_GUI_FRONTEND_service.. its only for front end..
u need open dataset, read dataset, close dataset kind of things while running in background. or RFCs to read the file... (search SDN). -
How to search file from presentation server
Hi All,
In a ABAP program i want to display a dialog box which will help me to find out any file from presentation server.That dialog box should be display after clicking on parameter on selection screen.Parameter is a simple variable,not a field from any internal table. so i can not use function module F4IF_INT_TABLE_VALUE_REQUEST
Please suggest me any function module which will satisfy my requirement.
Thank you.Hi,
Check this example..
DATA: T_FILETABLE TYPE FILETABLE.
DATA: RC TYPE I.
DATA: USER_ACTION TYPE I.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
CHANGING
file_table = T_FILETABLE
rc = RC
USER_ACTION = USER_ACTION
EXCEPTIONS
FILE_OPEN_DIALOG_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
others = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Thanks,
Naren -
Read PDF Formatted Spool and write PDF File to Application Server
Hi Experts,
After ECC 6.0, HR-W2 and W2C Form Spools are getting generated in PDF format.
We have a requirement wherein we want to read the PDF Spool Programatically and write the PDF file to Application server (Using OPEN DATASET and CLOSE DATASET)
PARAMETERS : p_spono LIKE tsp01-rqident.
DATA: pdf_data type FPCONTENT.
types: lt_pdf_table(1000) type x.
data: l_pdf_data type standard table of lt_pdf_table,
l_pdf_line type lt_pdf_table,
l_offset type i,
l_len type i,
p_file(100) VALUE '\sapout\DVH\pdf2.pdf'.
*Read the spool content
CALL FUNCTION 'FPCOMP_CREATE_PDF_FROM_SPOOL'
EXPORTING
i_spoolid = p_spono
i_partnum = '1'
IMPORTING
e_pdf = pdf_data
* e_pdf_file = file
EXCEPTIONS
ads_error = 1
usage_error = 2
system_error = 3
internal_error = 4
OTHERS = 5.
* Modify the spool contents to prepare internal table
l_len = xstrlen( pdf_data ).
while l_len >= 1000.
l_pdf_line = pdf_data+l_offset(1000).
append l_pdf_line to l_pdf_data.
add 1000 to l_offset.
subtract 1000 from l_len.
endwhile.
if l_len > 0.
l_pdf_line = pdf_data+l_offset(l_len).
append l_pdf_line to l_pdf_data.
endif.
* GUI DOWNLOAD Works Fine
* Now pdf contents is ready , lets store in local PC
*CALL FUNCTION 'GUI_DOWNLOAD'
* EXPORTING
* filename = 'C:\Documents and Settings\Desktop\shital.pdf'
* filetype = 'BIN'
* TABLES
* data_tab = l_pdf_data.
OPEN DATASET p_file FOR OUTPUT IN BINARY MODE.
IF sy-subrc <> 0.
MESSAGE ID '00' TYPE 'E' NUMBER '398' WITH 'sy-subrc:' sy-subrc
' Error opening file:'(Z03) p_file.
ENDIF.
LOOP AT l_pdf_data INTO l_pdf_line.
TRANSFER l_pdf_line TO p_file.
ENDLOOP.
CLOSE DATASET p_file.
IF sy-subrc <> 0.
MESSAGE ID '00' TYPE 'E' NUMBER '398' WITH 'sy-subrc:' sy-subrc
' Error closing file:'(Z04) p_file.
ENDIF.
Currently as you can see I have commented out GUI_DOWNLOAD Function Module, But it works perfect when I try to Download file to Local Desktop.
But when I try to pass the same Contents to Application server file and then try to open it by downloading file then it opens BLANK pdf file.
As per requirements I should be able to write the file correctly on Application server and If I dowload it from there it should open PDF file correctly.
Let me know if you require further details about the issue.
Regards
Shital
Edited by: shital phadake on Apr 8, 2009 9:39 PMThanks Selçuk for your reply and taking time for understanding the Issue,
I went thru Functionality of the program you suggested but dont think it matches my requirement.
Regards
Shital -
How to get the files in presentation server while uploading?
how to get the files in presentation server while uploading?
give me the function module nameHi,
PARAMETERS: P_FILE LIKE RLGRAP-FILENAME DEFAULT C_PRES. "Prsnt Srvr
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
DEF_PATH = P_FILE
MASK = ',..'
MODE = '0 '
TITLE = 'Choose File'
IMPORTING
FILENAME = P_FILE
EXCEPTIONS
INV_WINSYS = 1
NO_BATCH = 2
SELECTION_CANCEL = 3
SELECTION_ERROR = 4
OTHERS = 5. -
Read XML file from presentation server
Hi All,
I want read XML file from presentation server currently i am using GUI_UPLOAD fm . but it is reading some junk data.
DATA : BEGIN OF upl OCCURS 0,
f(255) TYPE c,
END OF upl.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = D:\XX.XML'
filetype = 'BIN'
TABLES
data_tab = upl.
is there any other alternative.
Thanks
Swarup,Hi Swarup,
Use method IMPORT_FROM_FILE of class CL_XML_DOCUMENT.
A sample code snippet :-
PARAMETERS: p_filnam TYPE localfile OBLIGATORY
DEFAULT 'C:\Documents and Settings\ssaha\Desktop\test.xml'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_filnam.
DATA: l_v_fieldname TYPE dynfnam.
l_v_fieldname = p_filnam.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
field_name = l_v_fieldname
IMPORTING
file_name = p_filnam.
START-OF-SELECTION.
TYPES:
BEGIN OF ty_tab,
name TYPE string,
value TYPE string,
END OF ty_tab.
DATA:
lcl_xml_doc TYPE REF TO cl_xml_document,
v_subrc TYPE sysubrc,
v_node TYPE REF TO if_ixml_node,
v_child_node TYPE REF TO if_ixml_node,
v_root TYPE REF TO if_ixml_node,
v_iterator TYPE REF TO if_ixml_node_iterator,
v_nodemap TYPE REF TO if_ixml_named_node_map,
v_count TYPE i,
v_index TYPE i,
v_attr TYPE REF TO if_ixml_node,
v_name TYPE string,
v_prefix TYPE string,
v_value TYPE string,
v_char TYPE char2.
DATA:
itab TYPE STANDARD TABLE OF ty_tab,
wa TYPE ty_tab.
CREATE OBJECT lcl_xml_doc.
CALL METHOD lcl_xml_doc->import_from_file
EXPORTING
filename = p_filnam
RECEIVING
retcode = v_subrc.
CHECK v_subrc = 0.
v_node = lcl_xml_doc->m_document.
CHECK NOT v_node IS INITIAL.
v_iterator = v_node->create_iterator( ).
v_node = v_iterator->get_next( ).
WHILE NOT v_node IS INITIAL.
CASE v_node->get_type( ).
WHEN if_ixml_node=>co_node_element.
v_name = v_node->get_name( ).
v_nodemap = v_node->get_attributes( ).
IF NOT v_nodemap IS INITIAL
* attributes
v_count = v_nodemap->get_length( ).
DO v_count TIMES.
v_index = sy-index - 1.
v_attr = v_nodemap->get_item( v_index ).
v_name = v_attr->get_name( ).
v_prefix = v_attr->get_namespace_prefix( ).
v_value = v_attr->get_value( ).
ENDDO.
ENDIF.
WHEN if_ixml_node=>co_node_text OR
if_ixml_node=>co_node_cdata_section.
* text node
v_value = v_node->get_value( ).
MOVE v_value TO v_char.
IF v_char <> cl_abap_char_utilities=>cr_lf.
wa-name = v_name.
wa-value = v_value.
APPEND wa TO itab.
CLEAR wa.
ENDIF.
ENDCASE.
* advance to next node
v_node = v_iterator->get_next( ).
ENDWHILE.
LOOP AT itab INTO wa.
ENDLOOP.
Regards
Abhii -
Generating tab delimited file on presentation server
Hi All,
I have to generate a tab delimited file on presentation server. The file shouldn't have '#' as separator. Instead it should be separated by TAB (when you press TAB button, some spaces will come naa... like that) ' '. Please advice me how to do this...
Thanks in Advance,
Regards,
PhaniHi,
Check this example..
DATA: BEGIN OF itab OCCURS 0,
matnr TYPE matnr,
werks TYPE werks_d,
END OF itab.
itab-matnr = 'ABC'.
itab-werks = 'ASDF'.
APPEND itab.
itab-matnr = 'EFG'.
itab-werks = 'DHIS'.
APPEND itab.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'C:\test.txt'
write_field_separator = 'X'
TABLES
data_tab = itab
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.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
MESSAGE s208(00) WITH 'File downloaded'.
ENDIF.
Thanks,
Naren -
Hi, Is there any way to load a PDF document in a flex
application. Can anyone guide me regarding this issue.
I want an example for loading PDF file in a flex application.
By,
Dharma"flexdharma" <[email protected]> wrote in
message
news:gcurce$evh$[email protected]..
>
Hi. I am having a task of loading a PDF file using
IFrame in
> flex. I
> have created the code. If I run the page through
browser. It's working
> properly. If i run the page using flex, the output file
being overwritten
> each
> time when the page is compiled. How to avoid the output
file being
> overwritten
> several times by flex.
Project>Properties>Flex Compiler>uncheck Generate
HTML Wrapper
HTH;
Amy -
I can not up load a PDF file to my File Manager?
i can not up load a PDF file to my File Manager?
Hi there,
You will need to provide way more information then that.
How big is the file? What happens when you upload it?
Do you have screenshots to show any errors you get?
Maybe you are looking for
-
I currently am working on a project in which i am going to be placing a pxi system with some components inside a larger box with some other hardware connected to it. Basicly what i want to do is to get rid of my chassis. I would like to have my pxi c
-
Is there any free way to get music i lost back if it's not synced to my computer?
is there any free way to get music i lost back if it's not synced to my computer?
-
Customize default user settings for new RemoteApp logins
Hi all, I'm poking around with RemoteApp on Windows 2012 R2 and have it set up to use a centralized file share for the user profiles and everything seems to be working ok. Is there a way for me to customize some of the options in a user's profile for
-
Changing Status Message in ALE
Whenever we post a order, and if that Order contains some error, it should throw a message to workflow inbox, telling the Order Number and the item Number for Error. For Eg., Actual error defined in SAP is "Document contains same order item more than
-
Just upgraded from CF MX 6 to MX 7. Trying out flash forms, but they are not working. I tried out a simple First Name, Last name, Submit form setting the form to flash. When viewing the page in Safari, Firefox on a Mac and IE in Windows the page is b