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

Similar Messages

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

  • How to configure Sender File Adapter to pick couples files in order !!

    Hi Folks,
    I am really looking for one requirement like, Sender file adapter has to pick multiple files by file name based with some time gap? Can we?
    I have got one BPM in this, I have tried with Process mode : Name and Date, with wait step on BPM, but no use. The way how PI behaving, if 40 files in file directory, it is picking all files in one shot. Start processing but not in order.
    The problem is on Receiver system side. The receiver system is SNC system, if old data receives later than earlier date data; we get data obsolete application error.
    Ex: If I receive 25th and 26th files, first I need to process 25th first on PI sends to SNC, I need to give some time gap and pick another file or even  PI picks and process 26th file, no problem but  I need to give some time gap to send SNC to this 26th date file?
    Please how guys, throw me your great ideas
    Thanks in advance!!
    Regards
    San

    @ Sandhya
    If there are 40 files , can you please specify how many types of files are ther like say first A type shud be picked then B type then C type and so on so forth ?
    LIke in my case I had only three types of files file1 and file 2 file 3
    and in the directory also only three  files will be placed at a time
    you need to have some logic to separate the type of files in  differnt folders and then  process them
    @ farooq yes . it will create problem if 40 files are kept at a time .
    Regards
    Ninad

  • Error when configuring Sender File Adapter (XI 7.0)

    Hi all,
    After i had configured my Sender File Adapter of Communication Channel 'CC_SEND_MATERIAL_FILE', an error message for this Communication Channel (in Runtime WorkBench/Component Monitoring/Adapter Engine/Communication Channel Monitoring) occurred as below:
    Error: com.sap.aii.af.ra.ms.api.DeliveryException: java.net.MalformedURLException: unknown protocol: dest
    I think that all configurations for this Sender File Adapter are correct. But i don't know where is protocol "dest" and how can i correct this protocol.
    Could anyone please help me to resolve this problem?
    Thanks for all in advance,
    Vinh Vo

    Hi Sarvesh,
    Yes, i have configured the source file with the path in the AL11. I think all an other configurations are also OK. But i don't know what is protocol 'dest'.
    Anybody can explain and help me, please!
    Vinh Vo

  • Errro when referring a Bean in Sender file adapter

    Hi
    I have created a sample code and deployed in  the server and when i refer that in the sender file adapter module processor using the naming format
    localejbs/sap.com/com.vas.mod/GetFileNameBean
    where
    com.vas.mod  is the EAR Project name
    GetFileNameBean is the  Bean name
    I am getting the erro in the XI Adaptor monitor as follows
    <b>- 2006-07-31 13:06:51 UTC: Error: NameNotFoundException: Path to object does not exist at com.vas.mod, the whole lookup name is localejbs/sap.com/com.vas.mod/GetFileName.</b>
    I checked theJNDI name in the server it is exactly the same.
    can some one help me on this please?
    vasagam R K

    Hi Vasagam,
    Please check these threads..
    They deal with ur question...
    NameNotFoundException during JNDI lookup for Deployable WebService Proxy
    Strange Lookup Error (SAP Resource Adapter)
    cheers,
    Prashanth
    P.S Please mark helpful answers

  • Configure Sender File adapter dynamically

    Hi,
    I need to configure the sender file adapter dynamically. Ex: I will be providing the src dir , file name etc dynamically. I think this is not possible using module because module gets executed after file is picked (in my case file dir and file names need to be determined dynamically). I even don't won't to use directory API for craeting my file sender comm channel. Is there any other way to achive this.
    Regards,
    Rakesh

    Hi Rakesh,
         what is the Operating system of the PI server? Could you please kindly explain what conditions determine filename and source directory? I do not think there is anyway you can determine src file and dir names dynamically in PI.
    Here is what you can try.
    PI server is on windows system u need batch file. If its on unix or Linux you need scripts. Now what you have to do is place all files in a directory. Here the script/batch file will run continuously in background. Once it gets files it will rename files based on file content or file name then move them in different directories as per your conditions. your interface must have multiple communication channels and sender agreement (with diffrent parties) which will pick up those files from these directories.
    The name of directories will be fixed in each channel.
    regards
    Anupam

  • Dynamic file Directory : Sender File Adapter

    Hi all
    In one of our interface development ,at  we require a dynamic Directory path at the sender file adapter ..
    ex :
    path = Root/A/B/C
    filename = test.txt
    now in Root Directory, Folder & subfolder  " A ( B ( C )))  are dynamic.
    Subfolder "C"  wil contain the source file..
    Will it possible...with Z module development..??
    Regards,
    Ashutosh

    hi,
    if you want your directory name dynamically from Payload, you can use the option variable substitustion;
    For example follow below procedure:
    1)in the Target directory name --> /%dir%
    2)go to advanced tab and check for the variable substitution option(enable),
    3)variable name:dir
       Reference:Payload:mt_filetest,1,name,1
    according to the given details in the communication channel your  payload should be like this
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:mt_filetest xmlns:ns0="urn://filetest">
       <name>madhav</name>
    </ns0:mt_filetest>
    now  directory is created with the name of madhav (Dynamically according to the payload directory name is created).
    Note: points if it is useful
    Thanks
    Madhav

  • File Adapter-Module configuration

    Hi All,
    I have the following requiremnt.
    "Duplicate files should not process"
    Following are the File Access Parameters.
    Source Directory: ABC (ex: contains aa1,aa2,aa3,aa4 files)
    Filename: *
    File name mask: aa*
    My doubt is if they place aa1 file again in ftp , i should not process.
    For this I'm thinking to write module configuration.
    Can any one suggests , whether this is the correct approach? If it is could u explain how to write this module and where to write this module and how to import in xI, do i need to pass any parameter name in module configuration.
    Regards,
    venu.

    Hi Venu,
    You can go with Module in the Sender File Adapter.
    First you need to check the file name and you need to store this file name in the Database.( you can use Java Database).
    If there is an entry in the database for that file, then reject the whole file as per the business requirement. So that you can avoid , overhead of Mapping. Because if there is an error set the flag in the message and check this flag in your Receiver Determination, if it is an error send into error directory.
    Another way is outside the XI, i.e using shell scripts.
    Regards,
    Moorthy

  • Sender File Adapter - Dynamic Filename?

    Dear All,
    I have a simple requirement to retrieve a file named "XXX_ddmmyy" from an FTP site. The FTP site administrator will place a new file everyday. The date is part of the filename.
    I can find a lot of information on how to set the Filename for a "Receiver File Adapter", but none about dynamically setting of the filename for a "Sender File Adapter".
    Can you help please?
    Kind Regards
    Farshad

    Hi,
    You have mentioned over here that the requirement is to get the file "XXX_ddmmyy" from an FTP site.
    Is that site strictly for keeping files related to your requirement only or lot of other files are also being placed???
    If its strictly related to your requirement then you can use the filename "*.extension" and set the processing mode as "delete" so that once the File Adapter picks the file it will be automatically deleted.
    But here disadvantage is that the file wont be no longer present in FTP site once it is picked by File adapter.
    Thanks,
    Lekshmi.

  • 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

  • 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

  • Required Changes in FCC Paramenters for Sender File Adapter.

    Hi
    I am Doing File-File Scenario.I am using FCC in the Sender File Adapter. I have defined the structure as below.
    My Source Structure
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_Source xmlns:ns0="http://city.net/filecopy">
       <Message>
          <Id>123</Id>
          <Head>
             <Id>123</Id>
             <Filename>test.xml</Filename>
          </Head>
          <Body>Helloworld</Body>
       </Message>
    </ns0:MT_Source_FILE>
    So for the above structure, I have defined the FCC Parameters as
    Document Name: MT_Source (Message Type)
    Document Namespace:http://city.net/filecopy(Namespace)
    Recordset Name: Message (root node)
    Recordset Structure: Message,1,Head,1
    Recordset Sequence: Ascending
    Recordsets per message:1
    Keyfield Type: string
    In the Table Rows I have defined
    Message.fieldFixedLengths: 3,10
    Message.fieldNames: Id, Body
    Message.fieldSeparator: ,
    Message.endSeparator: 'nl'
    Head.fieldFixedLengths: 3,8
    Head.fieldSeparator: ,
    Head.endSeparator: 'nl'
    Head.fieldNames: Id, Filename.
    My Input Text file
    123,Helloworld
    123,text.xml
    I am Getting Output as
    <?xml version="1.0" encoding="utf-8" ?>
    - <ns:MT_Source xmlns:ns="http://city.net/filecopy">
    - <Message>
    - <Message>
      <Id>123</Id>
      <Body>HelloWorld</Body>
      </Message>
    - <Head>
      <Id>123</Id>
      <Filename>test.xml</Filename>
      </Head>
      </Message>
      </ns:MT_Source>
    I should get Body field after Head Structure as in the Source Structure, So Please what changes do I need to do in the Parameters Specified above to get the desired Output.
    So How should I define the FCC Paramenters For Sender File Adapter ?
    Any Help Would be Appreciated.
    Regards,
    Varun

    Hi Everyone,
    I could Succeed to some extent.
    I have defined the parameters as follows
    Recordset Structure: Message,*,Head,1
    Key Field Name: KZ
    Key Field Type: integer
    In the table, I defined the Parameters as
    Message.fieldFixedLengths:1,3
    Message.fieldNames:KZ,Id
    Message.keyFieldValue:1
    Message.keyFieldInStructure:ignore
    Message.fieldSeparator:,
    Message.endSeparator:'nl'
    Head.fieldFixedLengths:1,3,8
    Head.fieldNames:KZ,Id,filename
    Head.keyFieldValue:2
    Head.keyFieldInStructure:ignore
    Head.fieldSeparator:,
    Head.endSeparator:'nl'
    Message.fieldFixedLengths:1,11
    Message.fieldNames:KZ,Body
    Message.keyFieldValue:3
    Message.keyFieldInStructure:ignore
    Message.fieldSeparator:,
    Message.endSeparator:'nl'
    My source text file
    1,123
    2,123,test.xml
    3,Hello World
    my output is
    <?xml version="1.0" encoding="utf-8" ?>
    - <ns:MT_Source xmlns:ns="http://city.net/FileCopy">
    - <Message>
    - <Message>
      <Id>123</Id>
      </Message>
    - <Head>
      <Id>123</Id>
      <Filename>test.xml</Filename>
      </Head>
      </Message>
      </ns:MT_Source>
    I got the output almost correct except I am not getting the value in the Body
    Any help would be appreciated.
    Please correct me If I am wrong.
    Regards,
    Varun
    Edited by: Varun on Sep 2, 2008 12:06 PM
    Edited by: Varun on Sep 2, 2008 12:15 PM

  • KeyFieldValue in Sender File Adapter Not Working

    Hi,
    I have a flat file like this...
    1Field1Field2Filed3.....
    2Field1Field2Field3....
    1Field1Field2Filed3.....
    2Field1Field2Field3.....
    1Field1Field2Filed3.....
    2Field1Field2Field3....
    My requirement is to pick only lines starting with '1'.
    I have configured the Sender File Adapter like this,
    Recordset Structure : SOURCE,*
    Key Field Name: KF
    Key Field Type : String(Case-Sensitive)
    File Content Conversion:
    SOURCE.fieldFixedLengths  1,5,5,5....
    SOURCE.fieldNames           KF,FIELD1,FIELD2....
    SOURCE.keyFieldValue      1
    After all this, still it picks up all the recored instead of records starting with '1'. Can any one solve this?
    Regards,
    Sreedhar

    If you feel module processor is bit tough you can use XSLT Mapping which is simple in sloving ur problem.
    Check this blog to do a sample example using module processor.
    /people/sap.user72/blog/2005/07/04/read-excel-instead-of-xml-through-fileadapter
    To implement the above check this link....
    https://websmp201.sap-ag.de/~sapdownload/011000358700003237612005E/HowToCreateAdapterModules.pdf
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e21106cc-0c01-0010-db95-dbfc0ffd83b3
    http://help.sap.com/saphelp_nw04/helpdata/en/8b/895e407aa4c44ce10000000a1550b0/content.htm
    /people/gowtham.kuchipudi2/blog/2006/01/13/stop-creation-of-an-empty-file-from-file-adapter-using-module

  • Sender File Adapter - Content Conversion

    HI Friends,
    I got a scenario where I need to convert the File to XML document through Sender file adapter..
    My file looks like below.
    BATCH1234........
    12DASER123142JMM
    237DSAFDLKC839890
    45SDFLASJ90011
    BATCH3455...
    132FGAR
    SD21352525
    BATCH998898...
    123145DSRTW
    12FSTS
    So there is a Header and Body for each record set..
    My XML Structure is as follows.
    <TimeStructure>
      <TimeRecord>
         <ControlRec>
             <Field1>BATCH </Field1>   
             <Field2> ...</Field2>
         </ControlRec>
         <DataRec>
             <F1> ...... </F1>
             <F2> ...... </F2>
         </DataRec>
      </TimeRecord>
      <TimeRecord>
         <ControlRec>
             <Field1> BATCH  </Field1>   
             <Field2> ADFAS  </Field2>
         </ControlRec>
         <DataRec>
             <F1> ...... </F1>
             <F2> ...... </F2>
         </DataRec>
       </TimeRecord>
    </TimeStructure>
    The blog <a href="/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem:///people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
    is somewhat relevant to my requirement.
    But the problem is I have the keyfield "BATCH" for my header file but don't have any <b>key field in the data record</b> of the input file.
    Please help me out how to mention the configuration parameters.
    Regards,
    Kumar

    Hi,
    If you don't have constant key value for your detail records, then you can not directly get the required xml.
    So in this case, you can read all the records in a common Row model, i.e each record will be considered as a one row with all the values, and then split this row with Substring or java functions in the mapping.
    Even you can do this in the Adapter module .
    If you have key value for each record to identify then you can try with content conversion.
    Regards,
    Moorthy

  • How to get the filename in mapping when using sender File adapter?

    hi Experts,
       I have scenario where XI reads the input file using Sender file adapter.
       The file name is configured in the communication channel.
       In my message mapping it is possible to read this file name?
    Thanks
    gopal

    Hi Gpoal,
    Use Dynamic Configuration - /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    Regards,
    Geetha

Maybe you are looking for

  • 4 sticks of memory 400 ddr

    i have 4 sticks of memory will only run at 333 ddr dual channel  i know guide said 2 stick will run at 400 and 4 stick will run at 333. is there any way i can get it to run at 400 dual channel? msi k8t neo2-f fx-55 2 seagate 160 g raid 0 khx3200ak2/1

  • Safari needs to click submit button twice when file uploading

    Hi all, I'm using Safari 4.0.5 and developing the html (no AJAX, but plain PHP posting) form with the file uploading on my local environment. I tested it fast and thick several times, then suddenly Safari stopped to upload the jpeg file, indicating l

  • I have lost my phone. how can i find it if im on an htc?

    I cannot locate my I phone. how do I make it signal out so I can hear it?

  • Card payments

    Dear experts, we have a process at our client place where the employees will be using purchase cards for procurement. Some times there will be po and LIV as well and some time they would just enter a regular vendor invoice. They wanted to follow the

  • Some avi files wont run in quicktime

    I've been having troubles running some divx/xvid files in quicktime, some say that i dont have the right codecs (then takes me to this site that has a listing of some codecs i've never heard of before and some that you have to pay for), also i found