Reading Dynamic Files using File port

Hello All,
We have a requirement in our project where we have to use File Port to pick a set of IDOC Flat files from a given directory. The File Port only allows us to pick a file with a specific given name and does not allow us to pull file with a pattern for .eg. We  can pull a file abcd.txt but cannot pull something like abc.txt. Our requirement is to pull abc.txt using the File Port.
If anyone has any idea about this, or any past experience with File Port in this regard, then please respond at the earliest.
We have created the file port with follwoing parameters:
Unchecked the Unicode Format System Setting
For the Inbound File:
Function Module: EDI_PATH_CREATE_CLIENT_DOCNUM
Directory is: A valid directory path
File Name: abcd.txt
Thanks in advance.
Abinash

If the xml files are all in the same directory (not in any directory structure relative to the parent directory), you can do something like this.
- create a bpel process to read the zip files as it comes into the directory]
- Have a file adapter inbound for the receive
- Call windows .bat command within the bpel process to run an unzip command on that directory
- Have another bpel process that reads *.xml files and this will get kicked off.
There are so many ways of solving this: like having a cron job to unzip the files coming in etc. But, if you have a directory structure for these XML files and if the structure is dynamic, it is difficult to configure the file adapter for that.

Similar Messages

  • Is it possible to read the file using File Adapter which is in client machi

    Is it possible to read the file using file Adapter which is in client machine(on the same network).Then what is thee need of FTP Adapter?

    You can achieve that by exposing your client machine as a drive, then you can go using file adapter.
    FTP adapter will help you to communicate with different machine which is in different network.
    It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts).
    Thanks,
    Vijay

  • How to read pdf file using file adapter

    Hi..
        How to read pdf file using file adapter?
    regards
    Arun

    Hi
    This may help you
    /people/sap.user72/blog/2005/07/27/xi-generate-pdf-file-out-of-file-adapter
    /people/alessandro.guarneri/blog/2007/02/21/sap-xi-acting-as-a-huge-file-mover
    ---Ram

  • Reading Multiple lines in a file Using File Adapter

    Hi All,
    Iam new to this technology.How to read multiple lines in a file using file adapter.Brief me with the methodology.

    I didn't look at anything else but if you want to write more than one line ever to your file you should change this
    out = new FileOutputStream("Calculation.log");to this...
    out = new FileOutputStream("Calculation.log",true);A quick look at the API reveals the follow constructor FileOutputStream(File file, boolean append) append means should I add on the end of the file or over-write what is there.
    By default you over-write. So in our case we say true instead which says add on to what is there.
    At the end of that little snippet you shoudl be closing that stream as well.
    So where you have
    p.close();You should have
    p.close();
    out.close();

  • Reading .pdx file using File Adapter

    Hi,
    I have .pdx file in the input directory of my BPEL process .Also i have the DTD of the pdx file.Using file Adapter wizard i converted tht DTD to the XSD.Now when I run my BPEL process i am getting this error.
    Failed to translate file : {C:\OraBPELPM_1\integration\jdev\jdev\mywo
    rk\TestWs\readPDX\inputDr\agile_20070621_050222833.pdx}
    <2007-07-06 23:08:38,137> <INFO> <default.collaxa.cube.activation> <File Adapter
    ::Inbound> Sending message to Adapter Framework for rejection to user-configured
    rejection handlers : {
    file=C:\OraBPELPM_1\integration\jdev\jdev\mywork\TestWs\readPDX\inputDr\agile_2
    0070621_050222833.pdx, Exception=ORABPEL-11207
    IO Failure in translator.
    IO failure because the translator failed to SAX Parse InputStream .
    Check the error stack and fix the cause of the error. Contact oracle support if
    error is not fixable.
    <2007-07-06 23:08:38,138> <WARN> <default.collaxa.cube.activation> <AdapterFrame
    work::Inbound> [Read_ptt::Read(ProductDataeXchangePackage)] - onReject: The reso
    urce adapter 'File Adapter' requested handling of a malformed inbound message. H
    owever, the following bpel.xml activation property has not been defined: 'reject
    edMessageHandlers'. Please define it and redeploy the business process. Will use
    the default Rejection Directory file://C:\OraBPELPM_1\integration\orabpel\domai
    ns\default\archive\jca\readPDX\rejectedMessages for now.
    <2007-07-06 23:08:38,138> <WARN> <default.collaxa.cube.activation> <AdapterFrame
    work::Inbound> [Read_ptt::Read(ProductDataeXchangePackage)] - onReject: Sending
    invalid inbound message to Exception Handler:
    <2007-07-06 23:08:38,138> <INFO> <default.collaxa.cube.activation> <AdapterFrame
    work::Inbound> Handing rejected message to DEFAULT rejection handler: file://C:\
    OraBPELPM_1\integration\orabpel\domains\default\archive\jca\readPDX\rejectedMess
    ages since none of the configured rejection handlers [] succeeded.
    <2007-07-06 23:08:38,142> <INFO> <default.collaxa.cube.activation> <File Adapter
    ::Inbound> Deleting file : C:\OraBPELPM_1\integration\jdev\jdev\mywork\TestWs\re
    adPDX\inputDr\agile_20070621_050222833.pdx after processing.
    Can somebody help me to find how to rectify this?
    Thanks in Advance

    Hi Anirudh,
    Please have a look at the answers for ur questions:
    (1)Is it a .pdf file?
    its a .pdx file.This file is generated from Agile PLM side.It consists of DTD information and the actual xml.If i rename it to .xml then its working fine.But i would be getting this file in .pdx format
    (2)Its size?
    It can be 73 MB
    (3)Using a file adapter to pick the file?
    Yes
    (4)Picking from the local box or a remote one?
    For the time being i am picking it up from the local box.But going fwd it shld be from remote
    (5)Any firewall being used?
    No
    (6)Is the schema correct and confirming with right namespaces?
    Yes
    (7)BPEL version?
    10.1.2
    Thanks
    Cheers
    Anirudh Pucha

  • Reading encrypted file using file adapter...

    Is it possible to read and write encrypted file using file adapter or if the file adapter is capable to encryption and decryption?

    what is the soa version you are currently running?

  • "encoding = UTF-8" missing while writing XML file using file Adapter

    Hi,
    We are facing an unique problem writing xml file using file adapter. The file is coming without the encoding part in the header of xml. An excerpt of the file that is getting generated:
    <?xml version="1.0" ?>
    <customerSet>
    <user>
    <externalID>51017</externalID>
    <userInfo>
    <employeeID>51017</employeeID>
    <employeeType>Contractor</employeeType>
    <userName/>
    <firstName>Gail</firstName>
    <lastName>Mikasa</lastName>
    <email>[email protected]</email>
    <costCenter>8506</costCenter>
    <departmentCode/>
    <departmentName>1200 Corp IT Exec 8506</departmentName>
    <businessUnit>1200</businessUnit>
    <jobTitle>HR Analyst 4</jobTitle>
    <managerID>49541</managerID>
    <division>290</division>
    <companyName>HQ-Milpitas, US</companyName>
    <workphone>
    <number/>
    </workphone>
    <mobilePhone>
    <number/>
    </customerSet>
    </user>
    So if you see the header the "encoding=UTF-8" is missing after "version-1.0".
    Do we need to configure any properties in File Adapter?? Or is it the standard way of rendering by the adapter.
    Please advice.
    Thanks in advance!!!

    System.out.println(nodeList.item(0).getFirstChild().getNodeValue());

  • Pooling data from an XML file to another XML file using File Adapter

    Hi,
    I am trying to Pool data from an XML file to another XML file using File Adapter. I have added "Target Namespace" in both the XML and XSD.The problem is "At the destination given in the FileAdapter" only a blank XML file is created and it doesnot have any data.
    Kindly suggest me some methods
    Thanks in Advance.

    Ok here is a solution with external tables.
    SQL> CREATE DIRECTORY my_xml_dir AS 'E:\oracle\Log_files\UTL_AKIVATST'
    2 /
    Directory created.
    SQL> DROP TABLE my_xml_et
    2 /
    Table dropped.
    SQL> CREATE TABLE my_xml_et
    2 ( EMPNO NUMBER,
    3 EMPNAME VARCHAR2(10),
    4 JOB VARCHAR2(10),
    5 HIREDATE DATE,
    6 SAL NUMBER
    7 )
    8 ORGANIZATION EXTERNAL
    9 (
    10 TYPE ORACLE_LOADER
    11 DEFAULT DIRECTORY my_xml_dir
    12 ACCESS PARAMETERS
    13 (
    14 records delimited by "</EMP>"
    15 badfile my_xml_dir:'empxt%a_%p.bad'
    16 logfile my_xml_dir:'empxt%a_%p.log'
    17 FIELDS
    18 (
    19 filler char(2000) terminated by "<EMP>",
    20 EMPNO char(2000) enclosed by "<EMPNO>" and "</EMPNO>",
    21 EMPNAME char(2000) enclosed by "<ENAME>" and "</ENAME>",
    22 JOB char(2000) enclosed by "<JOB>" and "</JOB>",
    23 HIREDATE char(2000) enclosed by "<HIREDATE>" and "</HIREDATE>",
    24 SAL char(2000) enclosed by "<SAL>" and "</SAL>"
    25 )
    26 )
    27 LOCATION ('emp.xml')
    28 )
    29 PARALLEL
    30 REJECT LIMIT UNLIMITED
    31 /
    Table created.
    SQL> SELECT * FROM my_xml_et
    2 /
    EMPNO EMPNAME JOB HIREDATE SAL
    7369 SMITH CLERK 17-DEC-80 800
    7499 ALLEN SALESMAN 20-FEB-81 1600
    This is the XML file i used emp.xml
    <EMPLOYEES>
    <EMP>
    <EMPNO>7369</EMPNO>
    <ENAME>SMITH</ENAME>
    <JOB>CLERK</JOB>
    <HIREDATE>17-DEC-80</HIREDATE>
    <SAL>800</SAL>
    </EMP>
    <EMP>
    <EMPNO>7499</EMPNO>
    <ENAME>ALLEN</ENAME>
    <JOB>SALESMAN</JOB>
    <HIREDATE>20-FEB-81</HIREDATE>
    <SAL>1600</SAL>
    <COMM>300</COMM>
    </EMP>
    </EMPLOYEES>
    Use this external table to insert into your table.
    Thanks,
    Karthick.

  • Polling xml file using file adapter

    Hi,
    when i am polling xml file using file adapter, xml file received properly.
    After receiving activity i am using assign activity to copy values to another variables, here i am getting error the values are not updated.
    My xml comes with out namespace, when we put namespace then only values are updated.
    What i need to do to update values.
    Regards,
    eeswar.

    after configuring the file adapter, define the interface of the BPEL using "based on the WSDL " option and select the wsdl of the file adapter , see whether it helps...

  • Delete file using file adapter

    Hi,
    How can we delete a file using file adapter, I am using SOA 11g R3.
    Thanks
    Yatan

    thanks for reply,
    What I am trying to do is to only delete the file, is there some way where we can simply do a "delete", instead of first reading a file and then deleting it.
    Thanks
    Yatan

  • Appending XML data to a file using file adaptor

    Hi,
    I am trying to append data to a file using file adaptor in XML format. (Objective is to store data as XML message in the file). I understand it is possible to append data to an existing file by making appropriate changes in WSDL manually. However, my issue is every time the XML data is appended to a file even the XML header message is also getting appended. As a result the file data does not adhere to defined schema structure anymore.
    Is there a way to save XML data in a file in append mode ?
    Thanks, Riz

    I am having the same issue as well, which makes the output XML an invalid one. I have an XSD that has a hierarchy of elements. whenever I am wiriting the child elements the header message & the name space is also getting written. For example
    <?xml version="1.0" ?><Parent xmlns="http://testSchema.com/outputSchema">
    <StartDate>01/01/2001</StartDate>
    <EndDate>01/30/2001</EndDate>
    <Child/>
    </Parent>
    <?xml version="1.0" ?><Child xmlns:ns1="http://testSchema.com/outputSchema">
    <ns1:Id>20012981</ns1:Id>
    <ns1:Value/>
    <ns1:Date>01/15/2001</ns1:Date>
    </Child>
    <?xml version="1.0" ?><Child xmlns:ns1="http://testSchema.com/outputSchema">
    <ns1:Id>20012981</ns1:Id>
    <ns1:Value/>
    <ns1:Date>01/15/2001</ns1:Date>
    </Child>
    I am using a onefile adapter partnerlink to write the parent & an another one for writing the child element, since the child elements will repeat more than once. One other way to fix this issue is write the data using java embedded activity, but that would need a lot of boiler plate code, for writing/reading/appending the same file & for handling all those IOexceptions & buffer IN/outs. I am curious if someone had the same issue & how they resolved it.

  • List files using file adapter in 10G

    Hi',
    How can we list the files using File/FTP adapter in SOA 10G.
    My requirement is to get details like name of file and the timestamp.
    Please advice.
    Thanks
    Yatan

    Yatan,
    I used in the past a javaEmbedded activity which uses a shell script to list and get all the needed data from a directory.
    (I found it the easiest and faster way to do it)
    Arik

  • Creating PDF files using file adapter

    Hi,
    Is it possible to create a pdf file using, File/FTP adapter? If yes can someone please suggest how to do it.
    Thanks,
    Phani

    Hi Phani,
    I would say pdf files are binary files with a specialized format.
    You can move pdf files through BPEL or ESB (i.e. file/ftp -> file/ftp), or from file to database BLOB and database to file, by importing the schema as opaque.
    However I doubt that file adapter can create PDF files from a plain-text xml file, i.e. as PDFCreator would.
    In a sense a pdf file is much like a jpg, mp3, or zip file, it can be passed through bpel but not created.
    In other words if you have a base64Binary element in xml, that you know is the complete bytes to a pdf, jpg, or other file, you can write it out as a file using the File adapter.
    Thanks
    Steve

  • Export the Form Data to Excel File using FILE EXPORT

    One problem i am getting...
    I want to export printers page to some excel file using FILE > EXPORT option.
    I login into System Administrator Responsibility > printers > register...
    I want to export this printers data to flat file(EXCEL File) using FILE > EXPORT in the form...
    The movement I click FILE > EXPORT...a flash screen appears and disapperas...nothing will be exported...
    What Might be the problem...
    How can I solve this...
    My FND_LOBS_CTX index is fine..it is valid and

    - Check the security level of the "Trusted sites" zone, make sure it is set to "Low"
    - Make sure you do not have a yellow warning bar
    - Make sure you are not accessing the application through dev60cgi/f60cgi
    - Verify that you have sufficient space in the tablespace (Check init<SID>.ora for any errors)
    - Check the export on some other modules to determine whether the issue is across all Apps or with a specific module only

  • How to change read-directory when using file adapter

    Hi, I'm deploying BPEL process to read files from a directory. I want to change the directory where to read dynamically. This can be achieved by using a file header variable. I know how to do this. But, the problem for me is that I can not find a place to assign this file header variable a correct value. The first step in my BPEL process is the receive-step and this has to be the first step. I wanted to place the assign-step before this step but this makes the BPEL process invalid. First step has to be a receive or a pick-step. So, now I have a dilemma! Anyone an advice on this?
    Thanks in advance.

    Maybe you can use this information :
    http://otndnld.oracle.co.jp/document/products/as10g/1012/doc_v3/integrate.1012/B14448-01/html/app_trblshoot.htm
    A.3.3 Common User Errors explains something about the fileheader messages

Maybe you are looking for