Adapter-Specific Attributes Retrieval

Hello,
I am trying to retrieve the filename from the sender message type to be used in the mapping. In order to achieve this I ticked the Adapter-Specific message properties on both Sender and receiver CC. I created a user-defined function FilenameY with the following code to retrieve the file name. I am not importing any packages.
//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");
String ourSourceFileName = conf.get(key);
return  ourSourceFileName; 
Unfortunately I am getting the following message when I test mapping TESTMsgMapping. Any ideas why this is happening?????
RuntimeException in Message-Mapping transformation: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._TESTMsgMapping_ method FilenameY$[com.sap.aii.mappingtool.tf3.rt.Context@32a38dfd]
Thank you
Kathir

Hello Saravana,
That is right we will only get the attribute values at Runtime (we cant test the mapping fully at designtime) but the problem is that I am getting a similar error message at runtime.
During the application mapping
com/sap/xi/tf/_TESTMsgMapping_ a
com.sap.aii.utilxi.misc.api.BaseRuntimeException
was thrown: RuntimeException in Message-Mapping
transformatio~
So I thought the above problem at runtime was down to the message during the message mapping. I am not using any parameters to pass values to the function or using any packages either. Any comments will be gratefully accepted.
Thank you
Kathir

Similar Messages

  • Multi-Message-split with ABAP mapping and adapter specific attributes

    Hi all,
    With <b>ABAP-Mapping I split 1 message to n messages</b>.
    So many files are generated in <b>file-Adapter</b>.
    Everything fine.
    But now I want the file names different using adapter specific attributes.
    It is not possible to use variable substitution and write the file name in payload because of receiver restrictions.
    I tried this with following similar coding in ABAP-Mapping:
    data: lt_records TYPE MPP_DYNAMIC_TAB.
          Loop.
          l_file_name = "payload-Inbound"-information
          ls_record-namespace = 'http://sap.com/xi/XI/System/File'.
          ls_record-name = 'FileName'.
          ls_record-value = l_file_name.  "l_file_name comes from inbound-payload
          append ls_record to lt_records.
         Endloop.
      CALL METHOD dynamic_configuration->set_all_records
        EXPORTING
          records = lt_records.
    If I start the interface I see in the monitoring the dynamic configuration with many entries for file-name in the the SOAP-Header mapping of the request message (following extract):
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Mapping der Request-Message
      -->
    - <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">BPAADDRESS.XML</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">BPABROKERROLE.XML</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">BPACOMPANYSEGMENT.XML</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">BPACUSTOMERROLE.XML</SAP:Record>
    The result is that <b>all files have the same file name</b> (last entry in dynamic configuration).
    Is it possible to write the adapter specific configuration in ABAP-mapping <u>for every single result message</u>??
    Thank you for your help,
    Florian

    Hi Florian,
    I've a different idea...I dont think its a "right solution" but just another work around..it involves a BPM...
    In your ABAP mapping..set the dynamic config with as many variables as number of different messages...i.e. use the variables like 'FileName1', 'FileName2'...'FileName6' instead of 'FileName'. But use the same namespace 'http://sap.com/xi/XI/System/File'
    Call the above mapping in a BPM and capture the individual messages and set the attribute 'FileName' from the values of 'FileName1' to 'FileName6' accordingly using Message Mapping and then send the message using the 'Send' step.
    before you try this, try using the variable names 'FileName1' ...'FileName6' in the receiver adapters...enable the ASMS. <b>I know we need to select which variables from the dynamic config to be used by the adapter by specifically selecting 'FileName', 'Directory' etc...but just give it a try and see if it works..</b>
    Or..instead of using a BPM..you can combine Henrique's idea...use Adapter module to set the value for 'FileName' from variables 'FileName1'...'FileName6' accordingly.
    hope I'm clear..lemme know if you have any questions..
    cheers
    praveen

  • Adapter specific attributes - SOAP Adapter

    Hi,
    I am trying to use the adapter specific attributes of the receiver SOAP adapter. But I am not able to view the Dynamic configurations in sxi_monitor corresponding to this message. Any clue why!?
    I read through the SOAP adapter help on help.sap.com,
    <i>http://help.sap.com/saphelp_nw2004s/helpdata/en/69/a6fb3fea9df028e10000000a1550b0/frameset.htm</i>
    Here it says:
    <i>If you want to use header fields, set the relevant indicator for Variable Header. The technical names for the fields are XHeaderName1, XHeaderName2, XHeaderName3. The parameters are embedded in the HTTP request under the names you enter here.</i>
    But I donot find an option where I can enter the names. Am I missing something here?
    Regards,
    Smitha.

    Hi Smitha,
    I did not try to use adapter-specific attributes with SOAP-adapter, but with mail-adapter. The documentation is quite similar, so I excpect similar results...
    So as far as I understood, the parameters XHeaderName1, ... etc are for dynamic extension of the set of adapter-specific attributes. For example, if you want to add some more information in the message header, you can program an adapter module and you have now a guide how to name the additional attributes.
    Usually, the "standard" adapter-specific attributes are starting with "S" (Sender) or "T" (Receiver). You can find the names in the documentation of the SOAP-adapter.
    In order to use the adapter-specific attributes, you have to check both indicators (adapter-specific attributes, variable transport binding). If this still doesn't work, you should use OSS. In my scenario (mail adapter) this didn't work, too. The reason was, that there was a bug in the adapter metadata (Integration Repository) of SAP BASIS. There was a SAP note, where I could download the correct adapter metadata. Maybe you can find a SAP note for the SOAP Adapter.
    Although this is probably not the final solution, I hope this guides you a step further.
    Regards,
    Torsten

  • Using Adapter-specific attributes in Mail adapter

    Hi,
    I try to use adapter-specific attributes in my Mail adapter. I set the "Use Adapter-Specific Message Attributes" indicator, but I do not get a result in the mapping and also in the SXMB_MONI the attributes are not visible.
    The documentation also refers to Variable Transport Binding indicator:<a href="http://help.sap.com/saphelp_nw04/helpdata/en/23/c093409c663228e10000000a1550b0/content.htm">http://help.sap.com/saphelp_nw04/helpdata/en/23/c093409c663228e10000000a1550b0/content.htm</a>
    Could this be the problem? I cannot find this indiciator! Does anyone know where I can find this indicator?
    Regards,
    Torsten

    Hi,
    The values for the parameters, set using adapter specific message attributes are available at runtime in the path http://sap.com/xi/XI/System/Mail.
    We need to write UDF's that can extract the values from this path.
    For Ex:
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters() .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create(
        “http://sap.com/xi/XI/System/File”,
        “FileName”);
    String valueOld = conf.get(key);
    if (valueOld != null) {
        String valueNew = valueOld.replaceAll(“input”,”output”);
        conf.put(key, valueNew);
    If you check Dynamic configuration in sxmb_moni, you would be able to find the values for all the attributes that have been set in the adapter.
    Regards,
    Smitha.

  • Reg: Adapter Specific Attributes

    Hi Experts,
    My scenario is a File to File and I am using Adapter Specific Message Attributes in it. Things are going fine but when I check directory in ASMA, getting the output file in specified directory and it gets deleted after a while. What might be the reason, please clarify me.
    (As my processing mode is Delete at Sender side : If this is the reason how can I manage my scenario)
    Thanks,
    Sri.

    Hi,
    have you used any kind of Background processing for these files on FTP server that might be deleting the files.
    Or in Sender FTP adapter you have used any kind of masking for Fiel name. Probably this might be the reason that even after adding teh time-stamp the file might have get deleted.
    For time being deactivate the delete feature of sender fiel adapter and try if still the fiels are getting deleted or not.
    Thanks
    Swarup

  • Where is the Set Adapter Specific Attributes indicator on the comm channel?

    I really think I must be losing it guys.
    We are SP16, we went directly to SP16 from 9, so we skipped over SP14.
    When I go into a communication channel and choose an adapter(File) for instance. I cannot find the Set adapter-specific message attributes indicator anywhere!
    Someone please tell me where it is located! If possible please send a screenshot to [email protected]
    Thanks,
    chris

    Hi,
    did you reimport SAP BASIS component to IR ?
    just like specified in question 3 (adapter section)
    in the XI FAQ?
    /people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions
    Regards,
    michal

  • Accessing Adapter Specific Attributes from ABAP proxy

    Hi,
    Now i have a scenario from where i take a file from FTP and send it to ERP by proxy. While taking the file i am taking also the file name by setting adapter-specefic message attributes -> File Name. So the file name appears inside the SOAP Header. Now how i am going to use the file name in my ABAP code on the SAP side.
    Thanks.
    Arman

    Hi Arman,
    Follow this link:
    The specified item was not found.
    Your case is very similar to that one. Extract file Name from SOAP Header and then map it into any
    field of your proxy.
    Carlos

  • HTTP Adapter-Specific Message Attributes

    Hello,
    can someone help me to configure an url-parameter in HTTP Sender Adapter (adapter specific attributes).
    I need the paramter customer_number for the call BAPI_SALESORDER_GETLIST.
    My Question:
    How can I configure the parameter and after that how can I use this paramter in the url?
    thanks for help
    regards
    alex

    Alexander,
    Dont think this is possible.
    From note : 839803
    <i>Are HTTP header fields supported in the inbound?
    The HTTP client may use HTTP header fields, however, they are not analyzed and are not available in the XI processing.</i>
    Regards
    Bhavesh

  • Adapter Specific Paramters for Integration Process in Configuration

    I want to send the data from flat file to idoc through BPM
    While doing configuration do I need to explicitly give Adapter specific parameters(Logical System Name) for BPM(Integration Process) or not?
    Is it mandatory to give Adapter Specific Parameters for this scenario?
    FILE-->BPM--->IDOC(R/3)
    Thanks & Regards
    Katta Mohan Reddy

    Hi,
    why would you require Adapter specific parameters (I assume you mean Adapter specific Attributes) - Logical System should be there through the routing (Receiver Determination). What exactly do you want to accomplish by that?
    regards,
    Peter

  • Adapter Specific Identifier error

    Hi,
    I am not able to see the logical system name in Adapter specfic identifier for my business system.
    http://rapidshare.com/files/71687434/Error.JPG.html
    please find the attached link for error.
    Regards,
    Nithiyanandam

    Hi,
       Have u defined logical system for the sender system?? If so it has to highlight when u compare sld content in adapter specific attributes.So try to perform sld cache refresh and check out.
    If u have not defined LS then, go to transaction bd54 and define a logical sytem for the sender client. Save your entries and do a sld cache refresh. Now you should be able to see logical system name for sap system in SLD. Once this is done, go to adapter specific attributes and Click on the button "Comapre with SLD" and you should get the LS name and choose that, save and activate your  changes.
    Regards,
    Prasanthi.

  • Accessing Adapter specific message in Module

    Hi ,
          I am developing a module to set the content type in the mail adapter. I need to determine the content type based on the file name. If I am sending a PDF, then i need to set the content type as "application/pdf". I also need to set the file name.
    I have enabled the adapter specific attribute in the sender file adapter. How to access the adapter specific attribute in the module.
    With regards
    K.Varadharajan

    Hi,
       Now i am able to determine the file name using getMessagePrperty(). But i am unable to set the file name to the payload. The Payload it self comes as an attachment. The attachment name is some thing as shown below
    " [email protected]"
    We used SetName property also, but it is not working
    Does anyone know how to resolve the problem
    With regards
    K.Varadharajan

  • How does the adapter specific parameters gets filled up?

    Hello,
    How do I check adapter specific parameters?
    like, I am making the Soap action parameter to dynamically fill in the receiver soap adapter.
    I want to check if the correct (one of the 4 actions) action was filled in action field
    how do I check?
    thanks
    nikhil.

    Hi,
    You need to test the scenario from RWB testing to get the proper results about the dynamic settings for adapter specific parameters.
    Refer
    Accessing Adapter-Specific Attributes through User Defined Function
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70c89607-e4d9-2910-7280-f6746e964516
    Dynamic Configuration of Some Communication Channel Parameters using Message Mapping
    /people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70c89607-e4d9-2910-7280-f6746e964516
    Re: Adapter-Specific Message Attributes
    setting adapter specific message attributes
    Thanks
    Swarup

  • XSLT Mapping of Adapter-Specific Message Attributes

    Hi,
    We have the requirement to build a soap request with a custom soap envelop/header which contains a sessionId.
    Therefore we developed a xlst mapping which is called directly after a graphical mapping.
    In the graphical mapping the session id is written to the dynamic configuration.
    The goal is to read this session id in the xslt mapping from the dynamic configuration using XSLT Mapping of Adapter-Specific Message Attributes. We used  [this|http://help.sap.com/saphelp_nwpi711/helpdata/en/43/03fe1bdc7821ade10000000a1553f6/content.htm] documentation as an example.
    But we are getting the following error: TransformerConfigurationException triggered while loading XSLT mapping. The error is raised at this node: <xsl:variable name="dynamic-conf" select="map:get($inputparam, 'DynamicConfiguration')" />
    This is the coding of the xslt transformation:
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0"
          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
          xmlns:ns1="urn:enterprise.soap.sforce.com"
          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="/">
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com">
    <soapenv:Header>
    <urn:SessionHeader>
    <xsl:variable name="dynamic-conf" select="map:get($inputparam, 'DynamicConfiguration')" />
    <xsl:variable name="dynamic-key" select="key:create('http://sap.com/xi/XI/System/SOAP', 'sessionId')" />
    <xsl:variable name="dynamic-value" select="dyn:get($dynamic-conf, $dynamic-key)" />
    <urn:sessionId><xsl:value-of select="$dynamic-value"></xsl:value-of></urn:sessionId>
    </urn:SessionHeader>
    </soapenv:Header>
    <soapenv:Body>
    <xsl:copy-of select="*"/>
    </soapenv:Body>
    </soapenv:Envelope>
    </xsl:template>
    </xsl:stylesheet>
    Any help will be highly appreciated.
    Regards, Henk

    Hi, yes we did try that and lot's of other combination.
    The results of those trials are that it seems to go wrong with <xsl:variable name="dynamic-conf" select="map:get($inputparam, 'DynamicConfiguration')" />
    When we enclose it with <xsl:if test="function-available('map:get')"> the transformation is not dumping, but the function is not available.
    Regards, Henk

  • Adapter-specific message attributes for the JMS Receiver adapter

    Dear SAP Community,
    We are trying to activate some parameters at message level when SAP XI sent an interface (XML data) to IBM Websphere MQ. Programmaticaly, this is done the following way:
           TextMessage outMessage = session.createTextMessage();
           MQQueue replyToQ = new MQQueue("TESTQM01","SYSTEM.ADMIN.ACTIVITY.QUEUE");
           Destination replyTo = (Destination) replyToQ;
           outMessage.setJMSReplyTo(replyTo);
           outMessage.setIntProperty("JMS_IBM_Report_Exception", MQC.MQRO_EXCEPTION);
           outMessage.setIntProperty("JMS_IBM_Report_Expiration", MQC.MQRO_EXPIRATION);;
           outMessage.setIntProperty("JMS_IBM_Report_COA", MQC.MQRO_COA);
           outMessage.setIntProperty("JMS_IBM_Report_COD", MQC.MQRO_COD);
           outMessage.setIntProperty("JMS_IBM_Report_Discard_Msg", MQC.MQRO_DISCARD_MSG);
    This code is working fine.
    Since the documentation about this feature (Adapter-specific message attributes) is very light, We am not sure about the interpretation we made.
    First, we defined the following attributes: MS_IBM_Report_Exception, JMS_IBM_Report_Expiration, JMS_IBM_Report_COA, JMS_IBM_Report_COD, JMS_IBM_Report_Discard_Msg. All of them are with type int.
    Then we changed the mapping (XSL) to pass the value to the dynamic configuration, using the technical names (DCJMSMessageProperty0, ..., DCJMSMessageProperty4) and the value of the constants. We also specified a value in the Reply To Queue parameter of the adapter. As a test, We also change another parameter via the mapping (the correlation ID, to use the idoc number) and according to the log of the processed message, every thing is finde. According to the trace of the JMS adapter, everything is fine to. However, this has no impact on the message, only the correlation ID is changed.
    The JMS server is IBM Websphere MQ (v6.0.2.1). It is already in production and working fine. This is a change we have been asked to implement.
    Has anyone experience with the JMS receiver adapter-specific message attrbitutes ? What have we done wrong ?
    Any help is greatly appreciated.
    Regards,
    Gregory PFISTER
    SAP XI Analyst - Holcim

    Hi Neha,
    pls do chk the below links for SOAP adapter message attributes
    http://help.sap.com/saphelp_nwpi71/helpdata/en/fc/5ad93f130f9215e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/43/0a7d1be4e622f3e10000000a1553f7/content.htm
    http://publib.boulder.ibm.com/infocenter/wbihelp/v6rxmx/index.jsp?topic=/com.ibm.wbia_adapters.doc/doc/sap_xi/sapximst38.htm
    http://publib.boulder.ibm.com/infocenter/wbihelp/v6rxmx/index.jsp?topic=/com.ibm.wbia_adapters.doc/doc/webservices/webservices16.htm
    Regards
    Sampath

  • Java Mapping (not UDF) and Adapter-Specific Message Attributes

    Hello everybody,
    is it possible to create an Adapter-Specific Message Attributes in a java Mapping?
    I found in the SAP Help that the API com.sap.aii.mapping.api.DynamicConfiguration allows only to read, change or delete the attributes.
    best regards.
    Adnane Elgoute

    Hi,
    try the follwoing code
    import com.sap.aii.mapping.api.*;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.HashMap;
    import java.util.Map;
    public class JavaProgram
        implements StreamTransformation
        public JavaProgram()
        public void setParameter(Map map)
            param = map;
            if(param == null)
                param = new HashMap();
        public void execute(InputStream inputstream, OutputStream outputstream)
            try
                DynamicConfiguration dynamicconfiguration = (DynamicConfiguration)param.get("DynamicConfiguration");
                DynamicConfigurationKey dynamicconfigurationkey = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
                String s = dynamicconfiguration.get(dynamicconfigurationkey);
             //Your logic
            catch(Throwable throwable)
                throwable.printStackTrace();
        private Map param;

Maybe you are looking for

  • How to view parental/content ratings in iTunes???

    I have checked the box in Parental Preferences to "Show content ratings in library". Yet, I'm not seeing those ratings anywhere - only the popularity-type ratings. Where should I be looking to see the parental content ratings of my iTunes items???

  • Archive Source Files with Errors, Option Does not work

    Any one tried "Archive Source Files with Errors" on the sender adapter. It shows no effect. 1.We are on SP19. 2.Adapter type : FTP adapter. Steps for the Reconstruction  1. Configure a sender FTP adapter. 2. choose the option "Archive Faulty source f

  • No permission / access denied-message when importing cds to external hd

    Hello all, I can't import cds to my library folder on the external usb hd. This happens after I did the following: • I have an iTunes library on an ext hd which used to be connected and which I used to admin via pc • I connected it to my MacBook and

  • Rebuilding indexes on a replicated database

    Hello there, I am planning to rebuild the highly-fragmented indexes on my db which has both transaction and merge replications on many of its tables in addition to a number of indexed views. Fragmentation percent is almost the same on both servers, s

  • Copy writed material in a podcast

    Would it be legal or "ok" to pull songs from itunes that have been downloaded from the store or imported from a cd, and use them in a podcast, like a top 40 radio show?