Dynamic configuration : possibility of adding custom Key?

hi experts,
is it possible that i can add a new custom key like for example
namespace : http://sap.com/xi/XI/System/ERROR    
key : ERRORDESC
and put it inside the Dynamic configuration during a mapping and then use it further?
or are we limited to the use of ONLY standard key pairs?
Thanks in advance.
Regards,
Amol

Yes, is possible.
Take a look here:
http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=95093307
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/00a7ba12-e7cd-2b10-d589-e52b11346f77

Similar Messages

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

  • Dynamic Configuration key length

    I am using dynamic configuration to set certain JMS properties but it appears that the maximum key length is 20 characters.
    Has anyone experienced this problem.  Is this a bug?
    Thanks
    Here is my code
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/JMS", "com_inforecord_messageProcessor");
    conf.put(key1, "SoapMessage");

    Yes, is possible.
    Take a look here:
    http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=95093307
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/00a7ba12-e7cd-2b10-d589-e52b11346f77

  • Is it possible to adding a "standard" custom approver?

    Hi forum,
    We have a requrement that the user needs to approve the last stage. I've been experimenting with custom field and adding  <virsa_ae_wrkflapvr ID="ZTRAINEE" APPROVER="ZTRAINEE" wftype="AE"/> to the init_clean_snf_insert_data file. As far without success. Is it possible to adding a "standard" custom approver?
    These users will be registred in UME through LDAP.
    Kind Regards,
    Vit Vesely
    Edited by: Vit Vesely on May 17, 2010 9:22 PM

    Hi VIt,
    it is possible to create a custom field that automatically fetches the user id by using LDAP mapping concept.
    What you can  do this bycreate a custom fields in CUP of field type as text. Then Go to Configuration-> fields mapping-> LDAP mapping.
    Now in additional field  select the custom field in AC field and user id ( "sAMAccountName" in case of active directory ) in LDAP field.
    Now when user login from end user form its information will come to CUP application userid will be also populated in the custom field that you have created.
    If you want provisioned user to be the approver it is difficult to achieve but can be done by one solution  In CUP apart from the standard approvers , you can create custom approver determanator. Configuration->Workflow->Custom Approver Determinator. It can be created on the basis of various CUP.attributes like request type, priority, role, custom fields etc. But you have define clearly in this if request has this value for this attribute than this will be the approver. So above created custom fields will have userid right. So you can create CAD for this custom fields. and than can define if User id is this then this is the approver. In you case if Custom field has values USER_NAME that Apprvoer is USER_NAME. All users in this case should exist in UME. Also CAD needs to be maintain for every user this will be tedious task. you can upload this by excel sheet also.
    Hope that it would be helpfull..
    Kind Regards,
    Srinivasan

  • Get IDoc-number from flat IDoc using dynamic configuration

    Dear experts
    In an IDoc2File scenario I have added the IDoc-number to dynamic configuration using the folling code in an UDF:
    DynamicConfiguration conf = (DynamicConfiguration)
    container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey FileName = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File","DOCNUM");
    conf.put(FileName, a);
    The information is stored in the SOAP message
    <SAP:DynamicConfiguration SOAP:mustUnderstand="1">
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="DOCNUM">0000000000012345</SAP:Record>
    </SAP:DynamicConfiguration>
    Can anybody tell me how I can access this information in the "variable substitution" section of the CC? Perhaps something like "message:docnum"?
    Additional information:
    Taking the IDoc-number from the payload using e.g. "payload:ORDERS05,1,IDOC,1,EDI_DC40,1,DOCNUM,1" does not work, since the XML-IDoc has been converted to an flat-IDoc.
    Thanks in advance for any good ideas
    Markus

    Dear Rodrigo and Sarvesh
    Thanks for your help so far! I applied your hints and now it is working fine.
    But now I have the following additional questions
    1.) My message mapping only maps the input IDoc to an output IDoc of the same type and structure. The MM is only required to process the UDF. Is there another, better solution to achieve my requirement that the IDoc-number shall be part of the filename?
    2.) In the CC you have the possibility to use temporary files (section "Processing", Option "Put File" = "Use Temporary File". I think this will not work with the given solution, will it?
    To possibly help somebody else or clarify the mechanism once again, I wrote down how my solution now looks like.
    My UDF in the message-mapping looks like this
    - Input = DOCNUM of IDoc, e.g. ORDERS05/IDOC/EDIDC/DOCNUM
    - Outpt = DOCNUM of IDoc, e.g. ORDERS05/IDOC/EDIDC/DOCNUM
    - UDF:
    public String putDynamicConfiguration(String docnum, Container container) throws StreamTransformationException{
    try
         DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
         DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
         String filename = "Prefix_" + docnum + ".txt";
         conf.put(key, filename);
         return docnum;
    catch (Exception e)
         return docnum;
    In the CC the settings are now as follows
    File Name Scheme = . -> only a dot or something else, because this field is obligatory, even if it is not used in this case.
    Variable substitution (...)
        Enable -> unchecked
    Adapter-Specific Message Attributes
        Use Adapter-Specific Message Attributes -> checked
        Fail If Adapter-Specific Message Attributes Missing -> checked
        File Name -> checked
        Directory, File Type, Temporary Name Scheme for Target File Name -> unchecked
    When I send an IDoc to PI and view the Adapte-Engine Version of the message (the SOAP-document, not the payload) I can find the Filename:
    <SAP:DynamicConfiguration SOAP:mustUnderstand="1">
    <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">Prefix_0000000000012345.txt</SAP:Record>
    </SAP:DynamicConfiguration>

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

  • Problem with dynamic configuration in PI 7.0 (SP 21)

    We're trying to set a dynamically configurable parameter (UrlParam in plain http adapter) in a java mapping and when calling,   via proxy, getting the following error returned<br />
    <p />
    <br />
    &lt;?xml version="1.0" encoding="utf-8" ?&gt;<br />
    - &lt;asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"&gt;<br />
    - &lt;asx:values&gt;<br />
      &lt;SYSTEMFAULT href="#o284" /&gt;<br />
      &lt;/asx:values&gt;<br />
    - &lt;asx:heap xmlns:xsd="http://www.w3.org/2001/XMLSchema"<br />
    xmlns:abap="http://www.sap.com/abapxml/types/built-in" <br />
    xmlns:cls="http://www.sap.com/abapxml/classes/global" <br />
    xmlns:dic="http://www.sap.com/abapxml/types/dictionary"&gt;<br />
    <br />
    - &lt;cls:CX_AI_SYSTEM_FAULT id="o284"&gt;<br />
    - &lt;CX_ROOT&gt;<br />
      &lt;TEXTID&gt;F63AFF63DBE4BB4786A7F52CC4167145&lt;/TEXTID&gt;<br />
      &lt;PREVIOUS /&gt;<br />
      &lt;KERNEL_ERRID /&gt;<br />
    - &lt;INTERNAL_SOURCE_POS&gt;<br />
      &lt;PROGID&gt;95&lt;/PROGID&gt;<br />
      &lt;CONTID&gt;3304&lt;/CONTID&gt;<br />
      &lt;/INTERNAL_SOURCE_POS&gt;<br />
      &lt;/CX_ROOT&gt;<br />
      &lt;CX_STATIC_CHECK /&gt;<br />
    - &lt;CX_AI_SYSTEM_FAULT&gt;<br />
      &lt;CODECONTEXT /&gt;<br />
      &lt;CODE&gt;PLAINHTTP_ADAPTER.ATTRIBUTE_MISSING_PARAMS&lt;/CODE&gt;<br />
      &lt;ERRORTEXT /&gt;<br />
      &lt;LANGUAGE /&gt;<br />
      &lt;/CX_AI_SYSTEM_FAULT&gt;<br />
      &lt;/cls:CX_AI_SYSTEM_FAULT&gt;<br />
      &lt;/asx:heap&gt;<br />
      &lt;/asx:abap&gt; <br />
    <p />
    <br />
    The java code in the mapping is as follows:<br />
    <br />
    The java code in the mapping is as follows:<br />
    /*<br />
    Created on 07-Jun-2010<br />
    *<br />
    To change the template for this generated file go to<br />
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments<br />
    */<br />
    package uk.gov.communities.finance; <br />
    <br />
            import java.io.InputStream;<br />
    import java.io.OutputStream;<br />
    import java.util.Map;<br />
    <br />
    import com.sap.aii.mapping.api.DynamicConfiguration;<br />
    import com.sap.aii.mapping.api.DynamicConfigurationKey;<br />
    import com.sap.aii.mapping.api.StreamTransformation;<br />
    import com.sap.aii.mapping.api.StreamTransformationException; <br />
    <br />
    /**<br />
    @author Mark<br />
    *<br />
    To change the template for this generated type comment go to<br />
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments<br />
    */ <br />
    <br />
    public class PaymentGatewayRequestMap implements StreamTransformation {<br />
            /** This Map parameter is for the Method setParameter() */<br />
            Map param=null;<br />
            /** This method should be used while the Class implements<br />
    StreamTransformation interface<br />
             *<br />
    @param param - A Map object<br />
             */<br />
            public void setParameter(Map param){<br />
                    this.param=param;<br />
            }<br />
    <br />
    /**<br />
    This method will be called by XI to execute Java Mapping. <br />
    @param in - The InputStream which has the source message from CRM <br />
    @param out - The OutputStream which has the target message to ProFinance <br />
    */ <br />
    public  void execute (InputStream in, OutputStream out) throws
    StreamTransformationException { <br />
    String urlParamOne = null; <br />
    try{ <br />
    DynamicConfiguration dynCon = (DynamicConfiguration)param.get("DynamicConfiguration");  <br />
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/HTTP","myValueHere"); <br />
    String response = ""; out.write(response.getBytes()); <br />
    } <br />
    catch(Exception e){<br />
                            throw new RuntimeException(e.getMessage());<br />
                    }<br />
            }<br />
    }<br />
    <p />
    <p />
    <p />
    Looking at the call in SXMB_MONI there's no sign of the dynamic configuration stage anywhere but we are seeing the following in the response message:
    <p />
    <br />
    &lt?xml version="1.0" encoding="UTF-8" standalone="yes" ?&gt;<br />
    -&lt !--  Call Adapter <br />
      --&gt;<br />
    - &lt;SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1"&gt;<br />
    &lt;SAP:Category>XIAdapter&lt;/SAP:Category&gt;<br />
      &lt;SAP:Code area="PLAINHTTP_ADAPTER"&gt;ATTRIBUTE_MISSING_PARAMS&lt;/SAP:Code&gt;<br />
      &lt;SAP:P1 /&gt;<br />
      &lt;SAP:P2 /&gt;<br />
      &lt;SAP:P3 /&gt;<br />
      &lt;SAP:P4 /&gt;<br />
      &lt;SAP:AdditionalText /&gt;<br />
      &lt;SAP:ApplicationFaultMessage namespace="" /&gt;<br />
      &lt;SAP:Stack>Dynamic Header - Missing Message Attributes: Fields/Parameters&lt;/SAP:Stack&gt;<br />
      &lt;SAP:Retry>N&lt;/SAP:Retry&gt;<br />
      &lt;/SAP:Error&gt;<br />
    <p />
    <br />
    Please note, we have set this up on another PI system (7.0 sp 12) and it works as required.
    <p />
    <br />
    Many thanks
    <p />
    <br />
    Andreas

    Hello , let me clarify:
    - There's a graphical mapping which has a user defined function with the following code:
    DynamicConfigurationKey dynKey =DynamicConfigurationKey.create(
    "http://sap.com/xi/XI/System/HTTP",paramName);
    DynamicConfiguration dynCon =(DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    dynCon.put(dynKey, paramValue);
    return paramValue;
    - The above UDF has paramName set to UrlParamOne via a constant and paramValue set a per an element in the incoming structure.
    - Incidentally, a Java mapping is then called (although not relevent) to clear the xml produced from the mapping. This is a requirement for our customer who don't want the HTTP body set. The code is as follows:
    Created on 07-Jun-2010
    To change the template for this generated file go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    package uk.gov.communities.finance;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    @author Mark
    To change the template for this generated type comment go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    public class PaymentGatewayRequestMap implements StreamTransformation {
    /** This Map parameter is for the Method setParameter() */
    Map param=null;
    /** This method should be used while the Class implements
    StreamTransformation interface
    @param param - A Map object
    public void setParameter(Map param){
    this.param=param;
    This method will be called by XI to execute Java Mapping.
    @param in - The InputStream which has the source message from CRM
    @param out - The OutputStream which has the target message to ProFinance
    public void execute(InputStream in, OutputStream out) throws StreamTransformationException {
    try{
    String response = "";
    out.write(response.getBytes());
    catch(Exception e){
    throw new RuntimeException(e.getMessage());
    Many thanks
    Andreas

  • 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

  • File Receiver adapter module Dynamic Configuration

    Hi All
    I have a adapter module in a receiver file adapter. In the code I try to access the file name through dynamic configuration,The file name gets set in the mapping.
    String strFileName = msg.getMessageProperty(new MessagePropertyKey("FileName","http://sap.com/xi/XI/System/File"));
    When my module get executed I get error: nested exception is: java.lang.NullPointerException: while trying to invoke the method com.sap.engine.interfaces.messaging.api.Message.getMessageProperty(com.sap.engine.interfaces.messaging.api.MessagePropertyKey) of an object loaded from local variable 'msg'
    Is it possible to get file name in receiver adapter? if so why does this error occur?

    Yes it is possible...chk this
    /people/daniel.graversen/blog/2006/10/05/dynamic-configuration-in-adapter-modules
    i guess u have added this import statement in ur code:
    import com.sap.engine.interfaces.messaging.api.MessagePropertyKey;
    Code will be soemthing like this (FOR PI7.1)
    MessagePropertyKey mpk = new MessagePropertyKey("FileName","http://sap.com/xi/XI/System/File");
    String filename = msg.getMessageProperty(mpk);
    Thanks
    Amit

  • 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

  • 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 of properties/descriptor files?

    Hello all,
    I am trying to use configuration files used in j2ee applications (property files, deployment descriptors) in a more dynamic manner. I have been searching for a suitable solution for some time now.
    I have come across the following syntax within a configuration or properties file in a legacy project that I am to maintain.
    <some-tag>
    <some-config value=${theVariable}/>
    </some-tag>
    Notice the JSTL-like syntax ${theVariable}
    The above code comes from an xreg config file, read at startup.
    I do not think that there is custom code that parses the file so that it is updated, but I think that this is a pretty cool mechanism for dynamic configuration of applications especially if the properties come from the shell environment variables and can be set at will, or from the java -D option.
    If anyone knows anything about this technique please respond to the present mail or to [email protected]
    thank you,
    Joe
    Joe

    Hi,
    I have very similar requirement, In my scenario I need to pick up files from 4 static locations and based on the file name and pick up type(file/ftp) I can find out the destination's connectivity information from a Cross-Referencing table(Based on MS-SQL Database table- I can get this using look API) in this table we maintaining more than 100 destinations(host/user_name/password etc).
    Now I need to set the connectivity information dynamically at runtime. I know this is not possible with Standard XI but does anyone thinks this is possible by any technical way using with XI.. Adapter Modules or Java Proxies?
    This is very Critical to win the war with other middleware tools. Please let me know your thoughts and comments...
    thanks,
    Laxman Molugu

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

  • Accesing Runtime Parameters using Dynamic configuration

    Hi..
    Can we access  the following  parameters from mapping using DYNAMIC CONFIGURATION key?
    <SAP:TraceLevel>1</SAP:TraceLevel>
      <SAP:LogSeqNbr>000</SAP:LogSeqNbr>
      <SAP:RetryLogSeqNbr>000</SAP:RetryLogSeqNbr>
      <SAP:QIdInternal>XBTI0001</SAP:QIdInternal>
    Please let me know how to access
    Thanks
    Ram

    Hi Ram,
        I dont think we can achieve this one,only two ways to read any values at mapping level
    1)Dynamic Configuration--Option ruled out....not possible,
    2)Write some java coding to read the value,i think this one also not work it out.
    your req unique..i am looking for answer..:)
    Cheers,
    Raj

Maybe you are looking for

  • How to use different stylesheets for ChangeAttributeRequest workflow in OAM

    Hi, We have a requirement to invoke different change attribute request workflows (change password ,change email etc..) from external JSPs.. I want to apply different stylesheets for each workflow. In the workflow URL if i enter style=stylesheet-name

  • Error Installing iTunes 7

    iTunes 7 downloads good, but when I try to install it a window pops up and says "The Folder Path 'Documents and Settings/Jacob' contains an invalid character". Does anyone know how to resolve this problem?

  • Problem Downloading Adobe Acrobat 8 Standard

    Hello, I reinstalled my computer and i cannot install Acrobat beacause my cd is unreadable. I tried to download it from official site but there is no download link for my version. I found this site: http://www.adobe.com/uk/downloads/other-downloads.h

  • Pipe read  error

    i'm trying to make a ServerSocket that listen for clients and then uses one thread to read from a file and for each client starts another thread, and then as the file is being readed to send data to the other threads and from there to the clients but

  • Configuration overview for Reciever Determination Error

    Hi friends !! while creating Reciever determination... at configuration Overview for reciever determination (tab)   Reciever(Partner / Service) showing <b>Not Defined</b> can anybody suggest me why this issue is coming Regards Abhishek Agrahari