on 05-25-2010 8:10 AM
Hi All,
Very Good morning.
In my message mapping i map the
RFC response structure(Source Structure) map to JDBC insert structures(target)
in target JDBC structure i took two Statement insert tags. Because i need to insert two tables.
{My RFC response structure
*********************************
_-PG-_1E_SCMDB.response 1..1
DOC_DATA 0..1
item 0..Unbounded
VBELN 0..1
SUBMI 0..1
BSTNK 0..1
ITEMS 0..1
item 0..Unbounded
POSNR 0..1
MATNR 0..1
ARKTX 0..1
Target JDBC structure
***********************************
RESPONSE_MT 1..1
StatementName1 1..1
dbTableName 1..1
action optional ( attribute)---INSERT
table 1..1 --- XI_SAP_HEDEARDATA
access 0.. unbounded
VBELN 0..1
SUBMI 0..1
BSTNK 0..1
StatementName2 1..1
dbTableName 1..1
action optional (attribute)--INSERT
table 1..1 -- XI_SAP_ITEMDATA
access 0..unbounded
VBELN 0..1
POSNR 0..1
MATNR 0..1
ARKTX 0..1
VBELN filed is foreign key relation ship two tables.So i can map two statements
VBELN is map to VBELN in first statement and also as second VBELN in the Second statement
SUBMI is map to SUBMI ,BSTNK is map to BSTNK...in POSNR is map to POSNR, MATNR is map to MATNR.....
I will continue to next message
Thank you very much
Sateesh
Edited by: sateesh kumar .N on May 25, 2010 9:11 AM
I approached XSLT mapping here.Thank you very much your support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Continution
here my problem is: As per as RFC response structure First "item" tag having o to unbounded and second "item" tag also o to Unbounded..
for example: my XML data structure is like below this
<_-PG-_1E_SCMDB.response>
<DOC_DATA>
<item>
<VBELN>ABC</VBELN>
<SUBMI>12</SUBMI>
<BSTNK>XY</BSTNK>
<ITEMS>
<item>
<POSNR>A</POSNR>
<MATNR>AAA</MATNR>
<ARKTX>xbxgg</ARKTX>
</item>
<item>
<POSNR>B</POSNR>
<MATNR>BBB</MATNR>
<ARKTX>jjhhjh</ARKTX>
</item>
</ITEMS>
</item>
<item>
<VBELN>XYZ</VBELN>
<SUBMI>13</SUBMI>
<BSTNK>MX</BSTNK>
<ITEMS>
<item>
<POSNR>C</POSNR>
<MATNR>CCC</MATNR>
<ARKTX>jhukjk</ARKTX>
</item>
<item>
<POSNR>D</POSNR>
<MATNR>DDD</MATNR>
<ARKTX>iouho</ARKTX>
</item>
</ITEMS>
</item>
</DOC_DATA>
</_-PG-_1E_SCMDB.response>
When i got above structure from RFC i got mapping result in target below
<StatementName1>
<action>INSERT</action>
<table>XI_SAP_HEADERDATA</table>
<access>
<VBELN>ABC</VBELN>
<SUBMI>12</SUBMI>
<BSTNK>XY</BSTNK>
</access>
<access>
<VBELN>XYZ</VBELN>
<SUBMI>13</SUBMI>
<BSTNK>MX</BSTNK>
</access>
</StatementName1>
<StatementName2>
<action>INSERT</action>
<table>XI_SAP_ITEMDATA</table>
<access>
<VBELN>ABC</VBELN>
<POSNR>A</POSNR>
<MATNR>AAA</MATNR>
<ARKTX>xbxgg</ARKTX>
</access>
<access>
<VBELN>XYZ</VBELN> ..........Here i am excepted ABC value
<POSNR>B</POSNR>
<MATNR>BBB</MATNR>
<ARKTX>jjhhjh</ARKTX>
</access>
and after that no remaing Item tags are not coming
Can you please guide me how i can map here?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ramesh,
Thanks for your reply,
Statement1 get result what i am excetpting.
But Statement2 not except the result.
But i am excepting the result is below:
<StatementName1>
<action>INSERT</action>
<table>XI_SAP_HEADERDATA</table>
<access>
<VBELN>ABC</VBELN>
<SUBMI>12</SUBMI>
<BSTNK>XY</BSTNK>
</access>
<access>
<VBELN>XYZ</VBELN>
<SUBMI>13</SUBMI>
<BSTNK>MX</BSTNK>
</access>
</StatementName1>
<StatementName2>
<action>INSERT</action>
<table>XI_SAP_ITEMDATA</table>
<access>
<VBELN>ABC</VBELN>
<POSNR>A</POSNR>
<MATNR>AAA</MATNR>
<ARKTX>xbxgg</ARKTX>
</access>
<access>
<VBELN>ABC</VBELN>
<POSNR>B</POSNR>
<MATNR>BBB</MATNR>
<ARKTX>jjhhjh</ARKTX>
</access>
<access>
<VBELN>XYZ</VBELN>
<POSNR>C</POSNR>
<MATNR>CCC</MATNR>
<ARKTX>jhukjk</ARKTX>
</access>
<access>
<VBELN>XYZ</VBELN>
<POSNR>D</POSNR>
<MATNR>DDD</MATNR>
<ARKTX>iouho</ARKTX>
</access>
</StatementName2>
Thank you very much.
Sateesh
Edited by: sateesh kumar .N on May 25, 2010 9:57 AM
Hi,
You given the item 0..unbound as two times, so change that name at any one place.
Use the sender side data type like below
DOC_DATA 0..1
Header 0..Unbounded
VBELN 0..1
SUBMI 0..1
BSTNK 0..1
ITEMS 0..1
item 0..Unbounded
POSNR 0..1
MATNR 0..1
ARKTX 0..1
and for the StatementName2 map item node from sender side. now change the item context to Header and check
Regards
Ramesh
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.