Read File identified by filename from File Adapter

Hi all,
is there any way to read a file (which is identified by a given name) by using the file adapter.
My scenario is the following:
Webservice -> PI -> File
I call PI via a Webservice. The webservice call contains the filename of the file that i'd like to receive as response. Is it possible to realize this scenario with PI - from my experience it is not possible. But i would appreciate if you have some alternative solutions for me.
BR,
Martin

Hi Martin,
you can't achieve required functionality by standard File adapter; you need to write adapter module to achieve it.
SAP says
If you are developing a module for the sender file/FTP adapter and want to access the file name, see SAP Note 819761
below is the link for Adapter module generation which might help.
http://help.sap.com/saphelp_nw04/helpdata/en/e9/61e1407e858031e10000000a1550b0/frameset.htm
Regards,
Karna...

Similar Messages

  • How can i access filename from file (sender)

    hi All,
    can anybody tell me
    how can i access filename from file (sender)?
    thank u
    swari

    See:
    "SAP NetWeaver XI: Variable Substitution with Adapter-Specific Message Attributes via DynamicConfigurationBean"
    SAP NetWeaver XI: Variable Substitution with Adapter-Specific Message Attributes via DynamicConfigurationBean
    "Accessing Adapter-Specific Attributes through User Defined Function"
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70c89607-e4d9-2910-7280-f6746e964516

  • I am tring to import files into Aperture, permanently, from files on  my desktop. Aperture will import them, but when I take those files away from the desktop they also then leave Aperture?    Help appreciated     thanks   joanlvh

    I am tring to import files into Aperture, permanently, from files on my desktop. Aperture will import them, but when I take those files away from the desktop they also then leave Aperture?    Help appreciated     thanks   joanlvh

    You can seelct to leace the files where they are, copy into Aperture or else put them someplace else on the HD.
    What is your setting?

  • Get filename from file sender adapter

    Hi Experts,
    I have a question regarding the file/ftp adapter (sender).
    I have a directory with xml and pdf files. for every xml file there is a pdf file with the same filename. for example:
    file1.xml
    file1.pdf
    file2.xml
    file2.pdf
    file3.xml
    file3.pdf
    Now I want to read the xml file with the file sender adapter. afterwards I want to read the related pdf file. for example: If I read the file file1.xml afterwards I want to read the pdf file file1.pdf with the file sender adapter. For this it is nessessary to get the filename from the xml file so that I can read afterwards the pdf file. How can I realise it?
    Thanks and best regards
    Christopher

    Hi srinivas,
    thanks for your quick answer.
    That the file adapter is not able to read pdf files is clear to me. In this case I only want to transport the pdf. that works fine. I tested it.
    the problem is the following:
    I have a xml file with the name "file1.xml". I read the xml file with the sender file/ftp adapter configured with filename "*.xml". Then I want to import the pdf file with the name "file1.pdf". Therefor I need the filename from the xml file.do you know what I mean? So XI has to know the filename of the xml to import the pdf with the same name ...
    regards

  • Get File Name in UDF from file adapter sender

    Hi,
    I've looking for this solution, but I couldn't find any usefull information.
    I want to obtain the name of the file, sended by the file adapter.. and later use it in the mapping logic.
    I've readed about sustitution... any help?
    Thanks.

    HI Stortoni,
    Take a look at these blogs:
    http://wiki.sdn.sap.com/wiki/display/XI/CombiningthreedifferentaspectsofPIinoneshot
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    /people/sap.user72/blog/2005/07/15/copy-a-file-with-same-filename-using-xi
    Regards,
    ---Satish

  • How to get FILENAME from FILE PATH

    does anyone know how to get filename from a file path for example
    FILE PATH: C:\Project\uploadbean\web\uploads\Button.txt
    returns
    FILENAME: Button.txt

    @BalusC
    ust for a reference cause i'm new in JSP This has nothing to do with JSP, but with basic knowledge of an essential API. I have given you the link to the File API. Are you saying that you refused to read the API documentation, which clearly explains you how to use the File and shows which methods are all available to you undereach the straightforward getName() method, and expecting that the others may chew the answers for you? Loser.

  • Writing timestamp on the content of file (not the filename) using FTP Adapt

    Hi Experts,
    Is it possible to write a timestamp (from the source server) to a target logfile if I'll use FTP Adapter?
    Here the scenario:
    Source:
    source.log -> the contents is AAAA (the timestamp base from the server is [06/09/10 10:00])
    - basically the source.log file is overwritten with the same content but the timestamp is changed so that's would be scenario
    it will checked by the FTP adapter....
    Target:
    target.log -> the content of the file is 06/09/10 10:00
    so probably if i have a target logfile I'll just have to append the file as this
    06/09/10 10:00
    06/09/10 10:02
    06/09/10 10:04
    06/09/10 10:06
    06/09/10 10:08
    06/09/10 10:10
    If it's possible, how will I do this? Do I need script? or just normal settings of the FTP adapter?
    R-jay

    Yes, is posibble. if i not wrong, you can do this ussing Dynamic configuration.
    see those links
    /people/ryan.crosby/blog/2009/02/27/file-xi-proxy-scenario--moving-binary-files-with-accompanying-filename-attribute-in-converted-xstring-format
    http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/frameset.htm
    Thanks
    RP

  • How to read data in binary form from file?

    Hi,
    i try to write an implementation of LZW. I need to read data in binary form from a file. How can i do that? I cannot find something like "binary input stream" ...
    Thanks

    Hi,
    i try to write an implementation of LZW. I need to
    read data in binary form from a file. How can i do
    that? I cannot find something like "binary input
    stream" ...
    ThanksInputStream reads bytes. I don't understand your question.

  • What is the b2b setup for identifying TP names from file name in Inbound tx

    Hi,
    I am using B2B 11g version and documents of type ANSI-X12. I am working for Inbound Transaction and using Generic File protocol in Listening channel.
    File format is : %FROM_PARTY%_%TO_PARTY%_%DOCTYPE_NAME%_%DOCTYPE_REVISION%.dat
    How can i make B2B to identify Trading partner names from the file name once the remote trading partner put the file in the specified path with the specified format "%FROM_PARTY%_%TO_PARTY%_%DOCTYPE_NAME%_%DOCTYPE_REVISION%.dat" mentioned in the delivery channel.
    Now B2B is identifying Trading partner names from the Interchange Sender ID(ISA06) and Interchange Reciever ID(ISA08) of the ISA Segment. Please help me , how to make B2B to identify the trading partner names from the file name instead of from identifiers coming in ISA Segment.
    Thanks,
    Sridhar Rachumallu

    Hi Anuj,
    1)Now i am giving the file name for inbound documents in the format of "%FROM_PARTY%_<UniqueNumber/Timestamp>.dat" . But still B2B Identifying the TPNames at runtime from the ISA Segment elements ISA06 & ISA08 element values. I want to make B2B to identify the TPNames at run time from the file name instead of from ISA Segments.
    Please tell me how can i do these?
    2) I am giving exact Remote Trading partner Default Identifier Type 'NAME' value for "%FROM_PARTY% in the file format and i want B2B to identify the TP name at runtime based on the value of "%FROM_PARTY%" . If the value of "%FROM_PARTY%"is matching with any one of the Trading partner Default Identifier Type 'NAME' value than it should go for furthur else B2B should through error as " the TP name unable to found".
    3) Please tell me how B2B Identify trading partners at runtime in the business case given below
    - Inbound Transaction from remote TP to Host TP
    - Document protocol is 'ANSI-X12'
    - Listening channel protocol is 'Generic File'
    This is very urgent.. Please give the reply As soon as possible.
    Thanks,
    Sridhar.rachumallu
    Edited by: [email protected] on Jun 9, 2010 12:45 AM
    Edited by: [email protected] on Jun 9, 2010 1:01 AM

  • Reading non-standard variable types from file

    Hi,
    I'm currently on a programming course, and I need some help with an excercise.
    The excercise is about adding save, load and undo features to an Infocom style text adventure. The save file must contain three variables: The location of the player (Area), the items the player had (ArrayList<Item>) and the number of passed turns (int.)
    Is it possible to write to & read from file with these type of variables? Or do I have to convert them to Area to String (saving) and from String to Area (loading)?
    Thanks for the help in advance.

    You should probably take a look at Java Serialization (google on that)
    Kaj

  • Reading an integer size element from file

    Hello, I need some help for reading an integer size element from a file. In C++ there is the function fread with the following signature size_t fread(void ptr, size_t size, size_t nitems, FILE stream); where size is the size of one of the elements. Using this function in c++, you can read an integer by setting size = sizeof(int). I need this function because I am writing in a file a lot of integers and characters without any separator and I need to take the first element which is always an integer. Here is an example:
    I have: int x = 234; String y = "12ABC". I write those two elements in an output file. Now, when reading from that file the content of the file is: 23412ABC and I need to take the two elements x and y.
    Can anyone help ?

    I see what you mean but the problem is a bit more complicated, maybe I did not explain well. I need to copy data in a text file and retrieve them. Most data that will be written in the file are stored in an char array. those data may contain digits, letters, special characters... depending on their ASCII code. But before writting that char array, I need to write an integer corresponding to a specific index and I have no way of predicting the number of digits of that integer. So for example, my char array contains the following data: {'1','2','3','a','b','c'} and my int equals 10000. Using FileWriter I write the int and then the char array using the method myfile.write with its arguments. Next step, I want now to read from myfile.txt the data that I wrote in the first step. I start reading the int then using myfile.read(mychararray, 0, 6) /*6 being the size of the bloc to be read*/ I read the remaining characters and store each char in a cell of mychararray. The problem with this, is that using the method .read I can not read the first integer since I don't know its size: it may contain 1, 2 or even more digits.
    I know that storing everything in bytes would make my task easier, but I necessarily need to store an array of characters and then use .read method to store the content of the file (after having read the int of course) in a char array. Last clarification, the step of writing int then char array is reproduced n times before calling myfile.close();
    I hope it is clearer than before. Any suggestion for this problem would be welcome.

  • File Adapetr: File is not picking from File directory

    Hello,
    Issue: we are facing issue with file sender adapter like file is not picking from source file directory.
    Scenario: FTP1>PI>FTP2
    1. SAP PI sender communication channel will pick the file from FTP1 and process to PI file server (NFS)
    2. from PI file server (NFS), file will process again to FTP2
    So while picking the file, it shows following error:
    Could not process due to error: java.lang.IllegalStateException: Error during RETR epilogue: com.sap.aii.adapter.file.ftp.FTPEx: 451 Transfer aborted. Broken pipe
    Conversion of file content to XML failed at position 0: sun.io.MalformedInputException
    Processing started
    this issue occur after we migrate the PI server from hpunix to aixunix.
    Best Regards,SARAN

    Hi,
    check the FCC parameters, fieldfixedlength option would be used when the exact length of field is constant in the Sender, In the FCC the fieldfixedlength parameter carries the length of the each.
    Check out Michal's blog on content conversion for all your doubts :The specified item was not found.
    Kindly check the below links for further assistance.
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/frameset.htm
    regards,
    ganesh.

  • Itunes seems to be unable to locate original file to play songs. Songs are in the itunes media file and playable direct from file. Preferences/advance file location is correct. Some files are playing and others aren't with no obvious pattern.

    Itunes is unable to locate original file when attempting to play music. Songs are in the itunes media file and playable direct from there. Preferences/Advanced file location pointer is correct. Some songs play but most don't. I did move files around a bit in an attempt to share music with another account on same computor, however this did not work so have returned file to original location. Please help, I am way outside my feild in this one. Ta.

    I have solved the problem. i think when I moved the media file back out of public to my account, I put it back into the wrong place and ended up with a media file inside a media file, inside another media file!! So I moved it again and fixed!! Now I just need to work out why i can't share with another account user of same computor.

  • XSLT mapping to retrieve FileName from FILE SENDER adapter

    Hi
    I have an File Sender adapter scenario where I have switched on Adapter-specific message attributes (FileName).
    In my XSLT mapping program I need to RETRIEVE the filename and map it. Can anyone help please?
    Thx in advance

    Hi Bohamo
    Refer the following link.It provides the required solution for you.
    http://help.sap.com/saphelp_nwpi71/helpdata/EN/83/2200cb50d345c793336d9a1683163e/frameset.htm
    Thanks
    Ram

  • How to populate DB column with filename from file browse item?

    Hi,
    Using APEX 3.1.2, I'm trying to easily allow maintenance of a filename stored in a DB column (VARCHAR2(1000)). Using the column as a file browse item seemed to be the way to go, but of course I don't want the resulting file to be uploaded and it appears as though an existing filename is not shown in a form when the row is retrieved.
    After much searching, I found Checking filename length in File Browse item before uploading , but I'm not able to connect the dots. I was thinking that I could create a hidden file browse item and use a button to call Javascript function to activate it, then save the resulting filename to my DB column item and wipe out the hidden item before it was uploaded. But the hidden item doesn't appear, so I'm not able to reference it's form input name.
    Hopefully this mess makes sense. Anyone?
    Thanks!
    Rich
    Edited by: socpres on Sep 5, 2008 2:02 PM because message was truncated after attempting to preview it first.

    Hi John,
    From what I can tell, the path of a local file browsed from a file browse item cannot be retrieved because of security concerns. Although, it seems that while Firefox 3 only returns the filename sans directory, IE6 returns the full path:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
    <head><title>Form Test</title>
    </head><body>
    <script type="text/javascript" language="JavaScript">
    function GetDirectory()
    strFile = document.FileForm.filename.value;
    intPos = strFile.lastIndexOf("\\");
    strDirectory = strFile.substring(0, intPos);
    alert(strDirectory);
    document.FileForm.Directory.value = strDirectory;
    </script>
    <form id="FileForm" name="FileForm">
    <input type="file" id="filename" name="filename" value="" onChange="GetDirectory(this.value)">
    <input type="hidden" id="Directory" name="Directory" value="">
    </form>
    </body>
    </html>
    This Win-specific code displays the path via IE6, but not in Firefox 3. Then again, I can't seem to preview posts here using FF3, either...
    Rich

Maybe you are looking for

  • Data conversion for new sob

    Dear Viewers on 11.5.10 We are creating a new SOB with a change in currency from Feb-11 as this is the requirement For the same, we need to do data conversion. I have a confusion for Purchase Orders and Sales Orders Purchase Orders: Open purchase ord

  • Problems in Domain Creation of Weblogic Integration 8.1

    Hi, I am trying to create a domain in WLI 8.1 on Solaris machine. I am creating the domain by running the script config.sh in bea/weblogic81/common/bin directory. But it is creating the domain with default two conection Pools both pointing to PointBa

  • Doubt in Variable substitution

    Hi experts, Can i use variable substitution for taking a part of the input filename. My output filename contain only a part of the input filename. Regards, Divia

  • Throwing error message in BEx variable

    HI, I am using one of the variables in the user exit in cmod. in step1 & step2 I determine some values to be poplated in the variables. What is the ABAP command if say I want to show an error message on the variable screen? For Example, if I want to

  • How can I get the sign in to icloud message to stop popping up constantly?

    The message box to "sign in to iCloud" is popping up constantly. How do I get it to stop?