File Receiver - before message processing *urgent*

Hello experts,
I have a scenario where i  need to execute a script in File receiver adapter.
problem: "i send an xml file to target system, but as long as there is a .xml file in the directory, it should not send.
He should wait and send only then when there is no .xml file in the directory."
Is that possible with "run operating system command before" in the receiver adapter or i need for this issue BPM?
Best wishes,
FK

Hi,
File receiver adapter has a "Run Operating System Command Before/After Message Processing" feature, so you could use it for such purpose :
http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
I think it could be better to use a script than using BPM (it will save resources at XI level).
Chris

Similar Messages

  • File-FTP command before message processing

    Hi experts,
    my requirement is as follow :
    i have 5 files on my FTP server. All are named FILE_hhssmm.xml
    In the configuration of my CC out, i have put as specific file name to get picked 1*.xml
    I need a command line in the 'run operating system command before message processing' that renames one of the files as 1FILE_hhssmm.xml so that the files get picked one by one.
    I can not manage to do that, i only managed to write a batch file but i only can run it locally...
    please, any help would be greatly appreciated...
    Kindly,
    Jamal

    Hi
    I have been following this for a while (from other posts as well), you are trying quite hard to get this done
    I have couple of ideas...
    If you think that this is not going to work, then you can try another solution,
    - let the .bat file be scheduled by the scheduler of your OS (this is quite simple) say every 30 mins
    - make the .bat file move your input files from your current folder to a child folder
    - let XI poll the child folder, every 5 secs or so... anyway your scheduler will send the file only after every 30 mins
    - Now you need not rely on the OS command from the Fileadpater of XI
    My suspicion (though it is not documented anywhere in help, as far as I know) is that the OS command executes only if there is proper reading of the file (or its presence as per the configuration in adapter settings) & not per polling of the adapter. I infer this from your previous post. but your requirement is peculiar that though the file is present that itself has to have a different name - to be read by adapter...some kind of clashes ??!!.
    The problem could be something else also, but the above is a possibility as well..
    all the best
    Regards
    Vishnu

  • RUN OPERATING SYSTEM COMMAND BEFORE MESSAGE PROCESSING

    hi.
    just i want to know what is the purpose of run operating system command before message processing,after message processing under file sender adapter.
    waiting for your great answer.
    bye.
    regards.
    seeta ram.

    Hello Seeta,
    let me see if I give it using a simple scenario that I implamented : i nedd to transfer a very large file from one server to the other by XI.
    to save space and network traffic I use an OS command before picking up the file to run a zip command to zip the file.
    after I transfer the file to the target server I run another OS command after the transfer to unzip the file.
    now to your second question:
    the before Os command on the target server is used mostly for checks (make sure there isn't a file by that name or backing up existing data)
    and the after sender OS command is usualy for backing up or erasing existing files (cause it is done only after the first part was finished succesfully).
    Uri Lifshitz.
    p.s.
    there was a blog obout this titled "XI as a huge file mover"
    and you can see a description and my scripts at https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/05/03/additionaltipsforusingXIasahugefiletransfer%28withbatchscripts%29&

  • OS level command before message processing

    Hello
    I am getting the files from the SFTP server through the shell script and expecting to be processed by my File sender adapter.
    I have configured my File adapter which will poll the directory into which the shell script gets the file and it is scheduled at say 60 sec duration and i had configured OS level command before message processing.
    But when i monitored my communication channel and also my directory I found out that its not executing the OS level command. I tried dropping the dummy file into the directory. This time when checked in comm channel monitoring, it executes the OS  level command and gets the file from the SFTP server and adapter polls the SFTP file as well. But i don't want to use dummy file each time.
    Is there any way by which we can always make adapter to execute OS level command. I tried various options like Process Empty files etc etc but no luck.
    Thanks in advance.
    regards
    rajeev

    Rajeev
    How about placing a dummy file of 0 bytes, setting up the 'Handling of Empty Files = Don't create message', Processing mode = 'Test' and then writing a post operating command script as well, to move all the files to archive directory except the dummy file.
    Not a clean solution but just a thought.
    http://help.sap.com/saphelp_nw70/helpdata/en/e1/69a740aa053a13e10000000a155106/frameset.htm

  • FTP Adapter with Runtime OS Command before Message Processing

    Hi PI Techies,
    I have a confusion in using Sender FTP Adapter with Runtime OS Command before Message Processing.
    Scenario is like this:
    Ftp Adapter has to pick a file from FTP server after it checks that a Blank Marker file exists on PI server AL11 directory say "tmp directory".
    For this I am using Runtime OS Command before Message Processing where a shell script will check the existence of Blank Marker file on PI server AL11 and if found , it exits the script and FTP Adpater will then pick the Actual Data File and Process it.
    Now Confusion:
    I am confused in technical execution of steps by FTP Adapter..
    Whether FTP Adapter polling initiates the Interface or Runtime OS command checking the File existence will initiate the Interface?
    May be its follish to you guys... but please answer ..
    Regards,
    Anurag

    Hi,
    I will take it other way as we need to process the Data File not Marker File ( its just for checking the Data File is completely written on FTP server).
    Other way mean " Will Poll for Data.txt File and if  found then Runtime OS Command will do connect to FTP and check if Marker File exists, if yes then delete the marker file and read the actual Data File for processing.
    Please let me know, if Marker File does not exists on FTP folder, will it still read the Data File or will it exit the Adapter execution?
    Your help is much appreciated.
    Regards,
    Anurag

  • OS command on sender channel before message Processing

    Hi all,
    I am trying run unix script on my sender CC before message processing it's not working ,but If I use the same command in the program RSBDCOS0,I can see shell script is working.
    I am just providing the path of the script and  and shell script name.Tried below option to check it runs but it  is not.
    /home/pd1adm/concur/get-concur.sh
    sh /home/pd1adm/concur/get-concur.sh
    Please help me out.
    Thanks,
    Madhu

    Please check the FILE permissions.
    I had the same problem long back at that time there was some file permission missing.
    Please ask your BASIS or UNIX team to check the permissions.
    Thanks
    Naresh N

  • Runtime OS command before Message processing

    Hi all,
    I have a scenario where the input file from a particular FTP server has to be moved to XI server and then process the message from there. For this I am trying to use "Runtime OS command before Message processing" My problem is that how do I define it in the normal adapter configuration i.e. File access parameters for the sender.
    My Query is:
    Now should I use the NFS protocol or the FTP protocol ie.in the File access parameters should I specify the directory from which the file needs to be processed after movement to the XI server or should I specify the FTP server details choosing the FTP protocols.
    Also provide me some links on how to configure using OS commands.
    Thanks & Regards,
    Nithiyanandam

    Hi,
    U can use NFS ...also for RUN Operating sysyrm command
    Try using RUN OPERATING SYSTEM COMMAND AFTER MESSAGE PROCESING and RUN OPERATING SYSTEM COMMAND BEFORE MESSAGE PROCESING.
    You just post ur output file in some folder(Target) , lets say /usr/sap/sapout/test/.and the shell script in this path /usr/sap/bin/convert.sh (use ur Rename logic here).
    Inside the File access parameters put target directory and filename scehme and for shell script give processing parameters as File construction mode , File type and OS Command and use a space after the shell script name and the %F.
    And for input can use it directly.
    For the shell script (which u will use to rename the file after processing) you can put anywhere inside /INTERFACE/XI/ but athe time you provide the pat it will be exactly matching as from where you are using the Shell Script and the file at the coressponding places. It shud be in XI. Thats it and u r done.
    Check out these links. First one will help you in acheiving want you want.
    /people/sameer.shadab/blog/2005/09/21/executing-unix-shell-script-using-operating-system-command-in-xi
    /people/michal.krawczyk2/blog/2007/02/08/xipi-command-line-sample-functions
    /people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching
    http://help.sap.com/saphelp_nw70/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm
    I hope this will solve your problem
    thanq
    krishna
    Edited by: krishnachitanya siddavattam on Mar 10, 2008 5:38 AM

  • I need to sort the incoming file contents before message mapping

    Hi All,
      I have requirement like i have to sort the file contents before message mapping in Xi. is there any option please suggest me with your value information.i dont want to sort in message mapping before that i want file contents to be sorted order.waiting for your quick reply.
    Thanks,
    seshagiri

    Hi,
    You can do this in one scenario.
    Lets say you have MT_Source and MT_Target as two message types.
    Now your MM1 will be between MT_Source & MT_Source, that is same message type. Here you built your sorting logic.
    Now create MM2, between MT_Source & MT_Target. Here your actual mapping logic will be implemented. The input payload for MM2 will be sorted data.
    Now in operation mapping, first call MM1 and then call MM2 (You have a plus + sign to add multiple mapping programs). Due to this sequence, at run time first MM1 will be executed and after that its oupt will be given to MM2 as source payload.
    Hope its clear. Plz let me know if you have any doubts.
    -Gouri

  • Operating command before message processing

    Hi experts,
    i have a file to jdbc scenario.
    My problem is that i want to send files that are generated on a ftp seperately.
    To do so, i wrote a .bat script to rename the files the way I want, and then the CC takes the file under the specific name I specified.
    My script works locally, it renames correctly the files.
    But how do i execute my script before the message processing on the files of the FTP ?
    I entered the name of the script in the command line, but doesnt work, looks like nothing is launched.
    Can i launch my script on the FTP ?
    Kind regards,
    Jamal

    Hi
    Check these blogs
    /people/michal.krawczyk2/blog/2007/02/08/xipi-command-line-sample-functions
    /people/santhosh.kumarv/blog/2008/07/27/glimpse-at-os-command-yet-another-scenario
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/sap%252bxi%252bfile%252badapter%252bos%252bcommand%252bline%252bfeature
    Regards
    Vishnu

  • Can't open PPT and InDesign files, receive this message

    Receiving this message:Powerpoint cannot open this type of file represented by Macintosh HD:users:....

    I think I understand what the issue is now. In the December 2009 issue of Macworld there was an article on page 22 called "Snow Leopard Switches the Double-Click." In that article it goes on to explain what I believe is the issue you are having and some solutions. Normally I would have sent you a link to the article so you could read it yourself however for some reason MW didn't tag this article so the only way I know you can get it is by getting your hands on a hard copy of that issue. You can try your local library and see if they subscribe, that would be a good shot or you can contact Macworld on how to order past issues.
    In short the article says there are some solutions:
    1. You could select one of the files then press Command I to open the Get Info window; in the Open With section, you could select a preferred application and click Change All.
    or
    2. You could Control-click a file in question, hold down the Option key, select Always Open With and choose an application from the list of alternatives.
    The article goes on to explain he wasn't pleased Apple made this change in SL so I would recommend you contact Apple at http://www.apple.com/feedback/ and comment as well.
    Regards,
    Roger

  • New audio files receives error message from iTunes - You do not have enough access privileges for this operation.

    Every time a new audio file is downloaded onto my desktop, (or if I double click on a new audio file) iTunes no-longer will play them. It gives an error message stating: Attempting to copy to the disk "Mackintosh" failed. You do not have enough access privileges for this operations.
    Please can you help me to resolve this situaion. I confess that I am not very computer savvy.

    Launch iTunes on the computer.
    From the iTunes menu bar click Store > Authorize This Computer
    Make sure to sign in using the same Apple ID used on the iPhone.
    Then sync your iPhone.

  • Is it possible to call operating system command after file receive?

    Hi expert,
    I'm trying to call operating system command after file receive comm.channel receive a txt file.
    operating system command uses txt file name as parameter.
    Is it possible? How?
    Thanks.

    Hi,
    It should be possible, actually we have two options that are
    1.RUN OS command before message processing
    2.RUN OS command after message processing.
    So you can give the commands in the RUN OS command after message processing.
    Check this links for more info
    http://wiki.sdn.sap.com/wiki/display/XI/SAP%20XI%20File%20Adapter%20OS%20Command%20Line%20Feature
    http://help.sap.com/saphelp_nwpi71/helpdata/en/44/556cb799c93677e10000000a114a6b/content.htm
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417200)ID1690747750DB11724434094963199241End?blog=/pub/wlg/10392
    Regards
    Ramesh

  • Check if file exists in file receiver adapter

    hello,
      we have following scenario -> proxy to file
      before appending to the file, it should be copied/renamed to a "tmp" file
      xi should then append to that tmp file and copy/rename the file back to the normal name
    I tried it with "Run operating system command before message processing" but
    it's not working
    anybody has an example on how to use those settings before/after message processing ?
    regards,
    michel

    Hi Michel,
    little confused,
    1) before message processing do there any file exists?
    2) why should we change file name to 'tmp' and append data to that and again rename that file ?
    con't we directly proceed in append mode with file name?
    When we use single command say for example cp or mv (copy or move) the commands then 
    eg: cp %F /var/opt/data/outbound/Test/Dummy.txt 
    when we club commands together or try to redirect the outputs of commands
    eg: cp %F /var/opt/data/outbound/Test/Dummy.txt & mv %F /var/opt/data/outbound/Test/Dummy.txt
            or
          cp %F /var/opt/data/outbound/Test/Dummy.txt
          mv %F /var/opt/data/outbound/Test/Dummy.txt
    Include all ur command in one file and call that file in the OS parameter
    Regards,
    Pradeep A.

  • OS command before msg processing: In sender FTP

    hi all,
               i have a file-to-file scenario.Now i have to pick the latest file from FTP folder based on timestamp.All the files are named in yyyymmdd format .I came to know that i can run an OS command before message processing to delete the old files and keep the latest file in the folder.
    But i do know know how to write the script for this particular requirement.Can anybody please help me out with the code???
    regards,
    Nisheeta

    HI,
    If you want to delete filenames from Adapter use the following sample code:
    File adapter OS Command: D://server_dir//subdir//myCMDfile.bat %F
    Batch file:
    del %1 new_filename_with_path
    OR
    Please see the below links
    /people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching
    OS Command on FTP
    OS command line script - Need help
    FTP - Run OS Command before file processing
    Hope this solves your problem.
    Regards
    Chilla..

  • File Receiver Adapter Batch File Not Invoking:

    Dear All,
    I am trying to invoke a Batch file in the Receiver File Adapter after Message processing.
    The Batch file is not at all getting invoked at all. i dunno whats the reason. Please help.
    Below is the Format in which i gave the batch file:
    F://Test//prakash//Endseperator.bat %F
    then i tried:
    F:\Test\prakash\Endseperator.bat %F
    then i tried
    F:
    Test
    prakash
    Endseperator.bat %F      each folder seperated by '
    ' whixh cannot be seen here.
    below is the batch file content of Endseperator.bat :
    F:
    cd "Test\prakash"
    java Endseperator "%F" "%F"
    Its working perfect when i manual execute the batch file. But i am not able to invoke via Receiver file Adapter.
    Please Advice.
    Regards,
    Senthilprakash.
    Edited by: senthilprakash selvaraj on Dec 18, 2008 11:47 AM
    Edited by: senthilprakash selvaraj on Dec 18, 2008 11:48 AM
    Edited by: senthilprakash selvaraj on Dec 18, 2008 11:49 AM

    Hi Senthilprakash,
    I guess you must know that the batch file must exist on the XI server, not on your local machine.
    if yes, try with one / like:
    F:/Test/prakash/Endseperator.bat %F
    Make sure the user <sid>adm (in case of Unix) or SAPService<SID> (in case of windows) has the execution right of your program.
    Jayson

