cancel
Showing results for 
Search instead for 
Did you mean: 

Receiver IDoc generation failure

0 Kudos

Hi ,

  While executing JDBC-> IDOC scenario , PI is failing to generate number of IDocs also missing fields under created structure.

   Each row is mapped with IDoc .

   Eg: 20 records are coming from database means 20 idocs to be generated

    Present situation:

       20 records are coming from Dbase and only 1 IDoc is generating in message monitoring payload. Same data tested under mapping which is executed successfully and generating 20 IDocs. However at receiver end its end up with one IDoc with complete EDI_DC40 segment and rest of the segments with partial data. Please throw some suggestions on this and its bit urgent.

here is the sample output idoc generated by PI

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

<MBGMCR02><IDOC BEGIN="1"><EDI_DC40 SEGMENT="1"><TABNAM></TABNAM><DIRECT>2</DIRECT><IDOCTYP>MBGMCR02</IDOCTYP><MESTYP>MBGMCR</MESTYP><MESCOD>MBI</MESCOD><SNDPOR>A000000002</SNDPOR><SNDPRT>LS</SNDPRT><SNDPFC>LS</SNDPFC><SNDPRN>MBLOCK</SNDPRN><RCVPOR>SAPDE1</RCVPOR><RCVPRT>LS</RCVPRT><RCVPFC>LS</RCVPFC><RCVPRN>DE1CLNT200</RCVPRN></EDI_DC40><E1BP2017_GM_HEAD_01 SEGMENT="1"><DOC_DATE>20160121</DOC_DATE></E1BP2017_GM_HEAD_01><E1BP2017_GM_CODE SEGMENT="1"><GM_CODE>06</GM_CODE></E1BP2017_GM_CODE><E1BP2017_GM_ITEM_CREATE SEGMENT="1"><STGE_LOC>06</STGE_LOC><BATCH>1000000000</BATCH></E1BP2017_GM_ITEM_CREATE></IDOC></MBGMCR02>

Generated Idoc also missed multiple fields for below segments.


<E1BP2017_GM_HEAD_01 SEGMENT="1">

<E1BP2017_GM_ITEM_CREATE SEGMENT="1">



Thanks,

aman

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Issue got solved. Missed to place namespace under communication channel . Its failing to add namespace under the generated PI-XML from source jdbc adapter. After adding it PI is generating successful Idocs.

thanks

Answers (2)

Answers (2)

justin_santhanam
Active Contributor
0 Kudos

Hello Aman,

Thanks for providing the XML. Still the things are high- level. When you say some of the fields are not coming in the output structure, I'm not sure what to suggest without knowing what's source field is mapped to the target (IDOC element) that's not coming in the output structure. Just take one example and showcase what exactly you are seeing.

- Did you copy the whole actual XML payload and tested in Message Mapping as well as Interface mapping? Is it working?

- I would suggest enable the Message Logging/Staging and see on the each pipeline step Before Mapping and After Mapping how does the data looks like.

See if the fields are case-sensitive properly defined in your SQL Statement and that matches of your PI structure. Check the namespace etc..

Thanks!

0 Kudos

Hi Justin,

  I copied whole message and tested under message mapping and it worked out. Same payload from message mapping  was sent through RWB and its positive. 30 IDocs generated.

Here I observed one thing.

When adapter converts data into PI-XML . with this format when am passing through rwb its failing to create successful idoc , however its generating successful with the structure from message mapping.

Am wondering tomorrow will i see the same error when testing end-end or it will correct.

XML message from source channel : (with this structure its generating incorrect idoc structure)

<MBlockInventroyTansaction>

  <row>

  <TransactionId>135333095</TransactionId>

  <TransactionType>IM</TransactionType>

  <Location>M BLOCK IL</Location>

  <ItemId>114574</ItemId>

  <DateTime>2016-01-21 00:00:00.0</DateTime>

  <Qty>-15200</Qty>

  <CustomerId> </CustomerId>

  <OriginalPONumber>14764</OriginalPONumber>

  <UOM>EA</UOM>

  <TransferTo>M BLOCK IL</TransferTo>

  <TransferFrom>8386</TransferFrom>

  <IUOrderID>14764</IUOrderID>

  <IULine>1000</IULine>

  <Description>55000001431011                </Description>

  <ScheduleAgreementID>55000001431011                </ScheduleAgreementID>

  <CurrentDate>2016-01-21 15:50:46.193</CurrentDate>

  <Processed>0</Processed>

  </row>

