Disallow java program to execute external command
How to disallow java program to execute some external command.
Thank.
It work by using custom policy, thank
Test.java
String command1[] = {"/bin/ls","-a,","-l"};
String command2[] = {"/bin/pwd"};
Runtime runtime = Runtime.getRuntime();
try{
Process p1 = runtime.exec(command1);
Process p2 = runtime.exec(command2); // AccessControlException: access denied
Scanner s1 = new Scanner(p1.getInputStream());
Scanner s2 = new Scanner(p2.getInputStream());
System.out.println(s1.nextLine());
System.out.println(s2.nextLine());
}catch(Exception ex){
ex.printStackTrace();
}java.policy
grant{
permission java.io.FilePermission "/bin/ls", "execute";
}Run
$java -Djava.security.manager -Djava.security.policy=java.policy Test
java.security.AccessControlException: access denied (java.io.FilePermission /bin/pwd execute)
Similar Messages
-
Executing external command and program in background
Hi,
how to execute external command and external program in background.
please provide me some tips on the same.
while creating external command, what is the significance of "operating system command" and "parameters for operating system command".
Thanks,
Dinesh.Hi,
You can define external commands using transaction code SM69.
External commands are commands which would be executed at your operating
system with or without parameters.
Operating system commands are those which you execute at OS level like
mkdir, cat, rm, cp, ls
Parameters are options that you add to os commands to get more functionalities.
like, < ls -l > : will give you a long listing of files where " l " is the parameter
< ls -lt > : will give you a long listing with last changed file at top where " lt " is the parameter.
You can mention these in SM69 when you define the external commands.
Now, in order to execute these in your background job. In the steps click on "external command" and give your command name in SM36 while creating your job.
" Points for solution ".
Thanks and Regards,
Sandeep. -
Error 801 when executing external command on
Hello,
I have installed CCMS agents and CCMS ping in my system yesterday. And activated the CPH BGD jobs for SL reporting purpse. Now I am getting an error "Error 801 when executing external command on" under class LC 2. I am not able to find any relevant note or help for this error. Any idea why this happens? How can I solve this? The details as follows:
EXTERNAL COMMAND: rc = Error 801
SXPG_COMMAND_EXECUTE(LONG):
<timestamp>: 20100310144206
COMMANDNAME: PING
ADDITIONAL_PARAMETERS: s-sapcae
LONG_PARAMS:
OPERATINGSYSTEM: AIX
TARGETSYSTEM: sapasmc1
DESTINATION:
SY-SUBRC: 801
Regards,
RajeevHi,
I have activated the trace level to 3 and now I get some messages in dev_cp which is as follows:
Trace file of control program (trace level 3)
< Function: BtcTrcInit> Function: main SAPXPG 720
2010-03-11 08-52-09 : Before BtcXpgDetach
> Function: BtcXpgDetach < Function: BtcXpgDetach Accept RFC connection from R/3 system
2010-03-11 08-52-09 : Before RfcAccept
2010-03-11 08-52-09 : RfcAccept returned OK
Begin of check_if_security_list
security check switched OFF
End of check_if_security_list
Begin of check_trace_option
End of check_trace_option
Install RFC call SAPXPG_START_XPG
Install RFC call SAPXPG_START_XPG_LONG
Install RFC call SAPXPG_END_XPG
Wait for RFC call SAPXPG_START_XPG or SAPXPG_START_XPG_LONG
2010-03-11 08-52-09 : Before first call of RFCDispatch
Security: rfcexec_logon_check
rfcexec_logon_check: logon_user = TT4WNUC
sapxpg_logon_check: rfc_attr.user = TT4WNUC
rfcexec_logon_check: client = 100
2010-03-11 08-52-09 : After first call of RFCDispatch
2010-03-11 08-52-09 : Before call of RfcClose (sequencing error)
2010-03-11 08-52-09 : After call of RfcClose (sequencing error)
< Function: main
2010-03-11 08-52-09 : End of SAPXPG: main
I think the issue is with the user TT4WNUC. Could you please let me know from where I can change this user?
Rajeev -
LC 2 Error 1003 when executing external command brconnect on (xpgid=0,con
Dear all,
I am getting error in sm21.Please suggest .
Details Page 2 Line 23 System Log: Local Analysis of clusa 1
Time Type Nr Clt User TCode Grp N Text
10:00:32 DIA 000 600 DDIC LC 2 Error 1003 when executing external command brconnect on (xpgid=0,convid=.)
Error 1003 when executing external command brconnect on (xpgid=0,convid=.)
Details
Recording at local and central time........................ 10.05.2010 10:00:32
Task...... Process User...... Terminal Session TCode Program Cl Problem cl Package
06952 Dialog work process No. 000 DDIC 1 SAPMSSY1 S Operation Trace SBTC
No documentation for syslog message LC 2 exists
Parameter
1 .... xpgid=0,convid=.
Technical details
File Offset RecFm System log Grp N variable message data
224 260640 LC 2 brconnect & &Error 1003 & & &
Regards,
KumarDear Juan,
Please find the logs.Please suggest.
dev_cp log
Trace file of control program (trace level 3)
< Function: BtcTrcInit> Function: main SAPXPG 720
2010-05-10--09-33-29 : Before BtcXpgDetach
> Function: BtcXpgDetach < Function: BtcXpgDetach Accept RFC connection from R/3 system
2010-05-10--09-33-29 : Before RfcAccept
2010-05-10--09-33-29 : RfcAccept returned OK
Begin of check_if_security_list
security check switched OFF
End of check_if_security_list
Begin of check_trace_option
End of check_trace_option
Install RFC call SAPXPG_START_XPG
Install RFC call SAPXPG_START_XPG_LONG
Install RFC call SAPXPG_END_XPG
Wait for RFC call SAPXPG_START_XPG or SAPXPG_START_XPG_LONG
2010-05-10--09-33-29 : Before first call of RFCDispatch
Security: rfcexec_logon_check
rfcexec_logon_check: logon_user =
sapxpg_logon_check: rfc_attr.user = BASIS
rfcexec_logon_check: client =
> Function: BtcXpgStartXpgLong
2010-05-10--09-33-29 : Beginning of BtcXpgStartXpgLong
> Function: BtcXpgStartXpgImportLong > Function: BtcXpgParam < Function: BtcXpgParam > Function: BtcXpgParam < Function: BtcXpgParam > Function: BtcXpgParam < Function: BtcXpgParam > Function: BtcXpgParam < Function: BtcXpgParam > Function: BtcXpgParam < Function: BtcXpgParam > Function: BtcXpgParam < Function: BtcXpgParam > Function: BtcXpgParam < Function: BtcXpgParam > Function: BtcXpgParam < Function: BtcXpgParam > Function: BtcXpgTable < Function: BtcXpgTable < Function: BtcXpgStartXpgImportLong
BtcXpgStartXpgLong: special_trace_flag = <6>
> Function: BtcXpgStartXpgInt > Function: BtcXpgItTransfer Content of source log table:
Line Text
<No StdOut/StdErr output reported>
Target log table is not identical to source
ItGetLine terminated with NULL
< Function: BtcXpgItTransfer > Function: BtcTrcReset < Function: BtcTrcReset Call mode: VIA RFC
Input arguments of BtcXpgStartXpg:
External program: brtools
tracecntl = : 6
Display of Parameter string switched off !!
Contents of control flags:
StdIn control flag: redirect StdIn
StdOut control flag: store StdOut output in memory
StdErr control flag: store StdErr output in memory
Trace control flag: unknown contents
Termination control flag: control program will wait for termination
> Function: BtcXpgCheck > Function: BtcXpgArgv
parameter number 1:
parameter number 2:
parameter number 3:
parameter number 4:
parameter number 5:
parameter number 6:
parameter number 7:
Total number of arguments scanned: 7
Argument argv[0]: brtools
< Function: BtcXpgArgv < Function: BtcXpgCheck > Function: BtcXpgSigInst < Function: BtcXpgSigInst > Function: BtcXpgStart Rearrange stderr to be collected in memory
Rearrange stdout to be collected in memory
Redirect stdin, read from NUL:
> Function: BtcTrcInit< Function: BtcXpgStartStart status of external program: external program successfully started
Id of external process: 0000005296
StdOut/StdErr collected in memory
Line Text
<No StdOut/StdErr output reported>
< Function: BtcXpgStartXpgInt> Function: BtcXpgStartXpgExport > Function: BtcXpgParam < Function: BtcXpgParam > Function: BtcXpgParam < Function: BtcXpgParam > Function: BtcXpgParam < Function: BtcXpgParam< Function: BtcXpgStartXpgExport
2010-05-10--09-33-29 : End of BtcXpgStartXpgLong
< Function: BtcXpgStartXpgLong
2010-05-10--09-33-29 : After first call of RFCDispatch
Wait for RFC call SAPXPG_END_XPG
2010-05-10--09-33-29 : Before second call of RFCDispatch
Security: rfcexec_logon_check
rfcexec_logon_check: logon_user =
sapxpg_logon_check: rfc_attr.user = BASIS
rfcexec_logon_check: client =
> Function: BtcXpgEndXpg
2010-05-10--09-33-29 : Beginning of BtcXpgEndXpg
> Function: BtcXpgStartXpgExport > Function: BtcXpgTable < Function: BtcXpgTable < Function: BtcXpgEndXpgImport > Function: BtcXpgEndXpgInt > Function: BtcXpgItTransfer Content of source log table:
Line Text
<No StdOut/StdErr output reported>
Target log table is not identical to source
ItGetLine terminated with NULL
< Function: BtcXpgItTransfer > Function: BtcXpgReadChild Output of external command not written to log !!
Process executing external program has terminated
< Function: BtcXpgReadChild > Function: BtcXpgEnd < Function: BtcXpgEnd Termination status of external program: no errors reported
StdOut/StdErr collected in memory
< Function: BtcXpgEndXpgInt > Function: BtcXpgEndXpgExport > Function: BtcXpgParam < Function: BtcXpgParam > Function: BtcXpgParam < Function: BtcXpgParam < Function: BtcXpgEndXpgExport
2010-05-10--09-33-30 : End of BtcXpgEndXpg
< Function: BtcXpgEndXpg
2010-05-10--09-33-30 : After second call of RFCDispatch
2010-05-10--09-33-30 : After call of RfcClose (wait)
< Function: main
2010-05-10--09-33-30 : End of SAPXPG: main
dev_xpg
Trace file of External Program (trace level 3)
< Function: BtcTrcInit> Function: BtcXpgStart External program: brtools -sid prd -F printout alert_log 20100401000000 0128
Regards,
Kumar -
Error1006 when executing external command mv ...
This error concerns one of the several daily batch most critical. It was not detected before because even if there is an error the program won't never fail (we will review for sure this program).
The error appears at the call of an external command ZRENAME that corresponds to the OS command "mv" to rename a physical file on directory /interface.
This error seems corresponds to a timeout when the SAP system tries to call the mv command on the OS level ...
ERROR:
Time Type Nr Clt User TCode Priority Grp N Text
12:00:51 BTC 034 120 BUSER_HK20 LC 2 *Error1006 when executing external command mv on %_TCPIP_%1 (in=R,out=M,err=M,trc=0,trm=C. strtstat=,xpgid=0,convid=. msg:timeout during a)*
Thanks in advance for helpHello
Check note #1406178 Error 1006 occurs when you execute an external
Regards
Mark -
Sm_SolmanSID error 503 when executing external command
Hello,
On one of my managed system (my productive ECC),
I have the following error ,everyday at 20:00,
for the user SM_SolamnSID.
"Error 503 when executing external command on (xpgid=0,convid=.)"
The role ZSAP_SOLMAN_READ has been given to this user.
Could you tell me what I should perform to avoid this problem?
Regards,Hi Benoit,
Pls refer below threads for external error of 503,
Cannot run SM69 external commands from application server
Cannot run SM69 external commands from application server,&nbsp;SM21&nbsp;|&nbsp;ABAP,&nbsp;SAP,&nbs…
Regards
K.N -
Error 801 when executing external command
Dear all,
One of our PRODcution system (PI) system getting lot of below error in SM21.
00:07:17 sappip_PIP_03 BTC 038 400 BASIS LC 2 Error 801 when executing external command on (xpgid=0,convid=.)
00:07:17 sappip_PIP_03 BTC 038 400 BASIS LC 2 Error 801 when executing external command on (xpgid=0,convid=.)
00:07:17 sappip_PIP_03 BTC 038 400 BASIS LC 2 Error 801 when executing external command on (xpgid=0,convid=.)
00:07:17 sappip_PIP_03 BTC 038 400 BASIS LC 2 Error 801 when executing external command on (xpgid=0,convid=.)
00:07:17 sappip_PIP_03 BTC 038 400 BASIS LC 2 Error 801 when executing external command on (xpgid=0,convid=.)
00:07:17 sappip_PIP_03 BTC 038 400 BASIS LC 2 Error 801 when executing external command on (xpgid=0,convid=.)
00:07:17 sappip_PIP_03 BTC 038 400 BASIS LC 2 Error 801 when executing external command on (xpgid=0,convid=.)
00:07:17 sappip_PIP_03 BTC 038 400 BASIS LC 2 Error 801 when executing external command on (xpgid=0,convid=.)
00:07:17 sappip_PIP_03 BTC 038 400 BASIS LC 2 Error 801 when executing external command on (xpgid=0,convid=.)
OS : HP-UX , DB : Oracle and sapnetweaver2004s
Kindly advise and let me know what should i check SM49 ?
Thanks
Edited by: satheesh0812 on Aug 18, 2011 4:37 PMHi,
Perhaps the steps and solution in this thread could help.:
Error 801 when executing external command on
Regards,
Srikishan -
Speed at which JAVA programs are executed
While it is true that a typical JAVA program will execute slower than an equivalent program written in other languages such as C++.
Is it because the compiled bytecodes (.class) have to be interpreted by the JVM?
Thanks.yep, a .class is bytecode... the JVM interprets the bytecode "on the fly".
The JVM's major task is to "interpolate" native operating system requests. That's why the JVM is platform specific.
The bytecode to native interpretation takes a few clock ticks, so it's a might slower than native compiled code... but it's practically important to realise that this is not the big performance hit inherent in a "Virtual Machine"... the big (potential) performance loss is the overhead of "interpolating" every single O/S interface request... hence String BufferedReader.readLine() is light-years faster than char InputStream.read(), because .read() has to (1) interpret your request, (2) set the registers, (3) do an operating system interupt, (3) interpret the response... for EVERY SINGLE EENY WEENY CHARACTER... which in practice means you can't do an usable java port of directX... which is a shame really.
But is does mean that you can (almost) write a webapp which is completely portable across platforms (with zero code change).
horses....
keith.
Message was edited by:
corlettk -
Java APIs to execute external execute file or command
I would like to enquire about the 'program statement' to execute an external program or dos command (e.g 'cls' to clear the screen) in a java source program.
Is there any built-in API s which like 'execute' or something else so as to execute an external command ?Look at Runtime.exec()
However, 'cls' is not a external command in Windows it is and internal command and cannot be run using Runtime.exec()
If you are expecting to run programs in the same 'command prompt' window, you are going to be disappointed. That window is already running java.exe. -
Executing external commands problem
Hi,
I have the following problem. I need to execute an external command on Linux (ffmpeg for example), but I want it to keep running even after my program exits.
Any ideas how this could be done? I thought Runtime.exec() is the way to go, but as soon as my program terminates, so does the execution.
Thanks in advance,
Stefan GueorguievThat was a good idea. Didn't know about nohup. I
tried it but it doesn't seem to work.
The command starts to execute but the program doesn't
continue its execution.
this is what I have so far
myCommand = "nohup " + myCommand;
ps9= Runtime.getRuntime().exec(myCommand);Where myCommand is a huge string with a lot of
command line options.
Any clues as to why that won't work?
And is there a native java way to do this, without
nohup.
Thanks,
StefanI tried to say that you should place that in a script file, and execute the script file from your application. (The script file can take arguments)
Description of nohup:
"Run a command immune to hangups, runs the given COMMAND with hangup signals ignored, so that the command can continue running in the background after you log out."
The & after the command means that the process should run in the background.
/Kaj -
Executing external commands (linux)
Hello everybody,
I have to execute a command from my java program but I have a problem, when I do something like this:
input has the complet path to a file I have, output has the complete path to the output file cert has the complete path to a digital certificate file keyfile has the complete path to the privatekey file.
command = "openca-sv sign -in " + input +".pem -out " + output +" -cert " +cert +" -keyfile " + key;
r = Runtime.getRuntime();
p = r.exec(comamnd);
p.waitFor();
System.out.println("output value:: " +p.exitValue());
InputStream stream = r.exec(command).getErrorStream();
int resl = stream.read();
System.out.println("result: " +resl);I know java is finding the command. But why it doesn't end the right way?
The output for this piece of code is something like this:
Output value: 1
result: 91
I know that the output value 1 means that the command didn't finished successfully, but what is the meaning of the other value? 91??
I have also tryed passing as arguments the names of the files without the complete path, but the result is the same.
I have tryed to execute the command from a console but it ends successfully. I have also tryed from a console passing all the files path and files without path and it worked. What could be the problem? AFAIK the command was written in C
Thanks for any help
JhonnyHello, thanks for your reply.
I know java is finding the command.
How do you know that? It's always best to assume that Runtime.exec doesn't know your PATH.Because when I give a bad path for the command java says in the console:
java.io.IOException: java.io.IOException: /usr/openca-sv: not found
at java.lang.UNIXProcess.<init>(UNIXProcess.java:143)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:566)
at java.lang.Runtime.exec(Runtime.java:428)
at java.lang.Runtime.exec(Runtime.java:364)
at java.lang.Runtime.exec(Runtime.java:326)
at Prueba.firmar(Prueba.java:125)
at Prueba.main(Prueba.java:56)
I know that the output value 1 means that the command didn't finished successfully, but what is the meaning of the other value? 91??
It's the ASCII value of the first character printed to stderr.ok.
I forgot to give another info, I'm working in eclipse 3.0
Now what do you think?
Thanks again,
Johnny -
Is it possible to run a java program without using the command prompt?
Hi,
I was wondering whether it is possible to run a Java program (not an applet) without using a command line in the command prompt?
Basically I want to run a program that will be continually running in the background and hence I don't want to have a command prompt screen loaded up as well - I just want the program to be running in the task bar.
I know how to run the program in the task bar - but I still need to launch the program from the command prompt - is there anyway I can get a program running without having to start it from the command prompt?
CheersOr create a desktop shortcut (in Windows) or an application launcher ( in Linux GUI).
-
How to write a JAVA program to execute the SQL queries
I have a database in the Microsoft Access queries and I need to execute the query by some how write the Java program to make it execute the query. because I need to get the different of time so I know how fast each query run.
Thank youYou need jdbc-driver for MSAccess for run this example:
JDBCClient.java
import java.util.Properties;
import java.lang.String;
import java.sql.DriverManager;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.BufferedOutputStream;
import java.lang.System;
import java.lang.Class;
import java.sql.SQLException;
import java.util.Date;
import java.util.Locale;
import java.text.DateFormat;
import java.sql.Time;
public class JDBCClient{
private String DriverName = new String();
private String DatabaseURL = new String();
private String UserName = new String();
private String Password = new String();
private String SQLFile = new String();
private String OutputFile = new String();
private String Separator = new String();
private boolean NeedColumnHeaders;
private String EncodingParamName = new String();
private String EncodingValue = new String();
private String OutputEncoding = new String();
private boolean AfterLastColumnSeparator;
JDBCClient( String propfilename){
System.out.println( "Initializing...");
Properties properties = new Properties();
try{
properties.load( new FileInputStream( propfilename));
catch( Exception e){
System.out.println( "Error: " + e.toString());
System.exit( 0);
DriverName = properties.getProperty( "DriverName");
DatabaseURL = properties.getProperty( "DatabaseURL");
UserName = properties.getProperty( "UserName");
Password = properties.getProperty( "Password");
SQLFile = properties.getProperty( "SQLFile");
OutputFile = properties.getProperty( "OutputFile");
Separator = properties.getProperty( "Separator");
if( properties.getProperty( "NeedColumnHeaders").compareToIgnoreCase( "yes") == 0 ||
properties.getProperty( "NeedColumnHeaders").compareToIgnoreCase( "true") == 0)
NeedColumnHeaders = true;
else
if( properties.getProperty( "NeedColumnHeaders").compareToIgnoreCase( "no") == 0 ||
properties.getProperty( "NeedColumnHeaders").compareToIgnoreCase( "false") == 0)
NeedColumnHeaders = false;
else{
System.out.println( "Invalid value for \"NeedColumnHeaders\" property (logical expected)");
System.exit( 0);
EncodingParamName = properties.getProperty( "EncodingParamName");
EncodingValue = properties.getProperty( "EncodingValue");
OutputEncoding = properties.getProperty( "OutputEncoding");
if( properties.getProperty( "AfterLastColumnSeparator").compareToIgnoreCase( "yes") == 0 ||
properties.getProperty( "AfterLastColumnSeparator").compareToIgnoreCase( "true") == 0)
AfterLastColumnSeparator = true;
else
if( properties.getProperty( "AfterLastColumnSeparator").compareToIgnoreCase( "no") == 0 ||
properties.getProperty( "AfterLastColumnSeparator").compareToIgnoreCase( "false") == 0)
AfterLastColumnSeparator = false;
else{
System.out.println( "Invalid value for \"AfterLastColumnSeparator\" property (logical expected)");
System.exit( 0);
try{
byte[] EOL = new byte[2];
EOL[0] = 13;
EOL[1] = 10;
Class.forName( DriverName);
Properties connInfo = new Properties();
connInfo.put( "user", UserName);
connInfo.put( "password", Password);
if( EncodingParamName.length() != 0 && EncodingValue.length() != 0)
connInfo.put( EncodingParamName, EncodingValue);
Connection connection = DriverManager.getConnection( DatabaseURL, connInfo);
FileInputStream in = new FileInputStream( SQLFile);
byte[] buffer = new byte[in.available()];
in.read( buffer);
in.close();
String SQL = new String( buffer);
PreparedStatement statement = connection.prepareStatement( SQL);
Date d1 = new Date();
System.out.println( "Database connected at " + d1 + " Executing statement...");
ResultSet resultSet = null;
if( statement.execute())
resultSet = statement.getResultSet();
else{
System.out.println( "Script updates " + statement.getUpdateCount() + " records.");
System.exit( 0);
ResultSetMetaData metaData = resultSet.getMetaData();
BufferedOutputStream out = new BufferedOutputStream( new FileOutputStream( OutputFile));
if( NeedColumnHeaders && metaData.getColumnCount() > 0){
String head = new String();
for( int i = 1; i < metaData.getColumnCount(); i++)
head += metaData.getColumnName( i) + Separator;
head += metaData.getColumnName( metaData.getColumnCount());
out.write( head.getBytes( OutputEncoding), 0, head.length());
out.write( EOL, 0, 2);
String record = new String();
while( resultSet.next()){
record = "";
for( int i = 1; i < metaData.getColumnCount(); i++)
record += resultSet.getString( i) + Separator;
record += resultSet.getString( metaData.getColumnCount());
if( AfterLastColumnSeparator)
record += Separator;
out.write( record.getBytes( OutputEncoding), 0, record.length());
out.write( EOL, 0, 2);
out.close();
Date d2 = new Date();
System.out.println( "Done at " + d2);
System.out.println( "Executing time " + new Time( d2.getTime() - d1.getTime() - 10800000));
catch( ClassNotFoundException e){
System.out.println( e.toString());
catch( SQLException e){
System.out.println( e.toString());
catch( java.io.IOException e){
System.out.println( e.toString());
System.exit( 0);
public static void main( String args[]){
if( args.length == 1)
new JDBCClient( args[0]);
else
System.out.println( "Usage JDBCClient <properties_file>");
}JDBCClient.properties ( for Oracle database)
DriverName=oracle.jdbc.driver.OracleDriver
DatabaseURL=jdbc:oracle:thin:@192.168.1.1:1521:test
UserName=test
Password=test
SQLFile=test.sql
OutputFile=test.csv
Separator=*
NeedColumnHeaders=yes
EncodingParamName=
EncodingValue=
OutputEncoding=windows-1251
AfterLastColumnSeparator=yestest.sql
select * from users; -
How to execute external command from SAP
Hi gurus,
i need to execute an external command from a Sap (rel ECC.5.0) to a server UNIX (no SAP); precisely i have to write a file into a directory in unix server.
I see transaction SM49 and Sm69 but i don't know how can i use these features.
Please coul'd you help me or give me a documentation.
Thank's in advance
Maurizio Ortolani
email. [email protected]Hi Maurizio,
i do it in this way:
CONSTANTS: CMD_LS(50) VALUE 'ls -al /transfer/sap'.
DATA: BEGIN OF ITAB_LS OCCURS 0,
LINE(200),
END OF ITAB_LS.
CALL 'SYSTEM'
ID 'COMMAND' FIELD CMD_LS
ID 'TAB' FIELD ITAB_LS-SYS.
How do you write the file, via an UNIX-COMMAND than try the above call
with your command.
Another way is to write the file via OPEN DATASET ..., TRANSFER ... TO ..., CLOSE DATASET.
If you mean this i can give you an example.
Hope it helps.
Regards, Dieter -
How execute external command .sh in WorkFlow process?
Hi, i need execute a command, for example, <nombre>.sh with 3 parameters in a WF process.
This script .sh has command for execute ftp.
How can i do?
Thanks.Hi,
You need to wrap the call in either PL/SQL or Java and invoke that from a standard Workflow function API.
HTH,
Matt
WorkflowFAQ.com - the ONLY independent resource for Oracle Workflow development
Alpha review chapters from my book "Developing With Oracle Workflow" are available via my website http://www.workflowfaq.com
Have you read the blog at http://thoughts.workflowfaq.com ?
WorkflowFAQ support forum: http://forum.workflowfaq.com
Maybe you are looking for
-
Creation of Customer master using CLASS( 'MAINTAIN_BAPI')..
I am creating customer master by class 'MAINTAIN_BAPI'. So all fields are sucessfully created except the field 'Remarks / Comments' on customer..Please suggest for the same as far as posiible.. << Moderator message - Everyone's problem is important.
-
ITunes new version doesn't open at all. Gives error message
I downloaded 7.4.3 version of iTunes and it doesn't open at all. Gives error message. "iTunes has encountered a problem and needs to close." I have previous version of iTunes in my spare HD, in the same computer, and it works perfectly fine. I have u
-
Sale order to production order(Without running MRP)
Dear all, I want to create production order with reference of the sale order. Kindly let me know the process I tries by using Co08,but it was showing sale order has no co -object. Regards Rajasekaran
-
Financial Reports Client 11.1.2.1 build 507 needed
Hi, I need to match my client with the exact version that's on our server. When I log into Fin Reports on the actual server the version is 11.1.2.507 My question is. How do I get that exact version/patch level? I cannot log into support.oracle.com an
-
Reading Unicode data from a file...
I am writing an application that needs to read some configuration data from a file. An end user edits the configuration file to provide the configuration data. The Java code reads this file and uses the configuration data supplied by the user. The us