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

Similar Messages

  • 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

  • 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

  • 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");

  • Executing call system from sqr

    We've got a number of SQRs executing a Call System command, but this one (actually 2) won't execute.
    let $sender_cmd = '/usr/bin/sudo /usr/sbin/usermod -c "Human Resources Administration " appuser'
    call system using $sender_cmd #sender_status WAIT
    #sender_status is returned with a value of 1
    This is supposed to allow "appuser" to change the server email sender to "Human Resources Administration ". When the sqr is about to end, it changes it back to the original value.
    I've tried putting the string in a shell script and executing it, but it fails that way too.
    Any suggestions?

    BTW the command runs fine from the command line (Linux 5.0)

  • Call system using linux returns - 1 on linux; returns 0 in aix/unix

    call system using linux returns - 1 on linux; returns 0 in aix/unix when called from sqr

    the question is:
    when i am using call system in unix
    call system is being used in my sqr
    call system using $cmd #status
    #status is coming as 0
    while in linux though the command is getting exceuted correctly, the return status is -1 while it should eb 0.

  • 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

  • Calling systembuild access commands from a UCB

    Is there a way to call system build access commands from a UCB (e.g., using XmathCommand() call)?
    The goal is to modify the same UCB or other blocks using SBA modifyblock and have the changes available during the same or the consecutive simulations.
    Thanks

    Farshid,
    If you use a SBA command through XmathCommand then it would affect the model that is in the SystemBuild browser. It will not affect the model of the current simulation. When a simulation is started the model is copied to a new process (simexe). The value of %vars are also copied from Xmath. There fore the changes would only affect the next simulation.
    It would probably be more effecient to run the simulation and when it is done decide on the changes and use SBA before the next run.
    Why do you want to modify the model while it is still running? What kind of changes do you need to do? Maybe there is some other way to accomplish it.
    Carl L
    National Instruments

  • Strange folder called "System Folder" appeared after installing Appleworks?

    I started from scratch and wiped the drive, due to bad system symptoms. I installed OSX WITHOUT OS9 CLASSIC. Everything is working fine, printer drivers, internet, all apps etc. But I decided to install Appleworks. I chose from the reinstall choices to select Appleworks, but did not select Classic at all at anytime. I just discovered besides the OSX system folder with its distinctive design, that there is now another folder named System Folder, but it has no system and only Application Support, Extensions, Fonts, and help as folders. This looks like OS9 without a system. Was this installed for Appleworks?, as I remember from OS 9 Appleworks needs to install stuff in a system folder. Is that why this is here? Is this normal, The "System Folder" was locked. Should I do anything to this, delete it, rename it or what. Command info says that it belongs to system, not me, and it defaults to locked. I can unlock it, but to change its ownership, admin password is needed. I thought everything was going well, now this questionable stuff shows up, and enlightenment would be appreciated, as I just spend days fixing it all up, and don't want more trouble, especially so soon. Remember, Classic has not been installed, but I did first tried an archive and reinstall, and had a previous system folder, but I don't think this was dragged over from archived stuff when working on this whole new clean setup.
    Thanks, James

    I started from scratch and wiped the drive, due to
    bad system symptoms. I installed OSX WITHOUT OS9
    CLASSIC. Everything is working fine, printer drivers,
    internet, all apps etc. But I decided to install
    Appleworks. I chose from the reinstall choices to
    select Appleworks, but did not select Classic at all
    at anytime. I just discovered besides the OSX system
    folder with its distinctive design, that there is now
    another folder named System Folder, but it has no
    system and only Application Support, Extensions,
    Fonts, and help as folders. This looks like OS9
    without a system. Was this installed for Appleworks?,
    as I remember from OS 9 Appleworks needs to install
    stuff in a system folder. Is that why this is here?
    Is this normal, The "System Folder" was locked.
    Should I do anything to this, delete it, rename it or
    what. Command info says that it belongs to system,
    not me, and it defaults to locked. I can unlock it,
    but to change its ownership, admin password is
    needed. I thought everything was going well, now this
    questionable stuff shows up, and enlightenment would
    be appreciated, as I just spend days fixing it all
    up, and don't want more trouble, especially so soon.
    Remember, Classic has not been installed, but I did
    first tried an archive and reinstall, and had a
    previous system folder, but I don't think this was
    dragged over from archived stuff when working on this
    whole new clean setup.
    Thanks, James
    Thanks for the simple answer. I guess I was surprised to see another folder called system, and it kind of scared me, wondering if everything was "Kosher" with my reinstallation of OSX?, yet I didn't want to adversely effect Appleworks.
    I merely put the files in the trash, then tested Appleworks, it still works, so I believe I can trash the whole folder without worry. I was worried and not thinking correctly, having spent sleepless nights installing all the stuff back again, and that clouds my thinking and judgment. James

  • Is it possible to call ms-dos command in abap program?

    Hi,
    is it possible to call ms-dos command in abap program?
    Thanks.

    Hi Cemil,
    You probably have your answer here:
    [Re: DOS/Windows command in app server;
    You create your external command with SM69 (you can test it with SM49).
    Then you call this command with function module "SXPG_COMMAND_EXECUTE".
    (See function group SXPT for all the calls to external commands).
    Regards,
    Thomas

Maybe you are looking for

  • Unable to delete a file from the downloads list of...

    i am an e7 user. I was recently downloading a couple of videos at the same time when my phone hanged and had to be restarted. When it did restart, most of the files had to be redownloaded. All except one. The downloads list claims that the file has b

  • Idea tab A1000 taking too much time to charge

    I have A ideaTab A1000 and its taing too much time to charge.In first few days its take about 3 hours to charge fully but nowadays its taking 9-10 hours to fully charge and one more thing i.e. Where can i buy A Charger for the same?

  • Asset accounting error

    hi     i have one problem in asset accounting. where after creation of asset master. i am getting error saying that asset is incomplete.      it is saying the report RAUNVA00 for the asset & complete the asset specification then post the transaction

  • LIKE Operator with Clobs

    Hi, Having Problems using the LIKE Operator with the Clob Datatype. Does any one know if its possible. Thanks Emer

  • Statistical check in Billing

    Hi Gurus, I am facing a peculiar problem in pricing. When I am going for billing after delivery, the net value is coming as zero, it is because there is a statistical check for the conditions used, but in the sales order it was not so. I am not able