FILE SENDER ADAPTER -  TO GET A DINAMIC FILE NAME IN THE DIRECTORY

Hi,
     Please help me.
     I have to read by a file sender adapter a specific file in the directory that its name is Dyyyymmdd, where yyyymmdd is variable according with the current day:
     D      - fixed letter
     yymmdd - year,month and day of the current day.
     I cant´t use D* in the File Name Scheme because I must read only the one file generated in the day.
     How can I configure my file sender adapter to read this especific file in the directory?
      Thanks in advance.
      Mider.

Hi Krishna,
    I must access only one file by time ( of the current day ), but in the directory I have a lot of them of different dates. I mean, in the of the read ( in the adapter configuration ) , I need to configure the name of the file Dyyyymmdd before of the reading in the directory, in other words, I need to construct the name of file (withe the current date) before the communication channel access the file to read it.
    I think that OS command just can be applicated in file receivers, but if possible, at your purpose, how can I access the name of this especific file via OS command for senders?
    Thanks,
         Mider.
Message was edited by: Midervilson  Andrade
Message was edited by: Midervilson  Andrade

Similar Messages

  • File Sender Adapter Skip first line in file

    Hello to all,
    I'm trying to read a file (nfs) using the file adapter.
    The szenario works fine, but I need to skip the first line in the txt file (header line)
    I tried parameter documentSkipFirstRows, without success.
    Any ideas?
    Regards Christian

    Hi Kaiser,
    May be the syntax problem.
    use like this...
    xml.documentSkipFirstRows     1
    Syntax is
    xml.documentSkipFirstRows=<noOfRows>
    for more info refer this link..
    http://saphelp.border-states.com/EN/0d/00453c91f37151e10000000a11402f/frameset.htm
    Verify this...
    Thanks.

  • Semantics File Sender Adapter to determine which files to retrieve

    Hallo,
    does anybody has experience with this semantic?
    Thanks in advance,
    Frank
    From the FAQ-List of file-adapter(Note 821267 , Question 27).
    Q: Which semantics does the File Sender Adapter apply to determine which files to retrieve from an FTP server?
    A: Up to and including SP13 the File Adapter will issue an NLST command (see RFC 959) with the configured source file name scheme as first parameter to the FTP server. It will try to retrieve any of the files returned by the FTP server in response to this command.
    Starting with SP14, the File Adapter will issue a LIST command with the configured source file name scheme as first parameter to the FTP server. If it is able to parse the returned result (which is the case for UNIX- and Windows-style directory listings), it will retrieve any of the returned files. If it cannot parse the result, it will fall back to the pre-SP14 implementation and use the NLST command as described above.

    Frank
    We are on SP12 and have had problems with this and specifically, the FTP server on Solaris, not being fully RFC959 compliant.
    We've had to get a different FTP Server as we were returned *.xml no file or folder found instead of 550 *.xml no file or folder found.
    This increased the polling to the server, and filled up the ftp logging file, which intern filled up the partition and crasehd the server.
    We got round this by installing http://www.proftpd.org/

  • How to ignore columns in CSV File with File Sender Adapter

    Hi,
    I have a CSV File that I need to load with XI. The File contains 10 columns but I only need the data from 3 columns, let's say column 1,4 and 7. Can I configure the XI File Sender Adapter in a way that it only loads the data for the required columns and ignores the rest?
    Thanks in advance.
    Alex

    Alex,
    Dont think so. Why not create Dummy fieldName for these columns you want to ignore.?
    Regards
    Bhavesh

  • Pick up a specific file with File Sender Adapter.

    Hi guys,
    I would like to know how I can pick a specific file in a file pool (folder)? I would like to choose this file by name, like FileA or FileB, etc.
    I’m asking this because I have an asynchronous file scenario (BPM) with a receiver adapter that put the File with a specific name (variable substitution) in a folder.
    And I would like to do something like this:
    In another asynchronous scenario (BPM), a File sender adapter picks up this specific file (using the name). The correlation is made trough an IDOC that XI receives before pick up the file, this IDOC has payload field with the name of file to be picked.
    Is it possible receives the IDOC, read the field with the name of the file to be picked and choose this specific file? In a Sender File Adapter how I can do something like variable substitution like receiver adapter does.
    Thanks in advance,
    Ricardo.

    Hi,
    <i>Is it possible receives the IDOC, read the field with the name of the file to be picked and choose this specific file? In a Sender File Adapter how I can do something like variable substitution like receiver adapter does.</i>
    No this is not possible. The only dynamic thing you can do is use wild card characters like *.
    So, maybe you can pick a file like . or AA. and so on...
    Regards,
    Bhavesh

  • Changing source file for file sender adapter in adapter module

    Hi guys!
    3rd party partner send us files, which are not acceptable by file adapter, so we need to implement (I suppose) adapter module in file sender adapter to correct the file format before it is taken by standard adapter. I have no experience in this development field. Could you give me:
    1, whether it is possible (changing file contents before it is taken by standard file sender adapter)
    2. any ideas, where to start with the development (pdf with info etc.)
    Thanx a lot!
    Olian

    <i>2. any ideas, where to start with the development (pdf with info etc.)</i>
    >>>>>
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/02706f11-0d01-0010-e5ae-ac25e74c4c81
    <i>1, whether it is possible (changing file contents before it is taken by standard file sender adapter)</i>
    >>
    yes you can achieve this in the logic in a module

  • 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

  • File Sender Adapter - Dinamic Source Directory and Filename

    Hi Experts,
    I have to receive in XI a file and depeding of some info, put it in diferent directories with diferent fieldnames.
    In receiver File Adapter we can set the directory and fieldname dinamically by ABAP-CLASS mapping, but not in Sender.
    I've read Michal's blog
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    and sap help
    http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/frameset.htm
    But, I can't find Adapter-Specific Message Attributes in my File Adapter...:-) I've checked SP version is SP16, where are my Adapter-Specific Message Attributes?
    How can I set Directory and Fieldname at runtime for Sender File Adapter?
    Please help...
    Thanks all in advance,
    Regards.
    Urtzi.

    Hi Nilesh,
    Your threath is not about my issue...
    Answering to other friends, what I want is not to write p.e.: '/server/dir/' in each File Sender Adapter Channel, and put it with any other way looking some 'customizing' or checking a condition.
    The problem is that frecuently in the Company changes servers and we have to enter to the Directory and change every Channel one by one...We would like to reduce the maintain of the Channels with a mapping, variable, customizing table...or something similar. Do I explain?
    I don't know if its possible but I had the hope...:-)
    Thanks all.
    Urtzi.

  • UDF to get the filename for File Sender Adapter

    Hi,
    I had an requirement to get the  the Filename and map to the  target payload.
    I had configured the File Sender Adapter settings in the ID
    This is the following UDF i got from SDN.
    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;
    But when iam using this UDF iam getting an error
    RuntimeException in Message-Mapping transformation: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._MM_ORDER_CRS_OB_SAP_PROXY_IB_ method Filename$[com.sap.aii.mappingtool.tf3.rt.Context@54e154e1]
    Please help me in correcting the error.
    Thanks
    Srinivas

    Hi Jayson,
    actually, in the interface mapping, it doesn't give exception.
    The DynamicConfiguration is a constant retrieved from the container object, so it will never be returned as null (given that the container object was instantiated).
    Just the retrieved value will be null (since it was not previously set), but no exception occurs.
    In the message mapping, the container object is never instantiated, and that's the reason for the NullPointerException.
    Regards,
    Henrique.

  • Is it possible get special file in file sender adapter?

    Hi every SDNer.
    I want to get special file. for example like PJ<today>_return.dat
    Well, to paraphrase Marx, One folder has too many files. but I want one file in that folder.
    The rule is simple. if today is 20/07/2007 then I get the file as "PJ20070720_return.dat".
    How can i configuration File Sender Adapter?

    Dont have an XI system in front of me, but if I recall correctly, your options are pretty limited. The list of parameters in Advanced Selection for Source File does not include a date Better selection parms with the receiver channels.
    As such you may have to resort to writing a script on the OS that will do the following every minute... (basically run it more frequently than your channel)
    - look in that directory through all the PJ* files containing date = 'today'
    - rename the file to REAL_PJ_..... (for example)
    In your channel, pick the file REAL* and archive accordingly so it's not picked again by your script.
    If you find alternatives via cchannel - publish your results.
    sincerely,
    --NM

  • Cant do a file get from external server using file sender adapter with ftp

    Hi all,
    Up until now our company has only used the file sender adapter with ftp protocol to get a file from our XI server for processing and input the file into an integration process
    I have a requirement to do an ftp file get from an external server
    From our XI development server I can ftp directly to the external server and view the required directory using the command window via a DOS prompt (FTP open ...).  So all firewall issues and communications are fine
    Unfortunately I cannot currently pull files from the external server using the XI file adapter with ftp protocol from the XI development server AWB017
    FTP Connection Parameters: External server name using port 21, Data Connection is Passive, No security, I supply a userid and password
    Processing Parameters: Processing Mode is Archive (I tried test but this did not work either)
    No messages appear in the RWB
    Is there something else that I need to set up in order for the external ftp get to work via the XI file adapter?
    Regards,
    Mike

    Thanks for your responses.
    I have found the error messages in the File Adapter Monitor
    Scenario 1
    When I prefix the source directory with a forward slash, eg <b>/Folder/Subfolder</b> the error message is as follows
    <b>EST: Error: Error connecting to ftp server 'ip address': FTPEx: /Folder/Subfolder: The system cannot find the path specified</b>
    Scenario 2
    When I DO NOT prefix the source directory with a forward slash, eg <b>Folder/Subfolder</b> a different error message is returned
    <b>Error: Retrieving file 'FILENAME.XML' failed unexpectedly: FTPEx: Folder/Subfolder: The system cannot find the path specified</b>
    At least in this scenario the adapter has been able to identify the file on the external FTP site but cannot retrieve it
    Questions
    I thought that the backslash prefix for the source directory was mandatory but I am receiving an error in each scenario
    I receive the same error message whether the Processing Mode is 'Archive' or 'Test'
    The logs on the external ftp server seem to indicate that I am simply connecting, sending username and password then quiting straight away. I am not issuing any commands that they can see
    I thought that being a Sender adapter it would inherently execute a Pull or Get command
    To recap, from our XI development server I can ftp directly to the external server and view the required directory using the command window via a DOS prompt (FTP open ...). So all firewall issues, communications, userid and password are fine
    Has anyone experienced these issues?
    Please advise on next course of action?
    Regards,
    Mike

  • File sender adapter:FILE to IDOC without BPM, can't see in SXMB_MONI.

    Hi all
    I have a FILE - XI - IDOC Async scenario without BPM.
    I configured FILE sender adapter and IDOC receiver adapter. I made a mapping to transfer file data to the structure of IDOC.
    Now when i am trying to load the file using command prompt, i cud see nothing in the monitoring. Whereas if i go to the communication channel monitoring of runtime workbench, i saw that CC is polling correctly and was reading the file also.
    And also wen i saw in the processed folder which i mentioned in the CC configuration for the ARCHIVE DIRECTORY, i saw that file got transferred to the folder also.
    I don't understand why i cant see anything in the monitoring.
    Could anybody help me to rectify the problem. Is there anything i m missing ?
    Regards
    Naina

    Rajesh/Amar
    TCode:: SXMB_ADM->Integration engine configuration->specific configuration->runtime
    Trace_Level = 3 then you can get all MONI PIPELINE Steps also
    I did this change but cudn't see anything in SXMB_MONI.
    This is how i have configured my process:
    http://wiki.sdn.sap.com/wiki/display/XI/FiletoMultipleIDOCSplittingwithoutBPM
    But instead of IDOC splitting i have simple FILE - XI -IDOC scenario.
    I have configured everything exaclty the same way it is mentioned here. But for me the process is not visible at all.
    I can't even see the first request message in the monitoring.
    This is the message i can see in the communication channel monitoring:
    2010-05-24 09:07:41 Success Channel CC_*: Entire file content converted to XML format
    2010-05-24 09:07:41 Warning Channel CC_*: Empty document found. Proceed without sending message
    2010-05-24 09:07:41 Success File "/xyz/ABC.txt" archived after processing
    Is there any problem with the file and that could be the reason it cant convert the file to the request message MT_REQUEST and thus am not able to see anything in monitoring.
    help me guys....this is a simple process and i m stuck...its frustrating
    Regards
    Naina

  • File sender adapter (FTP) - processing mode "Archive"

    Hello all
    We're polling files from an external FTP server. For this I created a scenario on XI according to this thread:
    When setting processing mode to "Archive" in the file sender adapter (ftp) it polls the file, stores it to the archive directory I specified and then tries to delete the file on the FTP server side. This returns me an error because we're not allowed to delete the retrieved files on the FTP server!
    Because of this error the file adapter stops further processing and does not poll all the other files.
    How can I disable this deletion mechanism while keeping processing mode to "Archive"?!?!?
    We do not want to use processing mode "Delete" or "Test" and we don't see other options to influence this behaviour.
    Thanks for any guideance on this one in advance!
    Kind regards,
    Renaud

    Hi Bhavesh
    Sorry for the late answer. Unfortunately I can't ask the application system to provide file names containing a timestamp within. The files are provided by an external partner and are retrieved by several others as well.
    In the meantime I managed to achieve this:
    In repository I created dummy data types, message types and message interfaces. No mapping programs and interface mappings!
    In configuration I created the necessary communication channels (1 ftp sender, 1 file receiver) and the required receiver and interface determinations as well as the sender and receiver agreements.
    The result of this is:
    I'm able to poll some specific files via ftp from remote host. The file names are file1.arj, file2.arj, file3.arj and file4.arj. All 4 files have the same SourceFileTimestamp (e.g. "20060727T053900Z").
    I'm able to store those 4 files 1:1 in a target directory with the same file names. Until here I did NOT need to follow this blog: <a href="/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14: The same filename from a sender to a receiver file adapter - SP14</a>.
    As of this blog it is possible to access adapter specific attributes and make them available in message mapping using user defined functions. This way I'm able to get the SourceFileTimestamp from the polled files and use it in a message mapping. This way I'm also able to use it in variable substitution on file receiver adapter (syntax = "payload:root,1,fileTS,1") in order to dynamically create a directory with this syntax: YYYYMMDD.
    So far so good... but the only remaining BIG problem now is, that as soon as the mapping is activated and assigned in the interface determination, the created files contain the XML payload instead of the original binary content. Where has it gone? How should the target message type look like so that it can carry over the original binary file content?
    BTW: isn't it possible to post screenshots? Would be much more easier to explain things... so sorry to anyone if I wasn't clear enough!
    TIA and best regards,
    Renaud

  • File Sender adapter - source file name - weird

    Hi all,
    We have a sender file adapter polling an ftp location. The Dynamic config has been enabled to get the source file name.
    The actual file name is - "hrmd.xml", but in the dynamic configuration node, in sxmb_moni, the fileName is shown as ./hrmd.xml.
    This does not occur with any other file sender adapter comm channels polling ftp locations.
    I guess this has something to do with the ftp server. Did anyone face this issue?

    the fileName is shown as ./hrmd.xml
    The file name surely cant have a / in it....such characters are not allowed.
    is there any way we can change the fileName message attribute once the file is picked up
    Create a UDF for Dynamic Configuration and change the name as per your requirement (in XI)....the source file may be having proper format for name and i assume that you have to change it for receiver file name

  • File Sender Adapter - Multiple Source Directory

    Hi all,
    I have the following file to IDoc Scenaraio:
    The source file might be in any of 3 directories in source system and so created file sender adapter as follows:
    File access parameters:
    Source Directory : Directory1
    File Name         : Filename*.XML
    Addiontal Directory:
    Directory2    Filename*.XML
    Directory3    Filename*.XML
    The porblem we are facing is the file adapter is picking the file from Directory1& 2 and not from Directory3.
    If the change Directory Order in adapter as follows:
    File access parameters:
    Source Directory : Directory3
    File Name         : Filename*.XML
    Addiontal Directory:
    Directory2    Filename*.XML
    Directory1    Filename*.XML
    ... then file from Directory 2 & 3 is getting processed and not from Directory1.
    Any thoughts on this will be greatly appreciated.
    Thanks
    Sarat.

    Why use BPM for this?
    Instead write an abap program to pick from any of 3 directories in source directory and place it in the shared XI folder and configure your file adapter pointing to XI shared folder...shecdule the abap report for every 5 min..
    Wanna know more /people/sravya.talanki2/blog/2005/08/23/sender-xi-ftp-adapter-with-regular-path-expression-150-abap
    Or write OS level scripts for doing same.

Maybe you are looking for