SXPG_COMMAND_EXECUTE / Parameters
Hi
I've setup af system commando called ZMYSQL using SM69.
When I try run the function
SXPG_COMMAND_EXECUTE using
ADDITIONAL_PARAMETERS = '-h xxx.xxx.xxx.xxx --user=<uid> --password=<pwd> < c:\file.sql'
it for some reasson removes the '<' sign from my parameters, which make it fail.
Any knows how its possible to avoid this ? or is there a workaround ?
I can execute the system comand from the application server using.
mysql -h xxx.xxx.xxx.xxx --user=<uid> --password=<pwd> < c:\file.sql
Edited by: Henrik Mortensen on Jan 15, 2010 1:17 PM
Look at OSS [Note 1152084 - Parameter for external commands|https://service.sap.com/sap/support/notes/1152084] and [Note 1280022 - Special characters in parameter string of ext. commands (2)|https://service.sap.com/sap/support/notes/1280022]
Regards,
Raymond
Similar Messages
-
Maintain Blanks in SXPG_COMMAND_EXECUTE additional parameters
Hello guys,
we are trying to execute some commands in a Z function calling the function SXPG_COMMAND_EXECUTE.
We have a command Z and in the additional parameters and we fill the command with CMD('COPY T:
Documents
PXXX2
IEXXX.DOC \"E:
WORK
600613 MATERIAL 100333 (12345)\" ').
We want to maintain the blanks, but during the execution of function SXPG_COMMAND_EXECUTE a CONDENSE of the field additional parameters is done.
There is any way to maintain the blanks calling this function? There is another function that also executes commands and maintain the blanks?
Many thanks in advance.
Regards,
Xavi.Hi,
thanks for the answer. But thats doesn't match my problem. What I want is to start a shell-script with parameter whereas some parameters might include one or more blanks. Like for examples a script with only one parameter:
shell-script 'this is a parameter'
What I found out while testing with SM49 is, when I put the parameter into apostrophe than the parameter is passed as a single parameter to the script. But SM49 elsewell SXPG_COMMAND_EXECUTE condense more than blank to only one blank. And the apostrophe remain in the parameter.
SM49:
shell-script 'This is a parameter'
The shell-script gets the parameter 'This is a parameter' , whereas the apostrophe ' and the start and at the end is part of the parameter.
Using the function modules SXPG_RFCDEST_OPEN_INT, SAPXPG_START_XPG and SAPXPG_END_XPG instead of SXPG_COMMAND_EXECUTE solves the problem of condensing the blanks to one blank. But the apostrophe is still part of the parameter. And I have to consider that the apostrophe might be originally part of the parameter.
And I have to solve this problem.
Regards
Karl-Wilhelm -
FM SXPG_COMMAND_EXECUTE and parameters
Dear all !
I tried to execute the FM SXPG_COMMAND_EXECUTE (SM49, SM69) in order to execute SAPCAR on a couple of file on the server with the parameter
<i>-cvf /usr/sap/SBD/interfaces//SP2/CH/BACKUP/comp.car .</i>.
Unfortunately the FM changes the parameter string to UPPERCASE:
-CVF /USR/SAP/SBD/INTERFACES//SP2/CH/BACKUP/COMP.CAR .
Result is that SAPCAR finishes with :
<i>46 SAPCAR: unknown command option CVF (error 20).
45 External program terminated with exit code 20 </i>
Any ideas of how I can pass the parameter to SAPCAR without having it changed to UPPERCASE ?
Thanks in advance,
PhilippHi
If you are trying to excute the function module using SE37 there will be a check box on top saying uppper/Lower case.
Check the box it will work fine.
When using the function module inside the program no need to specify upper/lower case.
Nataraju -
Error BT616 when calling function module SXPG_COMMAND_EXECUTE in background
Hi All,
We use function module SXPG_COMMAND_EXECUTE with a custom command we defined in SM69 to move files in unix (mv command).
The function module call has worked fine for almost a year and recently we have been seeing an error (BT616) in our job lob (SM37) when the program is run in background. We have not been able to reproduce the error in foreground mode and it seems to be occuring only periodically in the background. (The appropriate SAP authorization objects where assigned to the batch job ID and the steps on the batch job.) We are in the process of setting up the trace flag and performing analysis on the trace log via ST11 to help identify the issue.
After perform analysis on SXPG_COMMAND_EXECUTE, the error is occurring when calling function module SAPXPG_END_XPG for exception 2, system failure, yet function module SAPXPG_END_XPG does not exist. I assume this is a program at the operating system level and is just a signature of the parameters to be passed to the operating system program.
Below is part of the SAP function module SXPG_COMMAND_EXECUTE that is failing.
* Now we have to wait for the termination of the external
* command if the caller wants us to.
IF TERMINATIONWAIT = 'X'.
CALL FUNCTION 'SAPXPG_END_XPG'
DESTINATION DESTINATION
IMPORTING EXITSTAT = STATUS
EXITCODE = EXITCODE
TABLES LOG = LOG
EXCEPTIONS COMMUNICATION_FAILURE = 1 MESSAGE MSG
SYSTEM_FAILURE = 2 MESSAGE MSG.
I performed a where used on function module SXPG_COMMAND_EXECUTE, and most of SAP programs call the function module with the parameter TERMINATIONWAIT = 'X', so I assume we should pass X as well.
Any ideas on what could be causing this issue?
Mike VondranI also remember I have this kind of issue, as I have some UNIX script at OS( UNIX) level . The problem was with the ID , as it dont have proper authorization at OS level ( UNIX ) . Please check this ID authorization. This could be the one of reasons if youre sure from SAP standpoint.
Hope thisll give you some guide line..
Thanks
Bye -
SXPG_COMMAND_EXECUTE
Hi Experts,
Can you explain me the fuctionality below code...
DATA: l_target_syst LIKE rfcdisplay-rfchost.
DATA: i_error LIKE btcxpm OCCURS 0 WITH HEADER LINE.
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'SAPDBHOST'
ID 'VALUE' FIELD l_target_syst.
CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
EXPORTING
commandname = commandname
additional_parameters = filename
operatingsystem = sy-opsys
targetsystem = l_target_syst
DESTINATION =
stdout = stdout
stderr = stderr
terminationwait = terminationwait
TRACE =
IMPORTING
status = status
exitcode = exitcode
tables
exec_protocol = i_exec_protocol
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
wrong_asynchronous_parameters = 12
cant_enq_tbtco_entry = 13
jobcount_generation_error = 14
OTHERS = 99.
CASE sy-subrc.
WHEN 1.
RAISE no_permission.
WHEN 2.
RAISE command_not_found.
WHEN 3.
RAISE parameters_too_long.
WHEN 4.
RAISE security_risk.
WHEN 5.
RAISE wrong_check_call_interface.
WHEN 6.
RAISE program_start_error.
WHEN 7.
RAISE program_termination_error.
WHEN 8.
RAISE x_error.
WHEN 9.
RAISE parameter_expected.
WHEN 10.
RAISE too_many_parameters.
WHEN 11.
RAISE illegal_command.
WHEN 12.
RAISE wrong_asynchronous_parameters.
WHEN 13.
RAISE cant_enq_tbtco_entry.
WHEN 14.
RAISE jobcount_generation_error.
WHEN 99.
RAISE x_error.
ENDCASE.
Regards
Kali PramodIn this FM.. main three parameters are:
<b>commandname
additional_parameters
exec_protocol</b>
Commandname is the command created thru SM49 they are called external operating system command,,,
In this command first parameter is always an operating system command like..
<b>ls for listing all files and directories</b>
<b>put</b> etc
in additional_parameters you can pass the parameters for that command like for the command you can see the contents of some particular directory so u have to pass that directory path in additional_parameters field
i.e. additional_parameters = '/usr/sap/tmp'
and exec_protocol is the table which returns u the contents which are retrieved using that command...
e.g using ls command all files an dir names appended to this table...
You can use another FM is ur additional parametes field is very long..
<b> SXPG_COMMAND_EXECUTE_LONG</b>
<i>Two more parameters: STATUS and EXITCODE are very important... your command is run successfully only when <b>STATUS = 'O' " Capital O
and
EXITCODE = '0' " Zero</b>
</i>
Reward if useful
Regards
Prax -
SXPG_COMMAND_EXECUTE: ADDITIONAL_PARAMETERS contains Blanks
Hi to all,
I want to start a shell-script with SXPG_COMMAND_EXECUTE on Linux. Therefor I have maintained a command with SM69.
I have to fill ADDITIONAL_PARAMETERS with a list of parameters which are passed to the shell-script. Unfortunately some parameters contains blanks, such as a material description.
How do I have to call SXPG_COMMAND_EXECUTE so that a parameter "AA BB" or "CC DD" conserves as one parameter when it is passed to the shell-script and the shell-script can recognize these as one parameter and not as two or more.
Maybe someone has a suggestion for another solution to handle this problem.
Thanks in advance
Karl-WilhelmHi,
thanks for the answer. But thats doesn't match my problem. What I want is to start a shell-script with parameter whereas some parameters might include one or more blanks. Like for examples a script with only one parameter:
shell-script 'this is a parameter'
What I found out while testing with SM49 is, when I put the parameter into apostrophe than the parameter is passed as a single parameter to the script. But SM49 elsewell SXPG_COMMAND_EXECUTE condense more than blank to only one blank. And the apostrophe remain in the parameter.
SM49:
shell-script 'This is a parameter'
The shell-script gets the parameter 'This is a parameter' , whereas the apostrophe ' and the start and at the end is part of the parameter.
Using the function modules SXPG_RFCDEST_OPEN_INT, SAPXPG_START_XPG and SAPXPG_END_XPG instead of SXPG_COMMAND_EXECUTE solves the problem of condensing the blanks to one blank. But the apostrophe is still part of the parameter. And I have to consider that the apostrophe might be originally part of the parameter.
And I have to solve this problem.
Regards
Karl-Wilhelm -
SXPG_COMMAND_EXECUTE FUNCTION
Hi Everyone,
I have a problem to use this function :
The unix commande is copyoutbound .
I want to copy a file automatically using reflection from a unix path to other unix path.
But it doesn`t work in this test code.
Can someone help me .
Thanks a lot
Soufiene
REPORT ZTEST_SOU.
DATA: params LIKE sxpgcolist-parameters.
DATA: return_code LIKE btcxp3-exitstat.
DATA: unix_command LIKE sxpgcolist-name.
DATA: dest LIKE rfcdes-rfcdest.
DATA: FILENAME1(128) TYPE C,
FILENAME2(128) TYPE C.
DATA: single_quote(1) TYPE c VALUE '"'.
DATA: quoted_subject(32) TYPE c.
DATA: convert_flag(1) TYPE c.
DATA: BEGIN OF tabl OCCURS 0.
INCLUDE STRUCTURE btcxpm. "Structure for Logging message from
DATA: END OF tabl. "external program to calling program
DATA: ICN LIKE ICON-ID,
I_NEXT_DATE LIKE SY-DATUM,
I_COMP_DATE LIKE SY-DATUM,
T_EXEC LIKE SY-DATUM.
UNIX_COMMAND = 'Z_HR_FILE_TRANSFER'.
FILENAME1 = '/US/hrit-sdck/trsf0019.toc'.
FILENAME2 = '/test/esc/inbound/done'.
DEST = 'cib10'.
CONCATENATE FILENAME1 FILENAME2 INTO PARAMS SEPARATED BY SPACE.
CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
EXPORTING
commandname = unix_command
destination = dest
additional_parameters = params
IMPORTING
status = return_code
TABLES
exec_protocol = tabl
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
wrong_asynchronous_parameters = 12
cant_enq_tbtco_entry = 13
jobcount_generation_error = 14.
IF return_code NE 'O'.
WRITE:/ 'UNIX status UNSUCCESSFUL TRANSFER RETURN CODE = ',return_code.
ENDIF.Script qui copie un fichier en utilisant le protocole ssh
Parametres Obligatoire:
$INTERFACE => Interface
$SOURCESID => SID d'origine
$TARGETSID => SID de destination
$AREA => Area
$LOCAL_AREA => Nom de repertoire qui doit figurer dans le path de source entre "interfaces" et "outbound".
$FILENAME => Filename (Could contain a wild card)
$LOCATION => Nom de repertoire qui doit figurer dans le path de destination entre "$TARGETSID" et "common"
$DIRECTION => inbound/outbound -
SXPG_COMMAND_EXECUTE - transfer files to FTP
Our OS is Windows NT.
I am using SXPG_COMMAND_EXECUTE to execute a script to transfer files from R/3 App Server to FTP Server. I created a command in SM69.
command name: ZZ_MOVE
Operating system: Windows NT
Type: Customer
Operating system command: cmd
Parameters for operating system command: Full path of the batch file
This batch file contain command for transfer the files. I am getting an error..Command not found.....Is this correct parameters i am passing or anything wrong....It's Windows NT server, it's not Unix system. I want to move files from one folder to another folder in Application server using FM SXPG_COMMAND_EXECUTE.
I have the Script (for moving files from one folder to another in Application Server). I pasted the script in notepad and saved as .bat file and dropped in Application server source folder. I gave the Application server file path(Script file location) in command create(Parameters for operating system command) in SM49.
Operating system command
cmd
Parameters for operating system command
C:\usr\sap\work\300\testftp.bat
Does it work this way ? I executed the command without errors but the file transfer not happening.....
My question Is does it works if i pass the Script file location in Command create ? if not how can i do this.....
Edited by: fract_get on Mar 15, 2010 8:01 PM -
SXPG_COMMAND_EXECUTE in background
Hi all.
Does the FM SXPG_COMMAND_EXECUTE can be activated within background mode?
When I activate the abap program that includes the above FM within a periodic job it's not being executed.
Any reason for that?
Thanks in advance,
Rebeka*--> Activate decryption command
CALL FUNCTION 'SXPG_COMMAND_EXECUTE' "IN BACKGROUND TASK
EXPORTING
COMMANDNAME = 'ZFI_GPG'
ADDITIONAL_PARAMETERS = LV_PARAMS
OPERATINGSYSTEM = 'Windows NT'
TARGETSYSTEM = LV_SERVER
IMPORTING
STATUS = STATUS
EXITCODE = EXITCODE
TABLES
EXEC_PROTOCOL = LT_PROT_TAB
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
WRONG_ASYNCHRONOUS_PARAMETERS = 12
CANT_ENQ_TBTCO_ENTRY = 13
JOBCOUNT_GENERATION_ERROR = 14
OTHERS = 15.
When 'ZFI_GPG' is the command from sm69 and lv_params is the additional parameters.
Thanks a lot,
Rebeka -
SXPG_COMMAND_EXECUTE - returns an error
Hi All,
I am using the FM SXPG_COMMAND_EXECUTE to run a unix script which fetches a pdf file written from ABAP code into
application server.
I have written the pdf file, and while run separately the Unix script is working fine.
But the FM which calls the unix script, SXPG_COMMAND_EXECUTE, returns errors which say that the pdf file could not be opened. I have written the pdf file in binary form on the application server.
Please help.
This is my code:
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = gv_bin_filesize
bin_file = gt_bin
TABLES
otf = gt_otf
lines = gt_pdf_tab
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
data: mstr_print_parms LIKE pri_params,
gv_file type string value '/usr/sap/ABAP-TMP/',
wa_pdf_tab like line of gt_pdf_tab,
it_docs TYPE STANDARD TABLE OF docs,
it_lines TYPE STANDARD TABLE OF tline,
gv_frontfile type string ,
wa_lines type tline.
concatenate gv_file wa_final-pernr '.pdf' into gv_file.
open dataset gv_file for output in binary mode.
transfer gt_bin to gv_file.
close dataset gv_file.
CONSTANTS: c_extcom TYPE sxpgcolist-name VALUE 'ZHRPAYSLIP',
c_oper TYPE syopsys VALUE 'Linux'.
DATA: v_dir_input TYPE sxpgcolist-parameters. " Input Directory
DATA: t_result TYPE STANDARD TABLE OF btcxpm.
concatenate wa_final-pernr
gs_reclist-receiver
'93210951'
into v_dir_input
separated by space.
CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
EXPORTING
commandname = c_extcom
additional_parameters = v_dir_input
operatingsystem = c_oper
TABLES
exec_protocol = t_result
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
wrong_asynchronous_parameters = 12
cant_enq_tbtco_entry = 13
jobcount_generation_error = 14
OTHERS = 15.
Thanks,
AnitaHi guys,
Issue has been resolved. I was writing the pdf file in the application server, wheras the Unix script had some other directory as its present working directory.
As we are using the same directory for the purpose, this directory and folder name was hard coded in the Unix script as well,
so that the confusion of path is resolved.
Thus this issue was resolved from the Unix script itself.
Thanks.
Anita Jeyan. -
SXPG_COMMAND_EXECUTE Can't exec external program (No such file or directory
Hi Experts,
I need to launch or terminate an external application (i.e. command prompt, notepad, etc.) in background job by using FM SXPG_COMMAND_EXECUTE. However, I am unable to proceed because of the following error occured after executing the command in SM69.
Can't exec external program (No such file or directory)
External program terminated with exit code 1
I was using the following sample code. Can someone tell me what might be the cause of the problem?
DATA: lv_status TYPE extcmdexex-status,
lt_output TYPE TABLE OF btcxpm,
lv_opsys TYPE sy-opsys.
lv_opsys = 'WINDOWS NT'.
CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
EXPORTING
commandname = 'ZIEXPLORE'
additional_parameters = '/c'
operatingsystem = lv_opsys
IMPORTING
status = lv_status
TABLES
exec_protocol = lt_output
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
wrong_asynchronous_parameters = 12
cant_enq_tbtco_entry = 13
jobcount_generation_error = 14
OTHERS = 15.
ZIEXPLORE command
Operating system command: cmd
Parameters for operating system command: taskkill /f /im iexplore.exe
Thanks and Regards,
LouieHi Louie,
I am not able to assume the reason of the problem, If you say that its not getting executed in SM49 then the problem lies there.
So I am providing you a link which might be helpful, just go through it and cross check. There is a parameter called "trace" in the fm mentioned.
Secton Microsoft Windows NT - [Prerequisites for Running External Commands and External Programs|http://help.sap.com/saphelp_nw70/helpdata/en/c4/3a7fbb505211d189550000e829fbbd/content.htm]
[Analyzing Problems with External Commands and Programs|http://help.sap.com/saphelp_nw70/helpdata/en/c4/3a80c4505211d189550000e829fbbd/content.htm]
May be you can post this question in [SAP AS General|SAP NetWeaver Application Server; also. -
SXPG_COMMAND_EXECUTE failed for BRBACKUP
Dear All,
OS : AIX, DB :Oracle , SAP ECC6.0
i got an error and online backup has scheduled in DB13 ( Production Server)
when its reach the backup time its showins error
Status : not Available
JOB LOG:
30.11.2009 17:26:56 Job started
30.11.2009 17:26:56 Step 001 started (program RSDBAJOB, variant &0000000000672, user ID BASIS)
30.11.2009 17:26:56 No application server found on database host - rsh/gateway will be used
30.11.2009 17:26:56 Execute logical command BRBACKUP On host PRODORADB
30.11.2009 17:26:56 Parameters:-u / -jid ALLOG20091130172655 -c force -t online -m all -p initIRPoffsite.sap -a -c force -p initIRP
30.11.2009 17:26:56 offsite.sap -cds
30.11.2009 17:27:28 SXPG_STEP_XPG_START: is_local_host: rc = 403
30.11.2009 17:27:28 SXPG_STEP_XPG_START: host = PRODORADB
30.11.2009 17:27:28 SXPG_STEP_XPG_START: is_local_r3_host: rc = 802
30.11.2009 17:27:28 SXPG_STEP_XPG_START: RFC_TCPIP_CONNECTION_OPEN: rc = 1003
30.11.2009 17:27:28 SXPG_STEP_COMMAND_START: SXPG_STEP_XPG_START returned: 1.003
30.11.2009 17:27:28 SXPG_COMMAND_EXECUTE(LONG)
30.11.2009 17:27:28 <timestamp> = 20091130172728
30.11.2009 17:27:28 COMMANDNAME = BRBACKUP
30.11.2009 17:27:28 ADDITIONAL_PARAMETERS =
30.11.2009 17:27:28 -u / -jid ALLOG20091130172655 -c force -t online -
30.11.2009 17:27:28 m all -p initIRPoffsite.sap -a -c force -p initIRP
30.11.2009 17:27:28 offsite.sap -cds
30.11.2009 17:27:28 LONG_PARAMS
30.11.2009 17:27:28 OPERATINGSYSTEM = ANYOS
30.11.2009 17:27:28 TARGETSYSTEM = PRODORADB
30.11.2009 17:27:28 DESTINATION
30.11.2009 17:27:28 SY-SUBRC = 1003
30.11.2009 17:27:28 SXPG_COMMAND_EXECUTE failed for BRBACKUP - Reason: program_start_error: For More Information, See SYS
30.11.2009 17:27:28 Job cancelled after system exception ERROR_MESSAGE
pls give suggestion to solve this issue
regards
satheeshHi
In Windows we can find Host & services from C:\WINDOWS\system32\drivers\etc
we are using AIX for all servers
below detail for reference
===================================================
ROOT@PRDCIXI:/#ls
.TTauthority bosinst.data perfdata
.Xauthority cdrom proc
.dt clverify_daemon.log sapcd
.dtprofile configassist.log sapcdd
.java dead.letter sapmnt
.mh_profile dev sbin
.profile esa sdtstart.err
.rhosts etc smit.log
.rhosts.previous home smit.script
.sdtgui image.data smit.transaction
.sh_history lib ss.txt
.vi_history lost+found tftpboot
.wmrc lpp tk
CSD mksysb tmp
IRPEXE mnt u
Mail mount.a1253462 unix
TT_DB opt usr
audit oracle var
backup pay websm.script
bin pay1
ROOT@PRDCIXI:/#cat .rhosts
PRODORADB_boot1
PRODORADB_boot2
PRODORADB_svc
PRODORADB_ps
PRDCIXI_boot1
PRDCIXI_boot2
PRDCIXI_svc
PRDCIXI_ps
===================================================
This is APP2 Instanece
ROOT@PRDAPP2:/#ls
.TTauthority TT_DB lpp smit.log
.Xauthority audit mksysb smit.script
.dt bin mnt smit.transaction
.dtprofile bosinst.data nmon tftpboot
.java cdrom opt tk
.profile configassist.log oracle tmp
.rhosts dev pay u
.rhosts.previous esa proc unix
.sdtgui etc sapcd usr
.sh_history home sapcdd var
.ssh image.data sapmnt websm.script
.vi_history lib sbin
.wmrc lost+found sdtstart.err
ROOT@PRDAPP2:/#cat .rhosts
SAP-DEV-QAS root
ROOT@PRDAPP2:/#cat .rhosts.previous
SAP-DEV-QAS root
ROOT@PRDAPP2:/#
========================================
This is APP1 Instanece
ROOT@PRDAPP1:/#ls
.TTauthority TT_DB lpp smit.log
.Xauthority audit mksysb smit.script
.dt bin mnt smit.transaction
.dtprofile bosinst.data nmon tftpboot
.java cdrom opt tk
.profile configassist.log oracle tmp
.rhosts dev pay u
.rhosts.previous esa proc unix
.sdtgui etc sapcd usr
.sh_history home sapcdd var
.ssh image.data sapmnt websm.script
.vi_history lib sbin
.wmrc lost+found sdtstart.err
ROOT@PRDAPP1:/#cat .rhosts
SAP-DEV-QAS root
ROOT@PRDAPP1:/#
You have mail in /usr/spool/mail/root
ROOT@PRDAPP1:/#
ROOT@PRDAPP1:/#cat .rhosts
SAP-DEV-QAS root
ROOT@PRDAPP1:/#cat .rhosts.previous
SAP-DEV-QAS root
ROOT@PRDAPP1:/#
============================================================
kindly advise me i didnt get any hint from host file -
Hi,
When i have configured to take backup using DB13 in production b/w SERVER (SAP ECC 6.0) it is saying the following:
14.01.2008 11:39:41 Job started
14.01.2008 11:39:41 Step 001 started (program RSDBAJOB, variant &0000000000002, user ID BASIS)
14.01.2008 11:39:42 Execute logical command DB6_BACKUP On host prprd1
14.01.2008 11:39:42 Parameters:PBW OFFLINE TO /dev/rmt/0mn BUFFERS 0 BUFFERSIZE 0 PARALLELISM 0
14.01.2008 11:39:43 SXPG_COMMAND_EXECUTE failed for DB6_BACKUP - Reason: command_not_found
14.01.2008 11:39:43 Job cancelled after system exception ERROR_MESSAGE
Actually when it is doing it should execute the following DB6_DBBACKUP logical command but it is saying it used DB6_BACKUP logical command which is not there.
In DB13, when i see the previous backups which were sucessfully completed r not seen, but in the job log SM37 it is showing.
Auditing was done by SAP and kernel is updated for production system. Is it creating any problem?
Expecting a solution.
regards
padmaHi Ralf,
Thanks for the reply.
I could also found that answer on my own.
regards
padma -
SXPG_COMMAND_EXECUTE - need help
Hello Friends,
Please explain me the functionality of this program.
REPORT ZABC.
PARAMETER PCOMMAND(18) DEFAULT 'zw1001'.
DATA: BEGIN OF PROTOCOL OCCURS 0.
INCLUDE STRUCTURE BTCXPM.
DATA: END OF PROTOCOL.
DATA: STATUS_00 LIKE BTCXP3-EXITSTAT.
DATA: XCOMMAND LIKE SXPGCOTABE-NAME.
DATA: ADDI_PARA LIKE SXPGCOLIST-PARAMETERS.
MOVE PCOMMAND TO XCOMMAND.
CLEAR STATUS_00.
CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
EXPORTING
COMMANDNAME = XCOMMAND
IMPORTING
STATUS = STATUS_00
TABLES
EXEC_PROTOCOL = PROTOCOL
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
WRONG_ASYNCHRONOUS_PARAMETERS = 12
CANT_ENQ_TBTCO_ENTRY = 13
JOBCOUNT_GENERATION_ERROR = 14
OTHERS = 15.
WRITE: / SY-SUBRC.
WRITE: / STATUS_00.
LOOP AT PROTOCOL.
WRITE: / PROTOCOL.
ENDLOOP.
Thanks,
ShreekantUsing this function module, you can check the authorization of a user to execute a particular external command and run the command:
With the arguments specified in ADDITIONAL_PARAMETERS
On the target host system defined by OPERATINGSYSTEM and TARGETSYSTEM
If an SAP profile parameter is inserted in the portion of the command stored in the database, then the value of this parameter is substituted into the command. If an SAP application server is active on the target system (TARGETSYSTEM), then the profile parameter values are read from the profile that is active on that system. No parameter substitution is made in ADDITIONAL_PARAMETERS.
After substitution, the command is checked for the presence of "dangerous" characters such as the semicolon ( ; ) on UNIX systems.
If an additional "security function module" is specified in the command definition, this function module is also called in the course of processingebenfalls. This function module can prevent execution of the command.
If the authorization checks complete successfully, the command is run on the target host system. -
SXPG_COMMAND_EXECUTE error
Hi All,
Jobs in db13 are failing with below error.
04.08.2010 05:00:46 Job started
04.08.2010 05:00:47 Step 001 started (program RSDBAJOB, variant &0000000000059, user ID xxxxx)
04.08.2010 05:00:47 Execute logical command BRCONNECT On host dbSID
04.08.2010 05:00:47 Parameters: -u / -jid STATS20100609000000 -c -f stats -t ALL
04.08.2010 05:01:27 External communication error at program start (see system log)
04.08.2010 05:01:27 SAPXPG_START_XPG_LONG: sy-subrc ne 0
04.08.2010 05:01:27 destination = SAPXPG_DBDEST_DBSID
04.08.2010 05:01:28 SXPG_STEP_XPG_START: execute_sapxpg: rc = 1.003
04.08.2010 05:01:28 SXPG_STEP_COMMAND_START: SXPG_STEP_XPG_START returned: 1.003
04.08.2010 05:01:28 SXPG_COMMAND_EXECUTE(LONG)
04.08.2010 05:01:28 COMMANDNAME = BRCONNECT
04.08.2010 05:01:28 OPERATINGSYSTEM = ANYOS
04.08.2010 05:01:28 TARGETSYSTEM = dbSID
04.08.2010 05:01:28 DESTINATION = SAPXPG_DBDEST_DBSID
04.08.2010 05:01:28 SXPG_COMMAND_EXECUTE failed for BRCONNECT - Reason: program_start_error: For More Information, See SYS
04.08.2010 05:01:28 Job cancelled after system exception ERROR_MESSAGE
And SAPXPG_DBDEST_DBSID rtc connection failed with timeout 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 ciSID.ncsbe.eu.jnj.com / sapgw52
Error Details DETAIL: no connect of TP sapxpg from host dbSID.ncsbe.eu.jnj.com after 20 sec
Error Details COMPONENT: SAP-Gateway
Error Details COUNTER: 98
Error Details MODULE: gwr3cpic.c
Error Details LINE: 2030
Error Details RETURN CODE: 242
Error Details SUBRC: 0
Error Details RELEASE: 701
Error Details TIME: Wed Aug 4 13:41:27 2010
Error Details VERSION: 2
System log is showing " Error1005 when executing external command brtools on SAPXPG_DBDEST_DBSID (in=R,out=M,err=M,trc=0,trm=C. strtstat=,xpgid=0,convid=. msg :Error when openi)".
When i check detail logs also it is throwing error " SXPG_COMMAND_EXECUTE failed for BRCONNECT - Reason: program_start_error: For More Information, See SYS ".
DB and CI are on different hosts.
SAP : SAP EHP 1 for SAP NetWeaver 7.0
DB : Oracle 10.2.0.4.0
OS : HP-UX
Gateway is running, I see gateway profiles exist at OS level in /usr/sap/SID/SYS/profile.
But gateway profiles haven't been created in RZ10.
Is this causing the issue. Can you please help me out here.
Thanks in advance.
Edited by: SAP Basis on Aug 4, 2010 7:59 AMError Details Error when opening an RFC connection
Error Details ERROR: timeout during allocate
Error Details LOCATION: SAP-Gateway on host ciSID.ncsbe.eu.jnj.com / sapgw52
It's using RFC to connect so check SM59 -> TCP/IP Connections -> SAPXPG_DBDEST_<SID>
Make sure the Technical Settings are correct and you can do a successful "Connection Test".
Nelis
Maybe you are looking for
-
hi i would like to built currect and yago sales report and unable to ge the yago correctly report parameter p_date in format MM-YYYY my report displays sales of 06-2010 for current and for yaga it should 06-2009 how to get get yago date please advice
-
Same batch picked on two different delivery notes
Hi all, We have a situation whereby on occasion the same batch of a material is picked by SAP on two different delivery notes. I'm trying to get to the bottom of why this is happening - from what I can tell this only seems to happen when the initial
-
Dear All Please release my confusion in STO Process we are using Customer and Vendor right, now i am using two vendors and same Customer because my criteria is Two Supplying plants and One Receiving plant, here if am leaving blank in Customer Record
-
Set Location of JPanel in another JPanel
Hello, i want to set the location of a JPanel in another JPanel. This is my code: * To change this template, choose Tools | Templates * and open the template in the editor. package nemo; * @author Administrator import java.awt.event.*; import javax.s
-
Acrobat Standard XI features stopped working after upgrading MS Office
We recently upgraded MS Office from 2007 to MS Office 2013 on one of our PCs that is running Adobe Acrobat XI Standard. The convert to pdf and combine to pdf functions are now generating an error when attempting to convert an excel file to a pdf that