Two FileName in Dynamic Configuration

Hi All,
I have a very rare problem. In an interface which uses BPM, where file is the sender and Proxy is the target,
there is an ABAP Class in the mapping which uses Dyanmic Configuration to retrieve the FileName and create a Proxy structure and posts it to the ECC. In this scenario, Multiple files are picked from different folder using advanced Selection and sent to BPM which uses the ABAP Class.
When i run the interface with 5 different files placed at source, In SXMB_MONI, I can see that after 3 files are processed successfully with a single filename in the Dynamic Configuration, the 4th or the 5th one wil have 2 filenames in the dynamic configuration out of which the first filename will be the copy of the earlier processed filename and the second one wil be the actual required filename. The above behaviour keeps on chainging.
How can this be possible as the Context Object 'FileName' can have only single filename through out the interface instance, as there is no setting of the filename done in dynamic configuration.
Please reply if anyone has a solution to the above problem.
Thanks.

Hi Jaideep..
Thanks for the reply.
Yes.. its a serial processing. Let me explain a bit more.
as i said above, after the 3rd BPM instance (Just as an example.. keeps on chainging), the 4th instance has a unique filename compared to before 3. but after processing, the Dynamic Configuration in SXMB_MONI will have 2 fileNames. which will have a copy of any one of the earlier filenames along with actual filename.

