on 03-18-2009 1:44 PM
Hi together,
i'am a PI starter and I have a problem with the mapping. I customize a JDBC Scenario from DB2 Database to an IDOC Adpater. The Scenario works fine and I can see the IDOC Meassges in the ERP System.
so far so good.
Now i got more rows in the output Message from the DB2 database. Only the last one I see in the target System. Here is the example of the extract payload.
<?xml version="1.0" encoding="utf-8" ?>
- <ns:PAKSTP.resultSet xmlns:ns="urn:sap.com:jdbcAdapter">
- <row>
<D1ERF>25</D1ERF>
<D2ERF>6</D2ERF>
<D3ERF>91</D3ERF>
<D4ERF>19</D4ERF>
<Z1ERF>13</Z1ERF>
<Z2ERF>39</Z2ERF>
<ERFUS>UMSTELLUNG</ERFUS>
<D1AEN>28</D1AEN>
<D2AEN>1</D2AEN>
<D3AEN>4</D3AEN>
<D4AEN>20</D4AEN>
<Z1AEN>11</Z1AEN>
<Z2AEN>7</Z2AEN>
<AENUS>MEIER</AENUS>
<STATU>N</STATU>
<GSBER>1</GSBER>
<PKKDN>1040253</PKKDN>
<PKANR>04</PKANR>
<PKNA1>DEBITOR1</PKNA1>
<PKNA2>CO. KG</PKNA2>
<PKNA3 />
<PKSTR>FISCHERWEG 10</PKSTR>
<PKPOF />
<PKLND>A</PKLND>
<PKPLZ>4063</PKPLZ>
<PKORT>HOERSCHING</PKORT>
<PKOID>102518</PKOID>
<PKKUS>F & B</PKKUS>
<PKTEL>07221/707-0</PKTEL>
<PKKTX />
<PKTTX />
<PKFAX>07221/73617</PKFAX>
<PKBBK>321</PKBBK>
<PKDIV>N</PKDIV>
<PKBRS>6000</PKBRS>
<PKSPS />
<PKBUN>64</PKBUN>
<PKBON>1</PKBON>
<PKSPZ>J</PKSPZ>
<PKBBN>0</PKBBN>
<PKBBS>0</PKBBS>
<PKKON />
<PKFIR>64</PKFIR>
<PKPVS>N</PKPVS>
<PKPVB>N</PKPVB>
<PKPVV>N</PKPVV>
<PKPVZ>N</PKPVZ>
<D1PKA>0</D1PKA>
<D2PKA>0</D2PKA>
<D3PKA>0</D3PKA>
<D4PKA>0</D4PKA>
<PKABZ>0</PKABZ>
<D1PKE>0</D1PKE>
<D2PKE>0</D2PKE>
<D3PKE>0</D3PKE>
<D4PKE>0</D4PKE>
<PKEMZ>0</PKEMZ>
<D1PKB>0</D1PKB>
<D2PKB>0</D2PKB>
<D3PKB>0</D3PKB>
<D4PKB>0</D4PKB>
<PKBUZ>0</PKBUZ>
<PKVKN>684</PKVKN>
<PKVGB>0</PKVGB>
<PKEKD>0</PKEKD>
</row>
- <row>
<D1ERF>25</D1ERF>
<D2ERF>6</D2ERF>
<D3ERF>91</D3ERF>
<D4ERF>19</D4ERF>
<Z1ERF>13</Z1ERF>
<Z2ERF>39</Z2ERF>
<ERFUS>UMSTELLUNG</ERFUS>
<D1AEN>11</D1AEN>
<D2AEN>9</D2AEN>
<D3AEN>3</D3AEN>
<D4AEN>20</D4AEN>
<Z1AEN>11</Z1AEN>
<Z2AEN>39</Z2AEN>
<AENUS>BRANCHE080</AENUS>
<STATU>J</STATU>
<GSBER>1</GSBER>
<PKKDN>1050002</PKKDN>
<PKANR>00</PKANR>
<PKNA1>Debitor2 GMBH</PKNA1>
<PKNA2 />
<PKNA3 />
<PKSTR>DRAIweg. 13</PKSTR>
<PKPOF />
<PKLND>D</PKLND>
<PKPLZ>77815</PKPLZ>
<PKORT>BUEHL</PKORT>
<PKOID>23223</PKOID>
<PKKUS>APHINA</PKKUS>
<PKTEL />
<PKKTX />
<PKTTX />
<PKFAX />
<PKBBK>80</PKBBK>
<PKDIV>N</PKDIV>
<PKBRS>9999</PKBRS>
<PKSPS />
<PKBUN>1050002</PKBUN>
<PKBON>1</PKBON>
<PKSPZ>J</PKSPZ>
<PKBBN>0</PKBBN>
<PKBBS>0</PKBBS>
<PKKON />
<PKFIR>1050002</PKFIR>
<PKPVS>N</PKPVS>
<PKPVB>N</PKPVB>
<PKPVV>N</PKPVV>
<PKPVZ>N</PKPVZ>
<D1PKA>0</D1PKA>
<D2PKA>0</D2PKA>
<D3PKA>0</D3PKA>
<D4PKA>0</D4PKA>
<PKABZ>0</PKABZ>
<D1PKE>0</D1PKE>
<D2PKE>0</D2PKE>
<D3PKE>0</D3PKE>
<D4PKE>0</D4PKE>
<PKEMZ>0</PKEMZ>
<D1PKB>0</D1PKB>
<D2PKB>0</D2PKB>
<D3PKB>0</D3PKB>
<D4PKB>0</D4PKB>
<PKBUZ>0</PKBUZ>
<PKVKN>417</PKVKN>
<PKVGB>0</PKVGB>
<PKEKD>0</PKEKD>
</row>
</ns:PAKSTP.resultSet>
The problem is, that I must say to the Message Mapping, that I want to create several IDOCs.
Thanks for qour help.
Wolfgang
this is what you need - /people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>
> Hello Shabarish ,
>
> i do these steps before, but which field must I map to to the structure(field) IDOC.
>
>
> Thanks for your assistance.
> Wolfgang
find a field/node which will fit the log. This node / field should come as many times as you need the IDoc to be generated.
eg. in case in your if there is a node say employee and it repeats and it is based on this that you need the IDoc to be created then map that node to the IDoc node
As rightly pointed above it should be the row since its the JDBC poll and the data is found in each repeating row tag
HI together,
it is right that I get several row tags from the select.
But if i map the "field" row to the "field" idoc i get an red flag in the XML Monitor.
I Get following error message:
Runtime exception occurred during application
mapping com/sap/xi/tf/_MM_DEBITOR_;
com.sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot create target element
/DEBMAS06/IDOC[2]/E1KNA1M. Values missing in queue context. Target~
Wolfgang
>
> Runtime exception occurred during application
> mapping com/sap/xi/tf/_MM_DEBITOR_;
> com.sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot create target element
> /DEBMAS06/IDOC[2]/E1KNA1M. Values missing in queue context. Target~
>
>
> Wolfgang
note that mapping the IDoc tag only will not be sufficient. You need to map the below tags of the IDoc will required values from the source. When you map a field you should also take care of mapping its node.
addition to that..
this error is related to missing of field in source for the target field check the mapping for tht field
if source field is missing in this case and target occ is 1 then do a check before mapping (something like if sourcefield of row exits ... then map to target field of idoc else someconstant to target)
Rajesh
Edited by: Rajesh on Mar 18, 2009 8:49 PM
>
> Hello Together,
>
> must I create a context change in the field IDOC ?
>
> Thanks
> Wolfgang
play around with the context changes. Context changes are something tough to explain in written words
But ideally in your case since IDoc is the root node you can map it after changing the context to the highest node.
Hi
In future, search SDN for answers, many docs are available.
check this
Regards
Vishnu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.