Value Mapping in Java Mpping

Hi All,
How can we call a value mapping in Java mapping?
Any of your inputs are welcome!
Thank You,
Mugdha Kulkarni

Hi,
of course we can - there are many examples on the forum on how to do that
please do a little search first
thank you,
Regards,
Michal Krawczyk

Similar Messages

  • Value mapping replication - java cache

    i used value mapping replication and successfully loaded values to the java cache (i can see the in the cache monitoring but not in  the configuration).
    when i try to use a scenario with value mapping using the agencies and schemes which i loaded, the mapping doesn't work and i receive the same value that was entered.
    what could be the problem?
    P.S
    i used the same groupid for each pair of source and target value when i loaded them. is that the right way?

    Tomer,
    what is the context that u used. Did you give the correct context in mapping as in Runtime Cache.
    Regards,
    Sudharshan N A

  • Read Value mapping table (java chace)

    Hi,
    I've updated the value mapping table in java cache via teh replication method. now for some reasons i need to read the values stored before i update the cache in a program. any idea on how to read the data stored in value mapping cache?

    Hi Prabhu,
    I donu2019t recall all the details, but after researching this before I came to the conclusion that the XI Value Mapping cache should only be used as a cache and not used as the master where item level maintenance is performed.  I believe it mainly involved the fact that there is no Update operation.  You need to delete first then re-create.  However, itu2019s easy to introduce duplicate items if you donu2019t use all the right values for the delete.
    So, I added the DeleteContext operation as the first item in the ValueMappingReplication  xml.  In this way the entire Context is deleted and re-created every time.  We can then be sure the cache is always in-sync with our source, which we maintain in Excel.
    <?xml version="1.0" encoding="utf-8"?>
    <ns:ValueMappingReplication xmlns:ns="http://sap.com/xi/XI/System">
      <Item>
        <Operation>DeleteContext</Operation>
        <Context>urn:company-com:valuemap:test</Context>
      </Item>
      <Item>
        <Operation>Insert</Operation>
        <GroupID>c7941e905e9711dfc8c5001a4b0631cb</GroupID>
        <Context>urn:company-com:valuemap:test</Context>
        <Identifier scheme="Alpha" agency="Alpha">A</Identifier>
      </Item>
      <Item>
        <Operation>Insert</Operation>
        <GroupID>c7941e905e9711dfc8c5001a4b0631cb</GroupID>
        <Context>urn:company-com:valuemap:test</Context>
        <Identifier scheme="Alpha" agency="AlphaPos">1</Identifier>
      </Item>
       u2026 etc u2026
    -Russ

  • Invoking Value Mapping inside Java Mapping

    Hi all,
    i have a to use Java Mapping for conversion to a xml. I also need to populate the values in the Target with Values from the Value Mapping Table in XI.
    How can this be achived.
    RGds
    Aditya

    Thnks

  • Retriving all records in the value mapping cache using java

    Hi,
    Is there a way to retrieve all records assuming I properly maintain some values in the value mapping using java? I know and I tried retrieving already using XIVMService.executeMapping but it seems that I can retrieve only 1 value at a time.
    For instance, in the value mapping cache I have the following:
    Agency         Schema         Value                Context
    SENDER       KEY              0001&ABC        http://xyz.com/ECC/ZTABLE
    SENDER       KEY              0003&           http://xyz.com/ECC/ZTABLE
    SENDER       KEY              0004&DEF        http://xyz.com/ECC/ZTABLE
    RECEIVER     RESULT           Hello           http://xyz.com/ECC/ZTABLE
    RECEIVER     RESULT           World           http://xyz.com/ECC/ZTABLE
    RECEIVER     RESULT           Hi              http://xyz.com/ECC/ZTABLE
    Is it possible to retrieve all values under the column Values assuming I know the value Agency, Schema and Context columns using a java program? If yes, can you point where I can find such an example code or if you are pointing to http://help.sap.com/javadocs/NW04S/current/pi/index.html please provide a sample code on how this can be done.
    Many thanks.

    Hi,
    Have you seen this weblogs by Prasad recently:
    /people/prasad.illapani/blog/2007/03/08/performance-tuning-checks-in-sap-exchange-infrastructure
    /people/prasad.illapani/blog/2007/04/20/performance-tuning-checks-in-sap-exchange-infrastructurexi-part-ii
    Also are you doing multiple lookups or a single lookup? If you are using multiple lookup for multiple fields which has the same logic then try to use global variables.
    ---Satish

  • Value Mapping - Best Strategy

    Hi,
    There are several strategies fo Value mapping
    1) Fixed values (e.g. constants in Graphical mapping)
    2) Value mapping on Jave stack via VM tables
    3) SAP tables created in SE11 and RFC the data from calls from the Java stack
    Surely the best strategy is 3) even though it is not the most efficient purely for the fact to have easy visibility of your integration data. e.g. via SM30 or custom transaction to view integration value mappings. If anyone has a different view on this I would to hear from them or possibly suggest an alternative.

    Hi,
    the best strategy is dependend from your requirements:
    - Fixed values could be used if the values never change
    - Value Mapping with groups in IB Directory is usually the standard
    - If you want to use authorizations of ERP backend you can go for Value Mapping Replication (more efforts).
    - You can use as well included textfiles, lookups and what else can store data...
    Regards,
    Udo

  • JPR - Access Value Mapping

    Hi,
    How can I access a value mapping defined in ID from a Java Server Proxy?
    I've tried to that with the following code:
    import com.sap.aii.mapping.value.api.*;
    public class MIGetDocsIn_PortTypeImpl extends com.sap.aii.proxy.xiruntime.core.AbstractProxy implements MIGetDocsIn_PortType {
    public DTGetDocsResponse_Type mIGetDocsIn(DTGetDocsRequest_Type mTGetDocsRequest)
    throws com.sap.aii.proxy.xiruntime.core.SystemFaultException, com.sap.aii.proxy.xiruntime.core.ApplicationFaultException{
    String senderAgency = "Source";
    String senderScheme = "Source1";
    String receiverAgency = "Target";
    String receiverScheme = "Target1";
    IFIdentifier src = XIVMFactory.newIdentifier(senderAgency, senderScheme);
    IFIdentifier dst = XIVMFactory.newIdentifier(receiverAgency , receiverScheme);
    try {
    String res = XIVMService.executeMapping(src, dst, "var1");
    } catch (ValueMappingException e) {}
    Do I need to add package com.sap.aii.mapping.value.api in application-j2ee-engine.xml?? What is the reference target for that package?
    Thanks,
    Pedro Leal

    Hi,
    It seems is not possible to access value mapping in java proxy.
    Alternatively can someone give me some advices about the best to way to read configuration parameters in a java proxy server scenario?
    Properties file is a solution. Is there any other way to achieve similar functionality?
    Thanks,
    Pedro Leal

  • Java maaping used in value mapping

    Hi Friends,
    Iam new to value mapping...I have hardcorde below values in javamapping..i need to pass it in value mapping.can anyone suggest me on this?
    <aClientId>SWClient</aClientId><aUser>Honk</aUser><aPassword>XXXXX</aPassword><aDomain>PR</aDomain><aApplication>HAM</aApplication><aSchema>IDOC</aSchema><aDestination>E</aDestination><aReference>1</aReference><aMessage>"+strContentID +  "</aMessage><aMessageFormat>4</aMessageFormat><aDuplicates>1</aDuplicates>
    Thanks
    dinu

    hi,
    so you have a java mapping and want to use the PI value mapping tables ?
    maybe this will help [http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00ee347e-aabb-2a10-b298-d15a1ebf43c5?quicklink=index&overridelayout=true]

  • Import conversion data table from SAP R/3 into value mapping table in XI

    Hi:
        Somebody knows how to import a table with conversion data that are in SAP R/3 and to take it to a value mapping table in XI?
        The purpose is to use a mapping table that can change in the future. Must I use a ABAP programming that retrieve data and build the value mapping table?
        If so, how I specify in the ABAP programming the group id, the scheme, the agency and the corresponding value?
        Please, help me.
        Regards!!!

    Hi David,
    please refer to this section in the help: http://help.sap.com/saphelp_nw04/helpdata/en/2a/9d2891cc976549a9ad9f81e9b8db25/content.htm
    There is an interface for mass replication of mapping data. The steps you need to carry out to use this are:
    +Activities
    To implement a value-mapping replication scenario, proceed as follows:
           1.      Register the Java (inbound) proxies.
    To do so, call the following URLs in the following order in your Internet browser:
    ¡        http://:/ProxyServer/register?ns=http://sap.com/xi/XI/System&interface=ValueMappingReplication&bean=localejbs/sap.com/com.sap.xi.services/ValueMappingApplication&method=valueMappingReplication (for the asynchronous replication scenario)
    ¡ http://:/ProxyServer/register?ns=http://sap.com/xi/XI/System&interface=ValueMappingReplicationSynchronous&bean=localejbs/sap.com/com.sap.xi.services/ValueMappingApplicationSynchronous&method=valueMappingReplicationSynchronous (for the synchronous replication scenario)
    You only need to perform this step once (for each installation).
           2.      Application programming
    The ABAP program must perform the following tasks:
    ¡        Read the value mapping data from the external table
    ¡        Call the outbound proxy used to transfer the data to a message, which is then sent to the Integration Server
           3.      Configuration of the replication scenario in the Integration Directory
    This involves creating all the configuration objects you need to execute the scenario successfully. One special aspect of the value-mapping replication scenario is that the receiver is predefined (it must be on the Integration Server). The sender, however, is not predefined in the replication scenario and can be defined to meet your individual requirements.
    For example, you can use the shipped ABAP proxies.
    In the case of the receiver communication channel, choose the adapter type XI. Ensure that you configure a channel for the Java proxy receiver in this case.
    Enter the path prefix /MessagingSystem/receive/JPR/XI for this purpose.
    +
    Regards
    Christine

  • How to read Group ID from Value Mapping Context in Cache Monitoring ?

    Hi friends,
        In RWB --> Cache Monitoring --> Integration Server (Java) -> (Search for Value Mapping Groups) in this each item is identified by Value Mapping Group (GroupID, Context, Identifier/Agency, Identifier/Scheme). Either we create Value Mapping Table in ID or replicate value mapping data directly from text file/SAP table etc., in run time cache, data will be identified in this manner.
        Now, our requirement is to delete a record the Cache for a particular context. Two operations provided by XI one is 'Delete' and another one is 'DeleteGroup'. When we use either of this, we should know GroupID. Suppose, I replicated some large amount of data from my text file in Runtime Cache. Value Mapping Table is like that IN --> India, US --> USA, AU --> Australia, EG --> Egypt. Now, I am required to write a program to get the input country code from user which is going to delete in the value mapping table like IN/AU....  For this, what logic we should follow in the program is, First we scan the value mapping table and find the record (country code)  which is match with the input. Then find the GUID value for this record. Now we use the DeleteGroup Operation and pass this GUID and then delete the record.
        So, in essence, how to read the GUID from value mapping context.
        Friends, Kindly help me to do this.
    Thanks in advance.
    Jegatheeswaran P.

    Did you get the way to read group id?

  • Value Mapping through Tables in R/3 from XI

    Hi All,
    I'm new to XI and got a scenario as "Value Mapping through Tables in R/3 from XI". Kindly do tell me the steps which I should follow to complete this scenario. I'm from ABAP so table creation is known to me, what next should I do after table creation?
    Thanks in Advance to all of you,
    Sreedhar

    sree,
    value mapping are done using message mapping. In message mapping you have to make a RFC call to query the db and get the response. were you have to write a java function in mapping program.
    check this blog, it speaks on value mapping
    /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i

  • XSLT Mapping with Java Enhancement

    Hi All
    I am working on XSLT Mapping with Java Enhancement.
    To do this scenario i have followed the following link.
    http://help.sap.com/saphelp_nw04/helpdata/en/55/7ef3003fc411d6b1f700508b5d5211/frameset.htm
    As per the above link I have created Source and Target Data Types , Message Types , Mesage Interfaces, XSLT Mapping (using the transaction XSLT_TOOL) and Interface Mapping part and configred a simple file to file scenario in the ID part.
    Apart from this I have wirte the java code, compile the java code, create the jar file using .java and .class file and after creating the jar file import the .jar file in the imported archive of the IR..
    when I am trying to execute the scenario I am getting the successful message in SXMB_MONI but the target file is having the payload as given below.
    <?xml version ="1.0" encoding="UTF-8"?>
    <name xmlns:javamap="java:com.company.group.MappingClass"/>
    And as per the XSLT mapping the payload should be as below
    <?xml version ="1.0" encoding="UTF-8"?>
    <person>
    <name>Rinku Gangwani</name>
    </person>
    I have also followed the following blog link but still i am getting the same issue
    /people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners
    could you please tell me what can be the reason that i am getting the blank targt field values in the payload.
    Thanks
    Rinku Gangwani

    Hi,
      The Transaction code XSLT_TOOL for ABAP xslt mapping.But the Java Enhancement is used for normal xslt mapping which we created using Stylus Studio.You can not access the Java Enhancement in ABAP xslt mapping.
    If you want to use Java Enhancement in xslt mapping then create a xslt mapping using Stylus Studio and save the file as .xsl and zip the .xsl and import to import archive.
    Regards,
    Prakasu.M
    Edited by: prakasu on May 28, 2009 1:46 PM

  • XSLT Value Mapping Problem

    Hello,
    we want to use the value mapping table in ID with XSLT.
    Here is my source:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Source xmlns:ns0="http://comsol-ag.com/xi/rfcxslt">
        <CustomerNumber>A</CustomerNumber>
    </ns0:Source>
    XSLT Mapping:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:trg="http://comsol-ag.com/xi/rfcxslt" xmlns:ns0="http://test/xi/tsts" xmlns:ValueMap="java:com.sap.aii.mapping.value.api.XIVMService">
        <xsl:template match="/">
            <trg:Target>
                <CustomerInfo>
                    <xsl:variable name="sourceValue" select="ns0:Source/CustomerNumber"/>
                    <ID>
                        <xsl:value-of select="$sourceValue"/>
                    </ID>
                        <xsl:variable name="response" select="ValueMap:executeMapping('http://sap.com/XI/xi','SourceAgency','SourceScheme',string($sourceValue),'http://sap.com/XI/xi','TargetAgency','TargetSchema')"/>
                    <Name>
                    <xsl:value-of select="$response"/>
                    </Name>
                </CustomerInfo>
            </trg:Target>
        </xsl:template>
    </xsl:stylesheet>
    Target:
      <?xml version="1.0" encoding="utf-8" ?>
    <trg:Target xmlns:trg="http://comsol-ag.com/xi/rfcxslt">
    <CustomerInfo>
      <ID>A</ID>
      <Name /> ???????????????????????????????????
      </CustomerInfo>
      </trg:Target>
    But the receiving data is not converted to value table in ID:
    Integration Directory Value Table :
    http://www.image-load.eu/out.php/i26896_pic1.PNG
    Please point out where i m going wrong.
    Thanks

    problem solved!

  • XSLT Maps with Java enhancements - JCO_SYSTEM_FAILURE

    Hi,
    I have reviewed several postings regarding XSLT Maps with Java enhancements. I followed instructions and build a jar file and the XSLT document. I built one imported archive with the .jar and .xsl. For the class, The path get loaded properly.
    However, I still have a problem when and execute the interface.
    My xslt has the following information
    <xsl:transform version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:ns="http://xyz.abc.sap.def.com"
        xmlns:javamap="java:xyz.Date_Time">
    <xsl:param name="inputparam" />
        <xsl:template match="/">
            <test><xsl:value-of select="javamap:getDateValue($inputparam)"/></test>
        </xsl:template>
    </xsl:transform>
    In SXMB_Moni I get the following error...
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="MAPPING">JCO_SYSTEM_FAILURE</SAP:Code>
      <SAP:P1>Exception in method processFunction.</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>"SYSTEM FAILURE" during JCo call. Exception in method processFunction.</SAP:Stack>
      <SAP:Retry>A</SAP:Retry>
      </SAP:Error>
    If i remove the line        
    <test><xsl:value-of select="javamap:getDateValue($inputparam)"/></test>
    The map ends successfuly.
    Comments would be appreciated.
    Regards,
    Sergio

    Stefan,
    Find the class and method definition below. The method is static and it returns the string.
    ==========
    package xyz;
    import java.util.Map;
    import com.sap.aii.mapping.api.AbstractTrace;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import java.util.*;
    import java.text.*;
    public class Date_Time {
        private static AbstractTrace trace = null;
        public static String getDateValue(Map inputparam)
                trace = (AbstractTrace)inputparam.get(
                         StreamTransformationConstants.MAPPING_TRACE );
                Date now1 = new Date();
                SimpleDateFormat formatter = new SimpleDateFormat ("yyyyMMd");
                String dateString = formatter.format(now1);
                return dateString;

  • Java Error in RFC Lookup in XSLT Mapping usinf Java helper class

    Hi All,
    I am doing RFC Lookup in XSLT Mapping using Java Helper class.
    The Lookup works fine when called one RFC at a time However my requirement is I want to do 2 Lookups.
    Both Lookups works when done individually however when I call both lookups in one mapping I get following error "javax.xml.transform.TransformerException: DOMSource whose Node is null."
    Following is the code I have written in XSLT for the lookup:
         <xsl:template name="Lookup_1">
              <xsl:param name="STDPN"/>
                   <rfc:RFC_READ_TABLE>
                        <QUERY_TABLE>KNA1</QUERY_TABLE>
                        <OPTIONS><item><TEXT>
                                  <xsl:value-of select="$STDPN"/>
                             </TEXT></item>
                        </OPTIONS>
                        <FIELDS>
                             <item>
                                  <FIELDNAME>KUNNR</FIELDNAME>
                             </item>
                        </FIELDS>
                   </rfc:RFC_READ_TABLE>
              </xsl:variable>
              <xsl:variable name="response" xmlns:lookup="java:urn.mt.pi" select="lookup:execute($request, 'BS_D, 'cc_RfcLookup', $inputparam)"/>
              <xsl:element name="STDPN">
                   <xsl:value-of select="$response//DATA/item/WA"/>
              </xsl:element>
         </xsl:template>
         <xsl:template name="Lookup_2">
              <xsl:param name="BELNR"/>
                   <xsl:variable name="Query">AGMNT = '<xsl:value-of select="$BELNR"/>'</xsl:variable>
                   <xsl:variable name="request1">
                        <rfc:RFC_READ_TABLE>
                             <QUERY_TABLE>ZTABLE</QUERY_TABLE>
                             <OPTIONS><item><TEXT>
                                  <xsl:value-of select="$Query"/>
                                  </TEXT></item>
                             </OPTIONS>
                             <FIELDS>
                                  <item>
                                       <FIELDNAME>KUNAG</FIELDNAME>
                                  </item>
                             </FIELDS>
                        </rfc:RFC_READ_TABLE>
                   </xsl:variable>
                   <xsl:variable name="response1" xmlns:lookup="java:urn.mt.pi" select="lookup:execute($request1, 'BS_D','cc_RfcLookup', $inputparam)"/>
                   <xsl:element name="BELNR">
                        <xsl:value-of select="$response1//DATA/item/WA"/>
                   </xsl:element>
         </xsl:template>
    My Question: Am I doing anything wrong? Or Is it possible to call multiple lookups in one XSLT?
    Thanks and Regards,
    Atul

    Hi Atul,
    I had the same problem like you had.
    The main Problem is that with the example code the request variable is created as NodeList object. In XSLT a variable is somekind of a constant and can't be changed. As the request object is empty after the first request the programm fails at the following line:
    Source source = new DOMSource(request.item(0));
    So I've created a workaround for this problem.
    In the call of the template I've put the request as a parameter object at the template call:
    <xsl:with-param name="req">
    <rfc:PLM_EXPLORE_BILL_OF_MATERIAL xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
      <APPLICATION>Z001</APPLICATION>
      <FLAG_NEW_EXPLOSION>X</FLAG_NEW_EXPLOSION>
      <MATERIALNUMBER><xsl:value-of select="value"/></MATERIALNUMBER>
      <PLANT>FSD0</PLANT>
      <VALIDFROM><xsl:value-of select="//Recordset/Row[name='DTM-031']/value"/></VALIDFROM>
      <BOMITEM_DATA/>
    </rfc:PLM_EXPLORE_BILL_OF_MATERIAL>
    </xsl:with-param>
    With this change the request will be provided as a String object and not as a NodeList object.
    Afterwards the RfcLookup.java has to be changed to the following:
    package com.franke.mappings;
    import java.io.ByteArrayInputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.PrintWriter;
    import java.io.StringWriter;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Source;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import com.sap.aii.mapping.lookup.Channel;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import com.sap.aii.mapping.api.AbstractTrace;
    import com.sap.aii.mapping.lookup.RfcAccessor;
    import com.sap.aii.mapping.lookup.LookupService;
    import com.sap.aii.mapping.lookup.XmlPayload;
    * @author Thorsten Nordholm Søbirk, AppliCon A/S
    * Helper class for using the XI Lookup API with XSLT mappings for calling RFCs.
    * The class is generic in that it can be used to call any remote-enabled
    * function module in R/3. Generation of the XML request document and parsing of
    * the XML response is left to the stylesheet, where this can be done in a very
    * natural manner.
    * TD:
    * Changed the class that request is sent as String, because of IndexOutOfBound-exception
    * When sending multiple requests in one XSLT mapping.
    public class RfcLookup {
         * Execute RFC lookup.
         * @param request RFC request - TD: changed to String
         * @param service name of service
         * @param channelName name of communication channel
         * @param inputParam mapping parameters
         * @return Node containing RFC response
         public static Node execute( String request,
                 String service,
                 String channelName,
                 Map inputParam)
              AbstractTrace trace = (AbstractTrace) inputParam.get(StreamTransformationConstants.MAPPING_TRACE);
              Node responseNode = null;
              try {
                  // Get channel and accessor
                  Channel channel = LookupService.getChannel(service, channelName);
                  RfcAccessor accessor = LookupService.getRfcAccessor(channel);
                   // Serialise request NodeList - TD: Not needed anymore as request is String
                   /*TransformerFactory factory = TransformerFactory.newInstance();
                   Transformer transformer = factory.newTransformer();
                   Source source = new DOMSource(request.item(0));
                   ByteArrayOutputStream baos = new ByteArrayOutputStream();
                   StreamResult streamResult = new StreamResult(baos);
                   transformer.transform(source, streamResult);*/
                    // TD: Add xml header and remove linefeeds for the request string
                    request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+request.replaceAll("[\r\n]+", ""); 
                    // TD: Get byte Array from request String to send afterwards
                    byte[] requestBytes = request.getBytes();
                   // TD: Not used anymore as request is String
                    //byte[] requestBytes = baos.toByteArray();
                    trace.addDebugMessage("RFC Request: " + new String(requestBytes));
                    // Create input stream representing the function module request message
                    InputStream inputStream = new ByteArrayInputStream(requestBytes);
                    // Create XmlPayload
                    XmlPayload requestPayload =LookupService.getXmlPayload(inputStream);
                    // Execute lookup
                    XmlPayload responsePayload = accessor.call(requestPayload);
                    InputStream responseStream = responsePayload.getContent();
                    TeeInputStream tee = new TeeInputStream(responseStream);
                    // Create DOM tree for response
                    DocumentBuilder docBuilder =DocumentBuilderFactory.newInstance().newDocumentBuilder();
                    Document document = docBuilder.parse(tee);
                    trace.addDebugMessage("RFC Response: " + tee.getStringContent());
                    responseNode = document.getFirstChild();
              } catch (Throwable t) {
                   StringWriter sw = new StringWriter();
                   t.printStackTrace(new PrintWriter(sw));
                   trace.addWarning(sw.toString());
              return responseNode;
         * Helper class which collects stream input while reading.
         static class TeeInputStream extends InputStream {
               private ByteArrayOutputStream baos;
               private InputStream wrappedInputStream;
               TeeInputStream(InputStream inputStream) {
                    baos = new ByteArrayOutputStream();
                    wrappedInputStream = inputStream;
               * @return stream content as String
               String getStringContent() {
                    return baos.toString();
              /* (non-Javadoc)
              * @see java.io.InputStream#read()
              public int read() throws IOException {
                   int r = wrappedInputStream.read();
                   baos.write(r);
                   return r;
    Then you need to compile and upload this class and it should work.
    I hope that this helps you.
    Best regards
    Till

Maybe you are looking for

  • About double click event in ALV report

    Hi all, I want to program a double-click event in ALV reprot. I am not suppose to use module pool approach for the same. If a user double clicks on the any of the row of ALV report, the transaction should get called. Again, I am using function 'REUSE

  • Third Party Sales Order Change

    Hi Gurus I have a situationin third party processing. When the sales order is created with IC = TAS, it fires PR which is then converted to a PO. However after the PO is generated, if Qty in Sales order is changed it does not update the PO. Have you

  • Creator2 portlet on JBoss Portal Server 2.2

    Has anyone managed to get a JSF Portlet created with Creator2 to run on JBoss Portal server 2.2? I've found documents on getting Creator2 to work with JBoss AS, but not JBoss Portal. JBoss Portal Server uses MyFaces and I would like to keep for examp

  • Single Image, Transition Between Two Pictures

    Hello all, I have searched all over the internet, but apparently I don't know how to ask what I want. I want a single image, made from 2 separate pictures I have, but I'm not trying to seamlessly integrate part of one into the other. Let's call them

  • ECC 6.0 (instalation) Starting J2EE Engine system failed on solaris

    We are installing Solution Manager on Solaris Spark w/ORACLE 10g. After installing ABAP, the JAVA Engine does not want to start...w/jdk1.4.2_12 any comments???