Configuration in Java Mapping.

Hi Folks, Here I am in real Need of Some inputs regarding JAVA Mapping. Actually I am working on the Change of a scenario. I just Added some fields to the interface. I added these fields on the Sender structure and the receiver structure.
        I did mapping also for the added fields. Till XI part its working fine. The problem is When I see the Interface mapping they are using the Java Class Mapping as well with the message mapping.
        I am very new to JAVA. I dont know even A..B..C..D of JAVA. That is the reason I am waiting for some to help from our Community.
        Here are some inputs regarding the JAVA mapping. I did some research and find out that they are using the JAVA Mapping for XML Validation. So I came to know that we dont need to change the JAVA files. Java file just reads the Incoming structure and writes to the receiver. Inside the JAVA mapping it  is using the XSD file to capture the incoming structure. 
        Here is the problem, when I double clik on the java mapping,  it is heading to the Imported archives in which we are having .java, .class, .XSD files already imported with some path information. when I just check the code by double clicking the XSD structure it is showing the old XSD. it is not updated with the added fields. So when ever I am testing the Interface its throughing an exception.
        Can any body please help me out in this matter.
         As i am not going to change the JAVA files, Do I need to install the J2SDK in my local Machine.
        What ever the path is showing in the imported archives, will that be in the XI server or again in our local machine. Do we need to create the folders to save any files on our local machines.
        I am in need to change the XSD file in the path. where I need to change the XSD.
        can any body please gimme the clear process regarding java part which I need to follow to complete my development. even though i completed 80% of my development I am struggling with this config from past 4 days. Please help me out. Looking for the positive responses.
     Thanks,
Ramana Avula.

Hi do one thing
Export the whole imported archive for e.g let the name be ABC.
When you click on ABC you find .java .class & XSD file.
export the archive with a .jar extension
for e.g ABC.jar
Now open this jar file with winzip.
you will see the three files i.e. .class .java & XSD
Now using winzip just replace the old  XSD  with new
The name should be same.
Take care if the XSD file is not present inside any folder
if so then replace it inside that directory only and not outside any folder
for e.g. /com/company/ folder have your .java & class file
but /com/company/xsd/abc.xsd is your xsd file
so replace it in appropriate folder only
And then reimport it back in the same archive
Edited by: Progirl Progirl on Dec 4, 2008 4:39 PM
Edited by: Progirl Progirl on Dec 4, 2008 4:42 PM