Message mapping XML(taken from message mapping test tab) (with this its generating successful)

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

<ns0:MBlockInventroyTansaction xmlns:ns0="urn:abc.com/DTC/MBlockInventoryTransactionPostingtoSAP">

   <row>

      <TransactionId>135333095</TransactionId>

      <TransactionType>IM</TransactionType>

      <Location>M BLOCK IL</Location>

      <ItemId>114574</ItemId>

      <DateTime>2016-01-21 00:00:00.0</DateTime>

      <Qty>-15200</Qty>

      <CustomerId> </CustomerId>

      <OriginalPONumber>14764</OriginalPONumber>

      <UOM>EA</UOM>

      <TransferTo>M BLOCK IL</TransferTo>

      <TransferFrom>8386</TransferFrom>

      <IUOrderID>14764</IUOrderID>

      <IULine>1000</IULine>

      <Description>55000001431011                </Description>

      <ScheduleAgreementID>55000001431011                </ScheduleAgreementID>

      <CurrentDate>2016-01-21 15:50:46.193</CurrentDate>

      <Processed>0</Processed>

   </row>

justin_santhanam
Active Contributor
0 Kudos

Did u change the occurrence of IDOC segment?

Thank you,

Justin.

0 Kudos

Thanks for instant reply. I did that. I tested with some sample data consisting of 10 records, its generating ten idocs.However this msg only behaving differently.

justin_santhanam
Active Contributor
0 Kudos

Hello Aman,

>>Thanks for instant reply. I did that. I tested with some sample data consisting of 10 records, its generating ten idocs.However this msg only behaving differently.

I'm not following. So you are saying if you have 10 records then 10 IDOC's is creating successfully?

- Where it's creating successfully? in the Message Mapping testing but not in the run time?

- When you say so many fields missing in the generated IDOC's, give me one sample element which is missing and show how the data looks like in the source, also is it 1 - 1 mapping?

Thanks.

0 Kudos

two cases .

1. Dummy test:

   I took some 10 records and processed and 10 IDOCs were generated successfully . end-end scenario executed successfully

2. Actual test:

  Now we business is testing the scenario and they are sending some 20 records and PI is generating 1 IDoc with missing fields. When check the message under message monitoring one idoc with partial data was showing. Same sender payload tested under message mapping, wonder mapping successful,20 IDocs were generated . Here am stuck with what may be the root cause.

   Next I tested the dummy test payload and end to end scenario executed successfully and its generating idocs accroding to rows.

  Sender structure: 20 records were passing,however I mentioned two

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

<ns0:MBlockInventroyTansaction xmlns:ns0="urn:abc.com/DTC/MBlockInventorytoSAP">

   <row>

      <PL_ID>MBLOCK</PL_ID>

      <TransactionId>130572047</TransactionId>

      <TransactionType>IM</TransactionType>

      <Location>K0016</Location>

      <ItemId>119056 </ItemId>

      <DateTime>2015-05-26 00:00:00.0</DateTime>

      <Qty>672</Qty>

      <CustomerId> </CustomerId>

      <OriginalPONumber>10014</OriginalPONumber>

      <UOM>EA</UOM>

      <TransferTo>K0016</TransferTo>

      <TransferFrom>8386</TransferFrom>

      <IUOrderID>10014</IUOrderID>

      <IULine>10000</IULine>

      <Description/>

      <ScheduleAgreementID/>

      <CurrentDate>2015-11-25 14:16:19.57</CurrentDate>

      <Processed>0</Processed>

   </row>

   <row>

      <PL_ID>MBLOCK</PL_ID>

      <TransactionId>130572051</TransactionId>

      <TransactionType>IM</TransactionType>

      <Location>K0016</Location>

      <ItemId>118949</ItemId>

      <DateTime>2015-05-26 00:00:00.0</DateTime>

      <Qty>300</Qty>

      <CustomerId> </CustomerId>

      <OriginalPONumber>10014</OriginalPONumber>

      <UOM>EA</UOM>

      <TransferTo>K0016</TransferTo>

      <TransferFrom>8386</TransferFrom>

      <IUOrderID>10014</IUOrderID>

      <IULine>10000</IULine>

      <Description/>

      <ScheduleAgreementID/>

      <CurrentDate>2015-11-24 16:08:01.377</CurrentDate>

      <Processed>0</Processed>

   </row>

