OS commands in File adapter

Hi Experts,
I have a requirement to move the xml file(size 2GB)  across the FTP server. I thought of zipping the file due to huge size before picking it up and unzip before dropping at the receiver FTP.
I know we can use Run Operating System command before and after message processing option in File adapter, but can you please guide me how can really use this option.
Thanks in advance,
MK

hi mk
check the below blogs
*OS COMMAND     *                    
Executing Unix shell script using Operating System Command in XI                         
Executing Unix shell script using Operating System Command in XI                                   
Performing FTP Commands From ABAP                                   
Performing FTP Commands From ABAP          
regards
kummari

Similar Messages

  • OS commands from File adapter Trace logs?

    Hi All,
    I am running some UNIX OS commands from File adapter as showing in below Blog.
    Problem is that in SXMB_MONI & in Runtime workbench I can not see any Trace logs written by those UNIX OS commands.
    Even I am writing echo messages.
    Runtime Workbench says only OS command file executed.
    Please guide me where I can see OS trace if some OS command fails?
    Any transaction code even at BASIS level exist?
    Or the only other way round exist is I need to write log into some files.
    /people/daniel.graversen/blog/2008/12/11/sftp-with-pi-the-openssh-way
    I am using PI7.1.
    Regards

    I think no solution, other then writing ABAP code using RFC SXPG_COMMAND_EXECUTE and put log/trace in some table/application.

  • OS Command in File Adapter

    Hi All,
    I am trying to encrypt a file from XI and FTP to a different location. I am using PGP software for encryption and decryption. I am able to encrypt/decrypt the file from the OS level. The command I am using at OS level is:
    pgp --home-dir /.pgp --encrypt test.txt --recipient 0xC483S9E6
    If I use the same command in Sender File adapter in Run Operating System Command After Processing it is not encrypting. But I am using the same above command:
    pgp --home-dir /.pgp --encrypt test.txt --recipient 0xC483S9E6
    Now if I run the scenario the file is writing but it is not encrypting the file. Can you guys tell me where I am exactly going wrong.
    ---Korobee

    Hi,
    Try this, write all you OS command in a BATCH file say "encrypt.bat" and then call the batch script from File adapter. Also make sure you are giving the full path for all the files that you are refering to like
    \serverfolderpgp --home-dir /.pgp --encrypt \serverfoldertest.txt --recipient 0xC483S9E6
    Any more help let me know.
    Thanks,
    Prakash

  • Return Code after Command Line (File Adapter)

    Hello all,
    i execute in the File Receiver Channel a Shell Script.
    Now i need a solution, when an error happens. The script returns an error code and i want that the Adapter Monitor is showing this information/error.
    How can i enable this?
    Or is there an other possibility to monitor this??
    many thanks for your help
    ilka

    Hi IIka,
    I have not tried this but I think
      The return code of the script cannot be shown in monitor, because the call ends (does not expect a response) once the file adapter is called.
    May be you can capture the errors in a seperate file and
    use that as a log.
    I am not sure if there is anyother way
    also check this blog /people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching
    Regards
    Vishnu

  • How to run several OS commands in file adapter ?

    I can run one UNIX commands in a file receiver adapter. But could I run more than one command ? I tried to use a semicolon, but it doesn't work. Only 1st command is executed. (in UNIX, we can use semocolon to run several command in one command)

    Hi
    Create a batch file  and in that put  all the commands to be executed.
    Mention this file in file adapter configuration ( CC ).
    thanks
    Prasad

  • FTP command using File adapter

    Hi,
    When i use the file adapter in FTP mode i need to add an xtra command before sending the file.
    I.ex: SITE LRECL=84 RECFM=VB WRAPRECORD
    Using manual connect i do this
    ftp 111.111.111.111.
    User/pass
    SITE LRECL=84 RECFM=VB WRAPRECORD
    put c:     est.txt test.txt
    quit
    But how do i add the xtra command? The Run OS command thing - thats before FTP is connected isn´t it?
    /Jakob

    If possibe, you could write the file on a file server using the NFS option of hte file adapter, and then use a simple shell script (if on UNIX) which contains your FTP commands to do the FTP part.  You will specify the script name in the the 'Run OS Command After Message Processing' parameters.
    I have used something very similar in the past...

  • Possible Scenarios where we can use OS command of file adapter

    Hi all,
    I would like to know the possible scenarios in which we can use the OS command feature in file adapter,I have tried zipping the file,copying the file,unzipping the file using this option.Any other inputs on this feature are appreciated.
    Thanks,
    Amit

    Hi,
    Executing Unix shell script using Operating System Command in XI                         
    Executing Unix shell script using Operating System Command in XI                              
    Performing FTP Commands From ABAP                              
    Performing FTP Commands From ABAP                              
    Thanks,
    Madhu

  • FILE adapter with secure FTP

    Hi experts,
    i have scenario file to file scenario, communication should  happen in secure connection .i searched in blogs & forums
    please find berlow forum
    How to configure SFTP Adapter in XI?
    in that 2 nd reply
    there is one option :2. Use the FTP adapter, and encrypt/decrypt the file contents through a user exit in the adapter. Something on the FTP server side will have to do the same.
    can anyone please elaborate this one & where can i find user exit  for the file adapter.
    please help is there any option to provide secure cinnection in file adapter (FTP) like using run operating system command befor or after message processing
    Thanks In advance

    I think  that you can solve in 4 different ways:
    -> Using FTPS connection
    http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/frameset.htm
    -> Using a 3rd Party Adapter (Seeburger or Aedaptive) for PGP or deploying a custom adapter for PGP
    http://www.seeburger.com/9468/
    -> PGP OS Level (Installing a PGP software like GnuPGP in your system) Install the PGP software in XI and write the OS command for encryption and decryption at OS level. Call this command in File adapter after or before message processing
    PGP ncryption
    -> Using an UDF
    Check this links:
    Is there any FTP API available from SAP?
    Send Text file to FTP in binary mode with PGP encryption
    http://www.webmethods.com/meta/default/folder/0000007429
    Converting IDOC to XML
    XI implementation
    http://www1.webmethods.com/PDF/webMethods_for_SAP-wp.pdf

  • File renaming in Sender file adapter usins OS command

    Hi Guys ,
    Can anyone explain on how to use the rename command in Sender file adapter using OS command parameter.
    Thanks,
    KC.

    Hey
    run the following OS command
    mv <originalFileName> <newFileName>
    This command will copy the <originalFileName> to a new file called <newFileName> and will delete the <originalFileName>
    There is no rename command in Unix,mv is used to rename the files
    Thanx
    Aamir

  • Receiver File Adapter Not Executing OS Command

    Hello All!
    We are currently running PI 7.1 and wish to use a Receiver File Adapter to FTP a file to a mainframe and override the FTP system defaults.
    Tried using the 'quote site recfm=fb lrecl=80' OS command but discovered that this would not work as the Adapter Engine is NOT on the mainframe.
    Regrouped a bit and made a second attempt which involved writing a Unix script to ftp a file and override rthe system defaults.   The idea was to use the File Adapter to FTP the data to the server, invoke the script and get the file to the mainframe with the proper attributes.    The script when executed on the server works perfectly.   
    However, when the IDoc comes thru PI, the File Adapter ftp's the file ok but the script is never executed.
    Any ideas why this is so or any suggestions?    
    Thank you.

    Hi Ken,
    Script only executes at Network File sharing (NFS) only. It dont work at FTP level.
    So you can better write the file on NFS and then within the script to connect to ftp and do your processing.
    Regards,
    ---Satish

  • Receiver file adapter command line

    hi,
    i am just wondering how to use command line on receiver file adapter.
    i am not clear how to use this.
    please modify on the following command!
    anyway, i have to call java application after put some files by receiver file adapter.
    cmd.exe %Fjava ./javacalltest
    it did not work..
    please guide me.
    Command Line
    An operating system command specified here is executed before or after a file has been successfully processed. The default value is an empty character string (no command).
    When the operating system command is called, the file name currently being processed can be specified with the following placeholders:
    %f (file name)
    %F (absolute file name including path)

    Hi Ogawa and Laurence,
    Have look at :: /people/michal.krawczyk2/blog/2007/02/08/xipi-command-line-sample-functions
    1)Windows batch Commands::
    http://labmice.techtarget.com/articles/batchcmds.htm
    2)Linux:
    /people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching
    Note:: First try using the comands on O.S if they work then only use them in Adapters.
    Hope it will help.
    regards
    Piyush
    Pl:reward some points if it is usefull.

  • File Adapter: Run OS command unix after processing message

    Hi,
    in file adapter configuaration, after processing message, I've configured the channel that it has to call an unix script.
    The sintax in configuration is:
    sh /XS0/usr/sap/XS0/DVEBMGS01/work/TEST_FILE_XI/OUT/rename_lib_contabili.sh <variable>.
    I tried also without the entire path and without the sh command at start of it.
    We have a XI 3.0 sp20.
    I don't understand, What other I have to do.
    Regards,
    Antonello

    Hi Carme,
    I found a warning that "describes" the error...
    2009-09-29 13:36:15     Success     Write to file "/XS0/usr/sap/XS0/DVEBMGS01/work/TEST_FILE_XI/OUT/LIBROGIORNALE_test_mov.zip" as binary, size 7248 bytes
    2009-09-29 13:36:15     Success     Execute OS command "/home/xs0adm/scripts/rename_lib_contabili.sh LIBROGIORNALE_test_mov.zip"
    2009-09-29 13:36:15     Warning     Error when executing OS command "/home/xs0adm/scripts/rename_lib_contabili.sh LIBROGIORNALE_test_mov.zip"
    2009-09-29 13:36:15     Success     File processing complete
    2009-09-29 13:36:15     Success     MP: Leaving module processor
    2009-09-29 13:36:15     Success     The message was successfully delivered to the application using connection
    File_http://sap.com/xi/XI/System.
    2009-09-29 13:36:15     Success     The message status set to DLVD.
    if I try to execute this script from Unix schell or ABAP OS shell this working fine.
    You have any idea?!
    Thanks,
    Antonello

  • File Adapter 7.11 - set operating system command line dynamically

    Hi,
    is there any way to set the "Operating System Command Line" in the file adapter as ASMA / dynamic attribute?
    I need to set  a command line exec depending on some XSL mapping values.
    thx
    holger

    hi,
    >>>is there any way to set the "Operating System Command Line" in the file adapter as ASMA / dynamic attribute?
    >>>I need to set a command line exec depending on some XSL mapping values.
    think about this approach:
    you put the XSL values into the filename after the real name of the file
    in the batch script you use those values in order to execute a dynamic exe command
    after processing you just change the name of the file in the script by removing the xsl values
    simple ? I think so
    Regards,
    Michal Krawczyk

  • OS Command for receiver file adapter

    Hi Guys,
    I have a requirement that in the target folder before putting the file, I have to rename the exisitng file then put the file. The target folder is in another machine and I have to use FTP option to send file.
    is it possible to use OS command after processing option in the receiver file adapter to do this? please let me know how to handle this.
    Thanks
    Mukesh

    Mukesh,
    You cannot rename the file in the FTP folder. What you can do is write a OS script where it logs in into the FTP site and renames the file. Then use this OS script before message processing so that it renames the file before you write the actual file.
    If you want to rename a file which is on the applicaiton server using NFS then you can directly rename it from the command prompt.
    Regards,
    ---Satish

  • File adapter OS command line - Calling a command remotely ??

    Hi,
    We have a scenario where in which receiver file adapter after putting a file on the FTP  , a subsequent XML loader needs to be called which would load data into the client legacy ERP system.
    There seems to be some idea about doing it through file adapter OS command line.
    The problem is the how to call this loader command remotely from our file adapter OS command line.
    Any help would be appreciated ???

    >> The problem is the how to call this loader command remotely from our file adapter OS command line.
    The below link might be helpful ...
    http://wiki.sdn.sap.com/wiki/display/XI/SAPXIFileAdapterOSCommandLine+Feature