Similar Messages

  • Dynamic configuration not working in Java mapping

    Hi All,
    I have a scenario where i  am using java mapping. In this i am doing following
    1)Read file name from input message header
    2)set file name in output message Header
    3) set Directory name in output message Header
    i  have used following code .. but iit is not working... when i test end  to end...  in reciver communication channel it is failing stating " message failed as "Directory is not set in Header. Also i checked in SXMB_MONI  "dynamic configuration".It is not showing Directory.
    this is code.
    public void transform(TransformationInput transformationInput,TransformationOutput transformationOutput)
                   throws StreamTransformationException {
                   private Map para;
                   String Directory ;
                   String  inputFileName;
                   String var1 = "ABC";
                   para = transformationInput.getInputHeader().getAll();
                   DynamicConfiguration conf = (DynamicConfiguration) para
                             .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
                   DynamicConfigurationKey keyFileName1 = DynamicConfigurationKey
                   .create("http://sap.com/xi/XI/System/File", "FileName");
                         inputFileName = conf.get(keyFileName1);
                   DynamicConfigurationKey keyFilename = DynamicConfigurationKey
                             .create("http://sap.com/xi/XI/System/File", "FileName");
                   DynamicConfigurationKey keyDirecory = DynamicConfigurationKey
                             .create("http://sap.com/xi/XI/System/File", "Directory");
                   Directory = "tmp/"+var1;
                   conf.put(keyFilename,inputFileName);
                   conf.put(keyDirecory, Directory);
    I am in PI 7.1 ,   and in eclipse its showing warning that Para is not used.
    Can anyone show some lights.
    Also is there any way to debug this?? like is there any function by which i can write the trace for each step to see those in MONI.

    Method name:   public void createDirectory(Resultlist result, Container container)throws StreamTransformationException
    //Use Simple UDF and do the following lines
    String Directory ;
    String  inputFileName;
    String var1 = "ABC";
    DynamicConfiguration conf = container
        .getTransformationParameters()
        .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
      DynamicConfigurationKey keyFileName1 = DynamicConfigurationKey
                   .create("http://sap.com/xi/XI/System/File", "FileName");
      inputFileName = conf.get(keyFileName1);
    DynamicConfigurationKey keyFilename = DynamicConfigurationKey
                   .create("http://sap.com/xi/XI/System/File", "FileName");
    DynamicConfigurationKey keyDirecory = DynamicConfigurationKey
                   .create("http://sap.com/xi/XI/System/File", "Directory");
    Directory = "tmp/"+var1;
    conf.put(keyFilename,inputFileName);
    conf.put(keyDirecory, Directory);
    and remove these 3 lines
    //private Map para;
    //para = transformationInput.getInputHeader().getAll();
    //DynamicConfiguration conf = (DynamicConfiguration) para.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION
    >>I am in PI 7.1 , and in eclipse its showing warning that Para is not used.Can anyone show some lights.
    You can simply remove declaring Map Para line... The eclipse gives warning because you dont assign values for it and you are trying to use...
    For using the same input file name in output side, you dont need coding ... you need only for the directory...
    Enable ASMA attributes in the channel.
    Edited by: Baskar Gopal on Feb 24, 2011 10:58 AM

  • UDF in message mapping instead of Java Mapping. Pls advice urgent

    Hi All,
    My scenario
    CRM --- XI -- CRM
    In XI I have to open socket connection.
    Pls refer link:
    /people/saravanakumar.kuppusamy2/blog/2005/12/15/socket-integration-with-xi
    Can Java Mapping code given in above link for socket connection can be used in Message Mapping (CRM -- CRM)UDF?
    Pls advice urgent
    Regards

    Hi Henry,
    I understood your requirement.
    But as per the architecture of XI/PI some message has to trigger your scenario.
    In this case there is no adapter where you can directly communicate with CRM system.
    Do one thing configure a dummy scenario on the sender side.
    Use File adapter for simplicity. once it pools the file with some dummy data in the file it comes to Interface mapping(message mapping) of the PIPELINE steps. Now use the code as you mentioned above(within UDF) for opening socket to CRM system and implement you business logic within that program and write the response to target interface which will infact talk with CRM system.
    Dont forget to do the coding in an infinite loop with some delay (if required). Other wise every time you have to put a message for File Adapter for triggering purposes.
    You can also acheive the same if you use Java Mapping instead of Graphical mapping with UDF(code for Opening socket and business logic). I suggest you to use Java Mapping.
    I dont know how you will comunicate with CRM system on receiver side.?
    Thanks,
    Gujjeti

  • XML Validation with XSD in java mapping

    Hi experts,
    I have created an interface to send differents messages between bussines system, the bussiness system receiver is put in the message, to get this value I have a configuration file indicating the path of this field for each message type. In a java mapping I transform the message sent in this structure:
    <document>
    <message>HERE THE MESSAGE AS STRING</message>
    <parameters>
    <sender>HERE SENDER BUSSINESS SYSTEM</sender>
    <receiver>HERE RECEIVER BUSSINESS SYSTEM</receiver>
    </parameters>
    </document>
    the messaging interface works fine, but now I have to validate the XML vs XSD. I need doing in a java mapping because the messaging interface send the message and a email to sender in error case.
    To do this validation I have implemented two java mappings that works fine in my local, the first way is with class Validator of java 5, but my system PI 7.1 return an error with this class. The second way is with SAX parse:
    String schema = "XXXXXxsd";
    DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
    docBuilderFactory.setNamespaceAware(true);
    docBuilderFactory.setValidating(true);
    docBuilderFactory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaLanguage","http://www.w3.org/2001/XMLSchema");
    InputStream is = this.getClass().getClassLoader().getResourceAsStream(schema);
    docBuilderFactory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaSource",is);
    in my local works fine but in PI always return OK never fail.
    For this moment the schema is hardcoded to do proofs, in the future will be loaded from my configuration file.
    Any idea?
    Thanks in advance
    Jose

    hi Jose,
    PI 7.1 has a built in feature available called XML vaidations ..
    your source xml can be validated against a XSD placed at a specific location on the PI server..
    validation can be performed at adapter/integration engine
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d06dff94-9913-2b10-6f82-9717d9f83df1?quicklink=index&overridelayout=true

  • Java mapping for EDI order document

    hi,
    My project is to convert a EDI-850 Purchase Order Document using XI into an R/3 system.I planned t use java mapping So,I had got the java code necessary for the mapping from a tool called ALTOVA XML MAPRFORCE.
    I have converted the code into a .jar file and put into the XI server.The mapping is working fine now. If i give an EDI order document as input to the mapping and test the mapping the out put is coming correctly.
    Now i dont know what I should do in the Integration directory.
    As I have to convert this document and post it in a R/3 system.I have found the function module to create a Purchase Order also "BAPI_PO_CREATE".
    What should I do next ?

    Hi Mithun,
    Follow the steps below:
    1. BAPI is a RFC function module. So you import into Integration Repository. Then map your output to the structure of RFC.
    2. In the integration Directory,
    a. Create a business service representing your source.
    b. Create a business system representing your R/3 system.
        Before creating business sytem, first you need to register it as a techincal system and business system in sld.
    c. Create a Sender Agreement to pick the message from source system. Depending upon the type of source system, you need to configure the sender adapter.
    d. Create Receiver determination to route the message to the target system
    e. Create interface determination to pick the current Interface mapping to convert source message to target message
    f. Create Receiver Agreement to send the message to R/3 System. This should encapsulate Receiver Communication channel which is using IDoc adapter.
    Reward if helpful.
    Regards,
    Suraj Kumar.

  • Java mapping for Remove and Add of  DOCTYPE Tag

    HI All,
    i have one issue while the Java mapping for Remove and Add of  DOCTYPE Tag   in Operation Mapping .
    it says that , while am testing in Configuration Test "  Problem while determining receivers using interface mapping: Error while determining root tag of XML"
    Receiver Determination...
    error in SXMB MOni
    " SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="RCVR_DETERMINATION">CX_RD_PLSRV</SAP:Code>
      <SAP:P1>Problem while determining receivers using interface mapping: Error while determining root tag of XML: '<!--' or '<![CDATA[' expected</SAP:P1>
    plz provide solutions
    Thanks in advance.

    Hi Mahesh,
    I understand, you are using extended Receiver Determination using Operational Mapping (which has Java Mapping). And, there is an error message u201CError while determining root tag of XMLu201D, when you are doing configuration test.
    Can you please test, the Operational Mapping (which has Java Mapping) separately in ESR, with payload which is coming now. It should produce a XML something like this [Link1|http://help.sap.com/saphelp_nwpi711/helpdata/en/48/ce53aea0d7154ee10000000a421937/frameset.htm]
    <Receivers>
    <Receiver>
      <Party agency="016" scheme="DUNS">123456789</Party>
      <Service>MyService</Service>
    </Receiver>
    <Receiver>
      <Party agency="http://sap.com/xi/XI" scheme="XIParty"></Party>
      <Service>ABC_200</Service>
    </Receiver>
    </Receivers>
    If it is not (I Think it will not), then there is some problem in Java Mapping coding. Please correct it. Last option, if your Java code is small in length; you may paste it here, so that we can have a look at the cause of issue.
    Regards,
    Raghu_Vamsee

  • LINKAGE ERROR in Java Mapping

    Hi Friends,
    I am getting LINKAGE ERROR when executing JAVA mapping as its not able to reference AbstractTransform class provided by SAP PI API.
    This problem occurs in particular environment for this particular mapping. For other environments this is working fine.
    I assume it has something to do with Java Library reference which is mis-configured during transport. Can anyone let me know how and where the library path is configured for Imported Achieves in SAP PI 7.1.
    We are using java 1.5 for building and creating java achieves.
    Many thanks,
    SK

    Hi Sumant,
      This error occurs when the jdk version of XI server and the library version you used to develop the mapping are incompatible. Make sure you use the same version as of the server
    have a look in SAP Note 755302
    Regds,
    Pinangshuk.

  • Getting Error in java mapping: Parsing empty source. Root element expected!

    Hi Experts,
       I am using java mapping for schema validation of input message. I have followed all the standard procedures and implemented the java class in the interface mapping.
    My interface mapping is like this:
    OrderData --->Java Class ---SchemaValidate
                         Mesg Map ---OrderData_to_BAP --->BAPI Msg
    So first I want to validate the schema of the input message. If the input message is invalid then XI should throw an exception. Then I use the actual message mapping to map the input order data to the BAPI input parameters.
    In the java code I am using xerces parser.
    The java code works fine when I run it as a standalone application.
    The interface mapping also works fine if I don't include the java mapping. Ofcourse schema validation does not happen.
    But when I test the interface mapping by including the java mapping then I am getting the error:
    Call method execute of the application Java mapping SchemaValidate
    Java mapping SchemaValidate completed. (execute() of SchemaValidate
    com.sap.aii.utilxi.misc.api.BaseRuntimeException: Parsing an empty source. Root element expected!
    What am I doing wrong? Why it is not getting the root element?
    My Java code is as follows:
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import com.sap.aii.mapping.api.StreamTransformationException;
    import java.io.*;
    import java.util.Map;
    import javax.xml.parsers.*;
    import org.xml.sax.helpers.*;
    import org.xml.sax.*;
    import org.apache.xerces.jaxp.*;
    Sample mapper for SAP-XI
    @author Gopal
    public class SchemaValidate implements StreamTransformation {
        //Constants when using XML Schema for SAX parsing.
         static final String JAXP_SCHEMA_LANGUAGE =
         "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
         static final String W3C_XML_SCHEMA =
         "http://www.w3.org/2001/XMLSchema";
         static final String JAXP_SCHEMA_SOURCE =
         "http://java.sun.com/xml/jaxp/properties/schemaSource";
    Injection of mapping parameters
    from integration engine
    @param map Map with configuration data
        public void setParameter(Map map) {
    Mapping implementation
    @param inputStream Input data from integration engine
    @param outputStream Output data to integration engine
        public void execute(InputStream inputStream,
                            OutputStream outputStream)
          throws StreamTransformationException {
            try {
                  // obtain an object of class javax.xml.parsers.SAXParser,
                  SAXParserFactory spf = SAXParserFactoryImpl.newInstance();
                  spf.setNamespaceAware(true);
                  spf.setValidating(true);
                  SAXParser sp = spf.newSAXParser();
                  // setup the schema file
                  sp.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
                  sp.setProperty(JAXP_SCHEMA_SOURCE, new File("IOReqMsgSchema.xsd"));
                  //parse the input xml using the given schema
                  sp.parse(inputStream, new ParseErrorHandler());
            catch(SAXException se) {
              se.printStackTrace();
            catch ( Exception e ) {
              throw new StreamTransformationException( e.getMessage() );
    My input message is :
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:OrderCreate_request xmlns:ns0="mynamespace">
       <ORDER>HTEST1234567</ORDER>
       <ORDER_TYPE>z001</ORDER_TYPE>
       <ORDER_NAME>Test Order</ORDER_NAME>
       <CO_AREA>INTC</CO_AREA>
       <CCTR_POSTED>1234567890888888888</CCTR_POSTED>
       <CURRENCY>USD</CURRENCY>
       <PERSON_RESP>12345679</PERSON_RESP>
    </ns0:OrderCreate_request>
    Kindly help! please this is urgent!!!!!!
    Thanks
    Gopal
    Edited by: gopalkrishna baliga on Feb 28, 2008 9:34 AM

    Hi Stefan,
       I did the code changes to return output stream and the java code works perfectly in standalone mode in my PC.
       But when I use the same in the Java mapping with XI then It throws an error "Getting Error in java mapping: Parsing empty source. Root element expected!".
    My XI J2EE server has JDK1.4.3.11.
    Is there any limitation of using SAX parser in XI? If Yes, then which parser should be used for schema validation in XI?
    I have included the XSD file for schema validation along with class files in the .jar file. This jar file is then imported in XI repository. Is the XI engine not able to read the XSD file?
    Do I have to handle reading XSD file differently? Any suggession how?
    Is this parser error due to some security access?
    Kindly help me! I have been struggling with this problem since 2 weeks. I will be greatfull to you if you can help me.
    Thanks
    Gopal

  • Problem by adding attachments in Java Mapping

    Hi,
    we have to add some attachments in Java Mapping.
    So we are using the Java Mapping API.
    But it doesn't work correctly.
    We got the following error in sxmb_moni:
    Attribute Manifest ExampleAttachment is initial
    So we checked what happened in the Manifest and in the SAP SOAP Envelope and we see that there is an inconsistence.
    In the SAP Manifest we find the following entries:
    <SAP:Manifest xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:wsu="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="wsuid-manifest-5CABE13F5C59AB7FE10000000A1551F7">
         <SAP:Payload xlink:href="cid:payload-79a6e3c088db11dfa4dd0017a477c1e8<at>sap.com">
              <SAP:Name>MainDocument</SAP:Name>
              <SAP:Description/>
              <SAP:Type>Application</SAP:Type>
         </SAP:Payload>
         <SAP:Payload xlink:href="ExampleAttachment">
              <SAP:Name>ExampleAttachment</SAP:Name>
              <SAP:Description/>
              <SAP:Type>ApplicationAttachment</SAP:Type>
         </SAP:Payload>
    </SAP:Manifest>
    For us it seems the entry for our ExampleAttachment is wrong. I think there must be a real content id for the attachment like the cid for the MainDocument. In the SOAP Envelope you can find the following entry for the attachment:
    content-type:text/plain
    content-length:45
    content-id:payload-79a6e3c088db11dfa4dd0017a477c1e8<at>sap.com
    This is an example for an attachment!
    --SAP_0017A477C1EC1DEFA3D200A5CB55CE04_END--
    So here you can see a real content ID, but you can't find it in the Manifest.
    So do we anything wrong in our source code or is it a bug of the SAP API?
    Do you have any ideas?
    Here the Java Mapping we're using for adding an attachment (as a test):
    import java.io.BufferedReader;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.Reader;
    import com.sap.aii.mapping.api.AbstractTransformation;
    import com.sap.aii.mapping.api.DynamicConfiguration;
    import com.sap.aii.mapping.api.DynamicConfigurationKey;
    import com.sap.aii.mapping.api.StreamTransformationException;
    import com.sap.aii.mapping.api.TransformationInput;
    import com.sap.aii.mapping.api.TransformationOutput;
    import com.sap.aii.mapping.api.Attachment;
    public class SUSAttaHandler extends AbstractTransformation {
         private static final DynamicConfigurationKey KEY_FILENAME    = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
         // Transform Method
         public void transform(TransformationInput in, TransformationOutput out)
                   throws StreamTransformationException {
              // An info message is added to trace
              getTrace().addWarning("JAVA Mapping AttaHandler called!");
              // Input payload
              String inData = convertStreamToString(in.getInputPayload().getInputStream());
              // dynamic configuration
              DynamicConfiguration conf = in.getDynamicConfiguration();
              String fileName          = conf.get(KEY_FILENAME);
              getTrace().addWarning("AttaHandler: FileName = " + fileName);
              String text = new String("This is an example for an attachment!");
              Attachment atta = out.getOutputAttachments().create("ExampleAttachment", "text/plain", text.getBytes());
              out.getOutputAttachments().setAttachment(atta);
              String outData = inData;
              try {
                   out.getOutputPayload().getOutputStream().write(outData.getBytes("UTF-8"));
              catch(Exception exception1) { }
         // convert Stream to String
         public String convertStreamToString(InputStream in){
              StringBuffer sb = new StringBuffer();
              try {
                   InputStreamReader isr = new InputStreamReader(in);
                   Reader reader = new BufferedReader(isr);
                   int ch;
                   while((ch = in.read()) > -1) {
                        sb.append((char)ch);}
                        reader.close();
              } catch(Exception exception) { }
              return sb.toString();
    Thanks for your help,
    Thorsten

    Hi,
    we created an OSS ticket for this problem and SAP created a SAP note.
    Here the number of the note: 0001501345
    I hope this will help you.
    Thorsten

  • Java mapping and no content conversion

    Hi all,
    I have a file to idoc scenario. The file is in flat idoc format and I've made my own java mapping that gets the flat file and converts it to idoc xml format.
    I don't use content conversion in the sender file adapter because I don't wan't the file to be converted to xml before the java mapping processes it. But with this configuration my scenario fails in the interface determination step, as it doesn't find an xml to apply the java mapping.
    Is there a way to make it work as I want? (with my java mapping and not applying content conversion?) If not, is there a way to put all the file in a single xml tag using content conversion?
    I mean something like this:
    <FILE>
    </FILE>
    This way it would be easy for my java mapping to remove the tags and work with the flat file as it does now.
    Thanks in advance.

    Thanks Stephan for your answer.
    In fact I have the defined that interface, as well as a dummy data type and message type that uses it. I still get the error though. My guess is that, as I don't use content conversion in file adapter (message protocol is file) the outbound message is in fact not in xml format, and it cannot identify it in interface determination. That's my guess but perhaps I'm wrong?
    This is the error I'm getting:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Interface Determination
      -->
    - <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="IF_DETERMINATION">CX_ID_PLSRV</SAP:Code>
      <SAP:P1>No interface determination found for outbound interface http://********.****/EDELIVERY.SI_OUT_A_0596_RECADV: Error while determining root tag of XML: BOM / charset detection failed</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:Stack>Error when determining the inbound interface: No interface determination found for outbound interface http://********.****/EDELIVERY.SI_OUT_A_0596_RECADV: Error while determining root tag of XML: BOM / charset detection failed No interface determination found for outbound interface http://********.****/EDELIVERY.SI_OUT_A_0596_RECADV: Error while determining root tag of XML: BOM / charset detection failed Error while determining root tag of XML: BOM / charset detection failed Error while parsing an XML stream: 'BOM / charset detection failed'.</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Any idea?

  • JAVA Mapping

    Hi,
    I have worked on Graphical mapping and XSLT Mapping. I want to do some scenarios using Java mapping. Can anyone give the detailed steps to work on Java Mapping. What are the softwares needed and their configurations. Also I want to know whether NWDS is compulsory to work on Java Mapping. Thanks.
    Regards
    Suresh

    Hi,
    Its not necessary that NWDS is compulsory to work with Java mapping.
    for java mappings you need jar file.
    Just have a look at these links for mapping:
    <a href="/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i:///people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
    <a href="Java Mappings for XI://Java Mappings for XI
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm">http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm</a>
    Regards,
    Gunasree

  • RFC Lookup using Java Mapping program - Examples

    Dear Experts,
    I am working on a scenario which is using 1:N mapping. For deciding the target message I have to use RFC Lookup to call the backend ERP system and there are 2 ERP systems involved in this integration. As I am using Java Mapping and never did a RFC Lookup in Java. I kindly request you to give me some examples which I could use for my RFC calls in my Java Mapping. Simple example will do.
    Client is adamant to use Java mapping, I could achieve this easily using XSLT or Graphical Mapping.
    Advance Thanks,
    Pradeep

    Hello,
    why don't you use Extended Receiver Determination Defining Extended (Dynamic) Receiver Determination - Integration Directory - SAP Library?
    What you can do is create a Message Mapping between your source message and Receivers message type. In this message mapping you can use your RFC to generate the target message.
    For example, lets say we have the function ZFM_GET_INTERFACE_INFO used to generate the List of Receivers given a source message. You could create a Message Mapping as below:
    In this case, the RFCLookup box look as below:
    The receiver determination configuration would look as follows:
    Afterwards, you will need two specific message mappings for the two ERP systems.
    Summarizing, you'll need:
    1.- A Message Mapping: Source Message to Receivers Message Type (This one uses the RFC Lookup)
    2.- A Message Mapping: Source Message to Target Message for ERP 1
    3.- A Message Mapping: Source Message to Target Message for ERP 2
    In Integration Directory you'll have 1 Receiver Determination(Source system, Target System determined Dynamically) and 2 Interface Determinations (Source System to ERP1, Source System to ERP2), etc.
    I hope you find it useful.
    Regards!

  • Read DataType Definition in a Java Mapping,

    Hi,
    Is there a way to load a DataType Definition and parse the fields and attribute of this data type from java code?
    I am in a custom Adapter Module (PI 7.1) and need to dynamically load the definition of a DataType to do some FCC.
    I would like to do the FCC based on the DataType definition rather then on the Communication Channel's adapter module configuration.
    Thanks,
    Martin

    Hi Martin Lavoie,
    I understand, you are getting a flat file and want to convert it into XML or the other way, converting XML to flat file in SAP PI 7.1 using File channel.
    First, why you are going for Adapter module? (I think even you don't like it) It is resource intensive to develop, running in production system, maintain. If already there is an adapter module, leave it as it is. Consider using Java mapping over adapter module. Java mapping is relatively less resource intensive to develop, running in production system, maintain. Java mapping can do the payload conversion what you are planning to do in adapter module. If you write adapter module (generic), you have to use it in interfaces (all channels) where you need to transform the payload. If you write java mapping (generic), you can use it in operational mapping in all interfaces where you need payload transformation, along with other graphical mappings.
    Second, as of now, there is no way to access Data type XSD (which are declared in ESR) using SAP PI. In PI 7.1 EHp1 payload validation using XSD can be done, by placing XSD file in folder on PI server. From PI 7.3, validation is based on Data type (XSD) defined in ESR. First place, you are interested in payload transformation not payload validation. So there is no way you can access XSD in ESR from Adapter module dynamically. I guess you can upload XSD along with adapter module, but maintenance in not all easy.
    Finally, I donu2019t recommend adapter module for you requirement. Try using FCC. You may say whenever there is change in XSD (change in field lengths), you have to change FCC (edit the channel), and I donu2019t see better option than this. If you think FCC will not be sufficient for your requirement, and then go for Java mapping. Writing generic java mapping will be a good challenge.  Java mapping should be uploaded with XSD (or parameter file) for every interface and should be edited if there is a change in XSD.
    Regards,
    K_Raghu_Vamsee
    Edited by: Raghu Vamsee on Jan 7, 2011 12:28 AM

  • Java Mapping (Not Working)

    Hi....
    I have done java mapping using file to file scenario....
    I have created two data types, two message types, two message interfaces... in imported archives i have imported
    dom4j-1.6.1.zip and itext.jar files..
    i have written my java code like this:
    package com.xmltopdf;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import com.lowagie.text.xml.XmlToPdf;
    public class MyXmlToPdf {
    public MyXmlToPdf(String inputFile, String outputFile){
    try {
    XmlToPdf xtp = new XmlToPdf();
    System.out.println("Ravi");
    xtp.parse(new FileInputStream(inputFile), new FileOutputStream(outputFile));
    }catch(Exception e ) {
    System.out.println(e);
    in message mapping i have invoked "MyXmlToPdf(String,String) constructor like this:
    MyXmlToPdf xmt= MyXmlTOPdf("C:
    source
    filetofile.xml","C:
    source
    file.pdf");
    return "";
    and i have configured my communication channel, reciever determination, sender aggrement, reciver aggrement, and interface determination.....
    so please tell me whether my code is correct or not... if its correct why i am not getting the pdf file.. if its not correct please tell me whats wrong in my code...
    Thanks & Regards
    Ravi Shankar B

    Hi ,
    select XMLTOOLKIT option in Operation mapping and execute it.
    I am not sure we can call java program in XSLT Program,but alternative is copy the code and use it in XSLT mapping it self,that means your XSLT program will become with JAVA extensions.
    then in Operation mapping level select SAPXMLTOOL kit option and execute it. i hope it will work. if it is not working then you have deploy some JAXP files on server,because the way execution of XSLT Mpaping program got changed,like when eve you executing XSLT with extnasions( if you are not using XMLTOOL kit option) then you have to use latest version of JAXP.JDK files.
    Regards,
    Raj

  • Java Mapping Issue

    Hi,
    I'm new to JAVA mapping and I'm having an issue which I can't get resolved :
    When I execute my mapping I get :
    <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">LINKAGE_ERROR</SAP:Code>
      <SAP:P1>XIFileNameMapClass</SAP:P1>
      <SAP:P2>http://notimportant.com/xi/SOOFT</SAP:P2>
      <SAP:P3>068fe9b0-44d1-11db-c69d-ee989e43162e</SAP:P3>
      <SAP:P4>-1</SAP:P4>
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Incompatible class versions (linkage error)</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    I'm using eclipse for the java class and I have choosen several jre versions to create the .jar file but all lead to the same error.
    I had copied the required aii_map_api.jar.jar from xi box to my local project directory and added it as an external .jar to my project.
    But since I new to JAVA and unsure on what exactly is going into the jar and what not.
    Is it important with which jre version you build the java class ? ( Xi is running on 1.4.2_12 ) I tried first with 1.5.0_06 and then with 1.4.2_9 and then 1.4.2_13 all with the same result.
    I do this by adding a different jre to the properties of my project. And then I export to the .jar file . Is that enough ? ( I was expecting something like a 'build' option somewhere but I can't find that in eclipse )
    When I imported the archive in XI, I also see a .Classpath , a .project , SAP_AG_G.RSA and a SAP_AG__G.SF file.
    This reminds me of those ugly .dll incompatibilities which I had hoped not occurring with JAVA...:(
    Any ideas ?
    PS We are on XI 7.0 SP8 ( so the older note 755302 is not relevant )

    Hi all,
    I did understand that I had something todo with different versions ( as I started to make a first attempt with version jre 1.5 and then with other versions )
    But somehow I apparently couldn't get my .jar file to be compiled to a 1.4.2_xx
    ( although I tried numerous settings in the Eclipse build path etc...)
    Finally, I removed the 1.5 version and started from scratch using jre 1.4.2_10.
    And now it works OK !
    I'm sure you can configure Eclipse correctly to generate 1.4 compatible jar files ( even when running itself on 1.5 or above ) but I must have missed the right combination of settings ( as I said I'm new in Java / Eclipse....)
    regards
    Dirk

Maybe you are looking for

  • ITunes 10.5.0.142 Crashes Whenever Music Added to Library

    This has been pestering me for a few weeks now and so now I'm taking it to you, random cloud of internet people. Whenever I attempt to load music files into my iTunes library it crashes more or less immediately. The error message reads as such: Probl

  • Unable to open itunes after upgrading

    i just did a upgrade to my itunes now it wont open on my computer im using windows 7 64 bit

  • Calling subtemplate.rtf in maintemplate.rtf in XML Publisher reports

    Hi, I am working on XML Publisher Reports. I have two subtemplate.rtf; based on condition in the maintemplate.rtf, i have to call either of the subtemplate.rtf. Doubts: 1. Do i need to register both subtemplate.rtf in oracle applications? If yes, wha

  • Creating booklet: Should image files from illustrator be in PDF format??

    Good morning, Over the weekend i got thinking about a image booklet i am looking to create. Despite being a newbie, i feel as though i have made great strides in becoming familiar with both Indesign and Illustrator. Having created artwork in Illustra

  • Connecting to a DB from an Applet

    Hi, I'm new to Java so I apologise if this question seems a bit basic. I want to display some DB contents in an applet using a web browser, but according to my Java 'bible', you cant use the JDBC-ODBC bridge driver from within an applet. How can I ov