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

Similar Messages

  • Dynamic configuration variable lifetime?

    We are migrating from PI 7.1 to PI 731 and one of our applications uses dynamic configuration variable. It is a custom dynamic config variable saved in the first message (IDOC to PI BPM). We have asynch to synch scenario and  send a synchronous message from BPM.
    Once the response is received, the message is sent back from BPM (Second send step). During this message, we have a receiver determination (which uses the previously defined dynamic config variable). When I look at this message in sxmb_moni, I see no 'Dynamic Configuration '  and my receiver determination fails.. This used to work in PI 7.1 before and was curious if something was changed in PI 7.31?
    I had noticed previously that dynamic configuration variable was removed when the logic went in exception processing of the BPM (even in PI 7.1).

    As I had indicated, I was creating a custom dynamic configuration variable (with custom namespace and custom name). It was not a standard...
    Essentially, a short cut to store the variable from input message (which will no longer be available in my response). 

  • Accessing dynamic configuration variables for correlation in BPM

    Hi,
    we are not able to access the runtime variables/ context objects while using correlation in BPM.
    is this the a problem with SP levels.. My server is in PI SP 9
    What might be the problem..??
    Regards,
    Rajesh

    Hi,
    Where you are not able to see the context objects???
    In ID----Receiver det or in BPM???
    Regards
    Seshagiri

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

  • PI 7.1 Access to Dynamic Configuration through Java Class

    My Current scenario involves IDCO -> FILE communications in PI 7.1 using XSL where the file name is dynamic.
    I have attempted calling a Java Class from XSL with the use SAPXMLTOOL kit option set in the adaptor and it works but I need to be able to call the transform method
    public void transform(TransformationInput arg0, TransformationOutput arg1)
    from XSL so I can access the message and update the File Name via Dynamic Configuration.
    Whilst I can call a static class with in the object I can not call transform with the correct arguments (arg0, arg1). I need access to arg0 (payload) to set/figure out the filename. I can calculate the filename in XSL and pass it to the Java but in a static method it is useless as it need to access the arg0 which is a object and obviously non-static context.
    Is this possible ? How do I get access to Dynamic Configuration from XSL through Java in 7.1 ?
    I have successfully called a static method but that is no help.
    Thanks in advance.

    Suraj,
       Unfortunately you link isnt operational but thankyou anyway, I have managed to call as Java class as per my original post, but a static method does not allow me to get a handle to the Dynamic Configuration Variables in the message.
    It seems importing the 7.0 LIBS may be an option and Im not entirely sure I have that option.
    It certainly isnt possible to use the JDK5 XML implementation to even call a static method on an Java OBJ from XSL (obviously the USE SAPXMLTOOLKIT option is there for a reason).
    I think and again I could be wrong but direct access via XSLT..
    LINK:http://help.sap.com/saphelp_nwpi71/helpdata/EN/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm
    Is what Im looking for, I shall report back success or failure but the doco seems to fit the bill. Im not sure why I wanted to instatiate a sperate Java class when it can all exist in the XSLT.

  • Dynamic Configuration not working with Integrated Configuration

    Hi All,
    Dynamic Configuration works fine in PI 7.3 when Classical Configuration is used. However the same does not work using Integrated Configuration.
    Scenario :
    SOAP -->SOAP Synchronous scenario in PI 7.3 (Dual Stack).
    Trying to save a value from Request mapping using dynamic configuration and use the same in response mapping.
    UDF Code :
    Request Mapping :
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey Variable = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/SOAP", "Variable1");
    conf.put(Variable, a);
    Response Mapping :
    DynamicConfigurationKey Variable = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/SOAP", "Variable1" );
    string1 = conf.get(Variant);
    Note : Using Integrated Config(AAE Processing) - Response header does not have DynamicConfiguration header node , but Classical Configuration has that.
    Regards,
    Parimala
    Edited by: ParimalaE on Mar 1, 2012 1:33 PM

    For us this is what we had:
    This didn't work (getInputParameters is the newer stuff that doesn't work):
    DynamicConfiguration dc = (DynamicConfiguration)container.getInputParameters().getValue(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey dck = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/SOAP","TServerLocation");
    dc.put(dck,"https://xyz.api-salesforce.com/services/Soap/c/26.0/0DFa00000008jis");
    return "";
    This works for us(we had to remove getInputParameters):
    DynamicConfiguration dc =  (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey dck = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/SOAP","TServerLocation");
    dc.put(dck,"https://xyz.api-salesforce.com/services/Soap/c/26.0/00D3000000001X0");
    return "";

  • Dynamic configuration with a target ZIP file

    Hi,
    I have an scenario file to file. Source is a ZIP file, so CC is a FILE NFS Binary.
    XI acts as a FTP mover and there aren't  message mapping nor Integration directory definition .
    Target and source filename it's the same.
    But target directory must be defined dinamically.
    For example.
    Source file :   filename_x1234.zip
    Target file :   directory x1234, filename filename_x1234.zip
    Is that possible?
    Thanks, in advance
    Carme

    >
    Indira Deivasigamani wrote:
    > Hi,
    >
    > It is not possible to specify the directories dynamically.
    >
    > Thanks,
    > Indira D
    Of course it is!
    For the target directory, at least.
    Just use Dynamic Configuration (as for the filename) and fill the proper value in the mapping (UDF, f.ex.) or custom module. The technical name is "Directory" and the namespace is "http://sap.com/xi/XI/System/File", as described in http://help.sap.com/saphelp_nw70/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm.
    Regards,
    Henrique.

  • Dynamic Configuration JMS

    Hi,
    i am trying to use dynamic configuration variable DCJMSMessageQueue as a condition for determining the receiver within the Receiver Determiniation. I can see the value in the DCJMSMessageQueue, but the condition is not applied.
    Have anyone tried to use this variable within the Receiver Determination (SP14)?
    Thnx in advance.
    Regards, Erik Hubers

    Hi Erik,
    I'm using JMS Channels and Adapter-specific attributes quite a lot (in my case it's DCJMSCorrelationID).
    So far I never had the requirement to use it in conditions in a Receiver Determination, but I set up
    a Receiver Determination to test it and it worked with SP15.
    Now what was a little strange is that the expression only worked if I set it up in the following way:
    DCJMSMessageQueue = queue:///EVENT_EB5331?targetClient=1
    where my queue name is solely EVENT_EB5331 (I'm using WebSphere MQ in native mode).
    Maybe that solves your problem (I actually copied this value, because it is the way it is written in the DynamicConfiguration
    piece of the XI message).
    There is another issue I had with the JMS Adapter Specific Attributes in SP14.
    The namespace of the attributes was implemented wrong (at least the one for DCJMSCorreleationID). Instead of
    'http://sap.com/xi/XI/System/JMS'
    it was just 'JMS'.
    Now if the condition is - by any reason - evaluated against the correct namespace (the long one)
    this could also be a reason why it is not working.
    Check the values in the DynamicConfiguration and have a look at the Trace.
    You should find something like this in the R E C E I V E R  D E T E R M I N A T I O N part of it:
    <Trace level="3" type="T">...call rule engine for Condition %CL_SAI_SWF_RULE_ENGINE.MSG_GET_SYSTEM
    (MSG=&_MSG&;SYSFIELD="DCJMSMessageQueue";
    SYSNSP="http://sap.com/xi/XI/System/JMS")% = queue:///EVENT_EB5331?targetClient=1</Trace>
      <Trace level="2" type="T">......attachment XI_Context not found</Trace>
      <Trace level="3" type="T">......extracting from attachment: DCJMSMessageQueue =
    queue:///EVENT_EB5331?targetClient=1</Trace>
      <Trace level="2" type="T">......extracting values found: 1</Trace>
    Compare the namespaces there with the one in the DynamicConfiguration.
    If there is a mismatch upgrade to SP15 or open an OSS Message.
    I hope that helps...
    regards,
    Peter

  • Variable substitution or dynamic configuration

    Hi,
       I am doing Proxy sender to File receiver scenario. I have message payload like,
    MTtest1..... 0..1
    date.... 0..1
    item....0...unbound
    I want to create a text file  with the name SAP<date>.
    I am using a variable substitution method, date: payload: MTtest1, 1, date, 1
    Target directory: SAP%date%
    I am getting the filename correctly, But this creates a blank line in the top of the file. Please suggest me how to overcome this issue.
    If a send the date at the end, how the it must be written in variable substitution method.
    If I need to use dynamic configuration, please tell me how to do that, i saw few blogs, but i am not able to get it.
    Thanks and Regards,
    Sri

    Dear Arunsri,
    Better to use Dynamic Confi method becs its recommended by SAP also.
    Please Follow the below steps.
    (1)Create the UDF and pass Filename as an Input parameter as shown here.
    public String Set_Output_File_Name(String var_Filename, String var_Directory, 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");
    conf.put(key, var_Filename);
    return  "TRUE";
    (2)In File receiver adapter configuration, select the Adapter Specific message attributes and in that select the Filename Option.
    Regards
    jagesh

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

  • Variable Substitution and Dynamic Configuration

    Hi All,
    In Variable Substitution , the name that should be given the the receiver payload should be part of the Source Payload unlike the Dynamic Configuration wherein the file name can be generated dynamically during mapping.
    I have the following questions
    1.Dont we need to write the UDF for the Variable substitution?
    2.Cant we do the Dynamic configuration without writing UDF?If so then how?
    3.In Dynamic Configuration the file name is generated dynamically.But where does the file name come from if it is not the part of the source payload?
    Thanks in advance

    Hi Shwetha,
    1.Dont we need to write the UDF for the Variable substitution?
    No. Here we are accessing the contents of the payload to the target. So no UDF required.
    2.Cant we do the Dynamic configuration without writing UDF?If so then how?
    Yes and No.
    Because we can set only few Dynamic configuration  values without UDF.
    If both source and target are File, then check ASMA on both sender and receiver. Then u can get the source directory name and source file name for target also without any UDF.Also some other parameters.
    3.In Dynamic Configuration the file name is generated dynamically.But where does the file name come from if it is not the part of the source payload?
    The file name comes along with the source in the payload as a attribute in header. U can view this in SXMB_MONI, and Dynamic Configuration.
    In Dynamic Configuration the file name is generated dynamically.
    No the file name is taken as it is from the source, if u want to change dynamically that u have to do in a UDF.
    I hope this will clear all doubts,
    If nt pl post
    Babu

  • 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

  • What is the difference btwn Variable Substitution and Dynami Configuration

    Hi Gurus
    Could you please explain the difference between the Variable Substituion and Dynamic Configuration.
    whn shall we use them and in what scenarios?
    thanx in advance

    Please go through this blog
    /people/shabarish.vijayakumar/blog/2009/03/26/dynamic-configuration-vs-variable-substitution--the-ultimate-battle-for-the-file-name
    Also this
    /people/madanmohan.agrawal/blog/2009/05/20/combining-three-different-aspects-of-pi-asma-af-module-and-variable-substitution-in-one-shot
    Edited by: Baskar Gopal on Mar 31, 2011 9:04 AM

  • 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

  • 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

  • E62 file manager & memory problem

    Hello I have an E62 from cingular, with a 2-gig extended memory. I have a problem with invisible data -- mostly email messages -- that are using up all but 80 mb of the phone memory. It appears I mucked things up by uninstalling blackberry connect an

  • How do I get Lightroom to delete photos from my iPhone after importing them?

    Lightroom 4 imports photos and videos from my iPhone and puts them where I want them to go, and names the directories the way I want. All good. But it also leaves the photos on the phone to be manually deleted. Is there some way to have it delete the

  • Functions Not Available in Query Builder

    Application Express 4.1.1.00.23 When we go into the Query Builder and select a table and then, select a column, this adds a row for that column below the table. In that newly added row, there is a dropdown labeled "Function". However, this drop down

  • Nokia 5800 email application

    dear, ive recently reseted my nokia 5800 and deleted everything..including my email applic.tion-not the one found under mesage settinp but found on application. How can i download it as all that ive downloaded deducts my data bundle bt when i open th

  • MacBook Pro OS 10.6.8 won't update

    Hi All Had a bit of trouble with my MacBook recently. Did not want to start. Had to do restart from disk. Anyway, thought I had it all solved. It has been running pretty much like normal for the last weeks. But it won't update. If i try I get the mes