Dynamic configuration in ABAP Mapping

Dear All,
I have requirement to use the filename's name in the mapping to the target message.
e.g: Filename is Victor.303, i need to take this 303 and map it to the target message.
I understand i can get that value using dynamic configuration in Adapter-Specific Attributes.
But all the samples are using Java code used in UDF.
How to do the same in ABAP Mapping?
I tried:
   record =  dynamic_configuration->get_record( namespace = 'http://sap.com/xi/XI/System/File'
                                                    name = 'FileName').
But record-value return blank.
Best Regards,
Victor.

Dear Prateek,
I changed my code with:
  DATA: record TYPE mpp_dynamic.
  CALL METHOD dynamic_configuration->get_record
    EXPORTING
      namespace = 'http://sap.com/xi/XI/System/File'
      name      = 'FileName'
    RECEIVING
      record    = record.
but record-value still return as blank.
I have doubt in this, do i need to populate the FileName in the dynamic configuration (in the graphical mapping) first before i can get the value in the ABAP mapping? or System should filled it and i just can use it directly in the ABAP mapping?
How we know what is the available name and namespace in that dynamic configuration-->get record??
(e.g: my case is FileName, and in the link that you gave is ERROR.)
Any link for this?
Best Regards,
Victor.

Similar Messages

  • Is there any way to read to dynamic configuration using abap mappings?

    Hi,
      Is there any way to read dynamic configuration suppouse filename using abap mappings, I mean using abap code?
    Appreciate for your response.
    Regards,
    Daniel.LA

    Daniel,
    Yes it's possible. Please refer Henrique Pinto's reply in this thread -Re: Abap mapping and variable substitution in File adapter
    raj.

  • Dynamic configuration in ABAP tables

    Hi,
    is there any ABAP table in XI containing the dynamic configuration's xml of a message (or an equivalent information in any format)?
    Thanks,
    Daniele

    hi
    Dynamic configurations will be a part of the xi message header
    chk these tables
    1.SXMSPMAST: (Integration Engine: Message Queue (Master)) The table is the master table for the monitoring information. You can get the timestamp, interface status, message id, and many more information.
    2.SXMSPEMAS: (Integration Engine: Enhanced Message Queue (Master)) The table provides the namespaces, the business systems and message interfaces involved in the interface.
    3.SXMSMSTATT: (Exchange Infrastructure: Message Status Description) This table provides a message status description.
    4.SXMSMSTAT: (Exchange Infrastructure: Message Status) This table is helpful if you want to show the process status icon for the corresponding message state.
    refer this for code sample
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/909760cb-0ec8-2a10-4a96-ee8417acfbc9
    rgds
    arun

  • Problem with Dynamic Configuration in XSLT mapping..!!

    Hi friends,
    Working first time with xslt map.I am doing a Idoc to File scenario in which I need to pass Idoc number as the file name dynamically. Right now I am just trying to send some constant value 'ABCD' to go in dynamic attribute filename.
    I used the code which has been provided over here.
    [http://help.sap.com/saphelp_nw04/helpdata/en/43/03fe1bdc7821ade10000000a1553f6/frameset.htm|http://help.sap.com/saphelp_nw04/helpdata/en/43/03fe1bdc7821ade10000000a1553f6/frameset.htm]
    I just changed the "Directory" with "FileName" in the code. It is not generating the dynamic attribute http://sap.com/xi/XI/System/File
    This is my xsl code. Please suggest me If iam doing anything wrong.
    <?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" select = "ABCD"/>*
         <xsl:output method="text" encoding="utf-8"/>
         <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="new-value" select="concat($dynamic-value, 'subfolder\')"/>
              <xsl:variable name="dummy" select="dyn:put($dynamic-conf, $dynamic-key, $new-value)"/>
              <!-- copy payload -->
              <xsl:copy-of select="."/>
         </xsl:template>
         <xsl:template match="/">
    Waiting for your answers.
    Thank you.
    Deepthi.

    Hi Stefen,
    I tried the way you suggest but still I couldn't able to see the Dynamic Configuration attribute in SOAP document. I tried for Idoc number and even tried by passing just a value 'abcd' like below.
    <?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:output method="text" encoding="utf-8"/>
         *<xsl:param name="inputparam"/>*
                    *<xsl:param name="new-value">*
      *<xsl:value-of select="/WMMBID01/IDOC/EDI_DC40/DOCNUM" />*
      *</xsl:param>*     
         <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="dummy" select="dyn:put($dynamic-conf, $dynamic-key, $new-value)"/>
    <?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:output method="text" encoding="utf-8"/>
         *<xsl:param name="inputparam"/>*
                    *<xsl:param name="new-value" select="abcd">*
       *</xsl:param>*     
         <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="dummy" select="dyn:put($dynamic-conf, $dynamic-key, $new-value)"/>
    Any suggestions please.
    Thanks
    Deepthi.

  • Using Dynamic Configuration Values in Mapping

    Hi
    I want to use the JMS CorrelationID and MessageID in my mapping
    Can anyone suggest me the UDF which i can use for the this
    I want to get the DynamicConfiguration Values and then map it to the target structure
    Rgds
    Aditya

    Hi Aditya,
    Accessing the Runtime Constants by Using Keys (Special Case)
    In certain exceptional and unavoidable cases, it may be necessary to use the keys to access the fields in the message header. This is always the case when you want to access the contents of the map by means of a variable. In the example below, a variable key key, which is to be used to read a field in the message header, is transferred to a user-defined function of a message mapping. You can only use a variable to access the map if the variable has the name of the key as its value and not the name of the string constant.
    String headerField;
    java.util.Map map;
    // get runtime constant map
    map = container.getTransformationParameters();
    // get value of header field by using variable key
    headerField = (String) map.get(key);
    For example, to read the message ID from the message header, the variable key must have the value MessageId and not MESSAGE_ID.
    Use the below link:
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm
    Thanks
    Farooq

  • Dynamic Configuration - CC Receiver - Abap Mapping

    How can I add info in the xml message in Dynamic Configuration from Abap Mapping ?
    Thanks in advance.

    Hi,
    The following should do the trick:
    data: l_dyn_record type MPP_DYNAMIC.
    l_dyn_record-namespace = 'http://sap.com/xi/XI/System/File'.
    l_dyn_record-name = 'FileName'.
    l_dyn_record-value = 'myFileName'.
    CALL METHOD dynamic_configuration->add_record
      EXPORTING
        record = l_dyn_record.
    Regards,
    Daniel

  • Abap Mapping: error in accessing to DynamicConfiguration.

    Hi All,
    I have been trying to put a value into Dynamic Configuration repository with the following abap code.
    DATA: l_record TYPE MPP_DYNAMIC.
    l_record-namespace = 'http://name1/ca/result1'.
    l_record-name = 'FileName'.
    l_record-value = '/mydir/dir1/File01.xml'.
    CALL METHOD dynamic_configuration->add_record
      EXPORTING
        record = l_record.
    I receive the following dump.
    Runtime Errors         OBJECTS_OBJREF_NOT_ASSIGNED_NO
    Except.                CX_SY_REF_IS_INITIAL
    Date and Time          25.03.2009 11:06:10
    Short text
         Access using a 'ZERO' object reference is not possible.
    What happened?
         Error in the ABAP application program.
         The current ABAP program "Z_XI_MAPPING_TEST_03==========CP" had to be
          interrupted because it contains
         a statement that cannot be executed.
    Error analysis
         An exception occurred that is explained in detail below.
         The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was n
          caught in
         procedure "IF_MAPPING~EXECUTE" "(METHOD)", nor was it propagated by a R
          clause.
         Since the caller of the procedure could not have anticipated that the
         exception would occur, the current program is terminated.
         The reason for the exception is:
         An attempt was made to access a component with a 'ZERO' object
         reference (points to 'nothing').
         An object reference must point to an object (an instance of a class)
         before it can be used to access a component.
         Either the reference has not yet been set or it was set to 'ZERO' using
         a CLEAR statement.
    I am executing my test outside PI, by launching the report Z_MAPPING_TEST as explained in a blog.
    In java evironment it is necessary to create an istance of a object for saving the value of the variable 'FileName' inside the Dynamic Configuration repository.
    I do not know if it is necessary to create (before) an istance of the Dynamic Configuration in abap mapping or if the method add_record do this.
    The meaning of my test is to get the name file from the Dynamic Configuration repository set in a previous step in a flow where the abap mapping will be launched.
    Any suggestion will be well appreciated.
    Many thanks in advance for your kind cooperation.
    Regard,
        Giovanni

    Hi,
    in your ABAP mapping code, instead of l_record-namespace = 'http://name1/ca/result1' use below:
    l_record-namespace = 'http://sap.com/xi/XI/System'.
    Then re-run your scenario.
    Regards,
    Rajeev Gupta

  • Access/set dynamic configuration in client/server abap proxy

    Hi,
    I have 2 question regarding reading/setting dynamic configuration in ABAP proxies:
    1) Is it possible to set dynamic configuration objects in a server abap proxy (SAP --> XI)?
    When looking at the class CL_PROXY_FRAMEWORK is looks as if it is possible. This class has en attribute IF_XMS_MAIN~DY which is a reference to the class CL_XMS_MSGHDR30_DYNAMIC.
    I'm not sure if I'm supposed to try and access the dynamic configuration objects via this class or if I'm supposed to use the GET_PROTOCOL method in some manner as suggested by:
    http://help.sap.com/saphelp_nw04s/helpdata/en/51/d5cd16235e4643ae8ec92395c4ad97/frameset.htm
    Above link is for client proxies not server, and I've been unable to find any documentation on this for server proxies.
    2) The same question goes for server proxies (XI --> SAP), though now I would like to set some dynamic configuration data.
    This I believe should be done using get_protocol( if_wsprotocol=>ws_header ) as indicated by before mentioned link.
    However in both cases I'm not sure of if it is indeed possible and which road to choose for sure. So a hint or 2 would be really nice.
    Best Regards,
    Daniel
    ps. maybe I should just mention that I am pretty new to the ABAP world, so bear with me.

    The link that you gave does give you an example for both server and client proxies:
    Accessing Protocol Classes for Client Proxies
    In client proxies, you access the protocol class by using the GET_PROTOCOL method. Below is an example for the IF_WSPROTOCOL_PAYLOAD protocol:
    DATA:
    lo_clientProxy      TYPE REF TO co_clientProxy,
    lo_payload_protocol TYPE REF TO if_wsprotocol_payload
    lo_payload          TYPE REF TO if_ws_payload.
    CREATE OBJECT lo_clientProxy.
    Get Protocol Class Using Method GET_PROTOCOL
    lo_payload_protocol ?=
           lo_clientProxy->get_protocol( if_wsprotocol=>payload ).
    CALL METHOD lo_clientProxy->execute_synchronous
                EXPORTING output  = ls_request
                IMPORTING input   = ls_response.
    Use Protocol Methods
    lo_payload = lo_payload->get_sent_request_payload( ).
    Accessing Protocol Classes for Server Proxies (XI Only)
    Within the implementation of a server proxy, you get the protocol class by using the CL_PROXY_ACCESS=>GET_SERVER_CONTEXT( ) method:
    DATA:  lo_server_context   TYPE REF TO if_ws_server_context,
           lo_payload_protocol TYPE REF TO if_wsprotocol_payload.
    lo_server_context   = cl_proxy_access=>get_server_context( ).
    lo_payload_protocol =
         lo_server_context->get_protocol( if_wsprotocol=>payload ).

  • Multi-Mapping and Dynamic Configuration

    Hello,
    Is it possible to use dynamic configuration in mulltip-mapping? (message split?)
    in a  proxy-mail scenario I am using a multi-mapping. The message gets splited by a specif field.
    (Field of source message-SplitByValue(Value Change)-CollapseCOntext->Target Message(1..N)
    WIthin the graphical mapping I have a dynamic configuration for the "Mail Subject"
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey keySubj = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/Mail", "THeaderSUBJECT");
    conf.put(keySubj,  pSubject);
    return pSubject ;
    I have mapped this field to a field in the target message.
    The messages are being splitted as expected and the value of pSubject is also correct.
    BUT when receiving emails the subject field has the same value for all splitted messages.
    My Question is "conf.put(keySubj,  pSubject);" overwitting all splitted outgoing messages?
    Thanks for the Help
    EMW

    As stated in http://help.sap.com/saphelp_nw70/helpdata/EN/43/09b16006526e72e10000000a422035/frameset.htm
    Adapter-Specific Attributes and Multi-Mappings
    In multi-mappings, there are multiple message headers with adapter-specific attributes. The mapping API can only access one message header. This has the following consequences depending on whether there are multiple source or target messages:
    ●     1:n Transformation
    If there are multiple target messages, the header for the adapter-specific attributes is copied for each message. This means that you can only create one header for all adapter-specific attributes, and not individual headers.
    ●     n:1 Transformation
    This variant is only possible for multi-mappings in integration processes. If there is more than one source message, read-access to the adapter-specific attributes of the various message headers is not possible at runtime.
    ●     m:n Transformation
    All afore-mentioned restrictions apply here. Developers can at most write the same adapter-specific attributes for all target messages to the header, without read-access to the attributes of the source messages. m:n transformations are only supported within integration processes.
    Regards,
    Henrique.

  • 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

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

  • Dynamic Configuration in PI 7.1

    Hi,
    We have this UDF working in XI 3.0, to feed file name into message mapping:
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
    String      file =  ( TableName );
    conf.put(key, file);
    we are upgrading to 7.1 and this little thing is not working any more. Can smebody please suggest what to do to get it working in PI 7.1.
    Alternatively, is there any other way to fill up 'Dynamic Configuration' in graphical mapping.
    Thanks for your help!

    Hi Dehra,
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
    String file = ( TableName );
    conf.put(key, file);
    return file;
    I will work, i hav done similr requirement in my currenct project with version PI7.1 its working fyn.
    cheers,
    raj

  • Regarding ABAP Mapping

    Hi everyone,
                Would anyone let me know the complete steps for configuring ABAP Mapping.
    Regards,
    Varun Reddy.K

    Hi,
    Inorder to configure an ABAP mapping do the follwoing steps.
    1) Goto SE24 tcode and createa custom object e.g. 'Z_TEST_ABAP_MAPPING''
    2) Use the standard interface IF_MAPPING in your object.
    3) Now write your piece of code in the method IF_MAPPING~EXECUTE .
    METHOD IF_MAPPING~EXECUTE.
    initialize iXML
      TYPE-POOLS: IXML.
      CLASS CL_IXML DEFINITION LOAD.
    create main factory
      DATA: IXMLFACTORY TYPE REF TO IF_IXML.
      IXMLFACTORY = CL_IXML=>CREATE( ).
    create stream factory
      DATA: STREAMFACTORY TYPE REF TO IF_IXML_STREAM_FACTORY.
      STREAMFACTORY = IXMLFACTORY->CREATE_STREAM_FACTORY( ).
    create input stream
      DATA: ISTREAM TYPE REF TO IF_IXML_ISTREAM.
      ISTREAM = STREAMFACTORY->CREATE_ISTREAM_XSTRING( SOURCE ).
    parse input document =================================================
    initialize input document
      DATA: IDOCUMENT TYPE REF TO IF_IXML_DOCUMENT.
      IDOCUMENT = IXMLFACTORY->CREATE_DOCUMENT( ).
    parse input document
      DATA: IPARSER TYPE REF TO IF_IXML_PARSER.
      IPARSER = IXMLFACTORY->CREATE_PARSER( STREAM_FACTORY = STREAMFACTORY
      ISTREAM = ISTREAM
      DOCUMENT = IDOCUMENT ).
      IPARSER->PARSE( ).
    get message content of tag <BookingCode>
      DATA: INCODE TYPE REF TO IF_IXML_NODE_COLLECTION.
      INCODE = IDOCUMENT->GET_ELEMENTS_BY_TAG_NAME( 'BookingCode' ).
    get XI header data (here: "Sender Service")
      DATA: L_SENDER_SERVICE TYPE STRING.
      L_SENDER_SERVICE = PARAM->GET( IF_MAPPING_PARAM=>SENDER_SERVICE ).
    add trace (appears in message monitoring)
      DATA: L_TRACE TYPE STRING.
      CONCATENATE 'Sender Service = ' L_SENDER_SERVICE INTO L_TRACE.
      TRACE->TRACE( LEVEL = '1'
      MESSAGE = L_TRACE ).
    build up output document =============================================
    create output document
      DATA: ODOCUMENT TYPE REF TO IF_IXML_DOCUMENT.
      ODOCUMENT = IXMLFACTORY->CREATE_DOCUMENT( ).
    create element 'SenderService' and add it to the document
      DATA: MSGTYPE TYPE REF TO IF_IXML_ELEMENT.
      MSGTYPE = ODOCUMENT->CREATE_SIMPLE_ELEMENT(
      NAME = 'MsgOut'
      PARENT = ODOCUMENT ).
    create element 'SenderService' and add it to the output document
      DATA: ELEMENTSENDER TYPE REF TO IF_IXML_ELEMENT.
      ELEMENTSENDER = ODOCUMENT->CREATE_SIMPLE_ELEMENT(
      NAME = 'SenderService'
      VALUE = L_SENDER_SERVICE
      PARENT = MSGTYPE ).
    add node to the output document
      DATA: OUTCODE TYPE REF TO IF_IXML_NODE.
      OUTCODE = INCODE->GET_ITEM( INDEX = 0 ).
      DATA IRC TYPE I.
      IRC = MSGTYPE->APPEND_CHILD( OUTCODE ).
    render document ======================================================
    create output stream
      DATA: OSTREAM TYPE REF TO IF_IXML_OSTREAM.
      OSTREAM = STREAMFACTORY->CREATE_OSTREAM_XSTRING( RESULT ).
    create renderer
      DATA: RENDERER TYPE REF TO IF_IXML_RENDERER.
      RENDERER = IXMLFACTORY->CREATE_RENDERER( OSTREAM = OSTREAM
      DOCUMENT = ODOCUMENT ).
      IRC = RENDERER->RENDER( ).
    ENDMETHOD.
    Now Add additional mapping types in your Exchange Profile:
    com.sap.aii.repository.mapping.additionaltypes
    Create a new Interface Mapping
    • Select Mapping Type Abap-class
    • Enter the name of the ABAP-OO class
    Rest of the mapping proceedure remains the same..
    Reward points if found useful
    Regds,
    Sandeep

  • 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

  • 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

Maybe you are looking for

  • Error while loading  data into External table from the flat files

    HI , We have a data load in our project which feeds the oracle external tables with the data from the Flat Files(.bcp files) in unix. While loading the data, we are encountering the following error. Error occured (Error Code : -29913 and Error Messag

  • Equium A100-027: CD/DVD drive says driver is missing or corrupted

    My cd/dvd drive is not shown anymore in "computer". i have looked in device manager and there is an exclamation mark next to my drive. I have done a full norton scan and everything was clear. On device manager when i open properties for this drive i

  • Datagrid with Horizontal and vertical header?

    Hi, I need to set a datagrid with a vertical and horizontal header, something like this: http://www.poirrier.be/~jean-etienne/info/csharp/datagrid-app.png But I need to be able to add labels to the vertical header cells too. Is there anyway to accomp

  • Skipping through songs...why and how to fix it?

    Starting last night, whenever I select a song to play on my iPod mini (the original version if that matters) it skips through all the songs to the end of the playlist and then brings me back to the main menu screen. What's going on here?

  • Ipod  via iphone??

    Is it possible to get on the internet with an ipod touch via the iphone when NOT in a wifi area? What if I signed up for AT&T's tethering - than could I do it? Thanks!