Maybe you are looking for

  • Err 8008 - Cant get it to stop

    Hey all! Having problems downloading Grey's Anatomy season 2. This is happening with many of the shows in this season. I keep getting the err = 8008 messages. If I resume it goes a little further then starts again. I have tried deleting the files for

  • When restoring my iphone 4 i get a error message -50

    Hi can anyone help me im stuck. My iphone 4 was synced with a mac. my mac died, so I got a windows laptop. I downloaded I tunes and when restoring my iphone it comes up with a error message -50. can anyone tell me how to fix this problem?

  • Audible Books not showing in playlist

    I have my Audible books synched up in my iPad. When I go to the iPod application and select "Audiobooks" it shows a book icon that says "Audible (5 Books)" but when I click on this icon the list appears empty. The only way I can play the books is goi

  • Corrupted package downloaded.

    Hello, I tried installing linux-headers and after a few failed attempts to do so, it did... only to be corrupted somehow... # pacman -S linux-headers resolving dependencies... looking for inter-conflicts... Packages (1): linux-headers-3.14.2-1 Total

  • Bluetooth LG Soundbar not recognized by mac mini

    Streams fine from my iphone 4s and ipad 1 and 2, but mac mini won't recognize it.  Doesn't even show up as available device, where as the portable devices pick it up right away.  Any ideas?