Module processing inside Sender File Adapter

Hello,
I am trying to analyze whether I can create a specialized module inside Sender File Adapter. As of right now, the Sender File Adapter and Receiver as well, assume endSeparator character in the end of each record. For files that do not have this field, it is just on continuous string, I assumed I can create an
     adapter module
     call it BEFORE data in the file is being converted to XML format
     Insert 'nl' character (since the record length is fixed)
     Call regular adapter processing (converting to/from XML)
    However, creating any module inside Sender File Adapter, the payload of the main document is already in XML format. Is there anyway to avoid it?
   Thanks for your help,
         Dmitriy Mindich

It is not possible with the standard functionality.
So maintain the sender file adapter with no conversion, but in the module tab enter following modules:
1. Your module
2. The conversion module (*)
3. The standard module.
(*) for details look here:
Look here:
http://service.sap.com/nw-howtoguides
-> Exchange Infrastructure
-> How To Use the Content Conversion Module in JMS Adapter
Regards
Stefan

Similar Messages

  • OS command before file processing in Sender File adapter

    Hi there,
    I'm having troubles running a os command from the sender file (NFS) adapter.  The batch file which I try to run is not getting executed at all.
    When I manually run the same batch file from the command prompt then it works perfectly.
    The OS command looks like this from the adapter config:
    myserver\xi\interface\in\dothis.bat
    I have also try with this notation
    G:\myserver\xi\interface\in\dothis.bat
    Please give me some tips how can I solve this problem, is there any way how can I debug the OS command? When I look at the adapter monitonr no errors are showed.
    Thanks for any tips.
    Roberto

    Hi all,
    The problem is solved.
    Issue: File Receiver Channel does not execute the OS Command before message processing.
    Reason: XI always expects an input file (in my case the sender communication channel) on the source folder. If no input files are found then the rest of the adapter configuration is not executed at all.
    In our scenario the OS command is responsible for retrieving the input files from a FTP server the adapter. SO XI will never trigger the OS Command.
    Solution: Place a dummy input file on the source folder , the sender adapter will always read in this file and put it back on the same location.(e.g. using a condition in the receiver determination).
    Thanks,
    Roberto

  • Retrieving the file name in the adapter module in the sender file adapter

    hi,
    i need to retrieve the file name, in the adapter module. This module is placed in the sender file channel.
    After the file adapter has picked up the file from the file directory, the file is placed in the archived directory.Custom adapter mofule is place in the file shanel. i need to retrieve the file name of the file in the adapter module. Is it possible to retrieve the file name?
    Also is it possible to retrieve the archive directory path in module?
    Regards,
    Meenkashi

    Hi Meenakshi,
    I guess you are looking for this
    /people/daniel.graversen/blog/2006/10/05/dynamic-configuration-in-adapter-modules
    Regards
    Suraj

  • OutOfMemory error on large file processing in sender file adapter

    Hi Experts,
    I got file to IDOC scenario, sender side we are using remote adapter engine, files are processing fine when the size is below 5mb, if the file size is more than 5mb we are getting java.lang.OutOfMemoryError: java heap space. can anyone suggest me what parameter i need to change in order to process more than 5mb.

    Hi Praveen,
    Suggestion from SAP is not to process huge files at a time. Instead, you can make the into chunks and process.
    To increase the heap Memory:
    For Java heap-size and other memory requirements, Refer to the following OSS note for details:
    Note 723909 - Java VM settings for J2EE 6.40/7.0
    Also check out the OSS Note 862405 - XI Configuration Options for Lowering Memory Requirements
    There are oss notes available for the Java Heap size settings specific to the OS environment too.
    Thanks,

  • Operating System Command After File Processing in Sender File Adapter

    Hello guys,
    actually we have different interfaces, and the client to take all the files from only one directory, for example D:/DPI.
    Unitl now we had one adapter for every file with the content conversion, so we didn't have problems with that. Now we have the problem that we sould maintain an order processing files.
    We thougth that an idea could be to execute one file pointing to D:/DPI and at the Operating System Command put like: copy D:/DPI/file.txt D:/DPI/outbound/file.txt, so when file is executed, we move the next file to another directory where is pointing the adapter. Doing this we have an error on the adapter giving us the message: Could not process due to error: java.lang.NullPointerException
    We are using a Windows.
    There is anyway to do in our way, or there is a better solution to resolve this problem?
    Any other idea to do this?
    Many thanks in advance.
    Regards,
    Xavi.

    Helo Guys,
    maybe I haven't explained well.
    We have one directory with different files. We have one adapter for every file( we need for the content conversion ) using NFS and all the adapters are pointing to the same directory.
    The problem is that if we have files A.txt, B.txt and C.txt we need to process in an order.
    And the problem we see is that for every file we have one adapter, so for example if we process file A.txt with one adapter, when this part is finished, we want to process file B.txt with another adapter, and the same for the rest of the files.
    So the idea we had is to create another directories, and when A.txt has finished move file B.txt to another directory.
    However this way is not running, if we log on the PI machine and execute cmd, we can do a copy of one file from one directory to another, but when we put this sentence in the adapter in OS command if we see the adapter log we see an error executing the OS command, but we don't know what is the error, there is no more information.
    There is any way to do this or maybe we have to manage in a different way?
    Many thanks in advance.
    Regards,
    Xavi.

  • Sender File Adapter Bespoke Module Development

    I have been following the How To ... Create Modules for the J2EE Adapter Engine to create a bespoke module for the Sender File Adapter.
    Initially all the module does is write a message to the Augit Log. The module has been deployed to XI successfully. When I add the module to the sender file adapter the adapter is green in the adapter monitor but I get the following message in the message monitor ....
    "Attempt to process file failed with Path to object does not exist at com.kk.FileAdapter, the whole lookup name is localejbs/sap.com/com.kk.FileAdapter/WriteToLog."
    com.kk.FileAdapter is the package. All of the required files have been built as per the How To pdf.
    Does anyone have any ideas??

    Hi Satish,
    Thanks for the quick response.
    Using the fully qualified name I get the following error in the adapter monitor.
    "Last message processing started 18:32:11 2005-09-19, Error: Module Exception 'com.sap.aii.af.mp.processor.ModuleProcessorException' found, cause: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Path to object does not exist at BANKSenderFileAdapterEAP, the whole lookup name is localejbs/sap.com/BANKSenderFileAdapterEAP/WriteToLog."
    If is use the JNDI name I do not get an error in the Adapter Monitor but get the following error in the Message Monitor.
    "Attempt to process file failed with Path to object does not exist at BANKSenderFileAdapterEAP, the whole lookup name is localejbs/sap.com/BANKSenderFileAdapterEAP/WriteToLog."
    The rest of the message seems to be successful, only the run of the module.
    Any ideas??
    Many thanks
    Gary

  • Dynamic configuration required in sender file - Adapter Module

    Hi Everybody,
    I am developing an Adapter Module in the file adapter (sender) using Adapter Specific Message Attributes.
    I am using Dynamic configuration inside the Module Process method in the adapter module.
    We are getting an error saying Dynamic Configuration cannot be resolved.
    Can anybody tell me the package to be used.
    Thanks,
    Zabiulla

    You can access the dynamic configuration in adapter module like this:
    Message msg = (Message) inputModuleData.getPrincipalData();
    String fileName = msg.getMessageProperty("http://sap.com/xi/XI/System/File", "FileName");
    You do not need any addition library besides the adapter module API.
    Hope that helps
    Stefan

  • 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.

  • Sender File adapter to process each file with time gap

    Hi All,
    I have a sender file adapter which is picking 2 files in a folder. I want to delay the processing of each file by 5 minutes. For ex: PI should process the first file, then wait 5 minutes and the process the next etc.  Is this achievable ?
    Is there a way  to create 2 sender agreements if I create 2 separate comm channels for each file .
    I am using PI 7.0
    Edited by: Dev Noronha on Sep 17, 2010 8:48 AM

    Hi Sarvesh...
    U r correct ... but i am nt wrong.... Just joking...
    S u r correct in normal cases..
    But this interface also involves BPM too.....
    Dev didnt mention the whole prblm in clear....
    The prblm is as following..
    When he runs the CC at sender , if u have multiple files, then every file will initiate a BPM instance.
    And in turn every BPM instance is waiting fr a message from PROXY....
    The proxy messages coming from the ECC are not able to go fr exact BPM instance..
    Eg: 2 Proxy message gng fr 1 BPM instance...etc..
    FYI , no correlation on the messages....
    Babu

  • Sender File adapter and duplicate file processing

    If I set the sender file adapter to delete or archive and when a file gets picked up and processed, this file will not get deleted/archived unless it was successfully processed.  However, if it errors out during processing, the file remains but it's message will get persisted in the integration engine or adapter engine.  Since there's automatic retry, we have the potential for duplicate processing as in addition to the retry, the file is still continously polling for this file.  In other words, how do we stop this duplicate file processing?
    Thanks.

    Hi Bevan,
    However, if it errors out during processing, the file remains but it's message will get persisted in the integration engine or adapter engine.
    your file wont get deleted unless adapter engine sucesfull pickups. if does not picked up at adapter engine then is not stored in adapter engine . if it reached Intergation Server and failed their then file would be deleted.
    please let me know if you haveany questions
    please reward points
    Regards
    Sreeram.G.Reddy

  • XI Sender file adapter - How to process data and control files.

    Hello all,
       I have the following requirement to fulfill: I am using an FTP client (XI Sender file adapter) to retrieve data from an FTP site. To make sure I am not picking up a data file that is currently being written to, 2 files are actually present on the FTP site (for each data file):
    1. abc.ctrl (control file with no data in it. Indicates that the data file has been completely written).
    2. abc.dat (actual data file).
      I want the file/ftp connector in XI to retrieve the data file (abc.dat) only if the control file (abc.ctrl) is present. After the processing of the data file is finished, both files (.dat and .ctrl) should be deleted.
      Is there an elegant and robust way to accomplish this?
    Thanks for your help.

    Hi Yves,
    in my opinion there's no problem with files currently being written in combination with a polling file adapter because the final file name should be available only when the file is transferred completely. I'm using different file sender adapters very often and never had any problems. After picking up the files I move them to the corresponding archive folders mentioned in the adapters so that a second processing cannot occur.
    Regards
    Ralph

  • Sender File Adapter missing processing parameters

    Hi All,
    On my Dev box in ID for configurations of Sender File adapter I am able to see the following options:
    1)    Handling of Empty Files
    2) Archive Source Files with Errors
    But I am unable to see them on QA box.What could be the error.

    Hi All,
    I checked the metadata in IR in Dev and QA.
    They are different.
    In QA i dont see the " Handling of Empty Files"
    What could be the problem
    Thanks

  • Sender File Adapter with file conversion

    Hi guys,
    I’m using a Sender File adapter with file conversion. The message to be processed has a structure with fixed lengths and in your content are some values that needs to be ignored.
    An example:
    value1  <b>value2</b>  value3…
    I want to ignore <b>value 2</b> but I can’t find a parameter for that! Do I need to define dummy fields on my data type and ignore those fields during mapping? Or there is a specific parameter for that?
    Thanks in advance,
    Ricardo.

    hi,
    there always is another way:)
    you can import the whole line to one field
    and cut it inside the adapter module
    (then you can define start and stop of the substring that you need to use)
    but of course it's not standard even though it's quite easy to achieve in java
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Sender File Adapter FCC to Hierarchial MT Coversion

    Hi,
       I have MT with structure as follows
    Header               1..1
        F1          string  1..1
        F2          string  1..1
        SUB              1 to unbounded
           S11       string  1..1
           S12       string  1..1
    Can you anybody help me out how to convert the a CSV file to Convert the structure mentioned above using sender File Adapter FCC.
    Regards,
    Daniel.LA

    Hi,
    There is no suc h direct way to get the data from csv fiel with conversion.
    Either you can use JAVA Mapping for it or use the adapter module to read csv files.
    How to process CSV data with XI file adapter
    /people/sap.user72/blog/2005/01/06/how-to-process-csv-data-with-xi-file-adapter
    "JAVA MAPPING", an alternate way of reading a CSV file
    /people/rahul.nawale2/blog/2006/07/18/java-mapping-an-alternate-way-of-reading-a-csv-file
    There is one way that you could bypass IR (Integration Repository) for any type of files, see below link
    /people/william.li/blog/2006/09/08/how-to-send-any-data-even-binary-through-xi-without-using-the-integration-repository
    Making CSV File Lookup Possible In SAP XI !!!
    /people/sundararamaprasad.subbaraman/blog/2005/12/09/making-csv-file-lookup-possible-in-sap-xi
    This will help you
    Thanks
    Swarup

  • How to: Sender File Adapter to dinamically read all subfolders of a folder

    Here is the scenario:
    -Interface:  A file to file interface.
    -Objective: The idea is to move files from a file server to another file server.
    -Master Source Folder: ...\OUTPUT\
    -Master Destination Folder: .....\INPUT\
    Interface example
    -Source Folder: ...\OUTPUT\INTERFACE1
    -Destination Folder: .....\INPUT\INTERFACE1
    The idea is that the PI interface must read all the subfolders inside ..\OUTPUT\ and then move the files found to the corresponding folder in the target.
    What we want to achive is to be able to add a new source folder i.e ...\OUTPUT\INTERFACE2 without having to modify the sender File adapter.
    Actual status: Dynamic determination of the destination folder is already done, but source folders are statically defined in the sender file adapter.
    Can this be done? Perhaps using a Bean Module or something?
    Regards.
    Mariano Billinghurst.

    This is great! In the off chance anyone else is trying to do this, this is also useful if you have Papers and you want to switch to Mendeley. Papers keeps PDFs all organized by year and then author so the PDFs are all nested in subfolders. If you option-click the triangle next to the Papers folder, it will then show all the PDFs. Select All and then drag over the whole thing into Mendeley. I just imported my entire collection in under a minute. Glad I looked this up!

Maybe you are looking for