Maybe you are looking for

  • [SOLVED]My udev rules don't automount usb device

    Hi, I'm using this .rules file for automounting usb devices: # start at sdc to ignore the system hard drive KERNEL!="sd[c-z]*", GOTO="my_media_automount_end" #sda and sdb are internal hard drives ACTION=="add", PROGRAM!="/sbin/blkid %N", GOTO="my_med

  • How do I know if I have a virus on my iMac?

    Today when I was browsing in safari, some ads popped up, and I thought maybe that could be a sign I got a virus. sorry for my ignorance about all these virus stuff So, how can I know if a have a virus? im using an iMac mid-2011, os x yosemite

  • Help needed in calculations in Workbook for input query

    hi friends , Iam displaying an input query in the Workbook ..the format of the query is Account                                  Amount 1010 Undistributed Amount     $ 2000 1010 PC1 1010 PC2 1010 PC3 The use 0f this query is to distribute the undistr

  • Reducing the trim size of a Comic magazine in Indesign - Urgent

    Hi every one, It would be great if any one could help me to solve this issue. We are a service provider, we have a comic magazine in A4 size in spanish language, we have the indesign source files and editable .pdf file in spanish language. our client

  • Autonumber for Heading

    I am currently setting up a RH8 project that should generate a CHM and a PDF from a single source. I do not want to do any post processing for the printed documentation so I am prepared to accept the drawbacks the default behavior might have. So far