Name of processed file in a module processor in XI 3.0

Hello,
I've got the scenario : Flat file -> XI -> IDOC.
I have configured the parameter "source file name" with "*.xml" in the file adapter.
Now i try to capture in a moule processor the name of the file which is processed (for exemple : 123456.xml) and for that i try to use the "LookupManager" class and the "InboudRuntimeLookup" class for having the current channel and after i use the method : String res = (String) MyChannel.getValueAsString("file.sourceFileName") and in the two cases the result is "*.xml" so the configuration parameter... I don't understand how to get the current name of the file !
I have do that in xi2.0 with a dispatcher and i know that it's possible to use this dispatcher with XI3.0 but i don't want to do that because after XI 3.0 the usage of a dispatcher is not permitted !
So if anybody has an idea for doing that in XI3.0...
Regards
Vincent

Did you take a look at this article? :
Migrating Dispatcher Classes of the J2SE Plain Adapter Engine
http://help.sap.com/saphelp_nw04/helpdata/en/57/0b2c4142aef623e10000000a155106/content.htm
Regards,
Michal Krawczyk

Similar Messages

  • File Adapter Module - Change name of Generated File

    Hello all,
    My customer has XI v3.0 SP9. For the moment an upgrade is not envisaged.
    Since SP14 it is possible to dynamically change filename generated with receiver File adapter. This is done with a manipulation during mapping and a configuration in adapter.
    As I am in SP9, is there another solution, by example using a module processor ?
    My XML :
    <root>
        <lineFile>....</lineFile>   
        <lineFile>....</lineFile>
        <lineFile>....</lineFile>
        <filename>
    </root>
    Thanks a lot,
    J.C.

    Hi,
    AFAIK - as far as I know
    >>>>(Too much tests to do on other processes)
    it's good this way the customer will learn the need for test tools
    like mercury loadrunner - you can store all the tests inside
    and when an upgreade comes just execute them...
    customers always learn the hard way
    Regards,
    michal

  • Module processor enhancement with file content conversion

    Hi All,
      I have a bean (module processor) that converts the a PDF doc to text. I need to use the same bean with file content conversion. Module processor processing sequence is as follows:
    1) My Bean: localejbs/myBean
    2) Default: localejbs/CallSapAdapter (Bean for file content conversion).
    When I tried the same (myBean + File adapter with file content conversion) , it was not working as expected. But the same bean works fine with normal file adapter (myBean + File adapter without file content conversion).
    Couldn't figure out the reason. Please help.
    Regards,
    Ajay.

    As the content conversion of the file adapter is done before calling the customer module, it is not possible to use both.
    As workaround you can do the file content conversion with help of the MessageTransformBean. In the module chain you put the MessageTransformBean after your module.
    Note that the configuration of the MessageTransformBean has to be done like the J2SE sender file adapter:
    http://help.sap.com/saphelp_nw04/helpdata/en/0d/00453c91f37151e10000000a11402f/frameset.htm
    You find an example here:
    https://websmp206.sap-ag.de/~sapdownload/011000358700001186732005E/HowToConveModuleJMS.pdf
    Regards
    Stefan

  • Batch processing: save processed file with same name to different location without moving the original

    Hi, I would like to denoise Voice Over files with help of Auditions Batch Process. However, I have to save the files with the same name as the original, so that I can simply relink them in Premiere. Since I do want to keep the originals, I would like to save the processed files to a different location.
    Unfortunately, Batch Processor adds " Copy" to the processed files and moves the originals along with the processed files to the new folder (causing Premiere to loose the original files).
    Can I achieve my goal with Batch Processor, and how would I have to configure it?
    Kind regards,
    Andreas

    Which version of Audition are you using? The latest ones allow you to specify where the batched files are saved and also if any Prefix or Postfix are added to the file name. These are all under Export Settings in the Batch Process pane. However you must have the Export box ticked to give you access to the settings.

  • Function Module that gives the names of the file in the Application Server.

    Hi Experts,
       Please give me a Function Module that gives the names of the file in the Application Server.
    Thanks,
    Debi.

    Hi,
    see these links
    http://help.sap.com/saphelp_nw04/helpdata/en/2a/fa02b7493111d182b70000e829fbfe/content.htm
    http://abaplovers.blogspot.com/2008/05/function-module-sap-logged-in-users-to.html
    http://www.saptechies.com/abap-function-modules/
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/function-module-to-get-data-and-time-of-file-576751
    thanks
    karthik

  • Module processor usage in File ADapter

    Hi all,
    I have a scenario  Idoc->Xi->File to be in Xi 3.0.
    There is already an XI 2.0 system up and running wherin they have used dispatcher classes for the File Adapter Configuration.They have used the Transform Class "com.sap.aii.messaging.adapter.XSLTConversion" and have added the particular XSLT mapping Program in "namespace1.XSLTService.XSLTConversion.XSLTFileName=
    convert.xsl".
    When I want to configure these in XI 3.0 as a Receiver File Adapter, documentation says that we need to specify these in Module Processor as a sevice. For this the precursor is that we need to deploy the Java Classes in SDM.
    But my question is whether we have to include the XSLT coding too in the Archive and Deply it in the SDM? Is it not that its required only for the Java Classes to be Deployed using SDM or else the XSLT Codings too in a JAR File?

    Hi Stefan,
    Thanks a lot for your reply.
    I already tried this way by storing the file in the File system of the server.
    But for example,the XSLT file is this path of the Server,
    F:\usr\sap\D49\SYS\global\tech_adapter\xslt\DR11_adapter_exit.xsl
    Then, what exactly should be the path specification in the XSLT Sevice filename....Now its exactly as I have mentioned above and the file is stored physically over there....
    The error log was like this,
    2005-02-16 11:54:37 Success output 1108572877484 The message was successfully received by the messaging system. Profile: XI URL: http://cmis147:50000/MessagingSystem/receive/AFW/XI
    2005-02-16 11:54:37 Success output 1108572877484 Using connection AFW. Trying to put the message into the receive queue.
    2005-02-16 11:54:37 Success SAPEngine_Application_Thread[impl:3]_0 1108572877500 The message was successfully retrieved from the receive queue.
    2005-02-16 11:54:39 Success SAPEngine_Application_Thread[impl:3]_0 1108572879093 The message status set to DLNG.
    2005-02-16 11:54:39 Success SAPEngine_Application_Thread[impl:3]_0 1108572879109 Delivering to channel: FILE_DR11_Outbound
    2005-02-16 11:54:39 Error SAPEngine_Application_Thread[impl:3]_0 1108572879125 Exception caught by adapter framework: failed to configure the transformation object
    2005-02-16 11:54:39 Error SAPEngine_Application_Thread[impl:3]_0 1108572879125 Delivery of the message to the application using connection AFW failed, due to: failed to configure the transformation object.
    2005-02-16 11:54:39 Success SAPEngine_Application_Thread[impl:3]_0 1108572879125 The asynchronous message was successfully scheduled to be delivered at Wed Feb 16 11:59:39 EST 2005.
    2005-02-16 11:54:39 Success SAPEngine_Application_Thread[impl:3]_0 1108572879140 The message status set to WAIT.
    But when I see the monitoring for the AdapterFramework it says its ok.
    So I thought the path is probably invalid.
    Your opinions please...
    Thanks in Advance,
    Romit.

  • File adapter issue - files not processed (file name mask is *)

    Hi guys!
    I have a problem I never faced before. My file adapter doesn't process files in the source directory. When I put there exact file's name, it is processed. But when I use * , nothing happen. This is very strange. I was wondering, if problem can't be in that my PI box is UNIX and it's accessing Win filesystem.
    Any ideas, what to try?
    Thank you!
    Olian

    Yes, but I meant the one directory we're working in. We can write, delete there, so we should be able also use wildcards,  don't we?
    However, I tried it on a directory with 777 attributes. There is a file named clooo.ttt. When I run del .ttt I get Requested action not taken, file unavailable. The same for clooo. , clooo*,...  But when I type del clooo.ttt, the file is deleted...
    Any suggestions?
    Olian

  • File name generated when saving a process file

    When I choose to save a file (save as for instance) I get an odd
    looking default file name with a ~ in it such as; ne6e29~1.l4p. Why?

    Leo,
    I agree, that is an odd file name. I am not sure where the "~" is coming from. I am using Lookout 5.1 on a Windows XP machine. If I open a new process and use the default process name "Process1", the same name is appears in the "File name:" field of the "Save Process File As..." window when I navigate to File >> Save As. Even if I choose another name for my process, that name is then used as the default file name when I go to "File >> Save As."
    If you save your process with another name, such as "myprocess.l4p", does the same default name appear when you go to "File >> Save As"?
    I have seen the "~" character used in other applications when a file name exceeds the maximum length but I do not recall having that problem on newer OSes like Windows 2000
    or XP. I tried to save a process with a really long random file name on my machine and I was still unable to reproduce the behavior you are seeing.
    What version of Lookout are you using and what OS are you running. If your process is running on an older OS or you are using an older version of Lookout, it may be that the file name is limited to fewer characters.
    Regards,
    Aaron C.
    National Instruments
    Applications Engineer

  • JSP and XSL Processor - How do you send the processed file to a JSPWriter?

    The hierarchy for the relevant I/O classes is:
    Object---OutputStream
    Object---Writer---PrintWriter
    Object---Writer---JspWriter
    For the processed file from the Oracle XSLProcessor, typically HTML, the XSLProcessor API v2.0.2.9 offers either 'OutputStream' or 'PrintWriter' as targets.
    Unfortunately, a 'PrintWriter' cannot be used as a 'JspWriter'.
    I realise that I can call
    HttpServletResponse.getOutputStream()/getWriter() but there may be problems using this with the 'out' object.
    According to the JSP documentation: 'Either getOutputStream() or getWriter() may be called to write the body, not both.'
    The XSLProcessor API does offer an 'XMLDocumentFragment' as another target so I can make an XML document from this but looking at the API for 'XMLDocument', this again only offers 'OutputStream', 'PrintDriver' or 'PrintWriter' as targets.
    Not sure if 'PrintDriver' helps.
    How do I send the output from the 'XSLProcessor' to a 'JspWriter'?
    Why does the API not offer a 'Writer' as a target?
    Polite observation - this would be consistent with the 'OutputStream' being offered and, if changed, would not break any existing code.
    null

    You can also use a PrintWriter to wrap a JspWriter
    since PrintWriter has a constructor that takes any
    Writer instance.I'm having the same problem, I've spent a lot of time
    on it but I can't get it work.
    Could you post some working code that shows how you
    can do it?
    Thanks.
    It works now, I have used the code:
    result = processor.processXSL(stylesheet, xml);
    PrintWriter pw = new PrintWriter(out);
    result.print(pw);
    I had tried this before but there was an error in other place that prevented it to work.
    Thank you anyway.

  • HI FRIENDS, significance of record set name in flat file process

    1)significance of record set name in flat file process

    hi ganga,
    recordset specifies the logical structures in a flat file. A recordset can contain multiple types of substructures identified by logical names.
    We can use the recordset in Node functions
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
    regards,
    nikhil bos

  • 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

  • Class Cast Exception In Module Processor

    Hi,
      I'm trying implement "Step by step guide to develop a
    module for reading file name in a
    sender file adapter" by Krishnakumar Ramammoorthy. When I deploy the EAR in my server I'm getting following exception:
    #1.5#0003BA92DD90003B0000240000001D190003FCBEF3B117E6#1122321992587#/Applications/ExchangeInfrastructure/AdapterFramework/Services/ADAPTER/ADMIN/File##com.sap.aii.adapter.file.File2XI.processFileList()#J2EE_GUEST#0##nd2xidb.svc.doi.test_XD2_3621750#Guest#46b9f3b0fd4611d9af850003ba92dd90#output##0#0#Error#1#com.sap.aii.adapter.file.File2XI#Plain###Channel CC_File_S_ABCMCodes: Sending file failed with java.lang.ClassCastException - continue processing#
    I'm running it on XI 3.0 SP 11.
    I'm trying to send a file and planning to modify the content in the module processor.
    Please let me know if anyone has a clue ?
    to get above mentioned document please search for "ramammoorthy", it's the first document.
    https://www.sdn.sap.com/sdn/search.sdn?contenttype=url&query=ramammoorthy&selected=0&content=/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fSDN!2fiViews!2fWCM!2fcom.sap.sdn..wcm.search.search_adv%3Fprttheme%3DCSIN%26QueryString=ramammoorthy%26SearchPluginName=sdn_all%26SelectedCustomProps=resourcetype(value=s*)
    thanks
    Sibo

    Hi All,
      The problam was in ejb-jar.xml. You should use the interfaces provided by module framework as home and remote interface.
    I made following changes in ejb-jar.xml and it worked..
    <session>
                <ejb-name>GetFileNameBean</ejb-name>
                <!local-home>gov.doi.fbms.moduleprocessor.GetFileNameLocalHome</local-home>
                <local-home>com.sap.aii.af.mp.module.ModuleLocalHome</local-home>
                <!local>gov.doi.fbms.moduleprocessor.GetFileNameLocal</local>
                <local>com.sap.aii.af.mp.module.ModuleLocal</local>
                <ejb-class>gov.doi.fbms.moduleprocessor.GetFileNameBean</ejb-class>
                <session-type>Stateless</session-type>
                <transaction-type>Container</transaction-type>
            </session>
    Please refer to document http://help.sap.com/saphelp_nw04/helpdata/en/32/43d84072378031e10000000a1550b0/content.htm
    Thanks a lot for your help..
    Sibo

  • Doubts on Module Processor

    Hello All,
    What are Module Processors in XI? Where do we use them? Can anybody please send me some docu about this concept?
    //Priya//

    Hi Priya,
    These are the basic steps involved in writing a module:
    1. Make sure you have the following jar files with you.
    aii_af_cci.jar
    aii_af_mp.jar
    aii_af_ms_api.jar
    aii_af_ms_spi.jar
    aii_af_trace.jar
    aii_af_svc.jar
    aii_af_cpa.jar
    2. Open NetWeaver Developer Studio. Create a new EJB Module
    New>J2EE>EJB Module.
    Specify a meaningful name for the module and click Finish.
    3. Right click on the folder ejbModule and create new package.
    Enter a meaningful name for package and click Finish.
    4. Right click on the Project, select New-->Folder. Enter lib as the folder name.
    Copy all the jar files specified above from your local system and paste them into newly create lib folder.Right click on the project. Select Properties-->Java build path. Go to Libraries tab and add the jar files from lib folder to the classpath.
    5. Switch to J2EE Perspective-->J2EE Explorer tab.
    Right click on the newly created package and select New-->EJB.
    6. Specify a meaningful name for the EJB. Select Bean Type as Stateless Session Bean.
    Make sure to uncheck the checkbox “Generate default interfaces”.
    Click on Next.
    7. On the next screen change the values of following attributes as specified below.
    Remote Interface: com.sap.aii.af.mp.module.ModuleRemote
    Home Interface: com.sap.aii.af.mp.module.ModuleHome
    Local Interface: com.sap.aii.af.mp.module.ModuleLocal
    LocalHome Interface: com.sap.aii.af.mp.module.ModuleLocalHome
    Click on Finish.
    8. After clicking on Finish, a Creation error will be reported. Ignore this error as the file would still be created as specified.
    Open the newly created file in Java Editor and add “Module” to the implements list of the bean class. Press Ctrl + Shift + O to remove import errors if any.
    You will see a new error as
    “Class must implement the inherited abstract method Module.process(ModuleContext, ModuleData)”.
    Right click in the java editor and select Source-->Override / Implement methods. Select process method from Module interface and click Ok.
    You should have an error free build of the project after this.
    process is the only method where we need to write the business logic.
    With this you are ready to right the situation specific business logic in the process method.
    9. Once you create a deployable archive i.e. .ear for this using NDS, you can deploy this archive using NDS or using SDM.
    Also go through these links:
    http://help.sap.com/saphelp_nw04/helpdata/en/a4/f13341771b4c0de10000000a1550b0/frameset.htm
    /people/siva.maranani/blog/2005/05/25/understanding-message-flow-in-xi
    and also there is a how to guide on Service Market Place which delas with creating modules for your Adapter. Think it might be helpful to you and answer your query,
    https://websmp202.sap-ag.de/~form/sapnet?_SHORTKEY=01200252310000071155&_SCENARIO=01100035870000000202
    Just open the link below, and select the topic How to create adapter modules for j2ee engine
    The how to guide is available at the SAP marketplace.
    https://service.sap.com/~sapdownload/011000358700003237612005E/HowToCreateAdapterModules.pdf
    and also go through <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-code-samples/how%20to%20develop%20a%20module%20for%20reading%20file%20name%20in%20a%20sender%20file%20adapter%20xi%203.0.pdf">Step by Step guide to develop a module for reading a file name in sender file adapter</a>
    I hope all this information provided will help you create your module successfully.
    Regards,
    Abhy

  • Module processor exit bean

    Hi all,
      I am trying to do the following scenario.
    Generate PDF file out of file adapter using the following URL :
    /people/sap.user72/blog/2005/07/27/xi-generate-pdf-file-out-of-file-adapter
                    I downloaded the jar files according to weblog.
    I have one doubt. I am not able to deply or placing the  module processor exit bean.I am not able to find the way to call the bean.
    Caould anybody please guide me to solve the probelm.
    Thanks & Regards,
    Gopi.

    Hi Gopi,
    You need to deploy the Module processor bean on your XI server.
    The Module would be called from the module tab in your receiver file adapter.
    Open the receiver communication channel and go to the module tab.There in the first table control(Processing sequence) prior to the standard sapCallAdapter place your module.
    Put it as :
    Module Name
    localejbs/sap.com/<your earfilename>/<your EJB name>
    or
    localejbs/<JNDI name(if defined)>
    Type :
    Local enterprise bean
    Key
    0
    Regards,
    Sulakshana

  • Module Processor not working

    Hi All,
    I am working with on creating a module processor for the sender adapter. The code is simple and I am pretty sure it works. Its barely outputs the Module Processor object that’s created within the java code.
    I am having problem getting the module to work.
    I have a module '<b>CallSapAdapter</b>' (not localejbs/CallSapAdapter) predefined in my sender adapter. I have create my Java class <b>CreateData</b> in a package called Sample. I then created a EAR & deployed it using SDM. Then on, I then added this module ('<b>CreateData</b>') in the modules tab above the 'CallSapAdapter'. Chose the type as 'Local Enterprise Bean'.
    I am unable to get the file deleted (In the adapter I have configured the processing mode as delete). Even I cant see the communication channel log for the specific adapter as I see the following error message
    Application error occurred during request processing.
    Error [javax.servlet.ServletException: null], with root cause [java.lang.reflect.InvocationTargetException: null].
    Kindly let me know where am I going wrong. Is it in specifying the module name as 'CreateData'??
    Regards
    Keerti

    Did you set the references to libraries and services in the application-j2ee-engine.xml correctly?
    Compare it:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE application-j2ee-engine SYSTEM "application-j2ee-engine.dtd">
    <application-j2ee-engine>
         <reference
              reference-type="hard">
              <reference-target
                   provider-name="sap.com"
                   target-type="library">com.sap.aii.af.lib</reference-target>
         </reference>
         <reference
              reference-type="hard">
              <reference-target
                   provider-name="sap.com"
                   target-type="service">com.sap.aii.adapter.xi.svc</reference-target>
         </reference>
         <reference
              reference-type="hard">
              <reference-target
                   provider-name="sap.com"
                   target-type="service">com.sap.aii.af.svc</reference-target>
         </reference>
         <reference
              reference-type="hard">
              <reference-target
                   provider-name="sap.com"
                   target-type="service">com.sap.aii.af.cpa.svc</reference-target>
         </reference>
         <fail-over-enable
              mode="disable"/>
    </application-j2ee-engine>
    > Also, does removing the libraries from the EAR have
    > implications other than the size of the EAR?
    Yes

Maybe you are looking for