on 08-07-2008 4:54 PM
Hi experts,
while going through my Idoc to JDBC scenario, I am facing the following problem :
when I send an Idoc, in the RWB, it goes through the integration engine with no problem, but once in the adapter engine I got the following error:
Unable to execute statement for table or stored procedure. 'TBL_IN_TCLIENT' (Structure 'Statement1') due to java.sql.SQLException: FATAL ERROR document format: structure 'Statement1', no key element found
I have no idea where this could come from. My mapping works fine, my tests configuration as well.
Does anyone know where this might come from ?
Thanks,
Regards,
Jamal
this isn't a mpping problem.
you need to do two things:
Check your structure that you defined do you have elements in the right place and attributes in the right place.. check against SAP help.
<StatementName1>
<dbTableName action=u201DUPDATEu201D | u201CUPDATE_INSERTu201D>
<table>realDbTableName</table>
<access>
<col1>val1</col1>
<col2>val2new</col2>
</access>
<key1>
<col2>val2old</col2>
<col4>val4</col4>
</key1>
<key2>
<col2>val2old2</col2>
</key2>
</dbTableName>
</StatementName1>
your error message tells us that you don't have a key...
Also check against your DB and ensure you have the correct names etc...
Edited by: Alex on Aug 7, 2008 6:09 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i was facing a similar issue, i simply changed UPDATE to INSERT in my mapping and it worked fine for me.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ohhh...I realised something, UPDATE_INSERT does not work because I did not have the "key" node since all I do is INSERT...
sorry... :s
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Because the database is deleted on regular basis, that's why. But UPDATE_INSERT should work though, no?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all,
thanks a lot for your help.
I changed the value of @action from UPDATE_INSERT to INSERT and it works fine.
Do you know why ?
Thanks again,
Regards,
Jamal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Go to IR- MM and test your Mapping first. If possible paster the generated/target message structure here.
It might be this issue arising due to the Primary Key.
Thanks
Farooq.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check in your mapping structure that you have mapped a constant with value INSERT/UPDATE/.. to target Action field and also you have mapped a constant with value TABLE NAME to target Table name field respectively to query and table name in target structure fields.
It will solve your problem
Please award marks if found useful.
Thanks
Hamja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is the xml of my target message type (hope its explicit):
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://pomona/xi/in/ET/VT433_CLIENT_POUR_ET" targetNamespace="http://pomona/xi/in/ET/VT433_CLIENT_POUR_ET">
<xsd:element name="MT_VT433_CLIENT_SAP_ET" type="DT_VT433_CLIENT_SAP_ET"></xsd:element>
<xsd:complexType name="TBL_IN_ADV">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
8c900f31649c11ddb2650050568b4d2e
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="table" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
4a23cd40589311ddc780001b387a26b0
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="access">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
0f0f64d157e411ddc522001b387a26b0
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Code" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
d34ec57058b611ddb303001b387a26b0
</xsd:appinfo>
<xsd:documentation xml:lang="EN">
numéro de client
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="OC" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
0f0f64d257e411dda5c3001b387a26b0
</xsd:appinfo>
<xsd:documentation xml:lang="EN">
orga. com.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="Canal" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
0f0f64d357e411dd87ab001b387a26b0
</xsd:appinfo>
<xsd:documentation xml:lang="EN">
canal de distribution
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="SA" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
0f0f64d457e411dd8fd4001b387a26b0
</xsd:appinfo>
<xsd:documentation xml:lang="EN">
secteur d'activité
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="Branche" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
0f0f64d557e411ddc175001b387a26b0
</xsd:appinfo>
<xsd:documentation xml:lang="EN">
branche
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="TGR" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
0f0f64d657e411dd94f5001b387a26b0
</xsd:appinfo>
<xsd:documentation xml:lang="EN">
niveau de TGR
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="GPV" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
0f0f64d757e411dda36d001b387a26b0
</xsd:appinfo>
<xsd:documentation xml:lang="EN">
groupe de vendeur
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="GPV2" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
0f0f64d857e411dd8110001b387a26b0
</xsd:appinfo>
<xsd:documentation xml:lang="EN">
libellé groupe de vendeur
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="Agence" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
0f0f64d957e411ddc186001b387a26b0
</xsd:appinfo>
<xsd:documentation xml:lang="EN">
agence commerciale
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="Promo_Reg" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
0f0f64da57e411dda201001b387a26b0
</xsd:appinfo>
<xsd:documentation xml:lang="EN">
type de promo régionale
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="action" type="xsd:string" use="required">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
0f0f64d057e411ddaff8001b387a26b0
</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
<xsd:complexType name="TBL_IN_TCLIENT">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
8c925922649c11dd88a20050568b4d2e
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="table" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
1be8ae6157d411ddcd78001b387a26b0
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="access">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
1be8ae6257d411ddbca7001b387a26b0
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Code" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
1be8ae6357d411ddc0dc001b387a26b0
</xsd:appinfo>
<xsd:documentation xml:lang="EN">
numéro de client
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="Nom" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
1be8ae6457d411ddabb0001b387a26b0
</xsd:appinfo>
<xsd:documentation xml:lang="EN">
nom
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="Ville" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
1be8ae6557d411dd9371001b387a26b0
</xsd:appinfo>
<xsd:documentation xml:lang="EN">
localité
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="CP" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
1be8ae6657d411dda83c001b387a26b0
</xsd:appinfo>
<xsd:documentation xml:lang="EN">
code postal
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="Adresse" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
1be8ae6757d411dd932a001b387a26b0
</xsd:appinfo>
<xsd:documentation xml:lang="EN">
rue et numéro de rue
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="KATR1" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
1be8ae6857d411dd8bae001b387a26b0
</xsd:appinfo>
<xsd:documentation xml:lang="EN">
attribut 1
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="KATR1T" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
1be8ae6957d411dd973d001b387a26b0
</xsd:appinfo>
<xsd:documentation xml:lang="EN">
désignation attribut 1
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="KATR2" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
1be8ae6a57d411dd8441001b387a26b0
</xsd:appinfo>
<xsd:documentation xml:lang="EN">
attribut 2
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="KATR2T" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
1be8ae6b57d411ddcffd001b387a26b0
</xsd:appinfo>
<xsd:documentation xml:lang="EN">
désignation attribut 2
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="KATR3" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
1be8ae6c57d411ddb64e001b387a26b0
</xsd:appinfo>
<xsd:documentation xml:lang="EN">
attribut 3
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="KATR3T" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
1be8ae6d57d411ddc982001b387a26b0
</xsd:appinfo>
<xsd:documentation xml:lang="EN">
désignation attribut 3
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="KATR4" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
1be8ae6e57d411dd85f3001b387a26b0
</xsd:appinfo>
<xsd:documentation xml:lang="EN">
attribut 4
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="KATR4T" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
1be8ae6f57d411ddbfe9001b387a26b0
</xsd:appinfo>
<xsd:documentation xml:lang="EN">
désignation attribut 4
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="KATR5" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
1be8ae7057d411ddb2b7001b387a26b0
</xsd:appinfo>
<xsd:documentation xml:lang="EN">
catégorie
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="KATR5T" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
1be8ae7157d411dda25c001b387a26b0
</xsd:appinfo>
<xsd:documentation xml:lang="EN">
désignation catégorie
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="KATR6" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
1be8ae7257d411ddab8b001b387a26b0
</xsd:appinfo>
<xsd:documentation xml:lang="EN">
sous-segment
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="KATR6T" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
1be8ae7357d411dda876001b387a26b0
</xsd:appinfo>
<xsd:documentation xml:lang="EN">
désignation sous-segment
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="Date" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
1be8ae7457d411dd8e6d001b387a26b0
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Promo_Nat" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
17ecb6e057fb11dd8725001b387a26b0
</xsd:appinfo>
<xsd:documentation xml:lang="EN">
type de promo nationale
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="action" type="xsd:string" use="required">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
1be8ae6057d411dda41f001b387a26b0
</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
<xsd:complexType name="DT_VT433_CLIENT_SAP_ET">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
8c8b5442649c11dda43d0050568b4d2e
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="Statement1">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
74a974a057e611dd8490001b387a26b0
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="TBL_IN_TCLIENT" type="TBL_IN_TCLIENT">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
74a974a157e611ddc27c001b387a26b0
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Statement2" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
74a974a257e611dd9747001b387a26b0
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="TBL_IN_ADV" type="TBL_IN_ADV">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
74a974a357e611ddadb8001b387a26b0
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
thanks, my structure is OK, I only have the access node since all I do is "INSERT", unless I am wrong. I have checked the column names of my tables and they match...
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think you should look at the following structure as this is specified for an insert:
<StatementName2>
<dbTableName action=u201DINSERTu201D>
<table>realDbTableName</table>
<access>
<col1>val1</col1>
<col2>val2</col2>
</access>
<access>
<col1>val11</col1>
</access>
</dbTableName>
</StatementName2>
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.