*OS Command in the File Adapter

Hi all,
I am trying a scenario where in the username,time,date must be appended to my pay load.
For I am trying using the batcth file with out using udfs.
In my output file i need username,time,date info based on the login(suppose some user tests my scenario in xyz terminal his info must be displayed in my out put payload.)
In the sender CC:
xiserver\xi_scenario\File2File
Run OS command before processing:
c:\a.bat(This contains user info) after exeuting i placed in xi server to monitor the user(but i dont know where the batch file executes since there is no Dir 'c" in Xi)Please let me know how can i achieve this).
Receiver CC:
FCM:Append
filetype:text
Please correst me if i am not correct.
Thanks,
Srinivasa

Srinivas,
OS commands are usually placed in a path on the XI server itself. If XI is on UNIX shell scripts are used, while if it is on a Windows server .bat files are used. From your post, it looks like you are trying to execute a batch file on your local system.
Not sure if it is possible to execute such OS commands out of your local system.
You should probably could place the OS command script on a server path.
Thanks,
Anand

Similar Messages

  • Can I use the File Adapter to transfer files from/to my own PC

    Hello,
    Would it be possible to set tu the file adapter to send or receive files from my own PC's file system?
    For example I would like to transfer a file from my PC to PI instead of using PI's file system?
    Can I do that?
    Thanks
    Marcelo

    If your PC has Windows-based system, SAP XI is Unix-based, you have a problem: Unix can't connect to UNC-path - Unix doesn't understand path like this "
    mywindowspc\myfilesharefolder\", and Windows can't mount unix-drives. There are has a tool that can mount Windows UNC-file-share on NTFS like dirive UnixFS - but this tool is not freeware and has a problem when you switch off your PC without unmounting your Windows-dirives on Unix system. You can use a SAMBA, but Admins doesn't like to install this to Unix...
    So, if you want to use a File Adapter you can set only FTP path, create FTP-site on your own PC, and so on...
    Another way to send information from/to your own PC is "Plain J2SE Adapter Engine". This is a standalone part of SAP XI, you install it on your PC, configures URL of XI pipline, sets local folders to transfer from/to your PC, masks and types of your files, time to sending, any rules and DOS-commands for "before/after sending and receiving" and so on...
    In case of sending files from PC to XI, files transforms to XI-payload inside this Adapter Engine and then goes like XI-message to pipeline... When you send it back, payloads come to this Adapter Engine and transform to files on your PC.
    I used this Plain J2SE AE on my working notebook for checking sending messages to many different XI Systems.
    For more info: http://help.sap.com/saphelp_nw04/helpdata/en/6f/246b3de666930fe10000000a114084/content.htm
    Regards.

  • External OS command script in file adapter - return value check possible?

    Is it possible to check return value of external OS script execution which is called in the file adapter? We want to see the result in the adapter monitoring. The documentation says: "Message processing is independent of any errors that occur during the execution of a configured operating system command."

    Hi Sanjay ,
    Seems possible : Try this :
    /people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching
    Regards ,

  • Unzip the file archived by the File adapter

    Hi Experts,
    we have a scenario where we are archiving a xml file using the File adapter and also it is being zipped by the OS command.
    the script not only zips the file, it also rename the file from *.zip to *.xml.
    Hence after archiving when I am trying to open it, the content appears to be junk.
    Please suggest how to unzip the file as it got a extension *.xml.
    And I also tried renaming the file to *.zip and then to uncompress, but it shows below error
    Cannot open : it does not appear to be a valid archive
    Thanks in advance,
    MK

    hi Mk,
    instead of using OS command try using the exesting module provided by the SAP, so your job will be easy.
    follow this steps in the module processing for UN ZIP
    Processing sequence:
    Module name: AF_Modules/PayloadZipBean
    Type: Local Enterprise Bean
    Module key: 3
    u2022 Module configuration:
    Module key: 3
    Parameter name: zip.mode
    Parameter value: unzip.
    in the commincation channel specify filename.xml
    so you can open the file in XML format
    Thanks,
    Madhav
    Note:points if useful
    Edited by: madhav poosarla on Aug 14, 2008 8:31 AM

  • Can I use a schema with no targetnamespace with the file adapter?

    I am loading a file using a file adapter configured to use an xsd from a third party, the third party controls the xsd and incoming xml and does not have a targetnamespace defined in the xsd or xml.
    When I define a file adapter for it the wizard indicates that I need to fix the xsd by adding a namespace. I dont have control over the xsd or xml as they are an external party.
    I think I can hand edit the wsdl and change the import statement that requires a namespace to an include statement with no namespace.
    Have you run into this before? Will that work?
    Thanks,
    John

    Hi John,
    Did we get any solution for this ?
    Even in our case, the third party controls the xsd & incoming xml message. Both does not have a targetnamespace defined. The file adapter wizard indicates that we need to fix the xsd by adding a namespace. As a workaround, we manually added the target namespace to xsd and created file adapater. Now the question is how do we automatically add the name space in xml message as well, so that it can be parsed by BPEL process
    thanks
    Yj

  • How do I resolve: "Could not complete the Crop command because the file is not compatible with this version of Photoshop" error message?

    Photoshop document created in current version of PSCC2014, now will not crop, resize, etc without throwing compatibility error.
    "Could not complete the Crop command because the file is not compatible with this version of Photoshop."
    How do I resolve without recreating the file?

    Ooops.  Hit save reply prematurely. 
    You may be able to open the flattened composite or the embedded JPEG preview of your file in Adobe Illustrator, GraphicConverter (Mac only) or some such application, but your layers will be gone.
    The problem of working across a network is that it's not supported by Adobe:
    This is the boilerplate text often used in connection to saving to a network (please NOTE the part where it explains that normally, it does work, but that it is impossible to troubleshoot someone else's network remotely, and that's why it's not supported by Adobe):
    If you are opening files over a network or saving them to a network server, please cease and desist immediately in the event you are currently experiencing problems with one or more files. Working across a network is not supported.
    See: 
    http://kb2.adobe.com/cps/406/kb406793.html
      Copy the CLOSED file from your server to your local hard disk, work on it, save it again to your local hard disk, close it, and copy the closed file back to the server.
         Of course, the fact that Adobe does not support working across a network does not necessarily mean it won't work.   It should.
        Adobe's position is that there are too many variables in a network environment for them to guarantee that everything will work correctly in every network, especially given the fact that if something does not work properly, it's probably the network's fault, and Adobe has no way of troubleshooting your network.
      If you can't work locally, you are on your own, and if something happens, you're on your own. If you must work from a server, make sure your network administrator is a competent professional.
    When problems arise, a lot of valuable work can be lost.

  • Could not complete the video frames to layers command because the file could not be opened

    I recently learned to make gif images using KMPlayer and my Photoshop CS6, but today I hit a snag that I can't seem to get around. Normally I capture a scene from a show DVD I have in KMPlayer and then import the video frames into layers/frames in photoshop with no problem. Well today I went to do that, and captured the scene with what seemed like no problem (the small captured scene saved with no problem) but when I went to CS6 to import the video into layers, I got the error message "Could not complete the video frames to layers command because the file could not be opened". At first I thought it was the KMPlayer saving the files wrong, so I retried and got the same error message. Irestored the players settings back to a default and the file still wouldn't open in photoshop, and then I even tried uninstalling/reinstalling the player trying to get it to work, and then I thought it must be photoshop, because even scenes I had captured at an earlier day that worked perfectly fine when importing would not open.
    What could possibly be causing this problem to occur. Should I uninstall/reinstall photoshop and see if that works, or am I doing something wrong?
    The files I'm trying to import are AVIs as always, I even tried to capture scenes in other formats to no avail. What could be causing the problem?

    I uninstalled an reinstalled photoshop totally and it didn't fix the problem either. I made a post on the KMPlayer's forum hoping for an answer but I haven't recieved one yet. I'm starting to think it's the kmplayer having a problem capturing, since I've started getting the error "could not import the file to layers because the file has no layers" sometimes in photoshop, but I'm still trying to work around in photoshop to see if the problem came from there.

  • How to customize the File Adapter to put the header line in a variable?

    I have a file in which the first line contains the number of records contained by the file itself.
    Like this:
    4
    record1
    record2
    record3
    record4
    where each record is a delimited list of values
    I need to validate that the records are actually 4.
    in the documentation of the File Adapter I see that you can declare the first line as "header", but I have the impression that in this case it would be simply ignored, and not stored in a variable for later use......
    Is this correct?
    Any trick or workaround?
    thank you soooo much!

    it worked like a charm,
    here is the XSD I have used:
    http://www.javamonamour.org/2010/12/soa-sutie-file-adapter-parsing-complex.html
    ( I don't seem to be able to display correctly XML in this post :o( )

  • How can I read different files in the file adapter

    Hi,
    I have a scenario like file(content conversion and FTP) to Proxy and need to read 2 files which have different structures.
    The file structures is as follows.
    FileA.txt
    EMPID, Designtion,code,DOB,dept,deptID and 13 fields etc..
    FileB.txt
    officercode, dept,workspecs,FLAGarm,FLAGfoot and 27 fields etc.
    Both files needs to be read by the file adapter at same time and should send to the proxy to feed in ECC.
    Please help me in designing the above scenario with or without BPM.
    Thanks
    Manmadha

    Hello,
    Since u want to combine the two files from sender , you need to use BPM for it.
    First of all create Mapping. In your mapping program go to messages tab and add the two source messages types and in the target add the target message type. Come to your design tab and design the mappings.
    BPM:
    -- Insert Fork with two branches necessary condition. In first branch insert Receive step and check start process checkbox.
    --In second branch insert Receive step and check start process checkbox.
    -- Insert Transformation step after Fork branch step.
    -- Insert Send step [the outcome of transformation step needs to be send]
    Design the above structure, if you have any doubts, dp reply back.
    Best regards,
    raj.

  • Cannot process a Fixed Field Length file using the File Adapter (Sender)

    Hi -
    I have checked throughout these posts and blogs but I still have not been able to find a solution to my issue.  When using the File Adapter (Sender) I get a Conversion initialization failed with "xml.keyfieldName", no value found.  Why would I require a key field when I am using fixed field lenghts?  The file is comprised of 2 structures - 1 header and multiple details (see below).  There are no key fields in the flat file that I would be able to use.  Any suggestions?
    011000390      Customer Americas        20080605164317 000000000000000800000008000000000016000000                              
    12345678          100500       100500       Supplier 1                         0000000000030000002008040400                    
    12345678          100501       100501       Supplier 2                         0000000000052000002008042100 
    The File Adapter is configured as follows:
    Document Name = Rfchke00
    Document Namespace = 'my namespace'
    Recordset Name = Rfchke00
    Recordset Structure = Dtachkh,1,Dtachkp,*
    Recordset Sequence = Ascending
    Recordsets per Message = 1
    Key Field Type = String (Case-Sensitive)
    Dtachkh.fieldFixedLengths = 15,25,8,6,1,8,8,8,15,3,31
    Dtachkh.fieldNames = F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11
    Dtachkh.processFieldNames = fromConfiguration
    Dtachkp,fieldFixedLengths = 18,13,13,35,15,3,8,2,21
    Dtachkp,fieldNames = F1,F2,F3,F4,F5,F6,F7,F8,F9
    Dtachkp,processFieldNames = fromConfiguration
    Thanks,
    Dave

    Hi,
    you can use the module from which u can convert your structure to
    H011000390 Customer Americas 20080605164317 000000000000000800000008000000000016000000
    D12345678 100500 100500 Supplier 1 0000000000030000002008040400
    D12345678 100501 100501 Supplier 2 0000000000052000002008042100
    Please note the extra H,D in the struture added by the module.
    You can then use them as your key fieldValues.. The module should be deployed in Visual Admin and then can be used in the Module tab of your adapter CC
    While writing the content conversion after that please dont forget about the added new characters
    Please note also that i can find that the word supplier kept repeating in all the Dtachkp records
    Please use that
    Also if you feel that the field is of 13 characters and that would cause a problem dont worry... create a dummy field eg split tht 13 to two fields and use the common one as key field Value and identifier... as i see in ure case its like 500 Supplier , 502 Supplier . u can split the first 4 char and the remaing 9 char are key field value.
    try this out
    Rgds
    Aditya

  • "Performance" problems with the File adapter on Plain J2SE Adapter Engine

    Hi,
    At the moment I'm on a customer side to solve some XI issues for a few days. One of the issues is the performance of the Plain J2SE Adapter Engine, using the file adapter to transfer XML messages(already XI message format) from the legacy system to the Integration Engine. The File adapter has to deal with "large" XML messages(max at the moment is 65 Mb) and the engine fails with the following error when transferring the big XML file: "ERROR: Finished sending to Integration Engine with error "java.lang.OutOfMemoryError". Skip confirmation and quit this loop".
    As far I got the information from the customer the memory use of the Plain adapter engine is set to 512Mb. This is maybe to low. But I don't know where to look for this, I only have the adapter web interface in front of me, no access to the OS it self via for example remote connection.
    On the Integration Engine I know there is the ability to split large message with the file adapter(File Content Conversion), but I don't know this for the Plain Adapter Engine. Is there a possibility to do this also on the Plain Adapter Engine?
    Thanks in advance for any input.
    Greetings,
    Patrick

    Hi Sameer,
    Thanks for your answers.
    On the first solution, yes that is possible, we first decided to see if the legacy system can do the splitting, before starting developing a Java program.
    On the second solution, as far as I know is this solution possible on the Integration Engine. But we are facing the problems on the Plain J2SE Adapter Engine. I went trough that documentation(link:
    http://help.sap.com/saphelp_nw04/helpdata/en/6f/246b3de666930fe10000000a114084/frameset.htm ), to look for I similiar solution in the Plain Adapter Engine. So my question is, is this possible with the Plain Adapter? And if so, what kind of parameters I need to use to achieve this.
    Regards,
    Patrick

  • Could not complete the export command because the file could not be found

    When I try to save for web, Photoshop pops up a dialog box that says "could not complete the export command because the file could not be found".
    What is the solution for this?

    Please provide more information (Photoshop version, OS, target volume, …).
    Does the file’s or one of the folders’ name contain problematic letters (slash etc.)?
    Boilerplate-text:
    Are Photoshop and OS fully updated and have you performed the usual trouble-shooting routines (trashing prefs by keeping command-alt-shift/ctrl-alt-shift pressed while starting Photoshop after making sure all customized presets like Actions, Patterns, Brushes etc. have been saved and making a note of the Preferences you’ve changed, 3rd party plug-ins deactivation, system maintenance, cleaning caches, font validation, etc.)?

  • Passing file name dynamically to the file adapter

    Hi All,
    I'm using a file adapter to create a file from the XML message after mapping in XI. The file name is given in the file adapter configuration. Is it possible to have the file name as a part of the message and pass it to the file adapter dynamically? Or is it possible to have the file name in some variable or something in XI (like a BPM variable) and pass it to the adapter for every message?
    Does someone have any idea?
    Thanks,
    Sandeep

    Hi Sandeep,
    This is possible.
    For creating filenames dynamically for your sender, you will have to crate a variable name ( eg: %VAR%) as you file name and then you will have to give the name of your file under variable substitution. Just check this link for more info,
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    In the case of receiver file adapaters, you have 5 options for file creation like,
    1.Create
    2.Append
    3. Add time stamp
    4.Add Counter
    5. Add Message ID
    You can choose any of these options or you can do it dynamically from you payload. Just check out this help link for more info,
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    Hope this helps

  • The file adapter takes also the mark of the beginning of the file as a char

    Hi guys,
    I need to use the file adapter for sending data into XI.
    My first column of the CSV file contain ID of the objects of length 8 chars. But when the adapter takes also the beginning of the file, the length starts to be 9 chars.
    How is it possible to disallow to take this mark?
    I didn't find any parameter in the file adapter settings, which could solve this problem.
    Thanx for answer! (Points guaranteed )
    Peter

    Hi Peter,
             While configuring sender file adapter, you can do the following.
           1. While defining Parameters for Recordset Structures , you can make use of the recordsetstrucure.beginSeparator function which will take the first string in the file as a begin seperator.
      i guess this would help you.
    regards,
    Aravindh.

  • To run iTunes in 64-bit mooose the "Get Info" command in the File menu, and uncheck the "Open in 32-bit mode" checkbox in the iTunes Info window. but i doesn't have the tick thing plus i redownloaded it a

    To run iTunes in 64-bit mode, select the iTunes application in the Finder, choose the “Get Info” command in the File menu, and uncheck the “Open in 32-bit mode” checkbox in the iTunes Info window. but i doesn't have the tick thing plus i redownloaded it again and same message comes up

    Have you disclosed the "General" brick in the "Info" panel? Click the disclosure triangle to the left of "General":
    What is your iTunes version and MacOS X version?
    -- Léónie

Maybe you are looking for

  • Upgraded to iOS7 on the ipad.  Pages no longer connects to iCloud.

    Quick summary. Updated my iPad 2 to iOS7 via OTA.  Pages crashes on launch.  I unstalled the app, Reinstalled. Now it launches but my documents in iCloud don't show up.  I turned off iCloud and back on via Settings/Pages.  No change.  Deleted my iClo

  • My Iphone charge only last a few hours why?

    My iphone only holds a charge for about 6 hours now.  I don't know why

  • HT3529 iMessage not receiving pictures

    I have not been able to receive pictures I can send them but not receive, I have been trying different ideas such as, resetting network settings and resetting all settings. I hope you can help me because it is disappointing as I love iMessage and thi

  • No Title

    I am trying to create an LOV form in Designer 6i running on Windows 2000 using the HST 6.5.1 package. The form compiles fine, but I get the following error message when executing the form : FRM-40735 : PRE-BLOCK trigger raised unhandled exception ORA

  • Database Models

    Oracles database has been since time memorial been based on the Relational data base model. We even have a way of converting object models into Relational model. Why do we stick to this model only? Other models; especially the Object oriented Databas