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.

Similar Messages

  • 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 for the application

    I'm a newbie and trying to evaluate JSF. I took part in a project with struts framework and i could say i don't like struts cause of some limitation and i suspect that JSF has the same limitation. First of all, there are JSP pages. I can't use JSP pages/templates stored somewhere else except web application. I'd like to store my templates in the database. This will give me ability to add/change/remove jsp page without redeploying war-archive. Yes, i can use exploded war-archive and add JSP pages straight into file system, but i don't like this way. Next problem is the configuration file like struts-config (faces-config, whatever). I have to write down all my navigation logic and beans mapping to this file and it's really annoying me. This kind of project requires dynamic configuration for the all web application and i'd like to add/change/remove pages, beans, actions without restarting/reconfiguring webapp. Today, I looked thru documentation and source code and found that FactoryFinder class could use my own classes but i'm not sure it will be enough for the dynamic configuration for the beans. In any case, it's a huge problem with the templates.
    Right now i'm thinking about 1(one) JSP with XML/XSLT rendered HTML content and JSF for event/action handling. I mean, i'll use XSLT to render dynamic content and JSF for dispatching events. In that case i have to render form tag names in the HTML as JSF engine (i'm not sure if it possible). If it will take a lot of time to do this i'll have to switch a home-grown framework.
    So, i really need advices how to implement this sort of dynamic behavior in the web application.
    regars,
    anton

    A lot of what you're seeing are genuine limitations, but happily, JSF is so pluggable that you can overcome them.
    JSPs are problematic in exactly the way you describe - unless your app server has support for pulling JSPs out of a database, etc., you're SOL. JSF, however, lets you use something other than JSPs by replacing the ViewHandler. That's a fair bit of work, but it is doable.
    For navigation logic, you'd replace the NavigationHandler. As long as you're willing to write the code that can pull navigation rules from an external source, life is good.
    For managed beans, all you need to replace is the VariableResolver - again, if you can pull the rules from an external source, you have full control.
    This is all far from easy - and it's a huge amount of work for one person - but I'd imagine these pieces will become available from various sources. A core goal of JSF 1.0 was making the framework as a whole pluggable so that others can innovate on top of the framework.
    -- Adam Winer (EG member)

  • XSLT Mapping with Dynamic Configuration for Mail Adapter

    Hi Guys,
    I am wondering if somebody can help me please.
    I have a requirement in which I need to pick up the file from FTP and email it to the user as an attachment with the same file name and content.
    I know it is possible via 3 method either by deploying adapter module or via XSLT or JAVA Mapping.
    I preferred XSLT Mapping because it is easier to use and we don't need to compile the code like JAVA Mapping.
    I have done the XSLT Mapping but the only problem I am facing is that how to copy the file name which we get it from Dynamic Configuration to the Mail ContentDisposition.
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:map="java:java.util.Map"
      xmlns:dyn="java:com.sap.aii.mapping.api.DynamicConfiguration"
      xmlns:key="java:com.sap.aii.mapping.api.DynamicConfigurationKey">
    <xsl:output indent="no" />
    <xsl:param name="inputparam"/>
    <xsl:template match="/">
    <!-- change dynamic configuration -->
        <xsl:variable name="dynamic-conf" 
            select="map:get($inputparam, 'DynamicConfiguration')" />
        <xsl:variable name="dynamic-key"  
            select="key:create('http://sap.com/xi/XI/System/File', 'FileName')" />
        <xsl:variable name="dynamic-value"
            select="dyn:get($dynamic-conf, $dynamic-key)" />
        <xsl:variable name="dummy"
            select="dyn:put($dynamic-conf, $dynamic-key, $new-value)" />
        <!-- copy payload -->
    I tried many option but unfortunately none of them worked.
    <Content_Disposition>attachment;filename="$inputparam"</Content_Disposition>
    <Content_Disposition>attachment;filename="$dynamic-conf"</Content_Disposition>
    <Content_Disposition>attachment;filename="$dynamic-key"</Content_Disposition>
    <Content_Disposition>attachment;filename="$dynamic-value"</Content_Disposition>
    <Content_Disposition>attachment;filename="$dummy"</Content_Disposition>
             <Content_Disposition>
                attachment;filename=
                <xsl:value-of select="dynamic-key"/>
             </Content_Disposition>
    I really appreciate if someone can please provide some guidance.
    Thanks,

    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

  • Give me full details of Dynamic Configuration for file

    Hi all,
    please provide details of Dynamic Configuraion for file.
    Thanks and regards
    sai

    Hi,
      Refer the below weblog
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14 - The same filename from a sender to a receiver file adapter - SP14
    And <b>check for the Communication channel settings how to do for Sender & Receiver File channels</b>, Dynamic configuration Code is also available in the weblog.The same code you can use in your UDF and map the output of your udf to one of u r target field.
    By following this you can able to set the receiver file name as same is of your file name of Source.
    Hope it will helps to solve u r problem.
    Cheers
    Veera

  • Dynamic configuration for PI 7.1 in mapping for file adapter

    Hi Experts,
    I have used the code below to use dynamic configuration in PI 7.1, but it isnt working..
    http://help.sap.com/saphelp_nwpi71/helpdata/en/43/03612cdecc6e76e10000000a422035/frameset.htm.
    it shows the file name in the dynamic configuration in the sxmb_moni...
    but hen i chekc it  in operations mapping..it shows dynamicconfiguration has to be in queue ..
    has ne one used it before??
    I used a simple UDF to create it without any input parameter and I mapped it to a field n the target side...
    has ne one faced a similar situation????
    Regrads,
    Tauseef

    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

  • Dynamic Configuration for IDOC

    Hi,
    Whenever an IDOC is send from SAP R3 system to PI (SAP R3 -> SAP PI -> Target), we get an additional node of Dynamic Configuration under the SOAP Header in SXMB_MONI.
    Why is this happening? Does this happen for all the versions of SAP XI (PI)?
    This issue does not occur when the IDOC is send by SAP PI to SAP R3 system (Source --> SAP PI --> SAP R3)
    I am using SAP PI 7.1.1
    Thank you,
    Pankaj.

    Hi,
    Why this is an issue for you?
    I am trying to send IDOC from SAP System to PI system.
    Ideally there should be no DynamicConfiguration step under SOAP Header folder in SXMB_MONI (I tested a SOAP -> PI -> FILE and the Dynamic Configuration does not come); unless and until we make use of the ASMA properties (UDF/ Module). Is this understanding correct?
    For example, if I send an IDOC i get the below details in SXMB_MONI:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?><!-- Response -->
    <SAP:DynamicConfiguration SOAP:mustUnderstand="1" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="RCVPOR">SAPPI</SAP:Record>
    <SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="SNDPRT">LS</SAP:Record>
    <SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="RCVPRN">SAPPISYSTEM</SAP:Record>
    <SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="SNDPOR">SAPECC</SAP:Record>
    <SAP:Record namespace="http://sap.com/xi/XI/Message/30" name="CALLER_CODEPAGE">4102</SAP:Record>
    <SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="SNDPRN">SAPECCSYSTEM</SAP:Record>
    <SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="CIMTYP"/>
    <SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="IDOCTYP">Z_VALIDATION_ACK01</SAP:Record>
    <SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="MESTYP">Z1VALIDATIONACK</SAP:Record>
    <SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="RCVPRT">LS</SAP:Record>
    </SAP:DynamicConfiguration>
    Is this behavior as expected?
    Thank you,
    Pankaj.

  • Dynamic configuration for multiple files

    Hi All,
    I am new to PI. I have a proxy to file scenario, wherein 3 files are to be generated depending upon the value in a field (site ID) on the same receiver. Site ID can only have 3 different vales. All these 3 files are to have a dynamically defined name.
    How can I configure this scenario? Is there any way in which all 3 files can have dynamically defined names? Please help.
    Regards
    Vipul

    if you have only one recored (one site id) in proxy at a time, thn u can write a UDF for dynamic file name..
    // UDF: public String SetFileNameDyn(String siteID, Container container) throws StreamTransformationException{
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String myFileName = "";
    if(siteID.equals("firstValue")){
         myFileName  = "FirstFile1";
    }else if(siteID.equals("secondValue")){
         myFileName  = "SecondFile2";
    }else if(siteID.equals("thirdValue")){
         myFileName  = "ThirdFile3";
    conf.put(key, myFileName);
    return myFileName;

  • UDF Using Dynamic Configuration for Counter Reset

    Hi All,
    In an Idoc to file scenario we want to have counter option at the end of the file.we are using NFS so that we wil not face any problem of counter reset on a j2ee restart
    But when the counter turns 999999 it has to be reset to 0000001
    So we are trying to dynamically create a file name using the counter and check whether it has reached 999999 then resetting back . I had written a code for the same but it is throwing an error while mapping and activating.
    UDF CODE is below
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION) ;
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName") ;
    String FileName = conf.get(key) ;
    int inc = 1 ;
    String temp = FileName.substring(10,6);
    String temp1 = FileName.substring(0,10);
    Integer seqNo = Integer.parseInt(temp) ;
    if(seqNo == 0 || seqNo == 999999) {
    seqNo = new Integer(inc) ;
    else {
    int num = seqNo.intValue() + inc ;
    seqNo = new Integer(num) ;
    container.setParameter("seqNo", seqNo);
    String File_Name = temp1 + Integer.toString(seqNo);
    conf.put(key, File_Name);
    return File_Name;
    ERROR it is throwing
    'class' or 'interface' expected public String Decimal$(String Sample,Container container){ ^ /usr/sap/PJD/DVEBMGS58/j2ee/cluster/server0/./temp/classpath_resolver/Map76d12330b43811df8c1500e000a6fabc/source/com/sap/xi/tf/_MM_Sample_to_TRGT_.java:127: 'class' or 'interface' expected }
    So can anyone please advice.

    Hi Stefan,
    I removed the last }
    But stil it is throwing the below error:
    Activation of the change list canceled Check result for Message Mapping MM_Sample_to_Trgt | :  Starting compilation  Source code has syntax error:  /usr/sap/PJD/DVEBMGS58/j2ee/cluster/server0/./temp/classpath_resolver/Map8e67b780b44111dfbc4100e000a6fabc/source/com/sap/xi/tf/_MM_Sample_to_Trgt .java:98: FileName is already defined in File$(java.lang.String,com.sap.aii.mappingtool.tf3.rt.Container) String FileName = conf.get(key) ; ^ /usr/sap/PJD/DVEBMGS58/j2ee/cluster/server0/./temp/classpathresolver/Map8e67b780b44111dfbc4100e000a6fabc/source/com/sap/xi/tf/_MM_Sample_to_Trgt .java:102: incompatible types found : int required: java.lang.Integer Integer seqNo = Integer.parseInt(temp) ; ^ /usr/sap/PJD/DVEBMGS58/j2ee/cluster/server0/./temp/classpathresolver/Map8e67b780b44111dfbc4100e000a6fabc/source/com/sap/xi/tf/_MM_Sample_to_Trgt .java:103: operator == cannot be applied to java.lang.Integer,int if(seqNo == 0 || seqNo == 999999) { ^ /usr/sap/PJD/DVEBMGS58/j2ee/cluster/server0/./temp/classpathresolver/Map8e67b780b44111dfbc4100e000a6fabc/source/com/sap/xi/tf/_MM_Sample_to_Trgt .java:103: operator == cannot be applied to java.lang.Integer,int if(seqNo == 0 || seqNo == 999999) { ^ /usr/sap/PJD/DVEBMGS58/j2ee/cluster/server0/./temp/classpathresolver/Map8e67b780b44111dfbc4100e000a6fabc/source/com/sap/xi/tf/_MM_Sample_to_Trgt .java:111: cannot resolve symbol symbol : method toString (java.lang.Integer) location: class java.lang.Integer String FileName = temp1 + Integer.toString(seqNo);
    Edited by: mallavarapu soundarya on Aug 30, 2010 4:44 PM

  • Dynamic configuration for the remoteworkflowclient not wf_client_Config.xml

    I need to connect to multiple servers(hosting the bpel workflow) based on input of the IP address of the server at runtime.
    I cannot modify the wf_client_config.xml at runtime as it will be within the client jar.
    Is there any other mechanism of connecting to mulltiple servers to get List of Tasks or any such functionality.
    Currently it seems that the IP and other configuration needs to be hard coded into the .xml file and i am unable to any mechanism where this information can be provided at runtime.
    Any help will be appreciated

    Hi,
    Did you ever find out a solution to this problem?
    If so, it would be much appreciated if you could post it.
    Thanks in advance,
    Aagaard

  • Dynamic Configuration - Set Directory Path for File Receiver Adapter

    Hi Experts,
    I have a question regarding the dynamic configuration for the file adapter. Is it possible to set a directory path without a message mapping for the file receiver adapter? the problem is that I want to import a pdf document. this pdf document I want to store in a dynamic directory (depending on the filename). so I have to read the filename out of the dynamic configuration and generate (depending on the filename) a directory for this file. Is that possible without a message mapping? I cannot make a message mapping because the file has the pdf format and should not get changed.
    best regards
    Christopher Kühn

    Hi Gaurav,
    I use the ASMA (respectively the filename) for the sender adapter. After the pdf was imported into XI this filename is in the ASMA.
    But what then??? How can I get this filename with the help of the variable substitution? and if I have this filename I have to change this filename a bit to generate the name / path of the directory.
    Please explain it to me detailled
    Thanks and regards
    christopher

  • Problem:obtaing file name using Dynamic configuration of file adapter

    hi all
    I am using Dynamic configuration for getting file name.
    I am getting Dynamic configuration in SXMB_MONI containg file name, but payload is empty unlike file i am sending.

    Hi All,
    Basically my requirement to get Filename in idoc segments in order to validate the posting at month end.
    Its an File to idoc scenario- GL Posting.
    Please check attached UDF and it gives error. Kindly help. Thanks

  • Dynamic Configuration of custom Context Objects: is it possible?

    Guys,
    is it possible to use Dynamic Configuration for custom Context Objects as we normally do to technical context objects?
    Also, is it possible to use a context object in receiver determination, even if it is not assigned to a message interface?
    My case: I need to use condition at receiver determination but I dont want to read a field from payload. Instead, I want to write that context object with dynamic configuration and use it at receiver determination runtime.
    I want to do this in order to avoid having to extend the payload's message type because of this extra field for condition (actually, its not that I dont want to, its that I cant. The message type is defined by 3rd party and cant be changed). If it is possible to keep that information at header instead of payload, it'd be great.
    Kind regards and thanks in advance,
    Henrique.

    Hi,
    >>>>>Just a last comment: do you need to deploy any code for the adapter on SDM or just the "fake adapter metadata file" is enough?
    no SDM
    just the metadata file as per my blog
    glad this is what you wanted
    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>

  • Is Dynamic Configuration possible with IDOC adapter.

    Hi,
    I have SOAP to IDOC scenario. I have many SAP receivers and are determined at runtime in a Java map.
    Can i use Dynamic Configuration for IDOC adapter?
    Thanks
    Shakthi

    Hi Sivasakthi,
    Why do you need Dynamic Configuration in receiver IDOC?
    Regards,
    Sanjeev.

  • Dynamic Configuration of HTTP Destinations in SOAPReceiver

    Dear PI Developers
    I'll define a dynamic Configuration for my HTTP Destination in SOAPReceiver with XI3.0 Protocol.
    The solution for that is to use an Adapter Module to set the dynamic Configuration Value.
    Process: ... > SOAP Receiver > MyAdapterModule, set HTTP Destination > SOAP Receiver, send Message to HTTP Destination
    URL-Adressing work's fine
    This works fine for URL-Adressing, here's my Java Code from my Adapter Module:
    Message message = (Message) inputModuleData.getPrincipalData();
    message.setMessageProperty(new MessagePropertyKey("TServerLocation", "http://sap.com/xi/XI/System/SOAP"), "http://domain.com/foobar");
    HTTP Destination, how it works?
    If I'll use HTTP Destination as Adressing Type but the HTTP Destination will not set.
    I think the "TServerLocation" Property don't work for the HTTP Destination, but I don't find a Property in:
    Configuring the Receiver SOAP Adapter - Advanced Adapter Engine - SAP Library
    My Questions
    Did someone know the coresponding property name for HTTP Destinations instead of "TServerLocation"?
    Are there other Solutions to set the HTTP Destination dynamicaly, for Example with variables %my_http_dest% ?
    How can I set my own variables %my_http_dest% in my Adapter Module?
    Background
    We have a lot of Destinations and a lot of Szenarios and won't create a SOAPReceiver and Routing for each Destination in each Szenario.
    The Destination depends on a HTTP Header Parameter from Sender, I'll map this Parameters to the coresponding HTTP Destination in the Adapter Module, that's the same Mapping for all Scenarios. To keep the performance, I cache this Routing Table in the Adapter Module.

    Here's a way to misapplay "mesage:{var}" variables:
    SAP NetWeaver XI: Variable Substitution with Adapter-Specific Message Attributes via DynamicConfigurationBean
    But it is a dangerous solution, I think we use URL-Adressing in place of HTTP Destination

Maybe you are looking for

  • Mac crashes; Firefox 33.02 FORGETS all tabs (Safari doesn't!)

    MacBook Air (mid-2011), OS 10.10, 4 gig When the Mac crashes - increasingly frequently, sigh - Firefox forgets all open windows and current tabs... which is VERY annoying - especially as Safari DOESN'T. This is so infuriating that I'm about to give u

  • TV Remote Control

    I'v been a loyal customer since 2011. I've payed probably over $1000 in equipment rental fees alone. And you want to charge me $15 to replace a 4-year old worn out remote?  That seems ludicrous.

  • Can't get HOMM V to work on my Macbook Pro

    I installed Heroes of Might & Magic V on my macbook Pro, but everytime when I open it, I get the message: "You can't open the application 'Heroes of Might and Magic V NoSN' because it is not supported on this architecture". Does anyone know what this

  • NAC implementation wi thout DHCP Server

    Dear Experts, Is it possible to deploy NAC without having DHCP server in the network? We have some 300-400 users in the campus and want to enable NAC for them. As per my understanding Cisco NAC cannot be deployed without DHCP server in the network, h

  • Flash, AS2 fscommand not working

    hi, I have a flash application working fine in a html page. i want to add javascript interaction. I see that i have to use fscommand . when i compile and execute my flash application inside flash CS4 and test it directly from the generation directory