Wild Cards in External Operating System Commands for HP-UX

Hello,
Is it possible to use wildcards for HP-UX commands in SM69?
For example, I would think the following would work in HP-UX:
    mv /directory/file_name.* /directory2
But whenever I execute a command with the * wildcard in SM69 I get the message 'No such file or directory'
Thanks,
Joel

This is wierd, I can't even do 'ls *.TRC'
Here's another example, using absolute path names that didn't work:
mv /usr/afisinw_cpafiscd/WHSE/ready/portalActivity_311688752_1243622628104.* /usr/afisinw_cpafiscd/WHSE/ready/portalActivityOld
     error: cannot access: No such file or directory External program terminated with exit code 1
But when I replace the * with txt it works. Unfortuneately I need to move multiple portalActivity files each time, and the beauty of using an external command is that my ABAP program is only a few lines long.
Could there be some sort of a safety feature in SAP to prevent the use of * in external commands?

Similar Messages

  • External Operating system Commands -GPG

    Hi Experts,
    Im quite new in SAP and we have a task to encrypt a file generated from SAP for upload to bank. We use  the external operating system commands to call the gpg commands for file encryption. But we encounter an error when we execute the command
    below is the error we encounter
    gpg: [Recptient's ID]: skip : public key not found
    gpg: [Filename] : encryption failed : public key not found
    but when I run the command on OS level it execute properly without any problem.
    hope you guys could me an idea on how to fix the issue i encounter
    Thanks in advance!!

    Louie,
    What is the command that you used? which OS?
    Thank you
    Regards

  • Re: Error while Execute External Operating System Command using T.code SM49

    Dear Experts,
    I Have uploaded one .exe file in the application server (eg: sum.exe) and created the OS command in SM69 transaction .
    And maintained the application server path in the 'operating system command' field in SM69 t.code.
    Our SAP system, oprating system is UNIX.
    After I have executed the external command using transaction SM49 , but I got the below error.
    Can not execute external program (permission denied) , External program terminated with exit code 1
    Immediately I run the SU53 transaction code to check the authorization, but Authorization was successful.
    Could any one please help on this error.
    Thanks in advance.

    >>Can not execute external program (permission denied) , External program terminated with exit code 1
    You need to give the permission as 755 to your file.
    >>I Have uploaded one .exe file in the application server (eg: sum.exe)
    You are on UNIX and do not expect to any result of .exe file as UNIX doesn't know about this.

  • Execute external operating system command

    Hi Friends,
    I have a requirement to run a script file with extention '.PL' on the application server using ABAP.
    i have sample how to run it in XI.
    XI3.0 provides a very simple way of handling this using the "Operating System Command" in the File Adapter.
    I post my output file in the following folder,
    /usr/sap/sapout/test/
    The shell script is available in the following path,
    /usr/sap/bin/convert.pl
    The figure below explains as to how we call the shell script using "Operating System Command".
    File Acess parameters
          Target Directory      = /usr/sap/sapout/test/
          File Name Scheme = TestOutput.txt
    Processing Parameters
         File Construction Mode          = Add Time Stamp
         File Type                              = Binary
         Operating System Command = /usr/sap/bin/convert.pl %F
    I have to do the same thing in ABAP as it has been done for XI as mentioned in the above example.
    My operating system is UNIX.
    If any one can give me a sample it would be really helpful to me.
    Thanks in advance,
    Arundhathi.

    Hi Arundhati,
    You can run operating system commands from ABAP.
    e.g. If you want to change UNIX right for any file, you can use following code.
    lv_ucomm  = 'chmod a+rwx 123.txt'.
    CALL 'SYSTEM' ID 'COMMAND' FIELD lv_ucomm.
    whatever command you provide in Field parameter ( lv_ucomm in the above case ), ABAP run that command at operating system level.
    In your case, you can provide command in lv_ucomm to run script at operating system level.
    Hope it will help you.
    Regards,
    Naren

  • Run operating system command for sender File adpter (NFS)

    Hi All,
    iam doing a file to RFC scenario, using 'Run operating system command' in sender file adapter to change the file name while archiving (after processing completed).
    I mention OS command like this:
    sample_server\scripts\Test\Rename.bat"
    Rename.bat file calls a 'perl script' code.
    when i run interface, could see below statement in adapter log ->
    "Execute OS command "
    sample_server\scripts\Test\Rename.bat"
    but the script was not run and file name was not changed.
    Please advice what could be the problem?
    Does this mean script executed successfully?
    Do i need install perl software on XI server, even perl script (.bat file) is executing on sample_server?
    Thanks in advance..
    Regards,
    Rajesh

    Hi,
    Just check the following URL and give it a try again :-
    Executing Unix shell script using Operating System Command in XI
    Hope this info Helps..
    Regards,
    Aditya

  • Integrating External Operating System Commands into ABAP program.

    Hi folks,
    using the transaction code sm69 it is possible to create an SAP command that's executing an operating system command.
    Is it possible to integrate such an SAP command into our ABAP programs ?
    How would we do so ?
    Regards
    Thomas

    Hello Thomas,
    We have an easier way of achieving this without declaring a command in SM69.
    Try the below piece of code:
    DATA: command LIKE rs37a-line.
    DATA: BEGIN OF tabl OCCURS 0,
              line(2000),
          END OF tabl.
    command = 'ls -l'.
    CALL 'SYSTEM' ID 'COMMAND' FIELD command
                  ID 'TAB'     FIELD tabl-*sys*.
    Replace the string in the variable 'comand' with any UNIX command.
    Regards
    Sabu

  • Operating System commands for LINUX OS

    Hi,
    I am working on PI7.1 OS LINUX,i am clear about WINDOWS OS how to call and execute but not clear with Linux OS
    Just trying one POC kind of requirement with Operating System Commands
    first i started with simple requirement moving one file from one directiry to other directiory,but unfortunaltly i was not sucesfull.
    the help documentation also not clear ,could you please any one give some clear clue to hoW  to call shell script.
    i have created below script.
    #!/bin/sh                                                                                cd /Interface                                                                               
    cat BIA1.xml >> /interfaces/BIA2.xml  
    http://wiki.sdn.sap.com/wiki/display/XI/SAPXIFileAdapterOSCommandLine+Feature
    thanks,
    Raj

    hi its very simple,just copy .sh file in PI server and call just sh path.it will work

  • Auto-Reaction Method - External Operating System Command

    Hello ,
    I am trying to run a script (test.cmd) on a monitored java system out of solution manager via ccms auto-reaction method, but without success.
    I have created a RFC Connection to the java system in transaction sm59, defined an external operation command in transaction sm69 (/usr/sap/test.cmd) and an auto-reaction method using that command. But when I test the command in transaction sm49 with the RFC connection as target destination, the command is executed on the local CEN system (SolutionManager system) instead of the monitored java system. I have no clue where's the problem???
    Thanks for any help (points, points, points)
    Mirko

    Hi Anand,
    can you please send me that doc too pleae.
    [email protected]
    I really appreciate your help.
    Thanks,

  • SM69 (external operating system commands)

    how can i use the MKDIR dos command in SAP using SM69

    Here i am using LS command in SAP :
    data: begin of t_tabl occurs 0,
    line(132),
    end of t_tabl.
    data: lc_command(100) type c.
    start-of-selection.
    Get all the file name falling under specified directory...
    lc_command(3) = 'ls '.
    lc_command+3(45) = p_dir. " Directory of file path
    call 'SYSTEM' id 'COMMAND' field lc_command
    id 'TAB' field t_tabl-sys.
    Check any files exits in the directory.......................
    if t_tabl[] is initial.
    message e006 with 'No files exist in the specified directory ' p_dir.
    endif.
    You can use MKDIR instaed of LS
    Thanks
    Seshu

  • Run Operating Systems command.

    Hi Experts,
    Please provide information on Run Operating Systems commands for File adapter.
    I have gone through t he below mentioned link already:
    [http://help.sap.com/saphelp_nw04s/helpdata/en/e3/94007075cae04f930cc4c034e411e1/frameset.htm]
    Also , please provide links for OS commands whch can be used for windows OS.
    thanks,
    Neha

    Hi Neha,
    pls do chk this linkfor windows OS commands
    http://webtools.live2support.com/windows/
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/sapXIFileAdapterOSCommandLine+Feature
    An interesting usage of Variable Substitution in XI
    Solution to the problem encountered using Variable Substitution with XI-SP12
    Copy a file with same filename using XI
    thanx
    Sampath
    Edited by: venkata sampath on Jul 8, 2008 7:20 AM

  • Operating System Command

    Hi,
    I want to pass UNIX operating system command for outbound FILE adapter. Is it possible to pass two parameters along with the command?
    If yes, could you please send sample syntax?
    Thanks & Regards
    Katta Mohan Reddy

    Hi,
    but why do you want to do it in this way when SAP
    gives a standard way of renaming files?
    Variable Substitution
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    it's available for sp12 but maybe it's worth to wait 1 day until your basis people install sp12 and start testing the new solution ?
    I won't see the sp12 till tuesday so I cannot say if it works but it looks (from the documentation) great
    BTW
    can you turn on the monitoring of the folder the file adapter tries to use and check if any command is being executed at all?
    Regards,
    michal
    Message was edited by: Michal Krawczyk

  • How to call Operating System commands / external programs from within APEX

    Hi,
    Can someone please suggest how to call Operating Systems commands / external programs from within APEX?
    E.g. say I need to run a SQL script on a particular database. SQL script, database name, userid & password everything is available in a table in Oracle. I want to build a utility in APEX where by when I click a button APEX should run the following
    c:\oracle\bin\sqlplusw.exe userud/password@database @script_name.sql
    Any pointers will be greatly appreciated.
    Thanks & Regards,

    Hi Guys,
    I have reviewed the option of using scheduler and javascript and they do satisfy my requirements PARTIALLY. Any calls to operating system commands through these features will be made on the server where APEX is installed.
    However, here what I am looking at is to call operating systems programs on client machine. For example in my APEX application I have constructed the following strings of commands that needs to be run to execute a change request.
    sqlplusw.exe user/password@database @script1.sql
    sqlplusw.exe user/password@database @script2.sql
    sqlplusw.exe user/password@database @script3.sql
    sqlplusw.exe user/password@database @script4.sql
    What I want is to have a button/link on the APEX screen along with these lines so that when I click that link/button this entire line of command gets executed in the same way it would get executed if I copy and paste this command in the command window of windows.
    Believe me, if I am able to achieve what I intend to do, it is going to save a lot of our DBAs time and effort.
    Any help will be greatly appreciated.
    Thanks & Regards,

  • How to execute Operating System commands from Stored procedure.

    Any help on how to execute Operating System commands from stored procedures will be appreciated.
    Nanditha.

    Search the forums for 'External Procedure' and you will find example code that has been posted before.

  • How to Run Operating System Command Before/After Message Processing SAP PI

    Hi,
    We are trying to execute multiple commands via "Operating System Command Before/After Message Processing".
    When we use single command say for example cp or mv (copy or move) the commands get executed fine.
    eg: cp %F /var/opt/data/outbound/Test/Dummy.txt 
    /this works fine/
    when we club commands together or try to redirect the outputs of commands, none of the commands get executed.
    eg:
    cp %F /var/opt/data/outbound/Test/Dummy.txt ; rm %F
    or
    wc -l %F > /var/opt/data/outbound/Test/Dummy.txt
    Is it possible to execute multiple commands or redirect the output  of commands without using a shell script? The PI server we are working on iis hosted on UNIX environment.

    Hi Harleen,
    try like this
    cp %F /var/opt/data/outbound/Test/Dummy.txt ; rm %F
    instead of semicolon try this
    (1) &
    command1 & command2
    Execute Command1 and then execute Command2
    (2) &&
    command1 && command2
    Runs the command2 only when command1 doesn't Complete successfully
    (3) ||
    command1 || command2
    Runs the second command if the first command had an error
    (4) ()
    (command1 || command2) || (command3 & command4)
    Defines the order in which commands are to be executed
    Regards
    Suraj

  • Unzip file using operating system command in file/ftp receiver adapter

    Hi,
    I'm wonderdering how to unzip a zip-file in the receiver file/ftp adapter. I know it is possible to do it using the 'Operating system command' feature, but somehow the command I use seems to be ignored! (I'm using SP14, unix).
    The command I entered is quite simple: unzip %F (also tried the %f, but i guess it doesn't really matter wich on I use).
    Is it possible that I'm unzipping to another directory than the one i expect? the unzip should be performed to/in the current directory, and assumingly current directory is the one stated in the 'Target Directory', right?
    Hope someone can clearify this issue for me.
    Best regards,
    Daniel

    Hi Daniel,
    It seems to me also, that the files are being unzipped to a different location than what you are expecting. The OS command might getting executed in some default location(i am trying to fnd that out)on the server and not in the target directory of the channel(It seems logical to me)....
    If you have time...pls try this out & see whether this would help...
    Have a shell script written with the following commands in them
    cd <path to target directory>
    unzip $1(filename from the channel)
    and in the OS command in the Channel give....
    <absolute path to the .sh file> %F
    Thanks,
    Renjith.

Maybe you are looking for

  • Indesign CS4 Crashes When Importing Another Indesign CS4 File

    Help! Every time I try to import an Indesign file into another Indesign file, my Indesign crashes. Also happens when I try to open an existing Indesign file that has files already imported into it. This is a problem because I have existing files I ne

  • Images with hyperlink in javascript - help needed

    Hai, I am having two hyperlinks say, "Good Morning" and "Good Evening". When I am clicking "Good Morning", a small arrow or a picture should display with the hyperlink. When I am clicking "Good Evening" this one should have the small arrow or a pictu

  • Diff between function,procedure/packages  and Diff bet delete,truncate,drop

    Dear all I am your pal ranga from IT capital bangalore india. I would like have detail discussion with respect to subject. Pls discuss Thanks and Regards B.Rangarajan

  • BDC scrolling problem

    HI , I am facing problem while recording for Txn PO13. I have to enter an infotype by scrolling but not possible. Any ideas ?? Thanks, Sandip.

  • Photoshop elements quits MAC

    I bought photoshop in december and I can load organizer but it quits after 2 minutes consistently, 100% of the time so I can't use the application.   It gives me the option to send a report to Adobe which I have done about 19 times but nothing happen