Call another Message Interface from Java Mapping

Hi Gurus!!
I have designed a Java Mapping that does a Socket Connection. Before send the response of the Java Mapping, I have to send information to our SAP System.
I have see in a blog that I can call a RFC from the Java Mapping, but my doubt is, can I call another Message Interface designed on XI?
Thanks and regards,
Manuel Míguez.

That's tricky, since the proper way of doing it would be through BPM.
Anyway, if you expose your XI interface as a WebService (Soap sender cc) you could access it through Mapping Lookup (lookup works for RFC, DB and Soap lookups). Check https://help.sap.com/javadocs/NW04S/current/pi/index.html
But be aware that Mapping Lookup API is not intended for inserts/updates (since it doesn't contain any transacational handling), just mere lookups (selects in tables), so I'm not sure it is the best approach for your case.
Regards,
Henrique.

Similar Messages

  • Accessing SAP:HopList element in message header from JAVA-mapping

    Dear Experts,
    Is it possible to access the SAP:HopList element from message header in JAVA-mapping? 
    I need this to get the list off all receivers of current message (I have a ReceiverDetermination with two receivers, without any conditions, so both receivers are receiving each message and in InterfaceDetermination to one of the receivers I have a JAVA-mapping, in which I need to know the name of another receiver. And the SAP:HopList is containing this information).
    Or maybe where is some other solution?
    Best Regards,
    Artsiom Anichenka

    That's tricky, since the proper way of doing it would be through BPM.
    Anyway, if you expose your XI interface as a WebService (Soap sender cc) you could access it through Mapping Lookup (lookup works for RFC, DB and Soap lookups). Check https://help.sap.com/javadocs/NW04S/current/pi/index.html
    But be aware that Mapping Lookup API is not intended for inserts/updates (since it doesn't contain any transacational handling), just mere lookups (selects in tables), so I'm not sure it is the best approach for your case.
    Regards,
    Henrique.

  • Query another message payload from graph mapping program

    Hi all,
    I have the following scenario
    Third Party Business System -> XI -> ECC 5.0
    Third Party sends ORDER to ECC and ECC answers with ORDRSP
    When mapping ORDRSP.ORDERS05 to Third Pty format, I need to use info that the Third Party provided us on the ORDERS.
    So... I have to query the ORDERS message payload from ORDRSP message mapping program.
    Any ideas?
    My first idea deal with doing an RFC lookup to search the ABAP Database for this info (my ABAP background raises ) but I'd like to know if there is a more elegant and efficent way of doing this.
    regards,
    David R.

    Hi,
    Let's try again to explain myself with my poor english!
    Time frame
    A) TPart system sends order. XI maps to ORDERS.ORDER05 idoc and is forwarded to ECC.
    B) In ECC users modify Sales order and then triggers the outbound ORDRSP.ORDERS05.
    C) XI has to map ORDRSP.ORDERS05 and include some info (in fact the original message) that was sent in step B).
    The xmls from TPart could be (simplified version):
    Orders (step A)
    <?xml version="1.0" encoding="iso-8859-1">
    <document>
      <header>
      </header>
      <Items>
      </Items>
      <Items>
      </Items>
      </Header>
    </Document>
    The received XML on step C) could be something like this:
    <?xml version="1.0" encoding="iso-8859-1">
    <Document>
      <PurchaseOrder_from_vendor>
      <i>Here I have to include the whole xml sent in step A</i>
      </PurchaseOrder_from_vendor>
      <SalesOrder_from_customer>
      <i>Here the ORDRSP.ORDERS05 mapping stuff</i>
      </SalesOrder_from_customer>
    </Document>
    All the communication will be always async.
    Any ideas?
    regards,
    David R.

  • Creaing Message interface from another software component imported object

    Hi all,
      Will it be possible to creaing Message interface from another software component imported object like i need to create idoc Abstract interface in one software component by using the imported object from other software component
    regards,
    Dhil

    Hi,
    In thise case your SC2 Software Component is dependent on SC1.
    Go  to the SLD, go to the software component SC2 and you will have an option Dependency and as shown in michal's blog make this SC2 dependent on SC1.
    Next, reimport your Software Components SC1 and SC2 in your IR . The old objects will contnue to exists but still clear the SLD cache, and reimport the SC1 and SC2 from the SLD.
    Now in SC2 you will see a new option called BASIS objects under which you can see the message interfaces of SC1.
    Regards
    Bhavesh

  • Can I call an interface from java

    Dear All,
    Can I call an interface from java in ODI ?
    Best Regards
    Arc

    Short answer, Yes.
    Long answer - you must create a scenario from the interface (the scenario is the "executable" code), right-mouse-button on the interface in the tree and "Generate Scenario". This can then be called using the invocation api this is documented in your <installationdirectry>/oracledi/doc/sdk/invocation. This points you at all the necessary classes etc to use.

  • Read Filename form Adapter-Specific Message Attributes in Java Mapping

    Hi,
    I have scenario File to Mail adapter. How can i read filename from Adapter-Specific Message Attributes
    in java mapping.
    Thank you and Best regards
    Fernand

    Hello Fernand,
    Are u using DOM or SAX parser?
    In any case just put the Dynamic config code in the execute function or the other option is to define it as a private functionand call it in the execute,My personal advice would be the former.
    Just put this code in ur java mapping
    As fellow sdn ers have mentioned there is no need of the container method,just initialise the set param method and use it in the dynamice config code as follows
    public class YourClass implements StreamTransformation
         private Map map;
    public void setParameter(Map param)
         map = param;
    public void execute(InputStream in, OutputStream out) throws StreamTransformationException
                   DynamicConfiguration conf =(DynamicConfiguration) map.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
                   DynamicConfigurationKey KEY_FILENAME =DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    // read value
    File = conf.get(KEY_FILENAME);
    Now just call File in the mapping program,
    Should help u out 
    Regards,
    Tauseef

  • Start and stop the Communication channel from Java Mapping

    How to start and stop the Communication channel from Java Mapping in XI 3.0
    Scenario  PI - > MQ -> Third Party web application 
    Web application is down and then Communication channels are stop manually .  
    We need to automate this process,
    MQ Solution - Trigger will be set in MQ which will be called when web application is stopped
    Trigger will send u201CSTOP u201C message to PI
    How to configure PI scenario to stop different com channels when this message received ?

    check this link: http://help.sap.com/saphelp_nw04/helpdata/EN/45/0c86aab4d14dece10000000a11466f/frameset.htm
    make sure that MQ send http request to PI. i dont think a configuration scenario is required in PI. Only roles should be enabled with proper user provided to MQ team.
    However, for security reasons, you can configure a scenario if you dont want to expose PI infrastructure directly to 3rd parties.

  • Problem while Calling a CGI pgm From Java with code sample

    Hey guys,
    I am calling a CGI program from java servlet, while calling cgi program I am passing encoded(Base64) content via post process,
    My problem is the encoded data is not posted as expected, the encoded data is corrupting. But when I send encoded data in a text file, cgi program is perfectly decoding and working fine.
    Here I am doing Base64 encoding as per requirement, I cannot avoid this encoding.
    My doubt is about OutputStreamWriter constructor argument , In OutputStream Constructor I am passing one argument is OutputStream object and another argument is encoding type. I tried with ASCII, US-ASCII & UTF-8 .
    My code is as follows, please help me to resolve this issue.
    URL url = new URL("CGI server path");
    URLConnection urlConnection = url.openConnection();
    urlConnection.setDoOutput(true);
    OutputStream os = urlConnection.getOutputStream();
    BufferedOutputStream buffer = new BufferedOutputStream(os);
    OutputStreamWriter  writer = new
                                                   OutputStreamWriter(buffer, "US-ASCII");
    writer.write(encodedPDF-Content);
    writer.write("\r\n");
    writer.flush();
    writer.close();
    here encodedPDF-Content is String and it's size is 9565 bytes

    Whenever you read something in java into string (with Reader implementation) it expects source to contain text in encoding you specified. It then decodes it and makes 16 bit unicode string from it. Whenever you store string using Writers it does reverse operation with specified encoding (may be different than this which you used to read source) and stores text as a sequence of bytes made of 16 bit unicode string. So, passing text back and forth between programs with the help of files or I/O you can make mistake at both reading and writing encoding. Check for it.
    Now, when C programm or other application reads file it may take another assumptions about encoding or may even completly ignore it and read source as a binary file. Then, if you have a source text as a file and have to pass it to other application never do it using Reader/Writer. User raw InputStream/OutputStream instead what will preserve all information unchanged.
    here encodedPDF-Content is String and it's size is 9565 byteHow id you get this info? String.length() gets you how many chars is in it, it will be half the number of bytes. If you see your input file beeing 9565 bytes long, see my above statements.

  • No messages created from split mapping

    Hello,
    My Scenario is JDBC to Proxy and there is  1:n Mapping
    I had done the multi mapping and done the all the necessary configuration in the MM, IM and ID
    I tested the payload in the MM and IM and it is working fine.
    But while iam doing the end to end testing in the ID --- Test Configuration,It is showing the error at Interface Determinmation and Mapping step.
    In SXMB moni, iam getting error as
    - <!--  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">GENERIC</SAP:Code>
      <SAP:P1>No messages created from split mapping</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>No messages created from split mapping</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    The below is my source payload.
      <?xml version="1.0" encoding="utf-8" ?>
    - <ns:mt_vendor_fusiondb xmlns:ns="http://loreal.com/poc_vendor">
    - <row>
      <ID>1</ID>
      <LIFNR />
      <NAME1>SriTest</NAME1>
      <PSTLZ>07066</PSTLZ>
      <LAND1>USA</LAND1>
      <TELF1>1234567890</TELF1>
      <Status>READY</Status>
      <LastUpdated>2008-11-20 09:20:00.0</LastUpdated>
      </row>
    - <row>
      <ID>2</ID>
      <LIFNR />
      <NAME1>GilderTest</NAME1>
      <PSTLZ>07066</PSTLZ>
      <LAND1>USA</LAND1>
      <TELF1>1234567890</TELF1>
      <Status>READY</Status>
      <LastUpdated>2008-11-20 09:20:00.0</LastUpdated>
      </row>
    - <row>
      <ID>3</ID>
      <LIFNR />
      <NAME1>KarthikTest</NAME1>
      <PSTLZ>07066</PSTLZ>
      <LAND1>USA</LAND1>
      <TELF1>1234567890</TELF1>
      <Status>READY</Status>
      <LastUpdated>2008-11-20 09:20:00.0</LastUpdated>
      </row>
      </ns:mt_vendor_fusiondb>
    Please help me in resolving this error
    Srinivas

    Hi Carlos,
    Now my message mapping is working, the error is in the messagetype i declared 'row' as capital letters,due to this in the runtime it is erroring out in the request message mapping.
    But still I had one more issue,iam getting error in Technical routing, the error is
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Technical Routing
      -->
    - <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="OUTBINDING">CO_TXT_MMF_ENGINETYPE</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Messages in multi message format can be sent to one adapter engine only</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    In the ID i checked the radio button extended.
    But still iam getting the above error.Can you guide me in resolving the error

  • No messages created from split mapping   error .....

    HI XI Friends..
    In My XML to RFC scenario,,
    i am doing message splitting withput BPM.
    in message mapping ..i changed target message occurance to unbounded
    and same i did in interface mapping also..
    static test is OK..creating multiple target messages in static test.
    in interface determination,using enhanced option i given interface mapping.
    file is picking but in SXMB_MONI ...i am getting error like this
    <?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">GENERIC</SAP:Code>
      <SAP:P1>No messages created from split mapping</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>No messages created from split mapping</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    please guide me..
    regards
    ram

    Hi Ram,
    Check these..
    Split mapping created no messages
    Message Split without BPM - Error
    cheers,
    Prashanth
    P.S Please mark helpful answers

  • How to Call abap functn/program from java layer

    Hi all,
        I have to develop a program which has to call abap function/program from java side or how to call a abap program through java ..
    pls send me related links or explanations.. dont send unrelated answers..
    Regards,
    Arivarasu S

    Hi,
    You mean accessing ABAP functions from J2EE perspective, then I think we can do this by using SAP Java Resource Adapter and also through webservices.
    SAP Java Resource Adapter (SAP JRA) can be used as an add-on for the SAP JCo SAP JRA enables the implementation of standard interfaces from diverse J2EE servers to the SAP JCo in the SAP Web AS. The SAP JRA thus simplifies
    communication with ABAP within heterogeneous J2EE landscapes.
    Go through the following links which has Good documentation on how to achieve this
    Accessing BAPIs Using the SAP Java Resource Adapter
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ad09cd07-0a01-0010-93a9-933e247d3ba4]
    Connectivity and Interoperability
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/326d82e5-0601-0010-fca4-9caf27b89c26]
    Finally with WebServices. Accessing SAP Business Functions (ABAP) via Web Services
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/06adbf03-0a01-0010-f386-d8e45561a3c4]
    Regards
    Raghu

  • How to call backing bean method from java script

    Hi,
    I would like to know how to call backing bean method from java script.
    I am aware of serverListener and [AjaxAutoSuggest article|http://www.oracle.com/technology/products/jdev/tips/mills/AjaxAutoSuggest/AjaxAutoSuggest.html]
    but i am running in to some issues with [AjaxAutoSuggest article|http://www.oracle.com/technology/products/jdev/tips/mills/AjaxAutoSuggest/AjaxAutoSuggest.html]
    regarding which i asked for help in other thread with subject ....Question on AjaxAutoSuggest article (Ajax Transactions Using ADF and J...)
    The reason why i posted is ( though i realise both are duplicates) .. that threads looks as a specific question to that article hence i would like to ask the quantified problem is asked in this thread.
    So could any please letme know how to call backing bean method from java script
    Thanks
    Murali
    Edited by: mchepuri on Oct 24, 2009 6:17 PM
    Edited by: mchepuri on Oct 24, 2009 6:20 PM

    Hello,
    May know how to submit a button autoamtically on onload of page with clicking a welcome alert box. the submit button has managed button too to show a message on console using SOP.
    the problem is.
    1. before loading the page a javascript comes on which i clicked ok
    2. the page gets loaded and the button is there which gets automatically clicked and the managed bean associated with prints a message on console using SOP.
    I m trying to do this through server listener and click listener. the code is(adf jspx page)
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1" binding="#{backingBeanScope.backing_check4.d1}">
    <af:form id="f1" binding="#{backingBeanScope.backing_check4.f1}">
    <af:commandButton text="commandButton 1"
    binding="#{backingBeanScope.backing_check4.cb1}"
    id="cb1" action="#{beanCheck4.submit1}"/>
    <af:clientListener type="click" method="delRow"/>
    <af:serverListener type= "jsServerListener"
    method="#{backingBeanScope.backing_check4.submit1}"/>
    <f:facet name="metaContainer">
    <af:resource type ="javascript">
    x=confirm("hi");
    // if(x){
    delRow = function(event){
    AdfCustomEvent.queue(event.getSource(), "jsServerListener", {}, false);
    return true;
    </af:resource>
    </f:facet>
    </af:form>
    </af:document>
    </f:view>
    <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_check4-->
    </jsp:root>
    the backing bean code is -----
    public class classCheck4 {
    public classCheck4() {
    public String submit1() {
    System.out.println("hello");
    return null;
    }

  • How to call a VB application from Java

    Hi,
    does anybody know how to call a VB application from java.
    Would appreciate if you can provide me with an example.
    thanks

    try exec()ing the cad program with the name of the file as a command line parameter...
    Runtime.getRuntime().exec("CADProg.exe Test.prt");
    i have no clue if this will work but it seems like it's worth a try.

  • How to call a .bat file from java code?

    How to call a .bat file from java code? and how can i pass parameters to that .bat file?
    Thanks in advance

    thanks for ur reply
    but still i am getting the same error.
    I am trying to run a .bat file of together tool, my code looks like below
    import java.lang.Runtime;
    import java.lang.Process;
    import java.io.File;
    class SysCall{
         public static void main(String args[]){
              String cmd="D://Borland//Together6.2//bin//Together.bat -script:com.togethersoft.modules.qa.QA -metrics out:D://MySamples//Metrics// -fmt:html D://Borland//Together6.2//samples//java//CashSales//CashSales.tpr";
              //String path="D://Borland//Together6.2//bin//Together.bat ";
              Runtime r= Runtime.getRuntime(); //Declare the system call
              try{
                   System.out.println("Before batch is called");
                   Process p=r.exec(cmd);
                   System.out.println(" Exit value =" + p.exitValue());
                   System.out.println("After batch is called");
              /*can produce errors which must be caught*/
              catch(Exception e) {
                   e.printStackTrace();
                   System.out.println (e.toString());
    I am getting the below exception
    Before batch is called
    java.lang.IllegalThreadStateException: process has not exited
    at java.lang.Win32Process.exitValue(Native Method)
    at SysCall.main(SysCall.java:17)
    java.lang.IllegalThreadStateException: process has not exited

  • Calling a Web Service from Java

    Our java guru (who is out sick....AHHHH) created all the calls that are needed to access the web service that he has running. For example the call getLongList(String user, String password) will return a list of all outstanding transactions. He made a jar file that has service has class files for PortType, Service, Service Locator and Soap Binding stub.
    How do I call this web service from java? Do I have to import it into my classpath? or just call these parameters from within my java code?

    never mind...i got it

Maybe you are looking for

  • Auto-Reaction E-mail is not working:

    HI Basis gurus, I am setting up a fresh configuration with Solution Manager. Central system is solution manager 4.0. Auto-Reaction E-mail is not working: I have set Z_ccms_Onalert_email with the following parameter Parameter name Parameter value SEND

  • MAC Authentication does not work

    My MAC Authentication does not work. I have a ACS 3.0 server set. the MAC address is set in the user name field and in the password field. I can ping the ACS, I can ping my AP, I can ping my client. I don't want WEP and I don't want LEAP just MAC. So

  • Item style messagDownload for a blob datatype shows junk

    Hello everybody, I am using the item style 'messagDownload' for a blob datatype , but it is showing junk characters in the output page. Has anybody faces this isse before. Thanks in advance. Riyaz

  • HT5429 maps on iphone 5 do not display anything

    Hi everyone. I recently bought a new iPhone 5 and I have a serious problem with my maps app. It does not display anything I search except the grid lines and pins. please help how can I fix it.  pls send the instructions at [email protected] Thank you

  • Error in tax formula.

    Hi all, When i am trying to add a new tax formula then system is giving me a error message that "this entry is already exist in the following table " Tax formula master table (OFML)" but the same formula is not present at the table.Kindly look into t