Dynamic Configuration Bean

Hi Experts,
I am doing a pass through scenario (i.e. ICo) without any ESR objects and I want to add time stamp to the file name at receiver side.
Could you please help me in doing this via Dynamic Configuration Bean?
What I also want to do is to replace file name with interface name through dynamic configuration bean using File adapter in receiver side.
But instead of getting the interface name in place of file name I am getting "message.interface" as file name. I have also used
variable substitution in receiver channel along with ASMA attributes.
Please suggest where I am wrong.
Thanks,
Aamir

Hi Aamir,
We are using only one Module :"AF_Modules/DynamicConfigurationBean" with the type "Local Enterprise Bean" and the system proposes a Module key.
In the above screen shot Module key "1" works as "getFileName" and Module key "2" works as "setFileName" .
     Coming to Module configuration for Module key "1" we are providing the Parameter name as "key.1" and Parameter value as :"read http://sap.com/xi/XI/System/File FileName" this value reads the FileName and and repalces the FileName with Interface name based on the Parameter value as "message.interface" (attribute used to fetch the corresponding Interface Name) for Parameter name "value.1".
Module key "2" we are providing the Parameter name as "key.2" and Parameter value as :"write http://sap.com/xi/XI/System/Messaging interface" this value writes the FileName by calling the module.
I have worked with this Dynamic Configuration Bean in both File and SAP SFTP Adapter in SAP PI 7.3 in case of SFTP Adapter we need to follow the following steps.
Thanks
Durga

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 bean in JMS Adapter

    Hello Experts,
    My scenario is JMS(Active MQ) to File.Its just Passthrough scenario and no mapping involved.
    Filename will be coming in one of the JMS Property (say businessId) and I need to set this filename to file adapter.
    I have refered the stefan's blog and used the Dynamic configuration bean module in sender JMS adapter.
    getFilename key.1 write http://sap.com/xi/System/JMS DCJMSMessageProperty4
    getFilename value.1 module.filename
    setFilename key.1 read http://sap.com/xi/System/File FileName
    setFilename value.1 module.filename
    But required filename is not populated in the target File.Any other configuration is missing here?

    Hi Karthiga
    Did you set the ASMA properties in both your sender JMS channel and receiver File channel?
    For the JMS adapter, as shown below, you will need to enter the DCJMSMessageProperty4 into the table
    Configuring the Sender JMS Adapter - Configuring the JMS Adapter in the Integration Directory/PCK - SAP Library
    If you want to set additional JMS message attributes, select Specify Additional JMS Message Properties (Maximum of 10).
    In the table, enter the names of the JMS message properties whose values are to be included in the message header of the PI message.
    The technical names of the additional attributes are DCJMSMessageProperty0, DCJMSMessageProperty1, ..., DCJMSMessageProperty9.
    For the File adapter, you need to check the ASMA FileName attribute.
    Once you have this configured, in your message, you should be able to see that the value is in the DynamicConfiguration section of the SOAP header.
    Rgds
    Eng Swee

  • How to use the Dynamic Configuration Bean

    Hi experts,
    im currently doing a file to mail scenario.
    i want the name of the input file as the subject of the mail.
    i want to establish this using the Dynamic Configuration bean
    my first question is:
    key.1 <b>read</b> http://sap.com/xi/XI/System/Mail THeaderSUBJECT
    value.1 message.messageID
    this reads the value of the message ID into the attribute THeaderSUBJECT
    but what does this do?
    key.1 <b>write</b> http://sap.com/xi/XI/System/Mail THeaderSUBJECT
    value.1 message.messageID
    when i use this it has no effect atall.
    my second question.
    I have my input filename in the FileName attribute in Dynamic configuration how can i read it into THeaderSUBJECT attribute.
    Appreciate any suggestions.

    Hi Satish,
    Yep i know its possible via an udf in Message mapping but i dont have an MM in my scenario. Since im not parsing thru the input data since its an excel file, so im transferring the file using the following method
    /people/william.li/blog/2006/09/08/how-to-send-any-data-even-binary-through-xi-without-using-the-integration-repository
    and in this method if i include an MM it will give me a mapping exception.
    So i have to use this bean somehow and try to accomplish what we do in the udf.

  • Dynamic Configuration Header is Missing

    Hi,
    Am getting this following when I tried a simple UDF in mapping, please let me know your thoughts
    "Exception caught by adapter framework: Dynamic Configuration Header is Missing."
    UDF
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/JMS","DCJMSMessageProperty0");
    conf.put(key1,a);
    DynamicConfigurationKey key2 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/JMS","DCJMSMessageProperty1");
    conf.put(key2,"123");
    return a;
    Thanks in Advance for the help
    Ashok

    Hi ASHOK,
        1.You will be able to see DynaicConfiguration Header automatically in Moni only if your PI is usin service Pack >= 14.in this case  you jus need to check ASMA atributes in Communication channel to capture them in the UDF  that you have written and need not configure the Dynamic configuration bean.To see the Service pack that you are currently using follow the navigation path.
         open the PI through Log on Pad(ABAP engine) -> on the tool bar click utilities>status--> Mote details by clicking magnifying lens symbol then you will be able to see all the services packs and basis components too.
    2.In case if the service pack is not SP ! >= 14 then you will have to follow the procedure of using Dyna,ic configuration Bean as experts mentioned above.
    Thanks,
    Ram.

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

  • Dynamic configuration - missing files

    Hi,
    during processing of message Dynamic Configuration is used.
    Inside SOAP response is written file name and Directory where file should be generated.
    But file is missing..
    Message seems to be processed successfully.
    Any idea what could happen?
    M.

    Hi,
    >>>Inside SOAP response is written file name and Directory where file should be generated.
    if this is a reponse you're doing request response beans ?
    >>>Message seems to be processed successfully.
    have you checked for any errors in the channel too or only message monitoring ?
    do you see the message in the MessagingSystem monitor ? what is the audit saying - was the file generated ?
    Regards,
    Michal Krawczyk

  • 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

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

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

  • Problem facing in Dynamic configuration in SAP PI 7.3

    Hello,
    I am doing dynamic configuration in sap pi 7.3. I am using the following UDF.
    String devFileName="'a.vc'";
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey FileName = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File","FileName");
    conf.put(FileName, devFilename);
    I am using this UDF in message mapping and mapped this UDF in the message header.
    I have selected the adapter specific message attribute in receiver communication channel also.
    Still I am getting the folowing error.
    MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: The Adapter Message Property 'FileName' was configured as mandatory element, but was not supplied in the XI Message header
    Exception caught by adapter framework: The Adapter Message Property 'FileName' was configured as mandatory element, but was not supplied in the XI Message header
    'Transmitting the message to endpoint using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.file.configuration.DynamicConfigurationException:  The Adapter Message Property 'FileName' was configured as mandatory element, but was not supplied in the XI Message header.
    Please help me what to do.
    Thanks & Regards,
    Moumita

    Hi, try this code:
    String devFileName="a.vc";
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    conf.put(FileName, devFilename);
    ASMA checkbox and respective parameter should be enabled in the required Adapter.
    Best Regards

