Call 'SYSTEM' id 'COMMAND' field w_runstring

Hi All,
This system command is throwing error , filling sy-subrc with value 1-.
Can anyone tell why?
Thanks,
Shaily

Was the file actually moved?  In certain releases Call 'SYSTEM' id 'COMMAND' .... returns -1 even though the command was issued successfully.
If you want to apply error handling take a look at SAP note 677435 which explains the supported methods for calling o/s commands.  As Call 'system'... is not actually supported it can do unpredictable things.
Regards,
Nick

Similar Messages

  • CALL 'SYSTEM' ID 'COMMAND'

    hi:
    constants:comm(90) value 'sh /usr/rvs/export/TNT2K7F/script/FRC12K7F.sh'.
      call 'SYSTEM' id 'COMMAND' field comm.
    can you tell me the  role of the sentence ,ths
    regards
    sophia

    Hi,
    'sh /usr/rvs/export/TNT2K7F/script/FRC12K7F.sh' is a unix command to run a unix script, and normally you would have to log on to the operating system to run this.
    call 'SYSTEM' id 'COMMAND' field comm calls this command from ABAP, meaning your SAP user can run a report which also runs the unix script.
    Regards,
    Nick

  • CALL 'SYSTEM' ID 'COMMAND'  cannot be used

    Hello,
    We were just told that with the latest kernal we are going to apply, we can no longer use the following command:
    CALL 'SYSTEM' ID 'COMMAND' FIELD CMD(250)
    We are thinking of using this function to replace it:
    CALL FUNCTION 'SXPG_CALL_SYSTEM'
    Does anyone have any other suggestions on other options we might have?
    Thanks!

    Bill,
    We are using function module SXPG_CALL_SYSTEM in our 4.7 system and it works fine.

  • Call System Command

    I am executing the following command from a abap program to execute a Unix Script. The script executes successfully but it comes back to the program with a sy-subrc return code of -1????? Anyone have any ideas? We are on 4.6c
    Thank You
    *&      Form  EXECUTE_UNIX_COMMAND                                     *
    form execute_unix_command.
    CALL 'SYSTEM' ID 'COMMAND' FIELD app_script
                   ID 'TAB'     FIELD TABL-SYS.

    Hi Joe,
    Check the Below program, you will get this program in latest versions from 4.6c...
    RSBDCOS0---->subroutine EXEC
    look OSS Note 9391 for more info
    Regards,
    Srinivas

  • Call a unix command

    Hi Community,
    It's possible to create a program that a call does a unix command.
    I would like created a synchronous scenario.
    Then the program call a unix command and this is waiting up to when a unix command termined a runtime.
    The command returned a data and the ABAP program will owe to take back the esecution.
    I hope in you
    Thank's everybody.

    Hi Antonello,
    i'd do it with different job steps (SM36)
    1) Program1, which does a unix command:
    syntax:
      CALL 'SYSTEM' ID 'COMMAND' FIELD COMMAND
                    ID 'TAB'     FIELD TABL-SYS.´
    or have a look here: external commands
    2) Program2 handle the output (e.g. a file) of program 1
    regards Andreas

  • How to call systems commands

    Hello guys,
    I will like to know if there is a way of calling system command and shell commands in windows without making use of the Runtime Class in java.
    Also when ever i call a system command or shells commands from my java application using the runtime class, it open the a new shell(Command Prompt) before executing the command.
    I await your response. Thanks in advance.
    Joe.

    How about this? http://onesearch.sun.com/ClickThru?qt=without+command+window&url=http%3A%2F%2Fforum.java.sun.com%2Fthread.jsp%3Fforum%3D31%26thread%3D440546&pathInfo=%2Fsearch%2Fdevelopers%2Findex.jsp&hitNum=2&col=devforums

  • How to call system command in vc++?

    i wish to call the netsend command in the program but i dont know how to do it? can you please show me the actually of calling net send command in the way of mfc?

    Take a look at the Win32 CreateProcess, ShellExecute, and ShellExecuteEx functions.
    - Elton

  • Disable/hide Command Field in T-iViews

    Hi All,
    I have ctreatd some transaction iviews. I am using SAP GUI type as SAP GUI for windows, I there any way to disable/hide the command field so that user user cannot enter any other T-Code and navigate to that transaction.
    Waiting for your inputs...
    Regards,
    Srinivas

    Hi,
    I have done that. I created that as a local object.
    Below are the params i maintained for the system created
    Application Host : My R3 Host
    Using SSO
    WebAs Host : FQDN of R3:8000
    WebAs Path :/sap/bc/gui/sap/its/webgui
    Protocol: http
    ITS Host : FQDN of R3:8000
    ITS Path :/sap/bc/gui/sap/its/webgui
    Protocol: http
    After that If I do a Preview, I am getting the below error:
    The URL http://MyPortal.Node1:8000/sap/bc/gui/sap/its/se37 was not called due to an error.
    Note
    The following error text was processed in the system ECD : Template interpretation cancelled, syntax error.
    The error occurred on the application server devecc_ECD_00 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    SYSTEM-EXIT of program SAPLSFUNCTION_BUILDER
    Function: RS_FUNCTION_INITIAL_SCREEN of program SAPLSFUNCTION_BUILDER
    Method: IF_WB_PROGRAM~PROCESS_WB_REQUEST of program CL_FB_FUNCTION_INITIAL_SCREEN=CP
    Method: DO_THE_NAVIGATION of program CL_WB_NAVIGATOR===============CP
    Method: DO_THE_NAVIGATION of program CL_WB_NAVIGATOR_VIS_AS_DYNPRO=CP
    Method: PROCESS_WB_REQUEST of program CL_WB_MANAGER=================CP
    Method: PROCESS_REQUEST_QUEUE of program CL_WB_MANAGER=================CP
    Method: IF_WB_MANAGER~SET_WORKSPACE of program CL_WB_MANAGER=================CP
    Method: START_INTERNAL of program CL_WB_STARTUP=================CP
    Module: MANAGER_START of program SAPLWB_MANAGER
    User with which I am trying this is having SAP_ALL permissions....
    More over, If I delete the ITS Params from the system definition, I am getting a Portal RunTime Error.
    0}#1#com.sapportals.portal.prt.runtime.PortalRuntimeException: Exception in SAP Application Integrator occured: Application URL &\#39;:///sap(ZT1zZEFWZjVWU1JNazVBRlg0ZWdLblNBLS1STFBvNnZPUEdYSnJaZjZCZnU1cWdBLS0=)/bc/gui/sap/its/se37&\#39; is not valid! Please check the protocol and host entries for system &\#39;ECC_DEV&\#39;.
    Please help me, am I missing any thing????
    PS: I am using the same system for T-Code iViews and are working fine.
    Regards,
    Srinivas

  • Why did we really need this "spanning-tree extend system-id" command?

    Folks,
    On the Spanning tree protocol I understood how does this spanning-tree extend system-id command work.
    But I have not understood why it is in place? or why do we really need it?
    Regards,
    Nikhil Kulkarni.

    Hi Nikhil,
    The STP and RSTP standard specifications mandate that each switch running STP/RSTP must have a unique Bridge ID (BID). Because Cisco runs STP or RSTP in each VLAN separately (called PVST and RPVST or PVRST), in each VLAN, the switch behaves like a standalone (albeit virtual) switch and thus, each STP/RSTP instance is required to have a unique BID to comply with the standard. Simply, having X VLANs means having X separate STP/RSTP instances and X unique BIDs.
    The question now is how to make sure the BIDs of STP/RSTP instances run on the same switch in different VLANs are truly unique. Older switches actually had a large reserve of MAC addresses. As new VLANs were created, these switches allocated a new MAC address for each new STP/RSTP instance in a new VLAN (recall that the BID originally consisted of the priority and the MAC address), making the BIDs unique.
    However, the consumption of MAC addresses this way was simply too large and ineffective. At the same time, having 65536 different values for priority in the BID was largely useless. So IEEE came with the idea of Extended System ID in which they reused a part of the priority field for a unique instance identifier. In Cisco's implementation, this field is populated with the VLAN number the STP/RSTP instance runs in. This easily and effectively makes the BID unique - even with the same priority for all VLANs on a single switch, and a single switch MAC address, multiple STP/RSTP instances running on this same switch with the same priority have different BIDs thanks to different VLAN numbers embedded into the BID.
    Some switch platforms actually allowed you to deactivate the Extended System ID and revert to the older style of assigning unique MAC addresses to individual STP/RSTP instance BIDs. That is why the command spanning-tree extend system-id exists in the first place. However, removing this command is only possible on those switching platforms which are equipped with 1024 MAC addresses for their disposal. Most new switching platforms have only 64 MAC addresses for their internal use, and while the spanning-tree extend system-id command is present in their configuration, you can not remove it. It is simply there to inform you that the Extended System ID is being used but you can not really deactivate it.
    Read more here:
    http://www.cisco.com/en/US/docs/switches/lan/catalyst6500/ios/12.2SXF/native/configuration/guide/spantree.html#wp1096536
    Best regards,
    Peter

  • PL/SQL Procedure Calling Java Host Command Problem

    This is my first post to this forum so I hope I have chosen the correct one for my problem. I have copied a java procedure to call Unix OS commands from within a PL/SQL procedure. This java works well for some OS commands (Eg ls -la) however it fails when I call others (eg env). Can anyone please give me some help or pointers?
    The java is owned by sys and it looks like this
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "ExecCmd" AS
    //ExecCmd.java
    import java.io.*;
    import java.util.*;
    //import java.util.ArrayList;
    public class ExecCmd {
    static public String[] runCommand(String cmd)
    throws IOException {
    // set up list to capture command output lines
    ArrayList list = new ArrayList();
    // start command running
    System.out.println("OS Command is: "+cmd);
    Process proc = Runtime.getRuntime().exec(cmd);
    // get command's output stream and
    // put a buffered reader input stream on it
    InputStream istr = proc.getInputStream();
    BufferedReader br = new BufferedReader(new InputStreamReader(istr));
    // read output lines from command
    String str;
    while ((str = br.readLine()) != null)
    list.add(str);
    // wait for command to terminate
    try {
    proc.waitFor();
    catch (InterruptedException e) {
    System.err.println("process was interrupted");
    // check its exit value
    if (proc.exitValue() != 0)
    System.err.println("exit value was non-zero: "+proc.exitValue());
    // close stream
    br.close();
    // return list of strings to caller
    return (String[])list.toArray(new String[0]);
    public static void main(String args[]) throws IOException {
    try {
    // run a command
    String outlist[] = runCommand(args[0]);
    for (int i = 0; i < outlist.length; i++)
    System.out.println(outlist);
    catch (IOException e) {
    System.err.println(e);
    The PL/SQL looks like so:
    CREATE or REPLACE PROCEDURE RunExecCmd(Command IN STRING) AS
    LANGUAGE JAVA NAME 'ExecCmd.main(java.lang.String[])';
    I have granted the following permissions to a user who wishes to run the code:
    drop public synonym RunExecCmd
    create public synonym RunExecCmd for RunExecCmd
    grant execute on RunExecCmd to FRED
    grant javasyspriv to FRED;
    Execute dbms_java.grant_permission('FRED','java.io.FilePermission','/bin/env','execute');
    commit
    Execute dbms_java.grant_permission('FRED','java.io.FilePermission','/opt/oracle/live/9.0.1/dbs/*','read, write, execute');
    commit
    The following test harness has been used:
    Set Serverout On size 1000000;
    call dbms_java.set_output(1000000);
    execute RunExecCmd('/bin/ls -la');
    execute RunExecCmd('/bin/env');
    The output is as follows:
    SQL> Set Serverout On size 1000000;
    SQL> call dbms_java.set_output(1000000);
    Call completed.
    SQL> execute RunExecCmd('/bin/ls -la');
    OS Command is: /bin/ls -la
    total 16522
    drwxrwxr-x 2 ora9sys dba 1024 Oct 18 09:46 .
    drwxrwxr-x 53 ora9sys dba 1024 Aug 13 09:09 ..
    -rw-r--r-- 1 ora9sys dba 40 Sep 3 11:35 afiedt.buf
    -rw-r--r-- 1 ora9sys dba 51 Sep 3 09:52 bern1.sql
    PL/SQL procedure successfully completed.
    SQL> execute RunExecCmd('/bin/env');
    OS Command is: /bin/env
    exit value was non-zero: 127
    PL/SQL procedure successfully completed.
    Both commands do work when called from the OS command line.
    Any help or assistance would be really appreciated.
    Regards,
    Bernard.

    Kamal,
    Thanks for that. I have tried to use getErrorStream and it does give me more info. It appears that some of the commands cannot be found. I suspected that this was the case but I am not sure about how this can be as they all appear to reside in the same directory with the same permissions.
    What is more confusing is output like so:
    SQL> Set Serverout On size 1000000;
    SQL> call dbms_java.set_output(1000000);
    Call completed.
    SQL> execute RunExecCmd('/usr/bin/id');
    OS Command is: /usr/bin/id
    exit value was non-zero: 1
    id: invalid user name: ""
    PL/SQL procedure successfully completed.
    SQL> execute RunExecCmd('/usr/bin/which id');
    OS Command is: /usr/bin/which id
    /usr/bin/id
    PL/SQL procedure successfully completed.
    Regards,
    Bernard

  • How to call a darwin command from c-code?

    Is there a way to call a Darwin command (in my case unzip )
    from a bundle written in c language?
    Thanks

    "man 3 system"
    system("unzip filename");

  • CUIC - Meaning of "Offered" in Call Type Historical All Fields?

    I am using the report template "Call Type Historical All Field Daily". And i feel very confusing on the field "Offered".
    From Cisco document, offered tasks is the field CallsOffered from table Call_Type_Interval when means "The "The total number of calls of this call type offered during the reportinginterval.".
    From "Call Type Historical All Field Daily" report, Can i make an assumption that
    "Offered = Handled + Aban + Return + Default Treatment + Network Routed + Flow Out + Call Error + Other" ?
    But i found that the number of offered task always is greater than the sum of right hand side. So where is the missed offered call/ task? (my system only has call task)
    Thank you for any suggestion.

    Hi,
    I do understand your struggle but you cannot simply compare data which is not supposed to be compared. If you want to see the calls, you need to break away from CUIC/WebView and take a look at the database tables (or, more specifically: database views), especially the ones named Route_Call_Detail and Termination_Call_Detail. The combination of these two will give you the list of all calls - in theory.
    If your call center does not run 24 hours a day, there's a slight chance that you can compare information, but using strict daily aggregation. Let me just check, what other columns we can use for comparison. What is the ICM version you are using?
    G.

  • Close command field ( one to execute the tcode ) in transactional iview

    Hi All,
    I need to close the command field ( one to execute the tcode at the top left corner ) in transactional iview.
    I know it has to do something with some services to be closed in sicf.
    Can anyone sugggest on this?
    Thanks and Regards,
    Nuzhat

    Hi Nuzhat,
    Please follow the steps below given
    In transaction SICF go to /sap/bc/gui/sap/its/webgui there you can modify some parameters by clicking on "GUI Configuration"
    and enter the following value:
    Parameter Name= ~WEBGUI_SIMPLE_TOOLBAR
    Value = one of the next values or the sum of the values of what you want.
    0 : Hiding the page header completely (not recommended)
    1 : Standard setting : This is the recommended standard setting in which the title and the menu bar below it with the Exit and Help button and the application buttons are displayed.
    2 : Displaying the title line
    4 : Displaying the buttons Exit and Help
    8 : Displaying the active system buttons on the screen (for example, Back and Cancel)*
    16 : Displaying the system menu
    32 : Displaying the application buttons
    128 : Deactivating the information block in the status bar (new)
    Thanks
    Murthy

  • Reg Disabling command field in Portal

    I have an requirement where in the command field should be disabled while calling a Tcode in Portal.
    I.e. After i call a Tcode in Portal, the command field box should not be there for the user to go for another transaction. How can i achieve this??

    Hi,
    Duplciate Post.
    I dont know abt the hiding th command field. I think we need a exit or BADI for that.
    Or
    Try to have the Iview in the Iput Disabled mode when opened in the portal.
    Or
    Give the permissions only to view the Tcode but not for eidting.
    Regards
    Lekha

  • Disabling Command field in Portal

    Hi EP Gurus,
    I have an requirement where in the command field should be disabled while calling a Tcode.
    I.e. After i call a Tcode, the command field box should not be there for the user to go for another transaction. How can i achieve this??

    Hi,
    I dont know abt the hiding th command field. I think we need a exit or BADI for that.
    Or
    Try to have the Iview in the Iput Disabled mode when opened in the portal.
    Or
    Give the permissions only to view the Tcode but not for eidting.
    Regards
    Lekha

Maybe you are looking for