on 02-10-2011 10:24 AM
Hi All,
My scenario is pulling data from Oracle DB(3rd party) and pushing it to SAP ECC system. Here I am using the table metadata in the form of an External Definition.I am directly using this ED in my message mapping and service interface. I am able to test the mapping locally, when I run the scenario the target message type is generated but the main element node inside is automatically suppressed. The structure examples are given as below(been taken from message mapping test tab):
Source
<?xml version="1.0" encoding="UTF-8"?>
<ns0:TABLE_NAME.resultSet xmlns:ns0="urn:sap.com:jdbcAdapter">
<row>
<A/>
<BV/>
</row>
</ns0:TABLE_NAME.resultSet>
Target:
<?xml version="1.0" encoding="UTF-8"?>
<MT_Inbound>
<Main_Node>
<X/>
<Y/>
</Main_Node>
</MT_Inbound>
I guess the problem is with the namespace and prefix which is coming along with the table metadata(ns0). I tried removing it by XML AnonymizerBean module in my sender JDBC channel but this did not solve the purpose.
Request you all to help in solving this.
Thanks in Advance
Lalitkumar.
Hi Lalitkumar,
Remove the XML Namespace in the source message type. Even though it is removed, the mapping will work. No need to worry about it.
Thanks,
Edited by: Hareenkumar on Feb 10, 2011 11:33 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Hareenkumar,
Thanks for replying so soon.
As u can see in my target example i have already removed the XML namespace in the target message type.
Now i am trying to remove the namespace from the source ED(table metadata) by using XML AnonymizerBean in Sender JDBC channel.
i have configured the module by following a few popular blogs on SDN but still at runtime complete target structure is not getting generated. Under the request message mapping of SXMB_MONI.
even when i have the source payload from SXMB_MONI and try to test the message mapping manually it behaves in the similar i.e., the target is not completed generated.
<row>(0...unbound)------------(mapped)--------------- <Main_Node>(0...unbound)
the mapping display queue shows <row> as null and <Main_Node> as suppress
thanks,
Lalit
Hi Aashish,
As we have imported the tabe definition from the oracle DB, which is in the form External defintion in ESR there is no message type created for the source. Now we used the XML AnonymizerBean to remove the namespace from the same. But this didn't work. kindly let me know how to remove the namespace of the source.
Thanks,
Lalitkumar.
> As we have imported the tabe definition from the oracle DB, which is in the form External defintion in ESR there is no message type created for the source.
This message type is intented to be used for receiver JDBC adapter. You cannot use it for sender JDBC adapter.
Create the message structure in ESR as data type directly.
Use a sample message from JDBC adapter test for creating it.
Dear Stefan,
This message type is intented to be used for receiver JDBC adapter. You cannot use it for sender JDBC adapter.
Create the message structure in ESR as data type directly.
Can you please help in understanding as to why we cannot use the ED of table metadata in Sender JDBC adpater..?
Use a sample message from JDBC adapter test for creating it
.
Can you please explain more on this...
Thanks for helping,
Lalitkumar.
> Can you please help in understanding as to why we cannot use the ED of table metadata in Sender JDBC adpater..?
As you should have already noticed, the structure of sender JDBC adapter does not match the meta data.
> >Use a sample message from JDBC adapter test for creating it
> Can you please explain more on this...
Just let the JDBC adapter poll once and look how the structure looks like.
Now I seem to be lost
/people/william.li/blog/2008/01/02/sap-pi-71-mapping-enhancements-series-import-sql-tables-metadata
Yes, the imported schema does match the result of a select statement of the JDBC sender comm chan.
Right now, there is no option to generate a schema that can be used by the JDBC receiver comm chan. This might be a little difficult due to the different actions, and columns to be included in the where clause.
As you should have already noticed, the structure of sender JDBC adapter does not match the meta data.
The structure of the ED imported is :
TABLE_NAME.resultSet
TABLE_NAME.resultSet
row
A
BV
The structure getting generated after polling the JDBC adapter is as given below(structure from moni inbound payload):
<?xml version="1.0" encoding="utf-8" ?>
- <TABLE_NAME.resultSet>
- <row>
<A>20110206</A>
<BV>06:38:56</BV>
</row>
I am not able to make out the difference here. I am able to also see the namespace when i check the same in the message mapping test tab.
I am also a little lost now as abhishek is on a different track.
Please comment.
OK, let us start from the beginning.
The external definition based in db table was originally intruduced to do database lookup in mapping. So the structure represents the response message from database in a sync call.
When you for example do an RFC -> JDBC call, you can create the JDBC->RFC response mapping based on that structure.
The structure does nether fit to sender JDBC structure nor to JDBC receiver request structure.
Is it clearer now?
>>>>>>>>>> I guess the problem is with the namespace and prefix
Yes, you are true. This happens if you don't give namespace in the sender (JDBC) channel. Generally people use to ignore it since it is not mandt.
So, namespace must be provided for the Document(Message type) in channel.
Note:This was the case for me.
Regards
Pothana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
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.