Start external program on explizit host
Hello!
I have a little problem - I just want to create a RFC destination which execute an external program
on a different windows server means not the sap application server. All SAP + server are Windows based.
I define a destination "Start on explicit host".
Program:
sap64\rfctest\aec\ALICE_MATHE_RFC.exe
Target Host: sap64.alice.tld
Gateway options (Host: sap64, Port: 3301)
On this server (sap64) only a gateway is running.
But it don't work.
Error:
Logon Connection Error
Error Details Error when opening an RFC connection
Error Details ERROR: timeout during allocate
Error Details LOCATION: SAP-Gateway on host sap64 / sapgw01
Error Details DETAIL: no connect of TP
sap64\rfctest\aec\ALICE_MATHE_RFC.exe from host sap
Error Details COMPONENT: SAP-Gateway
Error Details COUNTER: 42
Error Details MODULE: gwr3cpic.c
Error Details LINE: 1973
Error Details RETURN CODE: 242
Error Details SUBRC: 0
Error Details RELEASE: 700
Error Details TIME: Fri Nov 21 11:26:08 2008
Error Details VERSION: 2
If i define the destination as Start on application server there is no
problem - the exe on sap64 is executed on the application server of the sap system but this should not be....
Can anybody help me to find a solution to execute the exe on a different server
than the sap application server?
Best regards
Thomas Wassenhoven
Hi!
Yes it is possible. I solved this problem by registering the programm on the gateway (Note 63930).
Best regards
Thomas
Similar Messages
-
Setting debug start external program option to an executable of a class library in visual studio
Hi,
I have a project that creates a new solution with one class library project. I want Debug
Start external Program option of Class library of that solution to get set with an External
Executable Application( not manually, should get populated at the time of solution creation)
I am unaware of libraries that do this task
KarthikI'd ask them over here.
http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?category=vslanguages&filter=alltypes&sort=lastpostdesc
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows]
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights. -
Hi,
i started with java 2 days ago and i my english is awful. Sorry.
I have this problem:
There is a simple exsample in the java help for the swing.jFileChooser.
The choosed fle ist shown in the window as text.
But i want to start an external program.
This is the source that runs (ParaPath is defined as String):
int returnVal = fc.showOpenDialog(XMLChooser.this);
if (returnVal == JFileChooser.APPROVE_OPTION) {
File dir = fc.getCurrentDirectory();
File file = fc.getSelectedFile();
ParaPath = dir.getAbsolutePath() + "\\" + file.getName();
try{
Runtime.getRuntime().exec("notepad");
log.append(ParaPath);
catch (Exception f) {
System.err.println(e.toString());
What do i have do do to send the ParaPath to notepad?
Thanks
ThomasThank You! That's it!
I don't know why, i always tried
("notepad", ParaPath)
and was nearly angry, that it didn't run.
Thomas -
We have different programs in out business, is it possible to start these programs from the workflow pages?
Joris de GroenYeah I figured. Like I said, I had only done it in MSSQL. Seeing as Windows and MSSQL are made by the same company, it would be only natural one could call into the other easily. :)
But I agree, we do our external work with Java Listeners. We actually have, using our own homegrown queue listeners, multiple instances of multiple listeners (all multithreaded) on different servers polling central DB queues. They do things such as email, ftp, write to network drives, etc things that were easier to do in java then anything else. Its quite distributed and scalable. And the workflows are what initiate them. -
Starting external progran SAPXPG failed (SM69)
System Information:
ECC 6, Oracle 10.2, AIX 5.3, Kernel Patch level 147
Hi all,
We were encountered problems when try to scheduled actions in DB13.
We had install CI & DB on separate server and the rfc SAPXPG_DBDEST_<Destination> is not working.
We tried to use RSH in SM49/SM69 to start external program SAPXPG in target host remotely, however, it return External program terminated with exit code 1 when we executed it.
*External command we used
Rsh
Target host u2013l <sid>adm sapxpg
Logs of dev_cp:
Trace file of control program (trace level 3)
< Function: BtcTrcInit> Function: main SAPXPG 700
2009-02-05--21-18-10 : Before BtcXpgDetach
> Function: BtcXpgDetach < Function: BtcXpgDetach Accept RFC connection from R/3 system
2009-02-05--21-18-10 : Before RfcAccept
2009-02-05--21-18-10 : RfcAccept returned OK
security check switched OFF
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
2009-02-05--21-18-10 : Before first call of RFCDispatch
> Function: BtcXpgStartXpgLong
2009-02-05--21-18-10 : 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 = <3>
> 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: rsh
tracecntl = : 3
Program argument string: bir-hrerpdb -l prdadm sappxpg
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:
Scanned parameter: bir-hrerpdb
parameter number 2:
Scanned parameter: -l
parameter number 3:
Scanned parameter: prdadm
parameter number 4:
Scanned parameter: sappxpg
Total number of arguments scanned: 4
Argument argv[0]: rsh
< Function: BtcXpgArgv < Function: BtcXpgCheck > Function: BtcXpgSigInst set signal handler for SIGCHLD to SIG_DFL
old signal handler for SIGCHLD: SIG_DFL
< Function: BtcXpgSigInst > Function: BtcXpgStart Process id: 172232
Parent process id: 352710
> Function: BtcTrcIni Start status of external program: external program successfully started
Id of external process: 0000323746
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
2009-02-05--21-18-10 : End of BtcXpgStartXpgLong
< Function: BtcXpgStartXpgLong
2009-02-05--21-18-10 : After first call of RFCDispatch
Wait for RFC call SAPXPG_END_XPG
2009-02-05--21-18-10 : Before second call of RFCDispatch
> Function: BtcXpgEndXpg
2009-02-05--21-18-10 : 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 Process executing external program has terminated
< Function: BtcXpgReadChild > Function: BtcXpgEnd > Function: BtcXpgLog
Log message (44 byte): External program terminated with exit code 1
< Function: BtcXpgLog
< Function: BtcXpgEnd Termination status of external program: program terminated with error code 1
StdOut/StdErr collected in memory
< Function: BtcXpgEndXpgInt > Function: BtcXpgEndXpgExport > Function: BtcXpgParam < Function: BtcXpgParam > Function: BtcXpgParam < Function: BtcXpgParam < Function: BtcXpgEndXpgExport
2009-02-05--21-18-10 : End of BtcXpgEndXpg
< Function: BtcXpgEndXpg
2009-02-05--21-18-10 : After second call of RFCDispatch
2009-02-05--21-18-10 : After call of RfcClose (wait)
< Function: main
2009-02-05--21-18-10 : End of SAPXPG: main
We couldnu2019t located any clear error indication that might help us in troubleshooting.
We already configured settings in .rhosts file & we had resolve the permission problem
We executed the following commands as user <sid>adm:
In DB host, we executed rsh <CI host> date & it works.
But in DB hosts, its doesn't work when we executed rsh <DB host> date
Is this issue should be isolated as AIX OS issue?
We couldn't execute any activities from DB13 as the DB rfc destination is not working.
Is that alternative way that we can execute sapxpg on DB host?
Or we have to install standalone gateway as solution? It's that any impact if we installing standalone gateway at DB host now (It's production system)?
Thanks.
BR,
TerryHi Guru,
When we tried to execute the following command from host DB:
rsh <Host CI> date
it was return results.
However, if we tried to execute from host CI:
rsh <Host DB> data
it was return no results.
That's means we could'nt remotely start any of external command at DB host from CI host.
Start external program error was isolated within operating system level.
Any luck on this?
Thanks.
BR,
Terry -
Unable to connect the external program.
Hi Experts,
We have schedule one job which run everyday. This job execute one external program.
Now, this job get canceled everyday and the error is Unable to connect to target host
Failed to start external program. The job log is as follows.
Date Time Message text Message class Message no. Message type
15.10.2009 04:40:20 Job started 00 516 S
15.10.2009 04:40:20 Step 001 started BT 611 S
15.10.2009 04:40:20 External program: /interface/scripts/zgrm002.sh BT 612 S
15.10.2009 04:40:20 Related parameter: BT 613 S
15.10.2009 04:40:49 Unable to connect to target host BT 619 I
15.10.2009 04:40:49 Failed to start external program BT 605 A
15.10.2009 04:40:49 Job cancelled 00 518 A
Can anybody have the idea how to resolve this problem.
Thanks in Advance.
Abhishek.Hi,
The host serevr details may be changed. Please check with the respective team for the proper host details.
Check this link. It may help:
Re: Regarding Providing FTP connection from R/3
Regards,
Swarna Munukoti
Edited by: Swarna Munukoti on Oct 16, 2009 8:17 AM -
Executing external programs in Windows from UNIX
Hi all,
I would like to call an external program in Windows box from UNIX box. I tried to create a command in SM69, specify the command and OS type to Windows. When I try to execute the command in SM49, I got an error 'program_start_error'.
I tried also to create an RFC destination in SM59, using connection type = T (start external program via TCP/IP), specifying the program in the Program field and specify the Windows box hostname (or IP add) in the Target host. But this also seemed could not work.
Is there any other ways I could do this?
Thank you.
Mizwan<b>RSBDCOS0 Execute UNIX commands. </b>
Look at <b>SM69, SM49</b> and
Function <b>SXPG_COMMAND_EXECUTE</b>
e.g. SM69
Press F5 or click Change button
Press F6 or click Create
Fill in the following parameter :-
Command name - the unix scripts file name e.g. ZABAPFTP
Operating system command - e.g. sh
Parameters for operating system command - e.g. /sap_production/usr/sap/trans/data/zabapftp.sh
REPORT ZABAPFTP.
data : t_btcxpm like btcxpm occurs 0,
p_addparam like sxpgcolist-parameters,
rep_date like sy-datum,
t_date like SXPGCOLIST-PARAMETERS.
rep_date = sy-datum - 1.
t_date = rep_date.
*p_addparam = '/sap_production/usr/sap/trans/data/zabapftp.sh'.
refresh t_btcxpm. clear t_btcxpm.
call function 'SXPG_CALL_SYSTEM'
EXPORTING
commandname = 'ZABAPFTP'
additional_parameters = t_date
TABLES
exec_protocol = t_btcxpm
EXCEPTIONS
no_permission = 1
command_not_found = 2
parameters_too_long = 3
security_risk = 4
wrong_check_call_interface = 5
program_start_error = 6
program_termination_error = 7
x_error = 8
parameter_expected = 9
too_many_parameters = 10
illegal_command = 11
others = 12.
if sy-subrc ne 0.
write:/ 'Error in ZABAPFTP ', sy-subrc.
endif.
regards
vinod -
How to close external programs?
Hi there,
in vbs is a command "ExtProgram(ExtProgramName, ExtProgramArg)" to
start external programs. But how to close external programs when
they finished its work? Is there a vbs-command for it? Is there a way
when calling "cmd.exe" with a proper parameter?
Martin BohmHello Martin!
Yes, with the tool 'tasklist' in the same directory.
The problem is that it is not easy to query from script. I tried it in the following script. Perhaps not perfect espacially because a command interpreter pop up every time you call the function.Option Explicit
If IsDIAdemRunning() Then
Call MsgBox( "At least one DIAdem is running!" )
Else
Call MsgBox( "No DIAdem at all!" )
End If
Function IsDIAdemRunning()
Dim oWshShell
Dim oExec
' Execute via Shell Object
Set oWshShell = CreateObject("WScript.Shell")
Set oExec = oWshShell.Exec( "C:\windows\system32\tasklist.exe /FI ""IMAGENAME eq DIAdem.exe""")
' wait until tasklist is finished
Do While oExec.Status = 0
Pause(1)
Loop
' no Standard Output -> no DIAdem running
IsDIAdemRunning = Len(oExec.StdOut.ReadAll) <> 0
End Function
A better solution might be possible via WMI.
Matthias
Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater? -
Start external application with oracle job
I'm trying to start external program with oracle job.
Here is an example (I used SYS as SYSDBA):
BEGIN
DBMS_SCHEDULER.CREATE_JOB (
job_name => 'my_job',
job_type => 'executable',
job_action => 'C:/WINDOWS/system32/cmd.exe',
enabled => true,
auto_drop => false );
END;
But job STATE comes FAILED.
How should I do this?
Result was not better when I used
BEGIN
DBMS_SCHEDULER.CREATE_PROGRAM (
program_name => 'my_prg',
program_type => 'EXECUTABLE',
program_action => 'C:/WINDOWS/system32/cmd.exe',
enabled=>TRUE);
DBMS_SCHEDULER.CREATE_JOB (
job_name => 'my_job',
program_name => 'my_prg',
enabled => TRUE,
auto_drop => false );
END;
Edited by: user458393 on Feb 16, 2010 1:55 AMTake a look at this thread: Running a Windows BAT file using DBMS_SCHEDULER
C. -
To start the process by external program.
I'm using Guided Procedure
I want to start GP Process from external program.
I've tried Java API and it worked well.
But, I'm looking for the other way that starts Process of GP (ex, Web Service, URL,,,?)
Please let me know how to start processes.
Best regards,
KojiHi,
Yes. You can start a process through a web services that can be triggered from a method in a class or FM etc.
You can refer this link that has a step by step process for the same.
http://help.sap.com/erp2005_ehp_03/helpdata/EN/44/44c59fd7c72e84e10000000a155369/frameset.htm
Hope this helps.
Cheers,
Mandrake -
Need to start a program in Oracle System (External) from sap program
Hi guys,
I need to start a program in another oracle based system from sap program by writing native sql statements.
Does anyone have idea how to do this.
Rgds,
RamHi,
Here is another sample for procedures.Kindly reward points by clicking the star on the left of reply,if it is useful.
Code Sample for writing a procedure with input and output parameters
REPORT zzz_jaytest.
* Getting the regno and total as input parameters
PARAMETERS : p_regno(10) TYPE c DEFAULT 'R1000',
p_total TYPE i.
data : v_total type i.
* In this procedure, we are updating the total of a regno given as input.
* Here two parameters used in the procedure are input parameters.
* We are updating the record of regno entered in selection screen and
* adding the total entered to the already existing total. We have to give semicolon
* for the statement inside procedure.
exec sql.
CREATE or replace PROCEDURE PROC1 ( p_regno in char, p_total in number )
IS
BEGIN
UPDATE stu_det SET total = total + p_total where regno = p_regno;
END;
endexec.
* This is the code to execute the procedure for update.
* While executing the procedure, the parameter variable should be
* preceded with colon :
EXEC SQL.
EXECUTE PROCEDURE PROC1 ( in :p_regno, in :p_total )
ENDEXEC.
* In this procedure, we are selecting the details for the regno entered
* as input. Here p_regno is input parameter and v_total is used as output
* parameter. So that we can use the retrieved value of v_total in our
* ABAP program
exec sql.
CREATE or replace PROCEDURE PROC2 (p_regno in char, v_total out char)
IS
BEGIN
select total into v_total from stu_det
where regno = p_regno;
END;
endexec.
* This is the code to execute second procedure.
EXEC SQL.
EXECUTE PROCEDURE PROC2 ( in :p_regno, out :v_total )
ENDEXEC.
write : / 'Total of ', p_regno, ' is ', v_total. -
How can I execute an external program from within a button's event handler?
I am using Tomcat ApacheTomcat 6.0.16 with Netbeans 6.1 (with the latest JDK/J2EE)
I need to execute external programs from an event handler for a button on a JSF page (the program is compiled, and extremely fast compared both to plain java and especially stored procedures written in SQL).
I tried what I'd do in a standalone program (as shown in the appended code), but it didn't work. Instead I received text saying the program couldn't be found. This error message comes even if I try the Windows command "dir". I thought with 'dir' I'd at least get the contents of the current working directory. :-(
I can probably get by with cgi on Apache's httpd server (or, I understand tomcat supports cgi, but I have yet to get that to work either), but whatever I do I need to be able to do it from within the button's event handler. And if I resort to cgi, I must be able to maintain session jumping from one server to the other and back.
So, then, how can I do this?
Thanks
Ted
NB: The programs that I need to run do NOT take input from the user. Rather, my code in the web application processes user selections from selection controls, and a couple field controls, sanitizes the inoputs and places clean, safe data in a MySQL database, and then the external program I need to run gets safe data from the database, does some heavy duty number crunching, and puts the output data into the database. They are well insulated from mischeif.
NB: In the following array_function_test.pl was placed in the same folder as the web application's jsp pages, (and I'd tried WEB-INF - with the same result), and I DID see the file in the application's war file.
try {
java.lang.ProcessBuilder pn = new java.lang.ProcessBuilder("array_function_test.pl");
//pn.directory(new java.io.File("K:\\work"));
java.lang.Process pr = pn.start();
java.io.BufferedInputStream bis = (java.io.BufferedInputStream)pr.getInputStream();
String tmp = new String("");
byte b[] = new byte[1000];
int i = 0;
while (i != -1) {
bis.read(b);
tmp += new String(b);
getSelectionsDisplayTextArea().setText(getSelectionsDisplayTextArea().getText() + "\n\n" + tmp);
} catch (java.io.IOException ex) {
getSelectionsDisplayTextArea().setText(getSelectionsDisplayTextArea().getText() + "\n\n" + ex.getMessage());
}Hi Fonsi!
One way to execute an external program is to use the System Exec.vi. You find it in the functions pallet under Communication.
/Thomas -
How can I display files in external program like Word?
Using NetBeans 6.5, IE7, Windows XP
I have not had any luck attempting to get a PDF file to display in a separate browser window,
so I thought I might try to combine that with a new issue.
I have 3 file types - jpg, rtf and pdf that should be able to be displayed in external programs like Word or Adobe.
Is there a way to start an external application and pass the file name from a backing bean?
The files would be located on the server in a directory that is mapped to the client and the applications (Word, etc.) would reside on the client.
Can this be done from within the confines of a JSF application?
ThanksI was kind of hoping that someone could point me to an example of how to do this.
I've tried the servlet approach, but can't seem to get the file to display in a separate browser window.
That is why I thought about maybe launching a separate application, if that is possible. -
i have the new version of iMovie, and when i try to start the program, i can't because it says that it is looking for some movie files from the Iphoto, so all the program is locked up... how can i do to restart the program??
Hi
Did You ever use - iPhoto ?
Did You may be direct iPhoto to a different Photo Library
As iMovie tries to find the appropriate photo library - it can get lost if iPhoto direct it into a Library on a not connected external hard disk or to a strange location - And iMovie HANGS.
Do - When no other program is running that might interfere
• Start iPhoto - BUT NOW KEEP alt-key (option key) DOWN during the full Start-Up process
• Now iPhoto let's You select Photo Library
• Select the one in Your Account / Home folder / Pictures ! !
• Then iPhoto should start up OK
• Now Quit iPhoto
• START iMovie
Does it still hangs - then I would suspect - iMovie Pref. file
If it Run's OK - Then HURRAY !
Yours Bengt W -
Calling an external program (*.exe file) on the client
Hi,
I use 9iDS and I'd like to call an external program (*.exe file) on the client, but this exe file is located on the server not on the client.
So it should be something like a mixture between host and client_host(webutil) command. Is it possible to use client_host where a virtual path is passed to?
Regards SörenAre you saying you want to run on the exe on the client but its located on the server???
In that case you would have to do a webutil file transfer to move it to the client before executing. Or, if you are calling a DLL, webutil will download it automatically from the server to the client (see the C API example on the webutil page).
Regards
Grant Ronald
Forms Product Management
Maybe you are looking for
-
Issues while Importing /Mapping hierarchy/taxonomy
Hi All, We have multiple level hiererchies with different companies under the same banner.. When we try to map multiple level hierarchies in import manager to Taxonomy table ..We first map the Class to remote key and then clone Class(which has all
-
Hi i have a doubt in selection screen I had given statement as below now i can see the output screen and i'm getting the output also now i want to know the value of only one vendor. If i had given a vendor number it must select the particular data of
-
Problem saving a pdf file (adobe X) on a DFS (Distributed File System)
Following the installation of the X version of adobe reader, saving a pdf file over the network handled by DFS (distributed system files) is not possible. the following message appears: The file may be read-only or opened by another user. Save the do
-
Some critical errors in Planning, Business Rules and FR
Dear All, I am facing some critical errors in Hyperion Plannign 11.1.1.3. We did the migration of BR rules from one server to another server. Migration went well. When i running any one of the rule, it throws the below errors: If i run any one of the
-
My downloads and documents are now attached as blank pages .
Only happened recently Recipients have complained that the attachments are blank. They have all been succesfully downloaded or saved but appear as 0.1 kb on the e mail. Any advice?