Unale to print pdf files in oracle application server using oracle forms
Hi
We are using oracle developer suite 10g(10.1.2.3.0) in Windows vista. (test environment)
Oracle application server 10g(10.1.2.3.0) in Hp-UX 11iv3 (production environment)
We are able to print pdf files in test environment from oracle forms using the below command:
host('/usr/bin/lp -d p9775hplaser '||'/ashome/output/'||:print_file);
But while declaring to the live environment it is not working
host('cat '||:pdf_print_file||' | acroread -toPostScript | /usr/bin/lp -dp9775hplaser');
but when the above command is put in hp-ux cmd prompt it is workinh"'cat '||:pdf_print_file||' | acroread -toPostScript | /usr/bin/lp -dp9775hplaser'";
Kind ly tell me whether the problem i with the host command and some other command is available for printing files from forms.
Here is my guess:
declare
AppID PLS_INTEGER;
begin
AppID := DDE.App_Begin('acroread -toPostScript '||file name,DDE.APP_MODE_MINIMIZED);
end;
Similar Messages
-
Save PDF-file on the application server
Hello experts,
I convert my Smartform to a PDF-File. I copied the code from Suresh Kumar Parvathaneni (REPORT zsuresh_test). At first, thank you Suresh Kumar for that!
Now, I would like to save the PDF-File on the application server and not local.
Could you tell me how to do this. Especially, where do I have to put the abap-code in the given code from Suresh Kumar.
I thank you very much for your help in advance.
With kind regards.
gokselinHi,
You can use the OPEN DATASET statment.
Probably you must be having an output table which you are downloading to the local machine.You can use the same and loop at it. and if the OPEN dataset returned sy-subrc 0, use the TRANSFER statment.
Remember the data will be binary for pdf. So you have to open the dataset in binary mode.
regards,
Advait -
Download PDF File to SAP Application Server
Hi,
I need to download the PDF file to SAP Application Server. Can any one please help me to Solve this Issue?
Thanks in Advance,
KannanYou can read and upload the file to the PC:
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:temptest.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.
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:temptestn.pdf'
filetype = 'BIN'
bin_filesize = length
importing
filelength = lengthn
tables
data_tab = itab.
Rob -
Clone Oracle Applications 11i using Oracle Application Manager
Hi All,
I am working on the following Metalink documents:
*[Note: 398619.1 - Clone Oracle Applications 11i using Oracle Application Manager (OAM Clone)|https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=398619.1]*
I am bit confused, if I am doing Cloning with OAM and providing all the information about the target system how does it work?
Is it that, cloning with OAM will make the required templates and I will have to just take the backup of my database and application and have to restore it on target machine and cloning is done!
Please suggest,
AnchorageIs it that, cloning with OAM will make the required templates and I will have to just take the backup of my database and application and have to restore it on target machine and cloning is done!This is not enough. You still need to complete the following steps on the target node:
Task 5: Configure the Target System
Task 6: Initiate Data Purge
Task 7: Review Checklist -
Connect to Oracle 9i server using oracle 11g client
Hi,
my oracle 9i server is on unix machine.
I got new Window 7 64 bit machine for .NET code development(framework 4.0).It is having Oracle 11G installed.I am getting oracle connection error while running .NET application.
what changes (connection string/tnsnames.ora/others) will I have to do to connect Oracle 9i server using oracle 11g client ?Hi,
Please post the complete error stack you are getting.
Regards
Yoonas -
How to print PDF file from java application?
Hi,
I have a java application that needs to print an PDF files. Could any one provide me links to tutorial/sample codes for doing this?http://onesearch.sun.com/search/onesearch/index.jsp?qt=print+pdf+files&subCat=&site=dev&qp=&chooseCat=javaall&col=developer-forums
-
Regarding the uploading the pdf file to the application server
hi,
iam getting this error while uploading the pdf file to the applicatioin server.
"There was an error while trying to parse an image"
to convert smartform into PDF file we ll use convert_otf FM.
If see that FM data ll be stored in it_tline structure ok.
For sending to application server we ll use
OPEN DATASET p_arch for OUTPUT IN TEXT MODE ENCODING DEFAULT IGNORING CONVERSION ERRORS.
LOOP AT it_tline.
TRANSFER it_tline to p_arch.
ENDLOOP.
CLOSE DATASET p_arch.
Ok
For getting data from internal table we ll use
OPEN DATASET p_arch FOR INPUT IN TEXT MODE ENCODING DEFAULT IGNORING CONVERSION ERRORS
do.
READ DATASET p_arch INTO it_tline.
if sy-subrc = 0.
APPEND it_tline.
ELSE .
exit.
endif.
enddo.
CLOSE DATASET p_arch.
LOOP AT it_tline.
TRANSLATE it_tline USING '~'.
CONCATENATE wa_buffer it_tline INTO wa_buffer.
ENDLOOP.
TRANSLATE wa_buffer USING '~'.
DO.
i_record = wa_buffer.
APPEND i_record.
SHIFT wa_buffer LEFT BY 255 PLACES.
IF wa_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
Attachment
REFRESH:
i_reclist,
i_objtxt,
i_objbin,
i_objpack.
CLEAR wa_objhead.
i_objbin[] = i_record[].
Create Message Body
Title and Description
i_objtxt = 'COMMERCIAL INVOICE'.
APPEND i_objtxt.
DESCRIBE TABLE i_objtxt LINES v_lines_txt.
READ TABLE i_objtxt INDEX v_lines_txt.
wa_doc_chng-obj_name = 'COMMERCIAL INVOICE'.
wa_doc_chng-expiry_dat = sy-datum + 10.
wa_doc_chng-obj_descr = 'COMMERCIAL INVOICE'.
wa_doc_chng-sensitivty = 'F'.
wa_doc_chng-doc_size = v_lines_txt * 255.
CLEAR i_objpack-transf_bin.
i_objpack-head_start = 1.
i_objpack-head_num = 0.
i_objpack-body_start = 1.
i_objpack-body_num = v_lines_txt.
i_objpack-doc_type = 'RAW'.
APPEND i_objpack.
Attachment
(pdf-Attachment)
i_objpack-transf_bin = 'X'.
i_objpack-head_start = 1.
i_objpack-head_num = 0.
i_objpack-body_start = 1.
DESCRIBE TABLE i_objbin LINES v_lines_bin.
READ TABLE i_objbin INDEX v_lines_bin.
i_objpack-doc_size = v_lines_bin * 255 .
i_objpack-body_num = v_lines_bin.
i_objpack-doc_type = 'PDF'.
i_objpack-obj_name = 'COMMERCIAL INVOICE'.
i_objpack-obj_descr = 'COMMERCIAL INVOICE'.
APPEND i_objpack.
BREAK-POINT.
IF it_adr6[] IS NOT INITIAL.
LOOP AT it_adr6 INTO wa_adr6.
CLEAR i_reclist.
i_reclist-receiver = wa_adr6-smtp_addr.
i_reclist-rec_type = 'U'.
i_reclist-com_type = 'INT'.
APPEND i_reclist.
ENDLOOP.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_doc_chng
put_in_outbox = 'X'
TABLES
packing_list = i_objpack
object_header = wa_objhead
contents_bin = i_objbin
contents_txt = i_objtxt
receivers = i_reclist.
ENDIF.
The above error I am getting.
Please give your suggestions
Thanks in advanceU can use this code
Reward if useful
REPORT ZMN_PDF_UPLOAD.
data: begin of itab occurs 0,
field(256),
end of itab.
data: dsn(100) value '\usr\sap\DEV\DVEBMGS00\work\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. -
How to pull all the txt files from an application server to oracle server
hi
i got some 30 txt files on java application server. i have two questions
1) can java guys will be able to move those files to some oracle directory that will be used by create external table command.
2) can oracle do that using a stored procedure ..but then for it i think i have to create ftppkg and ftpbdy and call and connect each time...
which one is better and why?
regards
rajHi,
You can create procedure to move file from application server to oracle server.
Code for list all files in directory
ops$tkyte@8i> GRANT JAVAUSERPRIV to ops$tkyte
2 /
Grant succeeded.
That grant must be given to the owner of the procedure.. Allows them to read
directories.
ops$tkyte@8i> create global temporary table DIR_LIST
2 ( filename varchar2(255) )
3 on commit delete rows
4 /
Table created.
ops$tkyte@8i> create or replace
2 and compile java source named "DirList"
3 as
4 import java.io.*;
5 import java.sql.*;
6
7 public class DirList
8 {
9 public static void getList(String directory)
10 throws SQLException
11 {
12 File path = new File( directory );
13 String[] list = path.list();
14 String element;
15
16 for(int i = 0; i < list.length; i++)
17 {
18 element = list;
19 #sql { INSERT INTO DIR_LIST (FILENAME)
20 VALUES (:element) };
21 }
22 }
23
24 }
25 /
Java created.
ops$tkyte@8i>
ops$tkyte@8i> create or replace
2 procedure get_dir_list( p_directory in varchar2 )
3 as language java
4 name 'DirList.getList( java.lang.String )';
5 /
Procedure created.
ops$tkyte@8i>
ops$tkyte@8i> exec get_dir_list( '/tmp' );
PL/SQL procedure successfully completed.
ops$tkyte@8i> select * from dir_list where rownum < 5;
FILENAME
data.dat
.rpc_door
.pcmcia
ps_data
http://asktom.oracle.com/pls/asktom/f?p=100:11:3597961203953876::::P11_QUESTION_ID:439619916584 -
Oracle Application Server 10g/Oracle Fusion Middleware 11g
Hi folks, This question related to migration/upgrade of Oracle Application Server infrastructure.
I see that the Oracle has come up with Oracle Fusion Middleware 11g. Is it the next release of Oracle Application Server 10g. I have the following questions. Appreciate if any one can provide answers to the following questions. Please correct me if my understanding of these oracle products is not right! Thanks
1. What is the future of Oracle Application Server?
2. Is it Oracle Fusion Middleware(OFM) 11g is the upgrade path if one need
to upgrade?
3. Is it expected that expected that customers need(if require) to move to OFM 11g?
4. Does OFM 10g comes with Oracle Application Server? If not what does
it comes with?
5. If it does not, what about customers having applications built using oracle forms and reports? Does OFG 11g
support Oracle forms and reports?
I understand that OFM 10g comes with Oracle web logic server!
Thanks in advance.
movvaTo run Forms and Reports in Oracle Fusion Middleware 11g you have to use the distribution "Portal, Forms, Reports and Discoverer" in the FMW 11g software pack.
The structure of what we used to call "the application server" has changed a bit however, in the following way:
- In 11g you need to install the Javaserver WebLogic software (version 10.3.3 for the current Forms 11g version 11.1.1.3) first.
In 10g the installation of the Javaserver (OC4J) was part of the App server install.
Note that you just have to install the software, the configuration script for creating a Forms app server instance creates the WebLogic domain (comparable with the OC4J instance) for you.
- In 11g the Fusion Middleware software installation is separate from the creation of an application server instance.
This is more convenient and comparable to Oracle database and Weblogic installation.
- The Fusion Middleware Configuration script installs two parts of the product: 1. A WebLogic Domain. 2. A Fusion Middleware instance.
The first contains everything related to Java, such as the servlet configuration file (formsweb.cfg), while the latter contains everything that has less to do with the Javaserver
- No more Infrastructure server
The Infrastructure server does not exist anymore. If you want to use Single Sign On with Forms/Reports 11g you can install Identity Management 10.1.4.3 (or use Identity Management 11g, and configure separately the 10.1.4.3 Single Sign On) or keep your old 10g Infrastructure installation.
During installation you just have to specify you want to use OID and SSO and it configures out of the box.
Under normal circumstances the same licenses apply to 10g and 11g (as long as you do not use WebLogic for other purposes). -
Installation of Oracle Application Server and Oracle forms 10g
I am currently using form 6i and Oracle 10g in my home. but i want to
Install and setup Forms 10g on my Pentium IV PC with oracle Application server 10g.
I need the issues in this installation and I want Proper steps and Software and hardware Requirement for Implement my oracle forms on web.You can download the documentation from otn.oracle.com or if u have dvd/cd
then installation guide will be there inside the dvd/cd
Rajesh -
Open a pdf file located on Application Server from forms 10g
Dear all,
I want to open a pdf file which is stored in a folder on Application Server.
I have the following codes but could not be able to open the file.
1. host('rundll32 url.dll,FileProtocolHandler C:\REP012.pdf');
in this code I mentioned the path on local machine which is okey.
but the question is that how to open the file which is located in a folder on application server?
the following code don't show and file or error:
host('rundll32 url.dll,FileProtocolHandler /EMS/MANUALS/ACC001.PDF');
This is the file on Application Server not on local machine.
2. web.show_document('//EMS/MANUALS/ACC001.PDF/','_blank');
This give HTTP 404 NOT FOUND error
I think the problem is in path, how to mention the path of my Application Server file?
Regards:
Muhammad NadeemHi,
Did you find a solution to this?
We are running into the same problem where we need to open a file present on the application server (path /opt/webapps/applications/ISL/)
When we try this from the local machine it works (path D:/forms) however it does not work while trying to open it from the application server.
Regards,
Pooja -
PDF file write to application server
Hi All,
I want to write PDF file to application server while downloading its writing but in this manner
%PDF-1.6#%####
108 0 obj#<</First 17/Length 108/Filter/FlateDecode/N 3/Type/ObjStm>>stream
xڲT0P04Q07W05#2,#ll##K#J*#R#C####Sbq#[^##GjNYjIfr##SN##kr~Jf#~xf#c^q&##Ҧ##agG#a####X###T##XR### ##b#
Please let me know where i am doing wrong.
Please see below my code .
(the scenario is when i download the pdf file i want to write the same file in to app server )
call function fm_name
exporting
/1bcdwb/docparams = fp_docparams "
ls_header = ls_waste
lt_item = gt_rkpf
aufnr = lv_aufnr
importing
/1bcdwb/formoutput = fp_formoutput
exceptions
usage_error = 1
system_error = 2
internal_error = 3
others = 4.
concatenate 'D:\temp\PROCESSORDER_' ls_waste-rsnum '.PDF' into lv_file.
pr_file = lv_file.
open dataset pr_file for output in binary mode."text mode encoding NON-UNICODE.
if sy-subrc 0.
exit.
endif.
transfer fp_formoutput-pdf to pr_file.
close dataset pr_file.
clear :fp_formoutput-pdf,lv_file.
Please any one help me thanks,
Thanks,
KumarYou can't tranfer the whole PDF data with just one transfer statement, instead you have to loop that table and transfer the data to the file until you reach the last row.
open dataset pr_file for output in binary mode."text mode encoding NON-UNICODE.
if sy-subrc 0.
exit.
endif.
loop at fp_formoutput-pdf *****************
transfer fp_formoutput-pdf to pr_file.
endloop.
close dataset pr_file.
clear :fp_formoutput-pdf,lv_file. -
Upload the doc , pdf file presentation to application server
When upload file from presentaion to application server other then text
file data is corruption in wed dynpro application using the UI element
of UPLOAD. we used the code in custom application when we checked in
T.Code : 'AL11'. only text file is showing file other then text file
data is showing as corrupt.
code:
elem_sel_opt_1->get_attribute(
EXPORTING
name = 'DATASOURCE'
IMPORTING
value = gd_data ).
CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
EXPORTING
in_xstring = gd_data
IMPORTING
out_string = gd_filedata.
SPLIT gd_filedata AT cl_abap_char_utilities=>newline INTO TABLE
ist_data.
Opening the File
OPEN DATASET gd_file_appl IN TEXT MODE FOR OUTPUT ENCODING DEFAULT. IF sy-subrc NE 0.
WRITE: 'File cannot be opened. Reason:', D_MSG_TEXT.
EXIT.
ENDIF.
Transferring Data
LOOP AT ist_data INTO wa_data.
TRANSFER wa_data TO gd_file_appl.
ENDLOOP.
Closing the File
CLOSE DATASET gd_file_appl.
is it problem with my code. is it problem with UI element.
for file uploading the prasentation server to appliation.
we try with binary mode also
Regards
Praveen Chetpally.You can't tranfer the whole PDF data with just one transfer statement, instead you have to loop that table and transfer the data to the file until you reach the last row.
open dataset pr_file for output in binary mode."text mode encoding NON-UNICODE.
if sy-subrc 0.
exit.
endif.
loop at fp_formoutput-pdf *****************
transfer fp_formoutput-pdf to pr_file.
endloop.
close dataset pr_file.
clear :fp_formoutput-pdf,lv_file. -
How can I upload a pdf file into the application server?
Hi,
I have the otf data, which i have converted into pdf using the funcation module "Convert_otf". Is it possible to upload the pdf file in application server?Dear Srishti,
Use OPEN DATASET in BINARY MODE.
following link will help you.
http://scn.sap.com/thread/1480434
thanks,
vidyasagar -
How to get pdf file from sap presentation server using java connector
Hi Friends,
with the below code i am able to get po details in pdf in presentation server.
DATA : w_url TYPE string
VALUE 'C:\Documents and Settings\1011\Solutions\web\files\podet.pdf'.
CALL FUNCTION 'ECP_PDF_DISPLAY'
EXPORTING
purchase_order = i_ponum
IMPORTING
PDF_BYTECOUNT =
pdf = file " data in Xsting format
*Converting Xstring to binary_tab
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = file
APPEND_TO_TABLE = ' '
IMPORTING
OUTPUT_LENGTH =
TABLES
binary_tab = it_bin " data in binary format
**Downloading into PDF file
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
filename = w_url
filetype = 'BIN'
TABLES
data_tab = it_bin
when i am using java connector , to retirve the file from presentation server , the follwoing error i am getting...
init:
deps-jar:
compile-single:
run-single:
com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: Error in Control Framework
at com.sap.mw.jco.rfc.MiddlewareRFC$Client.nativeExecute(Native Method)
at com.sap.mw.jco.rfc.MiddlewareRFC$Client.execute(MiddlewareRFC.java:1244)
at com.sap.mw.jco.JCO$Client.execute(JCO.java:3842)
at com.sap.mw.jco.JCO$Client.execute(JCO.java:3287)
at PdfGen.<init>(PdfGen.java:35)
at PdfGen.main(PdfGen.java:78)
Java Result: 1
BUILD SUCCESSFUL (total time: 1 second)
i debugged too, problem with <b>gui_download......</b>
I am very glad to all with your suggestions!!
Regards,
Madhu..!!Hi
You can try to create an external command (transaction SM69).......sorry I've forgotten,,,,they works on application
How do you call CL_GUI_FRONTEND_SERVICES=>EXECUTE?
Max
Edited by: max bianchi on Oct 13, 2011 10:27 AM
Maybe you are looking for
-
Using Final Cut Pro, can we create a subtitle which can be used in other applications?
Can a subtitle file be created using FCP and later use in other application?
-
Reading colour image using raster object and getsample() method
Hello all, I am trying to read a grey image using this code below and it perfectly works: File filename = new File("myimage.jpg"); BufferedImage inputimage = ImageIO.read(filename); Raster input = inputimage.getRaster(); double pixelvalue = input.get
-
Homogenous System Copy SAP 4.7, Oracle 9.2.0.7
hi I have SAP 4.7, Oracle 9.2.0.7 system on windows. I need to perform a system copy of this to QAS System. I need some dcouments/procedure to do the same. Since it is a very old version, so i am not able to find any document. Please assist.
-
Document Preview Capability in Files?
I have a vague memory of being demonstrated a capability within Files (though could have been email) to preview a lot of standard document types without having to download the full document. So for example it will generate a read-only html view of a
-
I bought last week a new MBP 13" with retina display but after 2 days I started using the mail app but when I was about the set my mail account, I notice that there was already another name in the name section. I was just wondering if apple sells ref