How to download from spool to application server
Hi all,
Can any one tell me how to download from spool to application server. Quick response would be appreciated.
thanks
mahesh
Hi Kilaru,
Please find the sample code for your req,t and let me know if you found any difficulty on the same.
<b>Just copy paste the code :</b>
This will Convert spool to PDF format and download.
data: w_ident like tsp01-rqident,
w_doctype like tsp01-rqdoctype,
w_bytecount type i.
data: itab_pdf like tline occurs 0 with header line.
parameter spoolnum like tsp01-rqident obligatory.
selection-screen begin of block a2 with frame.
parameters: to_pc radiobutton group a2 default 'X',
pcfile like rlgrap-filename lower case,
to_unix radiobutton group a2,
unixfile(255) lower case.
selection-screen end of block a2.
at selection-screen on block a2.
if to_pc = 'X' and pcfile is initial.
message e398(00) with 'Enter PC File Name.'.
elseif to_unix = 'X' and unixfile is initial.
message e398(00) with 'Enter Unix File Name.'.
endif.
at selection-screen on spoolnum.
select single rqident rqdoctype
into (w_ident, w_doctype)
from tsp01
where rqident = spoolnum.
if sy-subrc ne 0.
message e398(00) with 'Spool' spoolnum 'not found'.
endif.
at selection-screen on value-request for pcfile.
call function 'WS_FILENAME_GET'
exporting
mask = ',.,..'
importing
filename = pcfile
exceptions
others = 1.
if sy-subrc <> 0.
message id sy-msgid type 'I' number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
start-of-selection.
if w_doctype = 'LIST'.
perform get_abap_spool_in_pdf.
elseif w_doctype = 'OTF'.
perform get_otf_spool_in_pdf.
endif.
if to_pc = 'X'.
perform write_pdf_spool_to_pc.
else.
perform write_pdf_spool_to_unix.
endif.
message i398(00) with 'Completed OK'.
form get_abap_spool_in_pdf.
refresh itab_pdf.
call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
exporting
src_spoolid = w_ident
importing
pdf_bytecount = w_bytecount
tables
pdf = itab_pdf
exceptions
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
others = 12.
if sy-subrc ne 0.
message e398(00) with 'Cannot convert to PDF. Error =' sy-subrc.
endif.
endform.
*********************************************************form get_otf_spool_in_pdf.
refresh itab_pdf.
call function 'CONVERT_OTFSPOOLJOB_2_PDF'
exporting
src_spoolid = w_ident
importing
pdf_bytecount = w_bytecount
tables
pdf = itab_pdf
exceptions
err_no_otf_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_dstdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
others = 12.
if sy-subrc <> 0.
message e398(00) with 'Cannot convert to PDF. Error =' sy-subrc.
endif.
endform.
*********************************************************form write_pdf_spool_to_unix.
open dataset unixfile for output in binary mode.
if sy-subrc ne 0 .
message e398(00) with 'Cannot open unix file for output:' unixfile.
endif.
loop at itab_pdf.
transfer itab_pdf to unixfile.
if sy-subrc ne 0 .
message e398(00) with 'Cannot write to unix file:' unixfile.
endif.
endloop.
close dataset unixfile.
endform.
*********************************************************form write_pdf_spool_to_pc.
call function 'WS_DOWNLOAD'
exporting
bin_filesize = w_bytecount
filename = pcfile
filetype = 'BIN'
tables
data_tab = itab_pdf
exceptions
file_open_error = 1
file_write_error = 2
invalid_filesize = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
others = 10.
if sy-subrc <> 0.
message e398(00) with 'Cannot download to PC. Error =' sy-subrc.
endif.
endform.
Hope this will help you.
Cheers
Sunny
Rewrd points, if found helpful
Similar Messages
-
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 store PDF spool in Application server.
Hi,
I have a requirement to send Print form spool in Application server.
For converting OTF format we have CONVERT_OTFSPOOLJOB_2_PDF.
How to convert and store Interactive print forms spool number(PDF type) in application server.
Thanks in advance.Hi,
I have a requirement to send Print form spool in Application server.
For converting OTF format we have CONVERT_OTFSPOOLJOB_2_PDF.
How to convert and store Interactive print forms spool number(PDF type) in application server.
Thanks in advance. -
How to start and stop Oracle Application Server from ANT
How to start and stop Oracle Application Server and Web application from ANT
Thanks in Advance.
ManiHi,
You can use: startManagedWebLogic.sh, it is in your domain directory and you have to execute it in this way
./startManagedWebLogic.sh managedServerName http://adminServerHost:adminServerPort
For instance, in my case I use:
unixserv01:/webportal/domains/appServerWeb/bin>startManagedWebLogic.sh managedServ01 http://pelma3w3per01.mesaperu.next:7001
You have to run it on the machine where the managed server was installed.
Best regards,
Raúl -
How can I download the data to Application Server and Network Drive
Hi Experts
I am having problem with download the data to Application Server and Network Drive in back ground. its working in foregorund but not in back ground.please suggest me . Thanks for advance.
Thanks & Regards
RaghavaHi Experts
I am using like this
P_Back is a check box on the selection-screen.
it_fihrst_out-its internal table
sy-batch -Program is running in the background
IF sy-batch IS INITIAL.
IF p_back = 'X'.
OPEN DATASET file_01 FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc = 0.
LOOP AT it_fihrst_out.
TRANSFER it_fihrst_out TO file_01.
ENDLOOP.
ENDIF.
CLOSE DATASET file_01.
CASE sy-subrc.
WHEN 0.
WRITE: / file_01, / 'successfully generated.'.
WHEN OTHERS.
WRITE: / file_01, 'Unexpected error occurred.'.
ENDCASE.
ELSE.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
filename = file_01
filetype = 'ASC'
TABLES
data_tab = it_fihrst_out
EXCEPTIONS
file_open_error = 1
file_write_error = 2
invalid_filesize = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
OTHERS = 10.
CASE sy-subrc.
WHEN 0.
WRITE: / file_01, / 'successfully generated.'.
WHEN 2.
WRITE: / file_01, 'Output Error: File still open'.
WHEN OTHERS.
WRITE: / file_01, 'Unexpected error occurred.'.
ENDCASE.
ENDIF.
ELSE.
LOOP AT it_fihrst_out.
WRITE:/ it_fihrst_out.
ENDLOOP.
ENDIF.
This is the code . -
How deploy 6i Forms Fmx trought Application Server 10g
Hello every one,
Situation :
In my company, we have a software developed by a team using Oracle Forms 6i, the application is connected te Oracle 9i Database and every thing works well.
Problem :
I was able to upgrade the database from 9i to 10g. But my question : is it possible to deploy all the Forms (fmx 6i version) on Application Server 10g. I want to use the 3-tiers architecture.
Take note that i have not the fmb source files. Just the FMX (about 40 files)
If yes, can you explain also how to proceed (tools to install on Application Server) and how to setup the connection between the 3 tiers throught a LOCAL NETWORK.
Regards
KiraYou will at least need to recompile all those *.fmb to *.fmx in the version of the App server you will be using.
We have a forms6 c/s application we are migrating to forms 11g and it almost that easy (except for changes in how you launch reports).
The application server is setup alot like the client/server side of forms is, it needs a tnsnames.ora that points to the database and it needs to know where you will be storing the forms and report. Looks for any *.fmx and that will be the default location. -
TRANSFER OF DATA FROM DATABASE TO APPLICATION SERVER
I have to upload /transfer data from database to application server .
I am not able to get it.
If anyone have any solution to it,
post it to me.
thanks*& Report <name>
REPORT name.
DATA:
BEGIN OF FS_SPFLI,
CARRID TYPE SPFLI-CARRID,
CONNID TYPE SPFLI-CONNID,
COUNTRYFR TYPE SPFLI-COUNTRYFR,
CITYFROM TYPE SPFLI-CITYFROM,
AIRPFROM TYPE SPFLI-AIRPFROM,
COUNTRYTO TYPE SPFLI-COUNTRYTO,
CITYTO TYPE SPFLI-CITYTO,
AIRPTO TYPE SPFLI-AIRPTO,
FLTIME TYPE SPFLI-FLTIME,
DEPTIME TYPE SPFLI-DEPTIME,
ARRTIME TYPE SPFLI-ARRTIME,
DISTANCE TYPE SPFLI-DISTANCE,
DISTID TYPE SPFLI-DISTID,
FLTYPE TYPE SPFLI-FLTYPE,
PERIOD TYPE SPFLI-PERIOD,
END OF FS_SPFLI.
DATA:
T_SPFLI LIKE
STANDARD TABLE
OF FS_SPFLI.
DATA:
BEGIN OF FS_TABLE,
CHAR(100) TYPE C,
END OF FS_TABLE.
DATA:
T_TABLE LIKE
STANDARD TABLE
OF FS_TABLE.
DATA:
BEGIN OF FS_TABLE1,
CHAR(100) TYPE C,
END OF FS_TABLE1.
DATA:
T_TABLE1 LIKE
STANDARD TABLE
OF FS_TABLE1.
SELECT CARRID
CONNID
COUNTRYFR
CITYFROM
AIRPFROM
COUNTRYTO
CITYTO
AIRPTO
FLTIME
DEPTIME
ARRTIME
DISTANCE
DISTID
FLTYPE
PERIOD
FROM SPFLI
INTO TABLE T_SPFLI.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
FILENAME = 'd:\files\p_spfli04'
FILETYPE = 'ASC'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
IMPORTING
FILELENGTH =
TABLES
DATA_TAB = T_SPFLI
FIELDNAMES =
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.
ENDIF.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'd:\files\p_spfli04'
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = ' '
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE =
IMPORTING
FILELENGTH =
HEADER =
TABLES
DATA_TAB = T_TABLE
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*LOOP AT T_TABLE INTO FS_TABLE.
WRITE:
/ FS_TABLE-CHAR.
*ENDLOOP.
OPEN DATASET 'p_spfli04' FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF SY-SUBRC EQ 0.
MESSAGE 'File Already Exists' TYPE 'I'.
STOP.
ELSE.
CLOSE DATASET 'p_spfli04'.
ENDIF.
OPEN DATASET 'P_SPFLI02' FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
LOOP AT T_TABLE INTO FS_TABLE.
TRANSFER FS_TABLE TO 'p_spfli04'.
ENDLOOP.
CLOSE DATASET 'p_spfli04'.
*ENDIF.
OPEN DATASET 'p_spfli04' FOR INPUT IN TEXT MODE ENCODING DEFAULT.
LOOP AT T_TABLE INTO FS_TABLE.
READ DATASET 'p_spfli04' INTO FS_TABLE.
APPEND FS_TABLE-CHAR TO T_TABLE1.
ENDLOOP.
Here is the sample code to download and upload the file onto presentation server and then using OPEN DATASET you'll be able to transfer the data to APPLICATION SERVER....
Regards,
Pavan P. -
How to save CSV file in application server while making infospoke
How to save CSV file in application server to be used as destination while making infospoke.
Please give the steps.........Hi
If you want to load your flatfile from Application server,then you need to trasfer your file from your desktop(Computer) to Application server by using FTP.
Try using ARCHIVFILE_CLIENT_TO_SERVER Function module.
You Just need to give thesource path and the target path
goto SE37 t-code , which is Function module screen, give the function name ARCHIVFILE_CLIENT_TO_SERVER, on click F8 Execute button.
for path variable give the file path where it resides like C:\users\xxx\desktop\test.csv
for target path give the directory path on Application server: /data/bi_data
remember the directory in Server starts with /.
U have to where to place the file.
Otherwise use 3rd party tools to connect to ur appl server like : Core FTP and Absolute FTP in google.
Otherwise...
Goto the T.code AL11. From there, you can find the directories available in the Application Server.
For example, if you wanna save the file in the directory "DIR_HOME", then you can find the path of the directories in the nearby column. With the help of this, you can specify the target path. Specify the target path with directory name followed by the filename with .CSV extension.
Hope this helps
regards
gaurav -
How to rename a file in Application server
Hi All,
Here I have a issue with the present file which is being generated in application server.
Before the completion of the file the EDI tool is extracting the file from the app server.So here I would like to generate the file with a temp name and then rename to the actual file name which EDI recognises and fetches.
Please correct me If I am wrong and let me know how to rename the file in application server.
Thanks,
Vijay Nyou can try using unix command , if your application server is unix.
use move command
mv <source> <target>
REPORT ZUNIX line-size 400
no standard page heading.
data: unixcom like rlgrap-filename.
unixcom = 'mv file1 file2'.
data: begin of tabl occurs 500,
line(400),
end of tabl.
data: lines type i.
start-of-selection.
refresh tabl.
call 'SYSTEM' id 'COMMAND' field unixcom
id 'TAB' field tabl[].
or else you can open dataset/ read the dataset and move it to another file and delete the old file. -
How to redeploy Calculation Manager Web Application Server
Hi All,
I am installing a patch(13925741) for Calculation Manager, i stuck at the following point:
6. Perform the standard Calculation Manager Web application server deployment task using Hyperion Enterprise Performance Management System Configurator (EPM System Configurator). See the Oracle Hyperion Enterprise Performance Management System Installation and Configuration Guide for instructions.
I don't know how to redeploy Calculation Manager Web Application Server, plz help me in deploying this.
The readme for the patch can be found at:
https://updates.oracle.com/Orion/Services/download?type=readme&aru=15356919#_Toc330987031909062 wrote:
Hi All,
I am installing a patch(13925741) for Calculation Manager, i stuck at the following point:
6. Perform the standard Calculation Manager Web application server deployment task using Hyperion Enterprise Performance Management System Configurator (EPM System Configurator). See the Oracle Hyperion Enterprise Performance Management System Installation and Configuration Guide for instructions.
I don't know how to redeploy Calculation Manager Web Application Server, plz help me in deploying this.
The readme for the patch can be found at:
https://updates.oracle.com/Orion/Services/download?type=readme&aru=15356919#_Toc330987031
Hi,
Did you actually try to look at the Oracle Hyperion Enterprise Performance Management System Installation and Configuration Guide for instructions as suggested ?
To redeploy a component, run the configurator that can be found in the start menu under Foundation Services. Then select "modify an existing instance". Then for Calculation manager, check the box "Deploy to application server".
Thanks,
JM -
Topic: How to obtain entity manager in application server?
Hey,
How to obtain Entity manger in application server ?
The class is a simple class (no Ejb), and i can call to this class from Ejb or from inner schdeuler process (not container management)
I want that if i call to this calss from Ejb , that the entity manager transaction will join to the global transaction.
Thank youHi,
entity managers outside EJBs can be created using a javax.persistence.EntityManagerFactory.
Regards -
Can any one tell me how to write open hubs to application server?
Hello Everone,
I created open hubs and my requirement is to write the file to application server. So, I created logical file name and logical paths as specified in below link.
http://help.sap.com/SAPHELP_NW04S/helpdata/EN/8d/3e4ec2462a11d189000000e8323d3a/frameset.htm
That is created 'logical file path defination' in 'FILE' transaction. Used the physical path as - 'bw/FTPOUT/BPR/GM/<FILENAME>' as given in above link..
In logical file name I used the above logical file path.
When I run the open hub, I'm getting the ABAP dump "UNCAUGHT_EXCEPTION
CX_RSB_WRITE_ERROR
12/18/2008 09:00:40"
Can any one tell me how to write open hubs to application server?Hi David,
Goto transaction code - FILE
1) Create a Logical File Path definition, enter the technical name and description by clicking new entries and save it.(z_ftp)
2) create a Logical file name definition using cross client,
enter the logical file name = z_ftp , name = ftp , physical file = ftp_test.txt,
dataformat = ASC, Appln area = BW and Logical path = z_ftp(created from step 1).
click SAVE button.
3) Assignment of physical paths to logical paths, choose your logical path here.
enter the syntax group = UNIX
Physical path = /bwftp/....
Save it .
In the openhub,
choose definition type = file
Check the applicaion sever.
servername = dev
type of file name = Logical file
Applin server file name = z_ftp
separator = |
Hope this helps and solve your problem.
Thanks
Sat -
Download the SAP NetWeaver Application Server ABAP Trial 7:03 64-bit
I can not download the SAP NetWeaver Application Server ABAP Trial 7:03 64-bit complete, the file size is 3,912 gb and I can only download 2 gb.
How can I download the full file?
thank youhttps://store.sap.com/sap/cpa/download/20/0000000218?tkt=6728195BC9A41D6FDC99371FC9BB49E9_20140521182535.4356890&sap-lan…
-
Upload data from excel to application server
Hi all,
Is there any process to upload data from excel to application server other than reading the data from excel to z program through gui_upload and transferring the data to application server.
I want to run background job for a BDC program with the data present in the excel file.
Thanks & regards
sreehari p.Hi Sreehari,
Please use the tcode - CG3Z, where you can transfer the file from presentation server to the application server.
Regards,
Selva K. -
How to zip the folder in application server?
how to zip the folder in application server?
You can use
open dataset with filter
link:[http://help.sap.com/abapdocu_70/en/ABAPOPEN_DATASET_OS_ADDITION.htm#!ABAP_ADDITION_2@2@]
Maybe you are looking for
-
Is your iOS6 wifi ok? What router are you using?
After trying every possible solution proposed to resolve my wifi connection problems after upgrading to iOS6'the only solution left is to purchase another router. Today an Apple tech support rep told me wifi connection was hardware related only and h
-
How to re-install address book application
I deleted "address book" application carelessly, how to re-install the program? please tell me.
-
Oracle.jdbc2.BatchUpdateException: ORA-00001:
I am posting news with news post form when i create db tables and insert records then its working well but when I am droping the all table and importing db then it throws the subject error thanks & best regards
-
How can I save a slideshow if I created it using iPhoto on my iPhone?
I have an iPhone 4 (no Mac) and was playing around with the iPhoto app and created a slideshow that I want to export and use as part of my wedding reception. However, I can't seem to find an option to export or save the slideshow on my iPhone... am I
-
I just can't figure out why below codes compile with errors List<? extends Object> output = new LinkedList<Object>(); //line 7 output.add(new Object()); //line 8Compilation Errors: D:\my_NetBeansProjects\JavaBook\Mock\src\BackLister.j