Skip to Content
author's profile photo Former Member
Former Member

Problem in JDBC Adapter Mapping

Hi all,

I am working on a scenario wherein i am trying to connect an ORACLE DB to SAP 4.7 system using XI 3.0 . I configured the JDBC Adapter and the JDBC adpter is picking up the message but i have a problem in JDBC adpter Mapping.

The error message is like this:

<!-- Request Message Mapping

-->

- 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">EXCEPTION_DURING_EXECUTE</SAP:Code>

<SAP:P1>com/sap/xi/tf/_ORACLE_MSGMAP_</SAP:P1>

<SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>

<SAP:P3>RuntimeException in Message-Mapping transformatio~</SAP:P3>

<SAP:P4 />

<SAP:AdditionalText />

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack>During the application mapping com/sap/xi/tf/_ORACLE_MSGMAP_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: RuntimeException in Message-Mapping transformatio~</SAP:Stack>

<SAP:Retry>M</SAP:Retry>

</SAP:Error>

How to map the "Resultset" from the Adapter to a target message? Can anybody throw some light on how to get the message from the JDBC adpter and map it to some other message format...Any documents regarding this ?

Waitin for ur replies...

Bye,

Romit Shankar Arun.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 25, 2005 at 05:16 PM

    Hi Romit,

    The steps you have to do to create a mapping are always the same:

    1. define data type for message XI will receive then message type than message interface of type outbound.

    2. define data type for message XI will send then message type than message interface of type inbound.

    If you send data to SAP R/3 than the inbound message interface could probably be an IDoc, so you would need to import that instead of creating your own message interface.

    3. After that you can create a message mapping using the message types you have created

    4. Define an interface mapping using the outbound message interface as source and the inbound message interface as target.

    When defining a message interface for a JDBC adapter you have to be carefull with the format. It will always look similar to:

    <YourDocumentName>

    <row>

    <COLUMN1>

    <COLUMN2>

    <COLUMN3>

    ...

    <COLUMNN>

    </row>

    </YourDocumentName>

    Make sure that your column names match the names of the database columns or your AS clause in the select statement. Define them in uppercase letters as the document will be created with uppercase column names.

    As you have already been able to select the data you want via the adapter, you can look in the monitoring for the structure in which it has been sent.

    Note: you can put an own document name in the adapter so that you do not need to use resultset, but it is not possible to rename the row tag.

    As you have already created a mapping, i would suggest that you have a look at the trace file of the message in SXMB_MONI. Here you should find a more detailed message on which error occured in your mapping.

    Best regards

    Christine

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 09, 2005 at 04:00 PM

    Hi,

    I think Oracle provides you an option to generate the XSDs for the desired tables. But before importing into XI make sure get rid of the "extra" namespaces and the attributes which Oracle puts in.

    If you generate a sample XML Using the XSD generated by oracle , the resulting XML structure will be like the following for example :

    <dbTablename>

    <col1>a</col1>

    <col2>b</col2>

    </dbTablename>

    But the XML structure required for your INSERT needs to be like the following:

    <root>

    <statement1>

    <dbTableName action="INSERT">

    <table>Text</table>

    <access>

    <col1>a</col1>

    <col2>b</col2>

    </access>

    </dbTableName>

    </statement1>

    </root>

    So all you need to do is edit the Oracle generated XSD to include definitions for the following tags :<root>,<statement1>,<table>,<access>.

    Refer to this Link:

    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm

    After you do the message mapping/interface mapping do a "TEST" using the test tool in the IB.

    Regards,

    Sridhar

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi,

      Does your other SDN post "Inserting data through JDBC adapter" refer to the same problem?

      I assume you use XMLSPY for creating XSDs.

      I used the XSD posted by you in the other forum thread and tried to generate the XML structure and it does not seem to generate the XML structure in the format required by the JDBC adapter.

      sample file generated from your XSD posted in the other forum thread:

      <?xml version="1.0" encoding="UTF-8"?>

      http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\Untitled1.xsd">

      <row action="INSERT">

      <CUSTOMER_NUMBER>String</CUSTOMER_NUMBER>

      <COUNTRY_KEY>String</COUNTRY_KEY>

      <FIRST_NAME>String</FIRST_NAME>

      <LAST_NAME>String</LAST_NAME>

      <AUTHORIZATION_GROUP>String</AUTHORIZATION_GROUP>

      <INDUSTRY_KEY>String</INDUSTRY_KEY>

      <ACCOUNT_GROUP>String</ACCOUNT_GROUP>

      <INTIAL_CONTACT>String</INTIAL_CONTACT>

      <COMPANY_CODE>String</COMPANY_CODE>

      <CITY>String</CITY>

      <CITY_CODE>String</CITY_CODE>

      <COUNTRY_CODE>String</COUNTRY_CODE>

      <DISTRICT>String</DISTRICT>

      <FAX_NUMBER>String</FAX_NUMBER>

      <HOUSE_NUMBER>String</HOUSE_NUMBER>

      <POSTAL_CODE>String</POSTAL_CODE>

      <REGION>String</REGION>

      <TELEPHONE_NUMBER>String</TELEPHONE_NUMBER>

      </row>

      </resultset>

      Compare the above to the template i have mentioned.

      Hope this helps.

      Regards,

      Sridhar

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.