Sender and receiver File Adapter

Hi ,
Sender File
12345566767
fjwehifh
09782345sdfgsjghjghhh
83475 dsf888234  dsfsdf wefrwr
Question1 : I need to Treat the Complete Message as a Field
Eg :  MY Source Structure
Recordset
   record
       Field1 0..1
I need to read complete file as one field, How can i achive it
Thanks in advace

Hi all,
As my understanding, requirement is that the source file is haphazard and the data type of source has only one field, we should read all the content from the file and convert to the DT which has only one field. and we should map the flat not xml content to target.
correct if i am wrong,
anyone has a suggestion for this?
Regards,
Kevin Song

Similar Messages

  • Prerequisites for Sender and Receiver FTP adapter

    Hi Experts,
    I am new to PI and configuring simple file to file scenario. I need to know the prerequsites for sender and receiver FTP adapter. Scenario is System A -> XI -> System B .
    What I want to know is:
    1> What ports need to be opened?
    2> Any service that I need to activate?
    3> Do I need to install FTP server in any of the machine?
    If I have missed something, please add.
    Br,
    Nilz

    Hi,
    1> What ports need to be opened?
    mentioned in below link as said its 21.
    2> Any service that I need to activate?
    No
    3> Do I need to install FTP server in any of the machine?
    THere are two ways by which u can pick ur file.
    1) NFS by which u can put the file on XI appplication directory and pick up ur file.
    2) FTP u have to put ur file on FYP server and XI will pick up the file from there. U can use freeware FTP and install it on ur Desktop search on goolge u will get ti FTP installtion.
    refer the below configuration requirement for FIle adapter.
    http://help.sap.com/saphelp_nw04/helpdata/en/69/a6fb3fea9df028e10000000a1550b0/frameset.htm
    ALso refer the end to end file to file scenario.
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/flatFILETOFLATFILE&
    chirag

  • Same file name from sender to receiver file adapter with out using UDF

    Hi All,
    I am working on FILE TO FILE. My requirement is same file name from sender to receiver file adapter. Is it possible to do using only Adapter Specific message properties?  i mean with out using UDF.
    Thanks
    Karthik

    Hi,
    >>>Is it possible to do using only Adapter Specific message properties?
    yes
    just enable Adapter Specific message properties in sender and receiver channel for file name
    and you're done
    Regards,
    Michal Krawczyk

  • Send and receive files between unix machines

    Hi friends,
    I have to send and receive files from one unix machine to another unix machine. In my first unix machine I have tomcat webserver. Using a JSP I have to send and receive files from this machine to another machine. The destination machine contain some BAAN implementation, which take the files I send as input .
    Can you send me a java program to solve this problem.

    Hi friends,
    I am getting a problem in my application. I will state the complete problem in detail. I have to transfer 3 files from one NT machine to unix machine some where kept in net work, I used an ftp in 'Process p = getRunTime().exec("ftp -i -s:ftp.txt")'. In ftp.txt file I have given the necessary things for ftp to unix machine. The files are transfering into the unix box. When I to the process for the 2nd time I have to check whether the file are exists in the unix box, then only transfer the files. Now, again I am doing ftp bring the files from the unix box to NT machines using 'Process p = getRunTime().exec("ftp -i -s:ftp1.txt")' where ftp1 contains all the necessary things for ftp to unix machine . Now I am checking for the files available in the NT machine using boolean=(new File(filename)).exists(), Fine out of 3 files, 2 file shows the return type as 'true' and one file is showing 'false', even the same happens if I delete the 3 files after checking, out of 3 files, 2 file shows the return type as 'true' and one file is showing 'false'. I went to the folder where I am bring files from and removing the files manually, one file is showing share violation, one process is using the file . I am unable to resolve this problem, will this code what I write is acceptable if not suggest any other code. I have sending all the snippets of the programs. I am doing this in the development environment like this. My production environment is totally both are unix machines.
    1. ftp to transfer files.(tranfer.txt)called in java code down
    open 172.16.30.6
    informix
    informix
    bin
    has
    cd /tmp
    put d:/dathu/CSV/bssfa932.txt
    put d:/dathu/CSV/bssfa933.txt
    put d:/dathu/CSV/bssfa936.txt
    bye
    2. ftp to get the files(get.txt)used in java code down
    open 172.16.30.6
    informix
    informix
    bin
    has
    cd /tmp
    lcd d:/dathu/hold
    get bssfa932.txt
    get bssfa933.txt
    get bssfa936.txt
    bye
    3. java code snippet to getfiles
    Process p = Runtime.getRuntime().exec("ftp -i -s:get.txt");
    4. java code to check the files exist
    boolean filestatus=moCreatFlatFilerobj.isFileExists();
    public boolean isFileExists(){
    boolean isfileexisting=false;
    boolean blnordhead = (new File(file1 with path)).exists();
    boolean blnordlines = (new File(file2 with path)).exists();
    boolean blnaccount = (new File(file3 with path)).exists();
    if(blnordhead && blnordlines && blnaccount){
    isfileexisting=true;
    return isfileexisting;
    5. java code to delete files
    public void deleteFiles(){
    boolean header= (new File(file1 with path)).delete();
    boolean line =(new File(file2 with path)).delete();
    boolean account=(new File(file3 with path)).delete();
    6. java code to tranfer files.
    p = Runtime.getRuntime().exec("ftp -i -s:transfer.txt");

  • Same Sender and Receiver File Name. Pls advice urgent

    Hi All,
    My sender file name is auto generated number so
    it is dynamic in nature.
    ex. "abc1.txt"
         "abc2.txt"
    Now In my Sender File Adapter I cannot give
    File Name hard coded as my sender file name is auto generated number.
    Also I want same file name received at receving end.
    File Sender --   "abc1.txt"
    File Receiver -- "abc1.txt"
    File Sender --   "abc2.txt"
    File Receiver -- "abc2.txt"
    Pls advice.
    Regards

    Hi Rider,
    All your sender files have .txt extension but the name is not constant(dynamic in nature).Than in this case to pick ur file u can use the *.txt as ur sender file name.Than all the files with .txt extension in the source folder specified would be picked.
    Than u can proceed in the same way given in this blog
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    Please let me know if u need any information
    Thanks,
    Bhargav
    Note:Award points if found useful

  • Determine Sender and Receiver in adapter module?

    All,
    Non-XML messages from different senders are received via the same JMS queue.  In the text payload, the ID of the sender and receiver is contained.
    Would it be technically possible to develop a JMS adapter module that sets the Sender Party, Sender Service, Receiver Party and Receiver Service based on the content of the message payload?  Is it possible to influence sender and receiver in an adapter module?
    Kind regards, Guy Crets

    Hi Steven,
    It seems like you can not convince XI to pick up a new message. The code below works when you use "inputModuleData.setPrincipalData(msg);" but not with "inputModuleData.setPrincipalData(msgnew);".
    The error in the Runtime Workbench is: "Catching exception calling messaging system' found, cause: javax.transaction.InvalidTransactionException: Cannot invoke call from within a transactional context.".
    I tried to set the RefToMessageId on the new message, but this does not work either.
    Does anybody know why the InvalidTransactionException is thrown?
    Here is the example code:
    public ModuleData process(ModuleContext moduleContext, ModuleData inputModuleData) throws ModuleException
      try {
        Message msg = (Message) inputModuleData.getPrincipalData();
        Context ctx = new InitialContext();
        ConnectionFactory cf = (ConnectionFactory) ctx.lookup(
          com.sap.aii.af.ra.ms.api.ConnectionFactory.JNDI_NAME);
        MessageFactory  factory = cf.createMessageFactory("XI");
        Message  msgnew = factory.createMessage(
          msg.getFromParty(),msg.getToParty(),
          msg.getFromService(),msg.getToService(), msg.getAction());
        msgnew.setConversationId(msg.getConversationId());
        msgnew.setDocument(msg.getDocument());
        inputModuleData.setPrincipalData(msgnew);
      catch (Throwable t)
        ModuleException me = new ModuleException("MyException");
        throw me;
      return inputModuleData;
    Best regards,
    Simon

  • WSDL url for sender and receiver SOAP adapter

    Dear Experts,
    I am working on SOAP --> SAP PI --> SAP ECC synchronous scenario. That means I have to create 2 Cc for SOAP i.e. Sender as well as Receiver adapter. I am responsible for creating the Request as well as Response structure in SAP PI. The sender application team is dependent on me to get the WSDL file.
    Please provide the suggestions on the below.
    Sender SOAP adapter.
    1. I will create the WSDL from Sender Aggreement. How to get the url and what is the navigation step? Should I provide the    same url to sender application team to call the service.
    Receiver SOAP adapter:
    2. In the receiver SOAP adapter , Should I have to get the web service parameter of the sender application. As mentioned , I am creating the response structure as well. That means I can not import the WSDL from the sender application. How to get target url in the receiver SOAP Cc.
    I refered to the forum SOAP SENDER - test in soapui but its not clear.
    Regards
    Alice Rebecca
    Edited by: Alice@xi on Dec 20, 2011 5:48 PM

    Dear Bhaskar,
    For synchronous scenario
                                                                Request
    MS Application (SOAP)<--> SAP-PI <--
    > SAP ECC.
                                                                                    Response
    I am creating the Request as well as Response structure in SAP-PI and its agrreement for both
    the ways.
    So for the MS appl team, I will give the WSDL url from the sender agreement to make the request to SAP-ECC.
    Now for receiving the response from SAP ECC, from where I should find the value to enter in the target url of SOAP
    receiver channel.
    1.Should I take the target url value from the MS Application team?
    2.How to know whether  the MS Application or SAP ECC is hosting the web service?
    Regards
    Alice

  • Send and receive file through ServerSocket

    Hi all!
    I try to send and then receive file via Server Socket but something goes wrong.
    I can send file from Client to Server, but after that I couldn't receive another file from Server to Client. What might be the problem?
    ex Client:
    public class FileClient{
      public static void main (String [] args ) throws IOException {
        int bytesRead;
        int current = 0;
        Socket sock = new Socket("localhost",13267);
        System.out.println("Connecting...");
        System.out.println("Try to send...");
        //send file
        File myFile = new File ("sourceImg.jpg");
        byte [] mybytearrayTOSend  = new byte [(int)myFile.length()];
        FileInputStream fis = new FileInputStream(myFile);
        BufferedInputStream bis = new BufferedInputStream(fis);
        bis.read(mybytearrayTOSend,0,mybytearrayTOSend.length);
        OutputStream os = sock.getOutputStream();
        System.out.println("Sending...");
        os.write(mybytearrayTOSend,0,mybytearrayTOSend.length);
        os.flush();
        System.out.println("File was sent...");
       System.out.println("Try to receive...");
        // receive file
       byte [] mybytearray  = new byte [filesize];
        InputStream is = sock.getInputStream();
        FileOutputStream fos = new FileOutputStream("source-copyImg2.jpg");
        BufferedOutputStream bos = new BufferedOutputStream(fos);
        bytesRead = is.read(mybytearray,0,mybytearray.length);
        current = bytesRead;
        do {
           bytesRead =
              is.read(mybytearray, current, (mybytearray.length-current));
           if(bytesRead >= 0) current += bytesRead;
        } while(bytesRead > -1);
        bos.write(mybytearray, 0 , current);
        bos.close();
        System.out.println("File was received..");
        sock.close();
    }ex Server
    public class FileServer{
    public static void main (String [] args ) throws IOException {
        ServerSocket servsock = new ServerSocket(13267);
        while (true) {
          System.out.println("Waiting...");
          Socket sock = servsock.accept();
          System.out.println("Accepted connection : " + sock);
          // receive file
          int filesize=6022386;
          int bytesRead;
          int current = 0;
          byte [] mybytearrayIn  = new byte [filesize];
          System.out.println("Try to receive...");
          InputStream is = sock.getInputStream();
          FileOutputStream fos = new FileOutputStream("source-copyImg1.jpg");
          BufferedOutputStream bos = new BufferedOutputStream(fos);
          bytesRead = is.read(mybytearrayIn,0,mybytearrayIn.length);
          current = bytesRead;
          do {
             bytesRead =
                is.read(mybytearrayIn, current, (mybytearrayIn.length-current));
             if(bytesRead >= 0) current += bytesRead;
          } while(bytesRead > -1);
          bos.write(mybytearrayIn, 0 , current);
          long end = System.currentTimeMillis();
          bos.close();
          System.out.println("File was received...");     
          System.out.println("Try to send file...");
          // sendfile
          File myFile = new File ("sourceImg2.jpg");
          byte [] mybytearray  = new byte [(int)myFile.length()];
          FileInputStream fis = new FileInputStream(myFile);
          BufferedInputStream bis = new BufferedInputStream(fis);
          bis.read(mybytearray,0,mybytearray.length);
          OutputStream os = sock.getOutputStream();
          System.out.println("Sending...");
          os.write(mybytearray,0,mybytearray.length);
          os.flush();
          sock.close();
    }

    ex Client:
    public class FileClient{
    current = bytesRead;
    This assignment is pointless. At this line, bytesRead and 'current' are already both zero.
    do {
    bytesRead =
    is.read(mybytearray, current, (mybytearray.length-current));
    if(bytesRead >= 0) current += bytesRead;At this point, if mybytearray.length == current, you are done, and the read will return zero, so you should test for a zero return ...
    } while(bytesRead > -1);... not just a -1 return.
    ex Server
    bis.read(mybytearray,0,mybytearray.length);
    Here you are ignoring the result of the read, which can be anything between 0 and mybytearray.length. Don't do that.

  • Send and Receive Files

    I found that on my desktop computer I cannot send or receive any files (pictures, documents, etc). However if I log into skype on my Android phone i can receive and send files. Why is this happening and how can I fix it?
    I'm on Skype Version 7.2.59.103
    Solved!
    Go to Solution.

    Try to reset all Internet Explorer settings:
    http://support.microsoft.com/kb/923737
    Next reset LAN settings:
    Open Internet Explorer. Go to Tools -> Internet Options -> Connections -> LAN settings. Make sure that the only option selected is “Automatically detect settings”.
    Next clear all Temporary Internet Files:
    Open Internet Explorer -> Tools -> Internet Options -> General. In the section “Browsing history” press the “Settings” button and in the next window the “View files” button. Delete all files from the Temporary Internet Files folder.
    Reboot your computer and test now what happens when you open this link in your Internet Explorer.
    https://api.asm.skype.com/s/i

  • How to create multiple files with Receiver File Adapter in SAP PI 7.31 Java Stack

    Dear Friends,
    I am using Sender JDBC Adapter and Receiver File Adapter in Integration Flow in SAP PI 7.3 EHP 1 SP08 Java Stack environment. The requirement is that we need to create multiple files based on the row count in jdbc resultset. If there are 5 rows in resultset, we need to create 5 XML files with one row elements in one file. Similarly if there are 10 rows, we need to create 10 XML files.
    So how can we create multiple files in this scenario. I tried placing a for loop in the Java Mapping as below in the transform method:
    DynamicConfiguration conf = arg0.getDynamicConfiguration();
    StringBuffer sbFileData = new StringBuffer();
    for (int i =0; i < record.size(); i++ {
         . // Create XML for each row and Marshal the object into to the String Buffer
         String strFileName = "DC_" + new SimpleDateFormat("ddMMyyyyHHmm").format(new java.util.Date())+"_"+i+".xml";
         conf.put(KEY_FILENAME, strFileName);
         arg1.getOutputPayload().getOutputStream().write(sbFileData.toString().getBytes("UTF-8"));
         arg1.getOutputPayload().getOutputStream().flush();
    So here I'm flushing the OutputStream for each record. But it's not creating the multiple file, instead it creates only one file will all record XMLs appended to each other.
    Please let me know if I missing something or need to do some thing else.
    Regards,
    Shreyansh Shah

    Hi
    You can easily achieve this using graphical mapping.  Create your target message type like below
    MT_Target
      Details  0 to 1
          Data  0 to 1
    Source sample structure
    <resultset>
    <row>
    <column-name>column-value</ column-name>
    </row>
    Then do the message mapping like below
    map <row> with  MT_Target
    contant ----> Deatils
    column-name ------>Data
    In the signature tab of message mapping, choose the occurrence of your target message type as
    0 to unbounded.
    This will generate multiple files from multiple rows.
    Let me know if you have any doubt.

  • Messages will not send or receive files.

    My messages app picks and chooses when it will send and receive files. Usually they are images or videos but also some Pages documents. Bringing up the file transfer window shows the spiraling download bar for receiving files and sending files will say "sent 0 kb of ____" and not move. Is there anything I can check to

    Same here ???????

  • Hadeling multiple files in sender and receiver adapter

    Hi ,
    In my sender FTP server multiple files gets created at a same time i want to send this same files to the target FTP server am not doing any file content conversion. Just pick this multiple files at a single poll and drop it in the target FTP system.
    I gave . in the as file name parameter in the sender file adapter..PI system picks all the files as separate message but if i give . in the receiver adapter itu2019s not creating the file and its giving Java exception..
    Is there any other method to do this without having File content conversion... ?
    Regards
    Shakfie

    I gave *.* in the as file name parameter in the sender file adapter..PI system picks all the files as separate message but if i give *.* in the receiver adapter itu2019s not creating the file and its giving Java exception..
    For receiver adapter you have to give some file name, '.' will not work for receiver adapter. So give any temporary name just to satisfy the mandatory field. And when you selet the ASMA settings in both SENDER & RECEIVER adapter then your Receiver File adapter will write the same file name which it has picked up and NOT the one which you have written in your receiver adapter.
    Note: Set ASMA setting in both else you will not get the same file name at receiver. You can see the same in blog given by Siva. You need not to create any UDF since you are not using any mapping. Just use the ASMA settings.. that's it.
    > Is there any other method to do this without having File content conversion... ?
    You can go through this blog for the same...
    /people/william.li/blog/2006/09/08/how-to-send-any-data-even-binary-through-xi-without-using-the-integration-repository
    Regards,
    Sarvesh

  • Email attachment name in sender mail adapter to the receiver file adapter

    HI ,
    Ths is regarding email to file scenario. I am trying to create file (in rceiver file adapter) with the same name as the email attachment that i read from mail sender adapter. I want ro use adapter module for this. I could find from blogs that there is module - GetAttachmentName - available that i can use for this in sender mail adapter.
    Can you please let me know what whetehr i neeed to mention any module key and parameters for this.
    I assume , i need to do following steps :Please confirm.
    1. i can use this module - after payload swap module and before standard mail adapter module in sender mail adapter
    2. select ASMA option in advanced tab in sender mail adapter
    3. In receiver file adapter select ASMA option in advanced tab in sender mail adapter
    4. Also select file name option in ASMA in sender mail adapter
    Thanks,
    Vamsi

    Hi Vamsi,
    your scenario is also described here: Re: sender mail adapter - attachment name
    If you use the Module getAttachmentName, which is described here,
    http://wiki.sdn.sap.com/wiki/display/XI/AdapterModulePI7.0GetAttachmentName
    your scenario should work as you described it.
    You just need to make sure that the Attachment Name that you read in the first place, is mapped to the Filename Attribute of the
    Fileadapter (http://sap.com/xi/XI/System/File/FileName).
    regards,
    Daniel

  • The same filename from a sender to a receiver file adapter

    Michal has provided us with a brilliant <a href="/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14.  I guess a lot of people have been waiting to do this. However, I have a slightly different scenario. In this case, XI is used as a medium to transfer a PDF file from one directory to another directory. There is not transformation or mapping involved.
    The message is send by File Sender Adapter and received by File Receiver Adapter. Message type is created as a simply type hexBinary. The file is supposed to be picked up as a PDF and received as a PDF, retaining the same file name. As such, the file name is neither stored in the source structure nor the target structure.
    Once the PDF file is transfered into target directory, it should be able to be open by using Acrobat directly without further conversion.
    We might add a file name file into the target structure but would that rendered the PDF non-readable upon being received by the File Receiver Adapter?
    Any feedback is highly appreciated.

    Hi
    >>We might add a file name file into the target structure but would that rendered the PDF non-readable upon being received by the File Receiver Adapter?
    No, adding file name would not hamper the properties. You can name *.pdf or something else.
    For that matter any file pdf, word, .msg format etc can be transferred by this approach. We have tried it.
    Earlier to SP14 you cannot give the same name to outgoing file without writing a Adapter module. But things are easy with SP14.
    Cheers,
    satish

  • The same filename from a sender to a receiver file adapter - SP14

    Hi Expers,
    I Have Gone through the link which is given bu Michal.
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    Here My Questions are.........
    1.Should we give any file name in the receiver side Adapter in this scenario.?????
    2.How wil be the Sender and Receiver Communication channel Parameters????
      What Are they???????
    Please Clarify me...
    Regards
    Khanna

    Hi Rajesh,
    Is your query related to sending the file name from the source xml document to the reciever file adapter. If so this can be achieved.
    Pls. do the following.
    1. In the mapping program that you are using populate the filename coming from the source into the target root element.
    2.Sender adapters can write adapter-specific attributes to the message header; these can then be evaluated at configuration time
    3. To change the adapter-specific attributes of the message header by using message mappings, you access the required classes of the mapping API by using a mapping runtime constant.
    <b>Note: You donot need to specify any filename in the receiver communication channel.</b>
    To access the classes DynamicConfiguration and DynamicConfigurationKey by using the mapping runtime constant DYNAMIC_CONFIGURATION, use the method getTransformationParameters() of the container object.
    Create an simple user defined function in the mapping and use the following code.
    Imports: com.sap.aii.mapping.api.*;
    Parameter: String filename
    Paramter: String filename;
    filename = fileName + ".DAT";
    DynamicConfiguration conf = (DynamicConfiguration) container
    .getTransformationParameters()
    .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File", "FileName");
    conf.put(key, filename);
    return filename;
    You donot need to hard code the value of the filename in the file adapter for your interface.
    In SXMB_MONI, when you see the pipeline services you would see that the value of the filename is populated in the message payload.
    Thanks
    Indranil

Maybe you are looking for

  • Flash Media Server dynamic Livestreaming

    I have FMS 3.5 installed, everything is running. I want to have a livestream from a camera that is dynamic and will change according to the bandwith of the viewer. What settings do I need to choose in Flash Media Encoder, FMS and in the Player to mak

  • SD Document Flow - Duplicate entries

    SD Document flow, duplicate entries created for the same Delivery & shipment. In VT03N document flow same shipment no is shown twice for the sales order & delivery document.

  • Express edition and enterprise edition..

    Hi experts, In my laptop i've installed Oracle 10g express edition.. is it possible to install 10g enterprise edition on the same notebook?? Regards, SKP

  • It's my 3000 post – Oracle ACE and Oracle employees

    Hello, So, this is my post number 3000. In this forum, it’s not so unique, but still I decided to dedicate it to the subject of Oracle ACE and Oracle employees. Recently, Joel blogged about Carl awarded Oracle ACE (http://joelkallman.blogspot.com/200

  • HT201257 Apple Hardware Test won't stop

    My daughter went to turn on her MacBook and the Apple Hardware Test came up.  I Googled what the AHT was & so we let it run in order to shut it down.    When we started it up again, the AHT popped up again.  We cannot get it to stop! (There is no dis