Maybe you are looking for

  • Unlimited Data Policy

    When I signed up with Verizon many years ago I was happy to pay for Data long before many even had it.  I have been with Verizon in one form or another since Verizon purchased AirTouch in Orange County California.  Yes, I had a bag phone and a 3 watt

  • Need conceptual advice for 16:9/4:3 menus

    Hi, First off I should say that I am undertaking my most ambitious DVD project to date and I am in well over my head. I want to order a book(s) and would appreciate any advice regarding which book(s) might best deal with the type of issues I am about

  • Replacement program

    I bought an iphone 5 from a wireless carrier , Zain in Saudi Arabia, and then in a few months (4-5) the sleep/wake button stopped working without me even using it. But later on 29th April i found out Apple has launched a replacement program, so i wen

  • I can't Apply license at ACS 5.1

    hi, maybe it looks stupied Q , but this my first time with ACS 5.1 server 1120 i configure the basic configuration using CLI setup command , then I connect https://10.2.2.7 but it ask me for the username and password , when i put the password i cann'

  • Export Audio to QT Movie -- Expected Behavior and Other Questions

    In the past I've reported that the Export Audio to QT Movie function didn't work correctly in LP 7.1.1. Well, it still doesn't seem to work correctly, but this time around I'm at least getting some kind of result. It would be kinda cool if I could ge