Generated target structure:

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

<MBGMCR02><IDOC BEGIN="1"><EDI_DC40 SEGMENT="1"><TABNAM></TABNAM><DIRECT>2</DIRECT><IDOCTYP>MBGMCR02</IDOCTYP><MESTYP>MBGMCR</MESTYP><MESCOD>MBI</MESCOD><SNDPOR>A000000002</SNDPOR><SNDPRT>LS</SNDPRT><SNDPFC>LS</SNDPFC><SNDPRN>MBLOCK</SNDPRN><RCVPOR>SAPDE1</RCVPOR><RCVPRT>LS</RCVPRT><RCVPFC>LS</RCVPFC><RCVPRN>DE1CLNT200</RCVPRN></EDI_DC40><E1BP2017_GM_HEAD_01 SEGMENT="1"><DOC_DATE>20160121</DOC_DATE></E1BP2017_GM_HEAD_01><E1BP2017_GM_CODE SEGMENT="1"><GM_CODE>06</GM_CODE></E1BP2017_GM_CODE><E1BP2017_GM_ITEM_CREATE SEGMENT="1"><STGE_LOC>06</STGE_LOC><BATCH>1000000000</BATCH></E1BP2017_GM_ITEM_CREATE></IDOC></MBGMCR02>

one idoc with missed fileds.

Please suggest what might be causing for improper structure generation

occurance of the external def(IDoc) is

<xsd:sequence>

            <xsd:element name="IDOC" type="ZL_MBGMCR_INVPSIN.MBGMCR02" maxOccurs="unbounded" />

         </xsd:sequence>

so i applied still failing

0 Kudos

sorry source structure mentioned incorrectly. Dummy data was given.

Actual data:

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

<MBlockInventroyTansaction>

  <row>

  <TransactionId>135333095</TransactionId>

  <TransactionType>IM</TransactionType>

  <Location>M BLOCK IL</Location>

  <ItemId>114574</ItemId>

  <DateTime>2016-01-21 00:00:00.0</DateTime>

  <Qty>-15200</Qty>

  <CustomerId> </CustomerId>

  <OriginalPONumber>14764</OriginalPONumber>

  <UOM>EA</UOM>

  <TransferTo>M BLOCK IL</TransferTo>

  <TransferFrom>8386</TransferFrom>

  <IUOrderID>14764</IUOrderID>

  <IULine>1000</IULine>

  <Description>55000001431011                </Description>

  <ScheduleAgreementID>55000001431011                </ScheduleAgreementID>

  <CurrentDate>2016-01-21 15:50:46.193</CurrentDate>

  <Processed>0</Processed>

  </row>

  <row>

  <TransactionId>135333096</TransactionId>

  <TransactionType>IM</TransactionType>

  <Location>M BLOCK IL</Location>

  <ItemId>114549</ItemId>

  <DateTime>2016-01-21 00:00:00.0</DateTime>

  <Qty>-15200</Qty>

  <CustomerId> </CustomerId>

  <OriginalPONumber>14764</OriginalPONumber>

  <UOM>EA</UOM>

  <TransferTo>M BLOCK IL</TransferTo>

  <TransferFrom>8386</TransferFrom>

  <IUOrderID>14764</IUOrderID>

  <IULine>2000</IULine>

  <Description>55000001431011                </Description>

  <ScheduleAgreementID>55000001431011                </ScheduleAgreementID>

  <CurrentDate>2016-01-21 15:50:46.193</CurrentDate>

  <Processed>0</Processed>

  </row>

90% one to one maping and one or two fields have some logic