Similar Messages

  • Problem in Dynamic Configuration bean

    Hi
    I am trying to dynamically change the filename using Dynamic Configuration bean with some constant value but target file is having same name as source.  In communication channel logs I can see the successul pro

    Hi,
    M not sure what will be the error with this when u r using dynamic configuration bean.But same functionality can be better achieved by using this dyanamic configuartion UDF :
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File", "FileName");
    conf.put(key, a);
    return value;
    Regards,
    Anoop

  • Dynamic configuration in integration process using abap mapping

    Hi everybody,
    i have the following scenario:
    file adapter -> integration process -> file adapter
    The integration process uses an ABAP mapping and sets the filename in dynamic configuration as follows:
    *-- Set Parameter
        clear ls_dyn_record.
        ls_dyn_record-name      = gc_dyn_config_name.
        ls_dyn_record-namespace = gc_dyn_config_ns.
        ls_dyn_record-value     = <new_file_name>
    *-- Write configuration
        ir_dyn_config->add_record( ls_dyn_record ).
    But now the new filename is not reflected in the file adapter (receiver). In the integration monitor (SXMB_MONI) i still find the old filename.
    Whats wrong?
    Elko

    The ABAP mapping is more complex, setting filename in Dyn. Conf. is just one step in mapping.
    If I check the Workflow protocol of the Integration Process, I find the following in the Trace of the ABAP-Mapping:
    The filename has been set to 3233340.SWNF00HW.P10I. The Suffix P10I has been added in the ABAP mapping.
    When I check the subsequent message in SXMB_MONI I find:
    The added suffix is missing in the filename !!
    Elko

  • Acces dynamic configuration variable (e.g. filename) in ABAP mapping class

    Hi experts
    I am searching for a possibility to acces a dynamic configuration variable (DCV) in an ABAP mapping class. Since I could not find a solution in SDN and other sources, I hope somebody in this forum can help me.
    What I already found is the following code which can be used to set a DCV, but what I would be interested in is how to read a DCV.
    Any help is appreciated.
    Markus
    METHOD if_mapping~execute.
    DATA l_record type mpp_dynamic.
    * copy payload
    result = source.
    * add an adapter specific attribute
    l_record-namespace = 'http://sap.com/xi/XI/System/File'.
    l_record-name = 'FileName'.
    l_record-value = 'test.xml'.
    dynamic_configuration->add_record( l_record ).
    ENDMETHOD.

    Hi Markus,
    you can find everything in my blogs
    /people/michal.krawczyk2/blog/2007/04/26/xipi-throwing-generic-exceptions-from-any-type-of-mapping
    Regards,
    michal

  • Dynamic Configuration for determining filename

    Hi ,
    I am using dynamic configuration for determining the filename sent by the sender
    I am using the following code::
    int i = 0;
    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);
    if  (ourSourceFileName.equals("data.txt"))
    for (i = 0 ; i < 1 ; i++)
    result.addValue(ourSourceFileName);
    i have also 'checked' filename in set Adapter specific message propertiesas  in sender communication channel.
    But Still it is not working.
    Please provide some help on it.
    Thanks & Regards
    Nilima

    Hi,
    Michal
    In SXMB-MONIthe response part contains DYNAMIC CONFIGURATION node
    and it displays::
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <!--  Response
      -->
    <SAP:DynamicConfiguration xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName"><b>try1.txt</b></SAP:Record>
      </SAP:DynamicConfiguration>
    please sir provide some help on it.
    Thanks once again.

  • Dynamic Configuration for two file adapters communication channels

    Hello Experts!!!!!!
         In one of the interface in my landscape, I am using two file adapters for creating two files with different names and at two different destination on F.T.P.
    However the receiver service for both the communication channel are same.
    In message mapping I am using multi mapping to create two files out a single message.
    Now i have a requirement of changing file path and file name using dynamic configuration for both the comm channel.
    When i doing dynamic coniguration for both the comm. channel. My interface is creating two files but with same name and on same destination which is set for second communication channel through dynamic configuration.
    Here, I guess the second dynamic configuration is over writing the first dynamic configuration and hence creating two files with same name and at same destination.    
    Please suggest, if separate dynamic configuration for separate communication channel of same receiver service can be done?
    Thanks & Regards,
    Amol

    Thanks for your prompt responses!!!!!
        Is there any way, By which in dynamic configuration I can find out the communication channel name and then change its parameter.
    I mean if iam using say comm. channel A and B.
    Then in dynamic configuration for A, I will first take communication channel A by calling it and then change its path/file name.
    and then do samething for comm. channel B in its dynamic conf.
    Regards,
    Amol

  • Dynamic Configuration Parameters - FileName

    Hi to ALL.
    I have a File(EDI) to File(XML) scenario and I use seeburger . I want to get the source file timestamp . I made UDF with dynamic configuration and actived parameters on sender channel. (Source file timeStamp)
    My problem is the I can't get the value because the configuration with seeburguer use the channel split (EDI).
    On sxi_monitor I see two records one is for Functional Acknow. and the other is for the interface.
    On the first record I see the value but in the second ( when the mapping is procesing) the dynamic value refill with anothers values from Seeburger.(file converted to XML)
    I get this values from dynamic configuration ()
    SAP:Record namespace="http://seeburger.com/xi/Split997" name="maxSplitNumber">1</SAP:Record>
      <SAP:Record namespace="http://seeburger.com/xi/Split997" name="splitSender">YYYYY</SAP:Record>
      <SAP:Record namespace="http://seeburger.com/xi/Split997" name="splitState">ACCEPTED</SAP:Record>
      <SAP:Record namespace="http://seeburger.com/xi/Split997" name="splitMapping">XXX_E2X_ANSIX12_XXXX</SAP:Record>
      <SAP:Record namespace="http://seeburger.com/xi/Split997" name="actSplitNumber">1</SAP:Record>
    </SAP:DynamicConfiguration>

    Hi Luis,
    you  can use the parameter "attributeCopyList" with the Splitter Module
    With this parameter you can copy Dynamic Attributes across to your new channel.
    For example, if you want to copy the attribute "test1" with the namespace "http://sap.com/xi/test",
    the value for attributeCopy List is "http://sap.com/xi/test/test1"
    So your module chain might look like this:
    ModuleKey: splitter
    ParameterName: attributeCopyList
    ParameterValue: http://sap.com/xi/test/test1
    Each new "Split-File" will then have the Dynamic Attribute http://sap.com/xi/test with value "test1"
    regards,
    Daniel

  • Accessing dynamically configured filename inside adapter module code.

    Hi,
    I am having a requirement where i have to access the filename configured using Dynamic configuration inside my receiver file adapter MODULE code.  I am having PI7.1.
    For accessing the DC filename i have inserted this piece of code inside my adapter module code:
    MessagePropertyKey MPK =new MessagePropertyKey("FileName","http://sap.com/xi/XI/System/File");
    String filename = msg.getMessageProperty(MPK);
    But when i am tesing this module i am getting: "Message processing failed. exception encrypting session key".
    This module is basically written for encryption.I am referring this blog:
    /people/daniel.graversen/blog/2006/10/05/dynamic-configuration-in-adapter-modules
    Do i  need to do something else for accessing DC filename inside my module??Please help??
    Thanks
    Amit

    Hi,
    My code is something like this:
    public ModuleData process(ModuleContext mc,
                   ModuleData inputModuleData)
                   throws ModuleException {
            Object obj = null;
             Message msg = null;
             MessageKey amk = null;
             String inpKeyLocation = (String) mc.getContextData("inpKeyLocation");
                try {
                  obj = inputModuleData.getPrincipalData();
                     msg = (Message) obj;
                  amk = new MessageKey(msg.getMessageId(),msg.getMessageDirection());
                    XMLPayload xpld = msg.getDocument();
                  MessagePropertyKey mpk = new MessagePropertyKey("FileName","http://sap.com/xi/XI/System/File");
                  String filename = msg.getMessageProperty(mpk);
                  InputStream inps = (InputStream) xpld.getInputStream();
                                        and so on ......
    My encryption method somewhere down the line will use "filename" as one of its input.
    Please help??
    Thanks
    Amit
    Edited by: AmitSri on May 25, 2010 1:43 PM

  • Error in mappingwith dynamic configuration using udf

    Hi All,
    Good Morning,
    i am working with ABAP proxy to file scenarion but here according my client requirement i am using udf for file dynamic configuration.
    In mapping, i mapped the field from "Filename" to message type tag(receiver file header)  "/ns0:MTxxxxxxDataFile". between there two fields i am using the following udf for dynamic configuration. but i got error after testing with test data in mapping that is also mentioned below.
    plz help me to solve the error. i will be wait for ur immediate response this sis very urgent.
    very thankfull to immediate response.
    UDF:
    i am not puting any packages here.
    public String putFileNameInHeader1(String a,Container container){
    //write your code here
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
    conf.put(key, a);
    return "";
    ERROR:
    12:21:30 Start of test
    Compilation of MMSAPLegacySalesDataToCOGNOS successful Runtime exception during processing target field mapping /ns0:MTCOGNOSLegacySalesDataFile. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._MMSAPLegacySalesDataToCOGNOS_ method putFileNameInHeader1$[cd00000038, com.sap.aii.mappingtool.tf3.rt.Context@f300f30] com.sap.aii.mappingtool.tf3.MessageMappingException: Runtime exception during processing target field mapping /ns0:MTCOGNOSLegacySalesDataFile. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._MMSAPLegacySalesDataToCOGNOS_ method putFileNameInHeader1$[cd00000038, com.sap.aii.mappingtool.tf3.rt.Context@f300f30] at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:350) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:401) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:105) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.execute(MapServiceRemoteObjectImpl0_0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:313) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:199) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:136) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(AccessController.java:215) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Root Cause: com.sap.aii.utilxi.misc.api.BaseRuntimeException: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._MMSAPLegacySalesDataToCOGNOS_ method putFileNameInHeader1$[cd00000038, com.sap.aii.mappingtool.tf3.rt.Context@f300f30] at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.calculateCurrentValue(FunctionWrapper.java:83) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.cacheValue(FunctionWrapper.java:59) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.gotoNextContext(FunctionWrapper.java:37) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:252) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:401) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:105) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.execute(MapServiceRemoteObjectImpl0_0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:313) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:199) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:136) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(AccessController.java:215) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Root Cause: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) at java.lang.reflect.Method.invoke(Method.java:391) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.calculateCurrentValue(FunctionWrapper.java:75) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.cacheValue(FunctionWrapper.java:59) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.gotoNextContext(FunctionWrapper.java:37) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:252) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:401) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:105) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.execute(MapServiceRemoteObjectImpl0_0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:313) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:199) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:136) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(AccessController.java:215) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Caused by: java.lang.NullPointerException at com.sap.xi.tf._MMSAPLegacySalesDataToCOGNOS_.putFileNameInHeader1$(_MMSAPLegacySalesDataToCOGNOS_.java:853) ... 26 more RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /ns0:MTCOGNOSLegacySalesDataFile. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._MMSAPLegacySalesDataToCOGNOS_ method putFileNameInHeader1$[cd00000038, com.sap.aii.mappingtool.tf3.rt.Context@f300f30]
    12:21:35 End of test

    Hi Sai,
    First of all, this UDF is pretty well knaown so there is no error in this UDF or your configuration for this UDF. I can suggest you something that at the time of configuration in IR, give a context object for that particular field of that file and then use the contect object name everywhere to refer that field. and also check the message type config for correction for my sake.
    There is also a possibility that of the input data. i guess you are sending the input file from Cognos and you making the file and putting some where in XI directory and want these to process something and generate with some new desired filename. Check the input because i guess its finding NOTHINg as an Input. check once again.
    Hope this will help you.
    Regards
    Aashish Sinha
    PS : Reward points if helpful.

  • Dynamic Configuration or Adapter module ?

    Hi Experts
    I need advice in the following scenarios where the interface is from a legacy file in the Source to an IDOC posting on the Target
    a) The logic for the mapping is that if the File name is A then pass 123 and if the file name is B pass 456
    for eg if it is IT_ABYYYYMMDD.350 then i have to pass 123 adn if it is  IT_ABYYYYMMDD.350 then i have to pass 456
    How is it possible to use the file name PI picks from the folder and use it in the mapping
    It has to be done in the File Adapter ? do i have to write an Adapter module for it ??
    how do i pass the file name in the mapping in IR ???
    b) i need to derive data from the file name
    for eg if the filename is IT_ABYYYYMMDD.345 and i have to derive the AB part from it and use it in the message mapping
    since it is to be maped to a target field int he idoc .. how can I do that ?
    Does it require a lot of coding ?
    I have read about Dynamic Configuration but where and how to use it ??
    can any one please help me with the steps to use or the code  for deriving the value AB from the File name IT_ABYYYYMMDD.345 ??
    thanks
    Rohan

    >
    RohanS wrote:
    > Yes I am on track .. just two small questions ..in michal's blog
    > the UDF code says
    >
    > DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    >
    > so does the first argument in the braces = the file path ? as in the server path and location ?
    >
    > and secondly
    > does this UDF require no input parameters cos in my mapping there is no source for this ... just that i need to derive this name and pass it to the target  field so will this udf take any input argument when i am creating it in message mapping n PI 7.1?
    >
    > or do I  just  create a UDF without a variable input and write this code and return as per your code and map it to the target ?
    >
    > thanks
    > Rohan
    first one is not path i.e file adapter property of SAP PI use as it is and need to pass some input to UDF just some variable which does nothing in the mapping and map the output to  your target variable
    HTH
    Rajesh

  • Getting an error in Dynamic Configuration

    Hi Guys,
    I need to dynamically post the file into different directories based on the file in the source payload.
    In Receiver File Communication Channel
    Target Directory : *
    Filename : *
    Checked the ASMA Attributes for filename and directory
    Iam refering this weblog
    /people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping
    In the mapping
    <filename> ---> UDF --> topnode of target message.
    My UDF is as below
    public String Directory(String a,Container container){
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key  = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File", "FileName");
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File", "Directory");
    String FileName = conf.get(key);
    FileName = a;
    conf.put(key, FileName);
    String Directory = conf.get(key1);
    Directory = "/SAPInterface/XI/PPD/DHX/out";
    conf.put(key1, Directory);
    return " ";
    But in runtime(moni) iam getting  error as
    com.sap.aii.af.ra.ms.api.MessagingException: The Adapter Message Property 'FileName' was configured as mandatory element, but there is no 'DynamicConfiguration' element in the XI Message header: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: The Adapter Message Property 'FileName' was configured as mandatory element, but there is no 'DynamicConfiguration' element in the XI Message header
    Please suggest me how to correct this.
    Thanks
    Srinivas

    Hi Srinivas,
    You said you are having dynamic directories to post the file. But I see you hardcorded or put constant for directory which is /SAPInterface/XI/PPD/DHX/out. I think you need to put //SAPInterface/XI/PPD/DHX/out.
    Try this in udf:
    public String Directory(String a,Container container){
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key  = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File", "FileName");
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File", "Directory");
    String FileName = conf.get(key);
    FileName = a;
    conf.put(key, FileName);
    Directory = "//SAPInterface/XI/PPD/DHX/out";
    conf.put(key1, Directory);
    return " ";
    Put FileName and Directory in file name and directory paramters in receiver communication cahnnel and cehck.
    Regards,
    --Satish

  • 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

  • Dynamic Configuration File Names

    Hi,
    I have a RFC->XI->File scenario.
    I have to put the target files names based on the calculation of values in 2 fields in the input.
    I tried using Dynamic Configuration in my message mapping for this.
    This is the code:
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create(u201Chttp://sap.com/xi/XI/System/Fileu201D,u201CFileNameu201D);
    String MyFileName = a + "_" + b +".xml";
    conf.put(key, myFileName);
    I checked ASMA in both the sender RFC adapter as well as the receiver file adapter.
    But it never works.
    I saw the dynamic configuration tab in SXMB_MONI but i can see only the RFC destination parameter.
    Cant see the file filename parameter.
    What is the problem here?

    No need enable ASMA on RFC sender adapter.
    See if the file channel is activated after selecting ASMA with FileName.
    The UDF might not be use in the mapping. Check this.
    Edited by: Praveen Gujjeti on Feb 23, 2010 1:05 AM

  • File name cant be fetched from Dynamic configuration...mutli-mapping used

    In a scenario, i have a BPM which has a transformation step which contains a mutimapping ...means 2 messages mapped to 1 messgaes, here in the mapping i m using an UDF and written code to extract the file name from dynamic configuration.....
    the problem is ...the same BPM contains another transformation step which contains a message mapping (which is not multi mapping), and here the code (UDF) works to fetch the file name...
    the code is all correct....and it looks like
    DynamicConfiguration conf = (DynamicConfiguration)
    container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String sourceFileName = conf.get(key);
    if (sourceFileName == null ){
    sourceFileName = "ErrorFile.xml";}
    return sourceFileName;

    Hi,
    Yes u r correct it will show error in operation mapping.. bcoz u cannot check the DynamicConfiguration in Operation mapping...
    It will throw Exception..
    The parameter to UDF depends on ur requirement.... Let us know ur requirements exactly...
    If u r doing for file to file means no UDF required,, just check ASMA on both sides....
    Babu

  • Doubt om Dynamic Configuration of receiver file

    Hello ,
      for Acheiving the Dynamic configuration of receiver file name ,adapter specific message attribute is used...But how to suppress the name of file in the content of the Received file...
    Is my question correct..do we get the file name in content of the receiver file,while using the Adapter specifc message attribute.
    And another question ,in the Variable substitution ...do we get the above problem,then how to tackle the situation to suprress the file name in the payload of receiver file.

    HI,
    You can handle the dynamic file name via Dynamic configuration or with the help of Variable Substitution.
    Please refer
    have a look
    Dynamic File Name using XI 3.0 SP12 Part - I --> Dynamic File Name using XI 3.0 SP12 Part u2013 I
    Dynamic file name(XSLT Mapping with Java Enhancement) using XI 3.0 SP12 Part -II --> Dynamic file name(XSLT Mapping with Java Enhancement) using XI 3.0 SP12 Part -II
    With Variable Substituion, you may need to supress the filename
    Dynamic File Name - Suppress the Substitue varible
    Let me know if you need anymore info.
    Thanks
    Swarup

Maybe you are looking for