Redirect SM50 output on unix file
Hello,
how can we execute daily SM50 daily and redirect html output on unix file?
I Tried SE38, execute SM50 succefully, but no way to redirect output of this transaction on a unix file ?
Thanks in advance.
Hi majda,
Hope you are doing good.
Maybe check /nSM49 and create a OS command using ">>" operator Divyanshu mentioned:
Restrict Authorizations for Executing External Commands - SAP NetWeaver Application Server ABAP Security Guide - SAP Lib…
Thank you!
Kind Regards,
Hemanth
SAP AGS
Similar Messages
-
Urgent : Doubt on Output in UNIX FIle
HI Friends,
I have downloaded the output from my program into a text file.
In which i have 1matnr,1tab,1price.
it coming perfectly. I am using constant
constant: c_a type x value '09'.
this is giving a tab in text file.When i checked the output in Unix file, In the place of Tab a
Hash(#) is replaced there.
Can anybody help me to get only a material numer one tab and then a Date.
or Is it like a Hash is the denotion for a Tab in unix.Hi gokul
I think you need to change File type in FM: WS_DOWNLOAD as 'DAT' or 'ASC' .
Regards
wiboon -
How to redirect CELLCLI output to text file
Hi,
I would like to redicrect the output of the cellcli command to a text file .
For example , how to redirect the output of this command to a text file on /tmp
CellCLI> list metrichistory where objectType = 'CELL' -
and name = 'CL_TEMP'Thankscellcli has spooling capabilities similar to sqlplus:
CellCLI> help spool
Usage: SPO[OL] [<filename> [ CRE[ATE] | REP[LACE] | APP[END]] | OFF ]
Purpose: SPOOL <filename>: Direct the results to the file <filename>.
SPOOL OFF: Turn off the spooling.
SPOOL: Check the current spooling status.
Arguments:
<filename>: The filename where the results will be output.
Options:
[APPEND]: If the filename already exists, the following output will
be appended to the file. Without this option, the existing file
contents will be replaced.
[CREATE]: If the filename already exists, an error is reported.
[REPLACE]: If the filename already exists, the contents will be
replaced. This is the default, when no option is provided.
Examples:
spool myfile
spool myfile append
spool off
spoolBut if you are trying to script it, it would be easier to just run it command line:
# cellcli -e "list metrichistory where objectType = 'CELL' and name = 'CL_TEMP'" > /tmp/CL_TEMP.txtAlso look into dcli which allows you to run cellcli commands on one or more cells from a compute node.
Good luck. -
Redirecting XSLT output to multiple files
Hi,
I am trying to redirect the output of the XSLT into multiple files using
<xsl:variable name="filename" select="concat(@id,'.xml')" />
<redirect:write select="$filename">
</redirect:write>I dont want to hard-code the directory of the $filename in XSL, I want to set it or resolve it programatically in the java code.
Can you please tell me if this can be done in someway ?Aravinda wrote:
I dont want to hard-code the directory of the $filename in XSL, I want to set it or resolve it programatically in the java code.
Can you please tell me if this can be done in someway ?You + setParameter + method of your Transformer in java code to set parameters. like below:
transformer.setParameter("message1", "This is my message to XSLT from Java Class.");
transformer.setParameter("message2", "Hello XSLT how are you?");
. . .You can retrieve above parameters in global parameters/variables(must be as child of xsl:stylesheet element in xslt) defined in xslt like below:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="message1"></xsl:param>
<xsl:variable name="message2"></xsl:variable>
<xsl:template match="/">
<xsl:value-of select="$message1"/> // retrieving message1
<xsl:value-of select="$message2"/> // retrieving message2
<xsl:value-of select="concat($message1,$message2)"/> // performing concat on message1 and message2
</xsl:template>
</xsl:stylesheet>*Cheers
TYPUROHIT*
(Tejas Purohit) -
Redirecting spool output to a file on app. server
I'm running a SAP report as a background job.
I hve a requirement to send the spool output to a file on app. server. This needs to happen automatically in background.
I'll appreciate any suggestion.Hi,
use report from Re: output to pdf format and substitute pc-download with file transfer
good luck
Andreas -
Junk Characters in Report Output(While redirecting the output to text file)
While generating the report (Reports 9i) output to a text file, I get the report output that contains junk characters. The other output formats viz. pdf, rtf have no problem.
Please share how to correct it.
Thanks.Yes, the MODE is set to Character and DESFORMAT is set to DFLT.
Still the problem exists.
Any idea please? -
Direct RMAN output to UNIX file
How i could direct RMAN output to a file
How, indeed? Hmm.....
Wouldn't it be great if Oracle compiled information about their various software products and published it? Even better, what if they published it online, and made it available for free??
Wouldn't that be great?
Oh, wait, what's this?
http://tahiti.oracle.com/
http://www.oracle.com/pls/db102/to_URL?remark=ranked&urlname=http:%2F%2Fdownload.oracle.com%2Fdocs%2Fcd%2FB19306_01%2Fbackup.102%2Fb14191%2Frcmarchi002.htm%23sthref48
http://www.oracle.com/pls/db102/to_URL?remark=ranked&urlname=http:%2F%2Fdownload.oracle.com%2Fdocs%2Fcd%2FB19306_01%2Fbackup.102%2Fb14191%2Frcmcnctg006.htm%23sthref462
-Mark -
Redirect the output of SQL*Plus to the file
Hi all,
I have the following command to run:
sqlplus username/password @myfile.sql
I don't know how to redirect the output to the file.
Also in the script myfile.sql I have the defined variable, &VP and
How can I substitute this variable(&VP) at the run time.
Thanks,
JPAssumed you like to replace your defined variable VP by number 4. SInce it is posintional parameter,instead of wrinting &VP, write
VP:=&1
sqlplus>spool redirect.txt
sqlplus>@myfile.sql 4
sqlplus>spool off -
Redirecting cmd output to a JTextArea
can anyone help me, im curious how can the compilers for java e.g.: Netbeans, JCreator, redirect the command promt output to a JTextArea..
can anyone guide me on what class to look at??
thanks a lothere is a simple class that redirects the standard output to a file called a.txt. you have to look into the class java.class.System. and other i/o classes
import java.io.PrintStream;
public class A {
public A() {
public static void main(String[] args) throws Exception {
PrintStream fileOut = new PrintStream("a.txt");
System.setOut(fileOut);
for (int i = 0; i < 10; i++) {
System.out.println(i);
}for your case where output goes to a textArea you might wanna use a multithreaded solution. redirect your output to a file as above and use the thread to read the file and paste text into your text area. there is other better solution that directly passes data into the textArea. i'll post it if can find it in my code base. -
Hi,
I am using XSU to querry a table and generate XML output.
When I execute a file (say for example test.sql), is there a way I can save this XML output to a file (say 'something.xml') ??
Can any one help ?
Thanks.
vikramHi,
Thanks for your reply.
But I am sorry I didn't get you. I can't use the second option because I am not using XSQL.
Coming to the first option, I didn't understand where to type
java OracleXML ... > SomeFile.xml
Can you explain pls ?
Once again this is what I have got....
Say, I have a file test.sql which contains the following code
select xmlgen.getXML('select * from scott.emp1',1) from dual;
commit;
set serveroutput on
Now, when I execute the file in SQL prompt I get the following output.
<ROWSET>
<ROW num="1">
<EMPNO>7369</EMPNO>
<ENAME>SMITH</ENAME>
<JOB>CLERK</JOB>
<MGR>7902</MGR>
<HIREDATE>1980-12-17 00:00:00.0</HIREDATE>
<SAL>800</SAL>
<DEPTNO>20</DEPTNO>
</ROW>
<ROW num="2">
<EMPNO>7499</EMPNO>
<ENAME>ALLEN</ENAME>
<JOB>SALESMAN</JOB>
<MGR>7698</MGR>
<HIREDATE>1981-02-20 00:00:00.0</HIREDATE>
<SAL>1600</SAL>
<COMM>300</COMM>
<DEPTNO>30</DEPTNO>
</ROW>
</ROWSET>
I want this result to go to a file (.xml) instead of displaying the output in the SQL prompt.
How do I do this ? Pls explain. Thanks.
vikram
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Muench ([email protected]):
Two ways:
(1) Just redirect the output to a file like:
java OracleXML ... > SomeFile.xml
(2) Use the XSQL Command Line utility
and build an XSQL Page that describes
the query you want to do. Then you can
do:
$ xsql yourfile.xsql SomeFile.xml<HR></BLOCKQUOTE>
null -
Output device - printing in unix file - where do I define the UNIX path?
Hi,
We use an special Output Device to print spool requests directly in Unix. These Output Devices are defined as Local Unix File. When those spool requests are printed, a file is created in certain path in UNIX.
The question is where this link is defined?, I dont see where in the Output Device (trn SPAD) is defined the path in UNIX.
Thanks!
AaronHi,
Might be the unix path would have been defined in the SPAD only under the Access method of the output device, in the field Destination host.
Regards,
Aditya -
Redirect standart output to file
i want to ask how to redirect standart output to file,
if i have statement like this System.out.println("hello"); i want hello not print in console but print to file
thxHere is sample code for that:
static{
try {
PrintStream obj_ps = new PrintStream(new FileOutputStream("internal.log"));
System.setOut(obj_ps);
System.setErr(obj_ps);
catch (FileNotFoundException ex) {
JOptionPane.showMessageDialog(null, "Error creating log file", "Error", JOptionPane.ERROR_MESSAGE);
} -
Unable to Open unix file in UNICODE system which created NON-UNICODE system
Unable to Open unix file in UNICODE system which created in NON-UNICODE system
We have two SAP systems both are ECC6.0 but System 1 is NON-Unicode and System2 is Unicode system.
There is a common unix directory/folder for both system.
Our requirement is to create one file on unix common folder and write the data to file from system1 .
In system2 open the same file for appending mode to write the data .
The file in system 1 created with below sentence.
OPEN DATASET g_unix_file FOR OUTPUT IN TEXT MODE ENCODING UTF-8.
Now I have to append the data from system 2 to same file.
I have tried to used below statement in system 2 to open the file but sy-subrc value comes as '8'.
1> OPEN DATASET g_unix_file FOR APPENDING IN TEXT MODE ENCODING UTF-8.
2>OPEN DATASET g_unix_file FOR APPENDING IN legacy TEXT MODE CODE PAGE
cdp IGNORING CONVERSION ERRORS .
3>OPEN DATASET g_unix_file FOR APPENDING IN TEXT MODE ENCODING Default.
4>OPEN DATASET g_unix_file FOR APPENDING IN TEXT MODE ENCODING NON-UNICODE.
Tried out all the possibilities as per F1 help given for open dataset , but still there is problem with opn file in appending as well output mode.However the file successfully open in Input mode(Read).
Please advice suggestion to resolve this issue.
Thanks.Messgae captured as 'Permission Denied". The program gets triggered with system user Id PPID.
How to check the security access of the User ID. -
How to upload pdf file format in unix file directory?
how to upload pdf file format in unix file directory?
Hi Karthikeyan,
If you have PDF internal table with you, You can follow the below method to upload into Unix directory.
DATA:file_path TYPE char100 VALUE '/usr/sap/tmp/rep_out.PDF'.
OPEN DATASET file_path FOR OUTPUT IN BINARY MODE.
IF sy-subrc EQ 0.
LOOP AT it_pdf.
TRANSFER it_pdf TO file_path.
ENDLOOP.
ENDIF.
CLOSE DATASET file_path.
Thanks
Venkat.O -
Allowing user to submit unix file on selection screen.
how to allow the user to submit the unix file on selection screen.
based on that file data ,the selection screen shd be populated automatically.Refer Sample Code:
constants: c_split TYPE c
VALUE cl_abap_char_utilities=>horizontal_tab,
c_path TYPE char100
VALUE '/local/data/interface/A28/DM/OUT'.
Selection Screen
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS : rb_pc RADIOBUTTON GROUP r1 DEFAULT 'X'
USER-COMMAND ucomm, "For Presentation
p_f1 LIKE rlgrap-filename
MODIF ID rb1, "Input File
rb_srv RADIOBUTTON GROUP r1, "For Application
p_f2 LIKE rlgrap-filename
MODIF ID rb2, "Input File
p_direct TYPE char128 MODIF ID abc DEFAULT c_path.
"File directory
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_f1.
*-- Browse Presentation Server
PERFORM f1000_browse_presentation_file.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_f2.
*-- Browse Application Server
<b>PERFORM f1001_browse_appl_file.</b>
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF rb_pc = 'X' AND screen-group1 = 'RB2'.
screen-input = '0'.
MODIFY SCREEN.
ELSEIF rb_srv = 'X' AND screen-group1 = 'RB1'.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'ABC'.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
*& Form f1000_browse_presentation_file
Pick up the filepath for the file in the presentation server
FORM f1000_browse_presentation_file .
CONSTANTS: lcl_path TYPE char20 VALUE 'C:'.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_path = lcl_path
mask = c_mask "',.,..'
mode = c_mode
title = text-006
IMPORTING
filename = p_f1
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
flg_pre = c_x.
ENDIF.
ENDFORM. " f1000_browse_presentation_file
*& Form f1001_browse_appl_file
Pick up the file path for the file in the application server
FORM f1001_browse_appl_file .
DATA: lcl_directory TYPE char128.
lcl_directory = p_direct.
CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
EXPORTING
directory = lcl_directory
filemask = c_mask
IMPORTING
serverfile = p_f2
EXCEPTIONS
canceled_by_user = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE e000(zmm) WITH text-039.
flg_app = 'X'.
ENDIF.
ENDFORM. " f1001_browse_appl_file
*& Form f1003_pre_file
Upload the file from the presentation server
FORM f1003_pre_file .
DATA: lcl_filename TYPE string.
lcl_filename = p_f1.
IF p_f1 IS NOT INITIAL.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = lcl_filename
filetype = 'ASC'
has_field_separator = 'X'
TABLES
data_tab = i_input
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 s000 WITH text-031.
EXIT.
ENDIF.
ELSE.
PERFORM populate_error_log USING space
text-023.
ENDIF.
ENDFORM. " f1003_pre_file
*& Form f1004_app_file
upload the file from the application server
FORM f1004_app_file .
REFRESH: i_input.
OPEN DATASET p_f2 IN TEXT MODE ENCODING DEFAULT FOR INPUT.
IF sy-subrc EQ 0.
DO.
READ DATASET p_f2 INTO wa_input_rec.
IF sy-subrc EQ 0.
*-- Split The CSV record into Work Area
PERFORM f0025_record_split.
*-- Populate internal table.
APPEND wa_input TO i_input.
CLEAR wa_input.
IF sy-subrc <> 0.
MESSAGE s000 WITH text-030.
EXIT.
ENDIF.
ELSE.
EXIT.
ENDIF.
ENDDO.
ENDIF.
ENDFORM. " f1004_app_file
Move the assembly layer file into the work area
FORM f0025_record_split .
CLEAR wa_input.
SPLIT wa_input_rec AT c_split INTO
wa_input-legacykey
wa_input-bu_partner
wa_input-anlage.
ENDFORM. " f0025_record_split
Thanks
Seshu
Maybe you are looking for
-
Migration cockpit of new G/L- balance carry forward
Hi, I have a question regarding the migration cockpit for new G/L. This a prepaid service of SAP and we are at test stage of migration cockpit. Before migration to new G/L, we have posted year-end-postings t-code F_TR_01 for Turkey , program RFSUMB00
-
Can a Time machine backup be moved from one hard drive to another.
Hello There are a few questions tucked away in here... 1 My Mac crashed due to a Kernal Panic (screen was flashing) this was happening over 2 weeks so I decided to restore from Time Machine. During a restore the Mac crashed again. So I aborted the re
-
I have down loaded a track which was initially missing 1min 30 seconds. iTunes enabled me to reload the rack which is now complete on the PC. However, syncing with my Ipad2 does not seem to replace the incomplete version with the full version. Can a
-
What is the use of MAIN WINDOW in SCRIPTS
what is the use of MAIN WINDOW in SCRIPTS, y we con't create a script w/o main window. Title was edited by: Alvaro Tejada Galindo
-
DFS - Cannot Create Namespace - RPC Server Is Unavailable windows 2008R2
Hi guys, I am back again with another question I am trying to create a domain based namespace, enabled Windows 2008 mode and get the following error...\\Miracle-Adventure.com\dfs. The namespace cannot be queried. The RPC server is unavailable. I have