REG: File Adapter

Hi All,
        I have a scenario where i need to pick 2 files from 2 different folders and process them in a particular sequence. Can anyone suggest me a method how this can be achieved.
Thanks,
Siva.

use two file adapter with different polling intervals.
first file adapter will pick up file then second adapter will be polled and will pick the another file from the folder.
chirag

Similar Messages

  • Reg:File adapter archive Directory

    Dear team,
    Our requirement is to read a csv file from a directory and archive the file in archive folder specified in the file adapter.
    If any exception is caught,then we need to read the archieve file from archive directory rename the archive file with source file name and place it in source directory.
    On the receive activity we are able to get the source file name and source file directory.
    <receive name="Receive1" createInstance="yes"
    variable="Receive1_Read_InputVariable" partnerLink="fileRead"
    portType="ns1:Read_ptt" operation="Read">
    <bpelx:property name="jca.file.FileName" variable="srcFileName"/>
    <bpelx:property name="jca.file.Directory" variable="srcDrFolder"/>
    How to get the archive file name and archive file directory from the receive activity so that we can store in local variables.
    Pls do help.
    Thanks

    Hi,
    Another way you can accomplish your scenario. Instead of deleting or archiving in beginning just move the file from inbound to archive location after business flow completion.
    In case of error, the file will remain at original position as moving operation is at the end.
    First read the file using read operation, then at the end create a file adapter with sync read operation. Change the entries in .jca generated with below sample.
    Sample jca file.
    <endpoint-interaction portType="SynchRead_ptt" operation="SynchRead">
    <interaction-spec className="oracle.tip.adapter.file.outbound.FileIoInteractionSpec">
    <!-- Below properties are dummy except Type , it will be changed in runtime -->
    <property name="SourcePhysicalDirectory"
    value="srcdir"/>
    <property name="SourceFileName" value="abc.txt"/>
    <property name="TargetPhysicalDirectory"
    value="targetdir"/>
    <property name="TargetFileName" value="abc.txt"/>
    <property name="Type" value="MOVE"/>
    </interaction-spec>
    Then,in you bpel flow at the invoke for sync read add these two properties.
    <bpelx:inputProperty name="jca.file.SourceFileName"
    variable="varInputFileName"/>
    <bpelx:inputProperty name="jca.file.TargetFileName"
    variable="varArchiveFileName"/>
    <bpelx:inputProperty name="jca.file.SourceDirectory"
    variable="varInputDirectory"/>
    <bpelx:inputProperty name="jca.file.TargetDirectory"
    variable="varArchiveDirectory"/>
    - It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts).
    Thanks,
    Durga

  • Reg file adapter with Synchronous

    Hi ,
    i have sce like send IDOCs to File ,get back the response  to PI with CSV formate.it is possible to do without BPM.
    Thanks

    >
    Manisha Dahatonde wrote:
    > Yes, you can do it without BPM.
    > See this
    > https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/file-rfc-file%2528without+bpm%2529
    >
    will this info work in this scenario also...i think the scenario is IDOC <-> XI <-> FILE and not the other way round

  • REG: File content conversion in Receiver file adapter

    HI Gurus,
    I have the scenario like proxy to file with content conversion
    my message type for the source like this
    MT_SOURCE
    -----||
           |---ROW
    ------------||
                    |---LINE
    target strucuture also same
    MT_TARGET
    -----||
           |---ROW
    ------------||
                    |---LINE
    i am using the following FCC parameters in receiver file adapter
    LINE.fieldSeparator = '                       '
    LINE.fixedLineWidth = 90
    LINE.lineSeparator  = 'nl'
    LINE.fieldFixedLengths = 200
    LINE.endSeparator        = 'nl'
    the output file show the data differently in note pad when compare to word
    word output
    dgepvs                       023456987
    kgdd0016155710                SS Smw Ne 01                                                                               
    kgdd0016155710                SS Smw Ne 01                                                                               
    kgdd0016155710                SS Smw Ne 01                                                                               
    kgdd0016155710                SS Smw Ne 01                                                                               
    kgdd0016155710                SS Smw Ne 01                                                                               
    kgdd0016155710                SS Smw Ne 01                                                                               
    kgdd0016155710                SS Smw Ne 01
    notepad out put
    dgepvs           023456987   kgdd0016155710                SS Smw Ne 01       kgdd0016155710                SS Smw Ne 01          kgdd0016155710                SS Smw Ne 01            kgdd0016155710                SS Smw Ne 01    kgdd0016155710                SS Smw Ne 01
    word output is the correct output wat i am expect but same out put i want in note pad can any help me out for this how can i resolve this
    Thanks in advance

    There is nothing wrong in your content conversion parameters. This is pure editors interpretation for the next line character.
    I would do in java program to fix this issue using '\r\n'   You might want to try and see how that helps for notepad editor.

  • Reg: UNIX shell script at File Adapter

    Hi all,
    I am doing a File to file scenario and using command line arguments in Sending file adapter. I am using UNIX shell script ".sh" file for executing the command.
    I gave the following path at "Run OS command before message processing" parameter:
    /temp/xidelivery/send/FILOSC004_shell.sh
    and this file contains following code:
    <b>#!/user/bin/sh cp /temp/xidelivery/send/FILOSC004_in.txt /temp/xidelivery/send/FILOSC004_input_copy4.txt</b>
    I put the source file, FILOSC004_in.txt and shell script files at the respective paths.
    If I give "cp" command directly in command line it is working fine. But I could not execute this with shell script. Can any body give me the reason where I gone wrong.
    Regards,
    Pavani.

    Hi,
    can you try this,
    bash /temp/xidelivery/send/FILOSC004_shell.sh
    let me know.
    hey you can check the blog below to catch the OS errors,
    /people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching
    Prasad Babu.
    Message was edited by:
            PrasadBabu Koribilli

  • Reg: File size in receiver file adapter

    Hi all,
    I am doing a proxy-> Flat file scenario. The output file size is nearly 15MB.
    Can anyone please tell me whether file adapter in PI 7.1 can write this much big file?
    or do i need to split it in integration engine?
    Regards
    Jagruthi

    Hi Jagruthi,
    >>The output file size is nearly 15MB.Can anyone please tell me whether file adapter in PI 7.1 can write this much big file?
    Yes it can, provided there is less load on the server and the interfaces running are minimal. Also the frequency of this interface should be very less
    >>or do i need to split it in integration engine?
    If possible try to split records and create file be appending
    Regards
    Suraj

  • Blank Lines at end of file when using Variable Substitution in File Adapter

    Hi all,
    I'm using variable substitution in a File Adapter, it's refers an element of message, like:
    filename    payload:MESSAGE_INTERFACE,1,FILENAME,1
    The variable substitution is working right, but it's append a BLANK LINE at end of file.
    Anyone knows how to solve this problem ?
    Thanks in advance.

    Hi Regis,
    I suppose you're using content conversion?
    if so try adding
    <b>endSeparator</b> = '0'
    to your last element
    this will delete the default line break at the end
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>

  • Performance Problem with File Adapter using FTP Conection

    Hi All,
    I have a pool of 19 interfaces that send data from R/3 using RFC Adpater, and these interfaces generate 30 TXT files in a target Server. I'm using File Adapters as Receiver Comunication Channel. It's generating a serious perfomance problem. In File Adpater I'm using FTP Conection with Permanently Conection, Somebody knows if PERMANENTLY CONECTION is the cause of performances problem ?
    These interfaces will run once a day with total of 600 messages.
    We still using a Test Server with few messages.

    Hi Regis,
        We also faced teh same porblem. Whats happening is that when the FTP session is initiated by the file adapter, then its getting done from teh XI server. Hence the memory of the server is also eaten up. Why dont you give a try by using 'per file transfer'.
        If this folder to which you are connecting is within your XI server network then you can mount(or map) that drive to the XI server and use it with a NFS protocol of the file adapter and thereby increasing the performance.
    Cheers
    JK

  • FileName in Sender File Adapter Module

    Hi Folks,
    In my sender file adapter have written a module to read the picked file name. The protocol used is NFS.
    Notice that the file name read in the module has the absolute path, including the directory path. E.g The file name xyz has to be picked from source directory
    XIServer\Outbound. In the module when I retrieve the file name, it comes up as
    XIServer\Outbound\xyz. Is this expected behaviour?
    I was expecting just the file name<xyz> to be retrieved.
    Thanks,
    Anand

    HI,
    Create an UDF and write this code.
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key =
    DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    return  ourSourceFileName;
    in Adapter u will have Adapter specific parameters check the file name check box.
    Using this UDF u will get the file name at target side.
    Regards,
    Phani.

  • Getting Error while running a file adapter.

    Hi all,
    I am doing a small application where I need to read an image from a shared path and send the base64code of that image in response. For that I am using File Adapter and Read
    operation. I have just hard coded the image name didnt give any wild card or expressions. I generated a service which is a proxy using the jca of that File Adapter. I added a stage
    replacing the response body with the opaque element of the request body. When I run the proxy I am getting something like *"The invocation resulted in an error: "* in response
    and in the stack trace I am getting *"Failed to set the value of context variable "body". Value must be an instance of {http://schemas.xmlsoap.org/soap/envelope/}Body."* as the fault
    reason I am unable to detect where exactly I am going wrong. Kindly help me in resolving this.
    Thanks,
    Phanindra.

    Not sure why you want to replace. Since the response of the proxy would remain to hold the request body by default.
    If you have stored the opaque element in a variable ($var_opaque), then you can do the following.
    XPath : .
    In variable : body
    Expression : $var_opaque
    Check - "Replace node content"

  • Using a variable in "arrayTerminatedBy" clause while using a file adapter

    Hi All,
    How can read a file of sample shown below using a file adapter.
    ABC|20081010|
    2008|xxxxxxx|
    2007|yyyy|
    2009|zzzzzzz|
    3|20081010|
    first line is the header
    last line is footer
    middle portion is the body
    '3' in the footer is the total no of record count in the body
    I am able to read the header and body.
    The problem i am facing is; when it is reading the footer it is treating the footer as a record in the body and is throwing an error stating - expected the format as "yyyy"
    I have to use "arrayTerminatedBy" to indicate the end of the body. But that terminating field is a varying field. How can i use this variable field in the "arrayTerminatedBy" clause.
    Can any one help in reading this file
    Thanks in advance
    Edited by: user10308218 on 11-Oct-2008 02:23
    Edited by: user10308218 on 11-Oct-2008 02:24

    See if this helps, I haven't tested it but it will give you a hint in how to achieve it. As you can see I use the startsWith command. I'm not sure how to handle your detail as it seems to start with different elements every time.
    cheers
    James
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
    targetNamespace="http://TargetNamespace.com/Write_File"
    xmlns:tns="http://TargetNamespace.com/Read_File"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified" nxsd:encoding="ASCII" nxsd:stream="chars" nxsd:version="NXSD">
    <xsd:element name="FileRecord">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Header" nxsd:startsWith="ABC|" maxOccurs="1">
    <xsd:complexType>
    <xsd:sequence nxsd:style="array" nxsd:arrayTerminatedBy="${eol}">
    <xsd:element name="FileDate" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;"/>
    <xsd:element name="Record" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:sequence nxsd:style="array" nxsd:arrayTerminatedBy="${eol}">
    <xsd:element name="DetailData1" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>
    <xsd:element name="DetailData2" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;"/>
    <xsd:element name="Footer" nxsd:startsWith="3|" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:sequence nxsd:style="array" nxsd:arrayTerminatedBy="${eol}">
    <xsd:element name="FooterData" type="xsd:int" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>

  • Receiver file adapter

    hi all,
    i'm using file adapter receiver and want to generate an fixed length text file. the name of the text file i want to generate it dynamically based on a field of the xml.
    the structure of xml:
    <mt_PO>
      <Header>
      </Header>
      <Detail>
      </Detail>
      <Filename>
        </name>
      </Filename>
    </mt_PO>
    For generate the name of the file i'm using variable substitution in this way:
    var1 ->  payload:mt_PO,1,filename,1,name,1
    and in the file name schema field: PO.%var1%.txt
    this it's correctly done.
    After, for generate the text file in the format i want i use content conversion:
    RecordSet structure:  Header,Detail,filename
    Name                                                Value
    Header.addHeaderLine                        0
    Header.fieldFixedLengths                    2,2,10,10,8,100
    Header.endSeparator                          'nl'
    Detail.fieldFixedLengths                      2,5,18,35,35,13,3,13,5,35,12,40,60,40,10
    Detail.endSeparator                            'nl'
    filename.fieldFixedLengths                  0
    filename.fixedLengthTooShortHandling  Cut
    The problem is that resulting text file is generated with an empty line to the end, and that is my problem. i don't know how to avoid generate that empty line.
    has anybody been in the same scenario and know how to solve this issue?
    Thanks.

    Hi,
    Ok No problem, let me give you the blog which contains all the steps,
    Dynamic Configuration of Some Communication Channel Parameters using Message Mapping
    Here you need to create one UDF in mapping and have to map it with target Message Type.
    Remove the filename from Target side structure.
    Thus at runtime it will take the value from Source side payload (Or you may pass any values in mapping )
    and that will be used in communication channel.
    The given blog have used HTTP as receiver communciation channel.
    For file adapter you need to fill-up below parameters with variable substitution.
    File Name Scheme : %Var1%
    Variable substitution -- enable
    >Var1----
    >message:message_id
    Adapter Specific Attributes
    Mark Filename & Use Adapter Specific attributes.
    PS Note : once you apply this UDF the mapping will give exception while testing from test tab. Let it be.
    This UDF will work on Runtime. Thus execute the scenario to see the results.
    Thanks
    Swarup

  • File Adapter - SP12

    Hi,
       We are in XI 30, SP12 and we were trying out passing the payload value as the file name.
    SAP help says that in the Variable Substitution, we should be giving as follows:
    Variable Name    FileName
    Reference  payload: Record,1,DT_HEADER,1,FILE_IDENTIFIER,1
    (Reference will show the XML path traversal till the least node to get the relevant value from the payload as per SAP help).
    In the filename Scheme we are mentioning the variable name <b>%FileName%</b>. But its not taking the value contained in the variable FileName which should hold the payload value. But its not happening.
    Anyone did some trial on the same pls throw some light on this issue..
    Thanks in advance
    Jayakrishnan

    To make the example if the online help run, you have to do following:
    File Access Parameters:
    -> File Name Scheme: %var1%.xml
    Processing Parameters
    -> File Construction Mode: Add Time Stamp
    Variable Substitution
    -> Enable: x
    Variable Name: var1
    Reference: payload:root,1,e1,1,e2,2
    Send this payload (use sender file adapter)
    <?xml version="1.0" encoding="UTF-8" ?>
    <root>
      <dummy>
         <e1>
            <e2>Data_1</e2>
            <f/>
            <g attr="abc">text</g>
            <e2>Data_2</e2>
         </e1>
      </dummy>
      <e1>
         <e2>illegal/value</e2>
         <f/>
         <g attr="abc">text</g>
         <e2 attr="fghij">Example Value</e2>
      </e1>
    </root>
    Result: Your file name looks like this:
    Example Value20050607-131921-414.xml
    =====================================================
    The example of Michal was ( _ omitted):
    payload:
    <?xml version="1.0"?>
    <OutputTag>
    <From>newfilename</From>
    </OutputTag>
    same config as above, besides:
    Reference: payload:OutputTag,1,From,1
    Result: newfilename20050607-133624-145.xml
    Hope this helps
    Stefan

  • File Adapter - special character in Filename

    Hi,
    i have a question concerning file adapter.
    Scenario: we are polling files via file sender adapter (FTP).
    Problem: if the filename contains a special character, an error is thrown with 'The System cannot find the file specified'
    Scope: Special character in filename (not in payload)
    Installed: XI 3.0 SP 19 on Linux
    Questions:
    - what FTP implementation does XI use?
    - What do i have to check/upgrade to unicode?
    - is it an OS problem or an Java problem or a XI problem?
    - or is it not possible copiing files with special characters in filename?
    Thank you very much in advance.
    Michael

    Hi Michael,
    The file/FTP adapter supports both passive and active FTP data connection. You can select the data connection while configuring the adapter.
    The file/FTP adapter follows specification RFC 959. The specification can be found on the Internet under  www.ietf.org/rfc/rfc0959.txt.
    For FAQs about the file/FTP adapter, see SAP Note 821267. Please note that you'll need an account to log in on service.sap.com.
    Question: How are you specifiying the file name? i.e. Are you using placeholders, like ?, *, *.txt, etc ?
    If there's a problem with the filenames, then it should be a problem in the JAVA implementation of the adapter I assume. So you could for instance build your own adapter extension to by-pass that problem.
    Just for your information; I haven't encounter a problem with filenames in other projects.
    Good luck!

  • Dynamic Filename in File adapter

    Hi,
    I am doing idoc-file scenario.I get the filename as a field in one of the segments of my idoc.Can anyone please let me know how i can get the filename from my idoc and use this filename in my file adapter.
    --Thanks

    Hi all,
    Thanks a lot for your replies.
    Please find below the inbound message that i get. Now i need to get the filename that i get in one of the segments and use that in the file adapter.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ZSSV_GENERIC_IDOC>
    - <IDOC BEGIN="1">
    - <EDI_DC40 SEGMENT="1">
        <TABNAM>EDI_DC40</TABNAM>
        <MANDT>100</MANDT>
        <DOCNUM>0000000000203015</DOCNUM>
        <DOCREL>620</DOCREL>
        <STATUS>30</STATUS>
        <DIRECT>1</DIRECT>
        <OUTMOD>2</OUTMOD>
        <IDOCTYP>ZSSV_GENERIC_IDOC</IDOCTYP>
        <MESTYP>ZSSV_GENERIC_MSG</MESTYP>
        <SNDPOR>SAPYRA</SNDPOR>
        <SNDPRT>LS</SNDPRT>
        <SNDPRN>YRACLNT100</SNDPRN>
        <RCVPOR>YXDTEST_GI</RCVPOR>
        <RCVPRT>LS</RCVPRT>
        <RCVPRN>IDES_LS1</RCVPRN>
        <CREDAT>20060420</CREDAT>
        <CRETIM>184948</CRETIM>
        <SERIAL>20060420184948</SERIAL>
        </EDI_DC40>
    - <Z1SSV_ITEMS_SUMMARY SEGMENT="1">
        <IDOC_SEQ_NUM>1</IDOC_SEQ_NUM>
        <TOTAL_REC_COUNT>50</TOTAL_REC_COUNT>
        <IDOC_SEG_COUNT>50</IDOC_SEG_COUNT>
        <OUTPUT_REC_LENGTH>90</OUTPUT_REC_LENGTH>
       <INTERFACE_DESCRIPTOR>OUT_RYDER_0001</INTERFACE_DESCRIPTOR>
      <b><HOST_FILENAME>TEST1</HOST_FILENAME></b>
      <RECORD_DELIMITER>^</RECORD_DELIMITER>
      <SEGMENT_DELIMITER>|</SEGMENT_DELIMITER>
      </Z1SSV_ITEMS_SUMMARY>
    In the file adapter, I have specified "%filename%.xml" as my file name and in variable substitution the reference is  "payload:ZSSV_GENERIC_IDOC,1,IDOC,1,EDI_DC40,1,Z1SSV_ITEMS_SUMMARY,1,HOST_FILENAME,1".
    I still get the same error "Message processing failed: Error during variable substitution: "
    Waiting for your help in this matter.
    Regards,

Maybe you are looking for

  • My computer will no longer emit sound of any kind, music, video, warning, or otherwise

    I'm not sure how it happened, I was trying to play something on itunes when everything froze up and the music stopped. But the problem is not limited to itunes, i can't hear any sound of any kind from my computer. I have checked and the speakers for

  • Tcode BP: creation of Business Partner

    Hello, Can we place a Maker and checker authorization on Tcode BP, while creating / editing Business Partner in SAP ? Requirement is like one user ID creates the business partner and other user ID check and approve, then only it should be available f

  • Want to create interactive pictures that the viewer can zoom and pan

    I want to make every image on this page zoomable on an ipad or iphone or whatever, within their current frame.  Found a bunch of useless information about slideshows, but no step by step instruction on how to accomplish this.  A moderator locked down

  • Trouble with form on a view

    Hi, I have trouble with the ROWID (ORA-01445) error when running the standard doQuery function on a button in a Form. Is it possible to use doQuery or do I have to write my own PL/SQL code, if so where can I find information on this (like the code fo

  • How to manually insert a jumper multisim

    hi i want to transfer my circuit to ultiboard but i need a jumper how do i add it on multisim my version does not support automatic insertion.