JDBC mapping to IDOC issue

We are retrieving information from our SQL server and trying to map it to the picking IDOC SDPIID01. We are having a problem in trying to get the correct mapping to occur. The result list is as follows:
<mt_SQLPickConfirmation>
  <row>
    <Processed />
    <Trans_ID />
    <Trans_IDOC />
    <VBELN_VL />
    <VBELN />
    <TANUM />
    <KODAT />
    <KOMUE />
    <WADAT_IST />
    <POSNR_VL />
    <POSNN />
    <PIKMG />
    <NDIFM />
    <CHARG />
    <MATNR />
    <ORPOS />
  </row>
</mt_SQLPickConfirmation>
and the IDOC is as follows:
<SDPIID01>
  <IDOC BEGIN="">
    <E1VPDLH SEGMENT="">
      <VBELN_VL />
      <VBELN />
      <TANUM />
      <KODAT />
      <KOMUE />
      <WADAT_IST />
      <E1VPDLI SEGMENT="">
        <VBELN_VL />
        <POSNR_VL />
        <VBELN />
        <POSNN />
        <PIKMG />
        <NDIFM />
        <CHARG />
        <MATNR />
        <ORPOS />
      </E1VPDLI>
    </E1VPDLH>
  </IDOC>
</SDPIID01>
Now some of the information goes into the segment E1VPDLH and some of the information goes into the segment E1VPDLI. The problem is trying to create a new IDOC everytime the field TRANS_ID changes.
We have tried to manipulate the context but still have problems with the output. The data can contain many rows with the same TRANS_ID number. Every time the TRANS_ID number changes we need a new IDOC created. All of my trys have failed. I either get one IDOC with a header segment and all the line items segments for each row or I get multiple IDOCS that do not contain the correct line item information.
Any help is appreciated. Attached is a sample of the data.
<?xml version="1.0" encoding="utf-8"?>
<mt_SQLPickConfirmation>
     <row>
          <PROCESSED>N</PROCESSED>
          <TRANS_ID>1</TRANS_ID>
          <TRANS_IDOC>SDPIID01</TRANS_IDOC>
          <VBELN_VL>0080593473</VBELN_VL>
          <VBELN>0000208489</VBELN>
          <TANUM>0000208489</TANUM>
          <KODAT>20051219</KODAT>
          <KOMUE>X</KOMUE>
          <WADAT_IST>20051219</WADAT_IST>
          <POSNR_VL>000001</POSNR_VL>
          <POSNN>900002</POSNN>
          <PIKMG>240</PIKMG>
          <NDIFM>0</NDIFM>
          <CHARG>12DE05W1</CHARG>
          <MATNR>DN07212</MATNR>
          <ORPOS>000001</ORPOS>
     </row>
     <row>
          <PROCESSED>N</PROCESSED>
          <TRANS_ID>2</TRANS_ID>
          <TRANS_IDOC>SDPIID01</TRANS_IDOC>
          <VBELN_VL>0080593503</VBELN_VL>
          <VBELN>0000208530</VBELN>
          <TANUM>0000208530</TANUM>
          <KODAT>20051219</KODAT>
          <KOMUE>X</KOMUE>
          <WADAT_IST>20051219</WADAT_IST>
          <POSNR_VL>000001</POSNR_VL>
          <POSNN>900002</POSNN>
          <PIKMG>30</PIKMG>
          <NDIFM>0</NDIFM>
          <CHARG>12DE05W1</CHARG>
          <MATNR>DM19200</MATNR>
          <ORPOS>000001</ORPOS>
     </row>
     <row>
          <PROCESSED>N</PROCESSED>
          <TRANS_ID>3573932</TRANS_ID>
          <TRANS_IDOC>2</TRANS_IDOC>
          <VBELN_VL>0080593503</VBELN_VL>
          <VBELN>0000208530</VBELN>
          <TANUM>0000208530</TANUM>
          <KODAT>20051219</KODAT>
          <KOMUE>X</KOMUE>
          <WADAT_IST>20051219</WADAT_IST>
          <POSNR_VL>000002</POSNR_VL>
          <POSNN>900003</POSNN>
          <PIKMG>630</PIKMG>
          <NDIFM>0</NDIFM>
          <CHARG>12DE05W1</CHARG>
          <MATNR>DR19460</MATNR>
          <ORPOS>000002</ORPOS>
     </row>
     <row>
          <PROCESSED>N</PROCESSED>
          <TRANS_ID>2</TRANS_ID>
          <TRANS_IDOC>SDPIID01</TRANS_IDOC>
          <VBELN_VL>0080593503</VBELN_VL>
          <VBELN>0000208530</VBELN>
          <TANUM>0000208530</TANUM>
          <KODAT>20051219</KODAT>
          <KOMUE>X</KOMUE>
          <WADAT_IST>20051219</WADAT_IST>
          <POSNR_VL>000003</POSNR_VL>
          <POSNN>900004</POSNN>
          <PIKMG>900</PIKMG>
          <NDIFM>0</NDIFM>
          <CHARG>12DE05W1</CHARG>
          <MATNR>DN07216</MATNR>
          <ORPOS>000003</ORPOS>
     </row>
     <row>
          <PROCESSED>N</PROCESSED>
          <TRANS_ID>3</TRANS_ID>
          <TRANS_IDOC>SDPIID01</TRANS_IDOC>
          <VBELN_VL>0080593504</VBELN_VL>
          <VBELN>0000208531</VBELN>
          <TANUM>0000208531</TANUM>
          <KODAT>20051219</KODAT>
          <KOMUE>X</KOMUE>
          <WADAT_IST>20051219</WADAT_IST>
          <POSNR_VL>000001</POSNR_VL>
          <POSNN>900002</POSNN>
          <PIKMG>450</PIKMG>
          <NDIFM>0</NDIFM>
          <CHARG>12DE05W1</CHARG>
          <MATNR>D903116</MATNR>
          <ORPOS>000001</ORPOS>
     </row>
     <row>
          <PROCESSED>N</PROCESSED>
          <TRANS_ID>3</TRANS_ID>
          <TRANS_IDOC>SDPIID01</TRANS_IDOC>
          <VBELN_VL>0080593504</VBELN_VL>
          <VBELN>0000208531</VBELN>
          <TANUM>0000208531</TANUM>
          <KODAT>20051219</KODAT>
          <KOMUE>X</KOMUE>
          <WADAT_IST>20051219</WADAT_IST>
          <POSNR_VL>000002</POSNR_VL>
          <POSNN>900003</POSNN>
          <PIKMG>150</PIKMG>
          <NDIFM>-100</NDIFM>
          <CHARG>12DE05W1</CHARG>
          <MATNR>DY17820</MATNR>
          <ORPOS>000002</ORPOS>
     </row>
     <row>
          <PROCESSED>N</PROCESSED>
          <TRANS_ID>3</TRANS_ID>
          <TRANS_IDOC>SDPIID01</TRANS_IDOC>
          <VBELN_VL>0080593504</VBELN_VL>
          <VBELN>0000208531</VBELN>
          <TANUM>0000208531</TANUM>
          <KODAT>20051219</KODAT>
          <KOMUE>X</KOMUE>
          <WADAT_IST>20051219</WADAT_IST>
          <POSNR_VL>000003</POSNR_VL>
          <POSNN>900004</POSNN>
          <PIKMG>400</PIKMG>
          <NDIFM>0</NDIFM>
          <CHARG>12DE05W1</CHARG>
          <MATNR>D109050</MATNR>
          <ORPOS>000003</ORPOS>
     </row>
</mt_SQLPickConfirmation>
This should contain three IDOCS That look like this.
<?xml version="1.0" encoding="UTF-8"?>
<SDPIID01>
  <IDOC BEGIN="">
    <E1VPDLH SEGMENT="">
      <VBELN_VL>0080593473</VBELN_VL>
      <VBELN>0000208489</VBELN>
      <TANUM>0000208489</TANUM>
      <KODAT>20051219</KODAT>
      <KOMUE>X</KOMUE>
      <WADAT_IST>20051219</WADAT_IST>
      <E1VPDLI SEGMENT="">
        <VBELN_VL>0080593473</VBELN_VL>
        <POSNR_VL>000001</POSNR_VL>
        <VBELN>0000208489</VBELN>
        <POSNN>900002</POSNN>
        <PIKMG>240</PIKMG>
        <NDIFM>0</NDIFM>
        <CHARG>12DE05W1</CHARG>
        <MATNR>DN07212</MATNR>
        <ORPOS>000001</ORPOS>
      </E1VPDLI>
    </E1VPDLH>
  </IDOC>
  <IDOC BEGIN="">
    <E1VPDLH SEGMENT="">
      <VBELN_VL>0080593503</VBELN_VL>
      <VBELN>0000208489</VBELN>
      <TANUM>0000208489</TANUM>
      <KODAT>20051219</KODAT>
      <KOMUE>X</KOMUE>
      <WADAT_IST>20051219</WADAT_IST>
      <E1VPDLI SEGMENT="">
        <VBELN_VL>0080593503</VBELN_VL>
        <POSNR_VL>000001</POSNR_VL>
        <VBELN>0000208530</VBELN>
        <POSNN>900002</POSNN>
        <PIKMG>30</PIKMG>
        <NDIFM>0</NDIFM>
        <CHARG>12DE05W1</CHARG>
        <MATNR>DM19200</MATNR>
        <ORPOS>000001</ORPOS>
      </E1VPDLI>
      <E1VPDLI SEGMENT="">
        <VBELN_VL>0080593503</VBELN_VL>
        <POSNR_VL>000002</POSNR_VL>
        <VBELN>0000208530</VBELN>
        <POSNN>900003</POSNN>
        <PIKMG>630</PIKMG>
        <NDIFM>0</NDIFM>
        <CHARG>12DE05W1</CHARG>
        <MATNR>DR19460</MATNR>
        <ORPOS>000002</ORPOS>
      </E1VPDLI>
      <E1VPDLI SEGMENT="">
        <VBELN_VL>0080593503</VBELN_VL>
        <POSNR_VL>000003</POSNR_VL>
        <VBELN>0000208530</VBELN>
        <POSNN>900004</POSNN>
        <PIKMG>900</PIKMG>
        <NDIFM>0</NDIFM>
        <CHARG>12DE05W1</CHARG>
        <MATNR>DN07216</MATNR>
        <ORPOS>000003</ORPOS>
      </E1VPDLI>
    </E1VPDLH>
  </IDOC>
  <IDOC BEGIN="">
    <E1VPDLH SEGMENT="">
      <VBELN_VL>0080593504</VBELN_VL>
      <VBELN>0000208489</VBELN>
      <TANUM>0000208489</TANUM>
      <KODAT>20051219</KODAT>
      <KOMUE>X</KOMUE>
      <WADAT_IST>20051219</WADAT_IST>
      <E1VPDLI SEGMENT="">
      <E1VPDLI SEGMENT="">
        <VBELN_VL>0080593504</VBELN_VL>
        <POSNR_VL>000001</POSNR_VL>
        <VBELN>0000208531</VBELN>
        <POSNN>900002</POSNN>
        <PIKMG>450</PIKMG>
        <NDIFM>0</NDIFM>
        <CHARG>12DE05W1</CHARG>
        <MATNR>D903116</MATNR>
        <ORPOS>000001</ORPOS>
      </E1VPDLI>
      <E1VPDLI SEGMENT="">
        <VBELN_VL>0080593504</VBELN_VL>
        <POSNR_VL>000002</POSNR_VL>
        <VBELN>0000208531</VBELN>
        <POSNN>900003</POSNN>
        <PIKMG>150</PIKMG>
        <NDIFM>-100</NDIFM>
        <CHARG>12DE05W1</CHARG>
        <MATNR>DY17820</MATNR>
        <ORPOS>000002</ORPOS>
      </E1VPDLI>
      <E1VPDLI SEGMENT="">
        <VBELN_VL>0080593504</VBELN_VL>
        <POSNR_VL>000003</POSNR_VL>
        <VBELN>0000208531</VBELN>
        <POSNN>900004</POSNN>
        <PIKMG>400</PIKMG>
        <NDIFM>0</NDIFM>
        <CHARG>12DE05W1</CHARG>
        <MATNR>D109050</MATNR>
        <ORPOS>000003</ORPOS>
      </E1VPDLI>
    </E1VPDLH>
  </IDOC>
</SDPIID01>
Any ideas how to achieve this?
Thanks,
Jim

Hi Stefan,
  We got similar scenario as you gave mapping solution above. But this time its BAPI. For IDoc, I exported IDoc signature, changed max occurs to unbounded and in message mapping imported that IDoc as XSD, with which we are able to generate multiple IDoc's, when ever there is change in VBELN_VL in source.
Here in this scenario whenever there is change in TRANS_ID we have to make new BAPI call and get the response back.
How do we acheive the same? Can we do this by message mapping? or Do we need to use BPM?? Can I change the occurence here same as we did for IDoc?
Here are the source and target(Expecting like this):
<?xml version="1.0" encoding="utf-8"?>
<b><mt_PhysCountEnt></b>
   <b><row></b>
      <TRANS_ID><b>1847204</b></TRANS_ID>
      <PROCESSED>n</PROCESSED>
      <TRANS_RFC>ZAPI_MATPHYSINV_COUNT ('20060103','2005','000',<b>'1000006021'</b>) ITEMS, RETURN</TRANS_RFC>
      <ITEM><b>004</b></ITEM>
      <MATERIAL>D117030</MATERIAL>
      <BATCH>10OC05W1</BATCH>
      <ENTRY_QNT>900</ENTRY_QNT>
      <ENTRY_UOM>EA</ENTRY_UOM>
      <ENTRY_UOM_ISO/>
      <SALES_VAL/>
      <ZERO_COUNT/>
      <MATERIAL_EXTERNAL/>
      <MATERIAL_GUID/>
      <MATERIAL_VERSION/>
   <b></row></b>
   <b><row></b>     
      <TRANS_ID><b>1847204</b></TRANS_ID>
      <PROCESSED>n</PROCESSED>
      <TRANS_RFC>ZAPI_MATPHYSINV_COUNT('20060103','2005','000','<b>1000006021</b>') ITEMS, RETURN</TRANS_RFC>
      <ITEM><b>003</b></ITEM>
      <MATERIAL>D117020</MATERIAL>
      <BATCH>31OC05W1</BATCH>
      <ENTRY_QNT>600</ENTRY_QNT>
      <ENTRY_UOM>EA</ENTRY_UOM>
      <ENTRY_UOM_ISO/>
      <SALES_VAL/>
      <ZERO_COUNT/>
      <MATERIAL_EXTERNAL/>
      <MATERIAL_GUID/>
      <MATERIAL_VERSION/>
   <b></row></b>
   <b><row></b>
      <TRANS_ID><b>1847204</b></TRANS_ID>
      <PROCESSED>n</PROCESSED>
      <TRANS_RFC>ZAPI_MATPHYSINV_COUNT('20060103','2005','000','<b>1000006021</b>') ITEMS, RETURN</TRANS_RFC>
      <ITEM><b>002</b></ITEM>
      <MATERIAL>D117020</MATERIAL>
      <BATCH>24OC05W1</BATCH>
      <ENTRY_QNT>0</ENTRY_QNT>
      <ENTRY_UOM>EA</ENTRY_UOM>
      <ENTRY_UOM_ISO/>
      <SALES_VAL/>
      <ZERO_COUNT>X</ZERO_COUNT>
      <MATERIAL_EXTERNAL/>
      <MATERIAL_GUID/>
      <MATERIAL_VERSION/>
   <b></row></b>
   <b><row></b>
      <TRANS_ID><b>1847204</b></TRANS_ID>
      <PROCESSED>n</PROCESSED>
      <TRANS_RFC>ZAPI_MATPHYSINV_COUNT('20060103','2005','000','<b>1000006021</b>') ITEMS, RETURN</TRANS_RFC>
      <ITEM><b>001</b></ITEM>
      <MATERIAL>D117020</MATERIAL>
      <BATCH>10OC05W1</BATCH>
      <ENTRY_QNT>175</ENTRY_QNT>
      <ENTRY_UOM>EA</ENTRY_UOM>
      <ENTRY_UOM_ISO/>
      <SALES_VAL/>
      <ZERO_COUNT/>
      <MATERIAL_EXTERNAL/>
      <MATERIAL_GUID/>
      <MATERIAL_VERSION/>
   <b></row></b>
   <b><row></b>     
      <TRANS_ID><b>1847205</b></TRANS_ID>
      <PROCESSED>n</PROCESSED>
      <TRANS_RFC>ZAPI_MATPHYSINV_COUNT('20060103','2005','000','<b>1000006023</b>') ITEMS, RETURN</TRANS_RFC>
      <ITEM><b>002</b></ITEM>
      <MATERIAL>D999475</MATERIAL>
      <BATCH>07NO05W1</BATCH>
      <ENTRY_QNT>120</ENTRY_QNT>
      <ENTRY_UOM>EA</ENTRY_UOM>
      <ENTRY_UOM_ISO/>
      <SALES_VAL/>
      <ZERO_COUNT/>
      <MATERIAL_EXTERNAL/>
      <MATERIAL_GUID/>
      <MATERIAL_VERSION/>
   <b></row></b>
   <b><row></b>
      <TRANS_ID><b>1847205</b></TRANS_ID>
      <PROCESSED>n</PROCESSED>
      <TRANS_RFC>ZAPI_MATPHYSINV_COUNT('20060103','2005','000','<b>1000006023</b>') ITEMS, RETURN</TRANS_RFC>
      <ITEM><b>001</b></ITEM>
      <MATERIAL>D509D03</MATERIAL>
      <BATCH>07NO05W1</BATCH>
      <ENTRY_QNT>295</ENTRY_QNT>
      <ENTRY_UOM>EA</ENTRY_UOM>
      <ENTRY_UOM_ISO/>
      <SALES_VAL/>
      <ZERO_COUNT/>
      <MATERIAL_EXTERNAL/>
      <MATERIAL_GUID/>
      <MATERIAL_VERSION/>
      <b></row></b>
<b></mt_PhysCountEnt></b>
TARGET:
<?xml version="1.0" encoding="UTF-8"?>
<b><ns0:ZAPI_MATPHYSINV_COU</b>NT xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
   <COUNT_DATE>20060103</COUNT_DATE>
   <FISCALYEAR>2005</FISCALYEAR>
   <PERCENTAGE_VARIANCE>000</PERCENTAGE_VARIANCE>
   <PHYSINVENTORY><b>1000006021</b></PHYSINVENTORY>
   <ITEMS>
      <item>
         <ITEM><b>004</b></ITEM>
         <MATERIAL>D117030</MATERIAL>
         <BATCH>10OC05W1</BATCH>
         <ENTRY_QNT>900</ENTRY_QNT>
         <ENTRY_UOM>EA</ENTRY_UOM>
         <ENTRY_UOM_ISO/>
         <SALES_VAL/>
         <ZERO_COUNT/>
         <MATERIAL_EXTERNAL/>
         <MATERIAL_GUID/>
         <MATERIAL_VERSION/>
      </item>
      <item>
         <ITEM><b>003</b></ITEM>
         <MATERIAL>D117020</MATERIAL>
         <BATCH>31OC05W1</BATCH>
         <ENTRY_QNT>600</ENTRY_QNT>
         <ENTRY_UOM>EA</ENTRY_UOM>
         <ENTRY_UOM_ISO/>
         <SALES_VAL/>
         <ZERO_COUNT/>
         <MATERIAL_EXTERNAL/>
         <MATERIAL_GUID/>
         <MATERIAL_VERSION/>
      </item>
      <item>
         <ITEM><b>002</b></ITEM>
         <MATERIAL>D117020</MATERIAL>
         <BATCH>24OC05W1</BATCH>
         <ENTRY_QNT>0</ENTRY_QNT>
         <ENTRY_UOM>EA</ENTRY_UOM>
         <ENTRY_UOM_ISO/>
         <SALES_VAL/>
         <ZERO_COUNT>X</ZERO_COUNT>
         <MATERIAL_EXTERNAL/>
         <MATERIAL_GUID/>
         <MATERIAL_VERSION/>
      </item>
      <item>
         <ITEM><b>001</b></ITEM>
         <MATERIAL>D117020</MATERIAL>
         <BATCH>10OC05W1</BATCH>
         <ENTRY_QNT>175</ENTRY_QNT>
         <ENTRY_UOM>EA</ENTRY_UOM>
         <ENTRY_UOM_ISO/>
         <SALES_VAL/>
         <ZERO_COUNT/>
         <MATERIAL_EXTERNAL/>
         <MATERIAL_GUID/>
         <MATERIAL_VERSION/>
      </item>
   </ITEMS>
   <RETURN/>
<b></ns0:ZAPI_MATPHYSINV_COUNT></b>
<b><ns0:ZAPI_MATPHYSINV_COUNT</b> xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
   <COUNT_DATE>20060103</COUNT_DATE>
   <FISCALYEAR>2005</FISCALYEAR>
   <PERCENTAGE_VARIANCE>000</PERCENTAGE_VARIANCE>
   <PHYSINVENTORY><b>1000006023</b></PHYSINVENTORY>
   <ITEMS>
      <item>
         <ITEM><b>002</b></ITEM>
         <MATERIAL>D999475</MATERIAL>
         <BATCH>07NO05W1</BATCH>
         <ENTRY_QNT>120</ENTRY_QNT>
         <ENTRY_UOM>EA</ENTRY_UOM>
         <ENTRY_UOM_ISO/>
         <SALES_VAL/>
         <ZERO_COUNT/>
         <MATERIAL_EXTERNAL/>
         <MATERIAL_GUID/>
         <MATERIAL_VERSION/>
      </item>
      <item>
         <ITEM><b>001</b></ITEM>
         <MATERIAL>D509D03</MATERIAL>
         <BATCH>07NO05W1</BATCH>
         <ENTRY_QNT>295</ENTRY_QNT>
         <ENTRY_UOM>EA</ENTRY_UOM>
         <ENTRY_UOM_ISO/>
         <SALES_VAL/>
         <ZERO_COUNT/>
         <MATERIAL_EXTERNAL/>
         <MATERIAL_GUID/>
         <MATERIAL_VERSION/>
      </item>
   </ITEMS>
   <RETURN/>
<b></ns0:ZAPI_MATPHYSINV_COUNT></b>
Thank You
Indrasena

Similar Messages

  • IDOC-XI-JDBC: mapping error

    Hi sap gurus...
            I had a problem in IDOC mapping to JDBC.
    If any body have mapping template or any blog.. related to MATMAS.. please help me..
    I don't know how to map the idoc structure to JDBC structure..
    points will be given immediately..
    Kumar

    Hi sheetal
    My IDOC structure is----
    MY JDBC Struc is
    as................................................................MT_MATMAS_MSSQL(Msg type name)
    This struc...is common----
    STATEMENTNAME(0..1)
    ............................................................................TEST (1..1)
    .................................................................................ACTION ..REQUIRED
    .................................................................................TABLE...(MATMAS TABLE IS CREATED IN MSSQL)
    .................................................................................ACCESS(1..1)
    ......................................................................................BEGIN ...REQUIRED
    ......................................................................................EDI_DC40..1...1
    ......................................................................................E1MARAM...1...9999
    ......................................................................................E1UPSLINK..1...1
    THIS IS MY JDBC STRUCTURE..
    I sent the screen shorts to your company email id..please check it and help me..
    i am able to get the idoc from sap r3 to Xi ,,, now i want to send that idoc to database..
    help me please.
    Kumar..
    [email protected]

  • Idoc - to - JDBC mapping..

    Can any one help me on  step-by-step   Idoc to JDBC  mapping ..

    Check this link for jdbc receiver adapter. and follow the instructions. If you need more assistance let us know with your requirement
    For configuring JDBC adapter
    http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm
    For creating jdbc structure on the inbound side
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm

  • JDBC to Multiple IDOC scenario

    Dear Experts,
    My Scenario is JDBC to Multiple IDOC scenario.
    I am reading 100 records and generating 100 IDOC's at the target ECC system, the problem which I am facing is if I have any issue with 1 record the total message gets failed in SXMB_MONI due to mapping failure.
    So again I need to reset all 100 records in my source database and I should reprocess the same.
    Is there any way to process the 99 and fail only one record which causes error.
    Is Stored procedure will fix this issue or do I need to use BPM for this to achieve.
    Please advice.
    Thanks,
    --Sai

    Hi Sai,
    As you are selecting 100 records in one go, all the records will come as a single message in PI.
    Please find below my suggestion for this issue.
    1. Selecting one record per message will not be efficient. So please do not use it.
    2. Create a secondary sctucture. Generate it only if there is an error in the record. You may set up an alert for that message. So if any error occurs, other 99 idocs can go normally, while you will get an aleart for the failed record.
    3. Another option is to create an idoc for error record also. You can do this by providing some default values in place of error fields. You can then monitor such idocs in ECC.
    Personally, i feel 2nd option is the best. Let me know if you need more information on this.
    Regards,
    Gavaksh

  • Idoc state 56.  jdbc to multiple idoc.

    hi,
    i have made a jdbc to multiple idoc scenario.
    i disabled so many mandatory field.
    i defined a external defination for the idoc.
    i changed occurance for "IDOC" segment.
    i can send multiple idoc successfully to ECC.
    BUT:
    I found that state 56 of the idoc with tcode we05 IN ECC.
    how should i resolve the issue?

    Hi ,
    In WE02 or WE05 you can find the details
    status 56 is Idoc with errors added , so check you scenario
    Hi,
    Just take the payload from the moni and check your mapping first ( TEST TAB)
    Regards,
    Jude
    Edited by: jude bright on Oct 21, 2009 10:49 AM

  • Proxy to JDBC Sync, with Idoc Receiver

    Hello all,
    I have to set up following synchronous scenario.
    PROXY -> PI -> JDBC   |   JDBC -> PI -> PROXY
                                           JDBC -> PI -> IDOC
    In other words, I need that the response from the JDBC Receiver adapter is sent back to R3 to an IDOC and the originating PROXY.
    How can I achive this? I mean how can I send the synchronuos response back to the originating PROXY, and in the other hand send an asynchronous message to the IDOC.
    This is a message with a large quantity of info, so I'm not sure what to use or how to use it.
    Thanks for your help.
    Felipe

    Hi Felipe
    PROXY -> PI -> JDBC | JDBC -> PI -> PROXY
    JDBC -> PI -> IDOC
    The message to the IDOC need to be sent from response ?
    Is your proxy SYNC?
    Use a BPM for this
    1. receive the message from Proxy.(SYNC)
    2. Send it to JDBC (SYNC)
    3. Map the proxy request to JDBC request and JDBC response to Proxy response.
    4. Send the JDBC response to IDOC
    Thanks
    Gaurav

  • BPM - doubt in N:1 mapping of IDOCs

    Is there any DETAILED document on Mapping multiple Idocs into a single Idoc package using BPM.My doubt is in the latter part in this process(During Receiver Determination) :
    Scenario : CRM->XI->R3
    We will download the CREMAS03 and then make changes in the xml so that it can hold multiple IDOCs.
    and then we will be collecting the Idocs(say 3 idocs at a time)...that is, appending the IDOCS(CREMAS03) into a multiline container of type CREMAS03.
    In the transformation step, the multiline container containing CREMAS03 IDOCs is transformed to IDOC PACKAGE(N:1 Mapping).
    In Integration Directory,We will create 2 RECEIVER DETERMINATIONS :
    1.CRM->BPM :
    Receiver Service  :BPM Object
    Inbound Interface :CREMAS
    Interface Mapping :Maps the Outbound interface (vendor_out_interface) to CREMAS(Abstract Asynchronous)
    2.BPM->R3 :(I have my doubt here!)
    Sender Service     : CREMAS_COLLECT_PACKAGE(BPM Object)
    Outbound Interface : CREMAS_package(Abstract Async, Message is the modified Multi-CREMAS PACKAGE)
    Receiver Service   : R3
    Inbound Interface  : CREMAS.CREMAS03
    Interface Mapping  : NONE (WHY is that No Interface mapping is needed ???...Please elaborate)
    1.HOW will the XI engine MAP the CREMAS_package to CREMAS.CREMAS03 at the end of BPM PROCESS ?
    2.In BPM we have Transformed the individual Idocs into a IDOC Package BUT then at BPM->R3 Receiver Determination WHY are we mapping the CREMAS Package into Individual CREMAS Idoc ??
    3.Does the R3 receive the IDOCs as a Package OR does it receive it as individual Idocs ?And when we say a Package does it mean it will contain 1 Control record & multiple Data Records(EDID) ??
    4.If the R3 receives the IDOCs as a PACKAGE, THEN How does the R3 System separate the Idocs into Individual Idocs ??
    Is there any specific configuration in the partner profile at the R3 side to process A IDOC package ??.
    5.Also when I compare Posting Function Module IDOC_INPUT_CREDITOR and IDOC_OUTPUT_ORDERS , It seems that IDOC_INPUT_CREDITOR    can process multiple Idocs at a time while IDOC_OUTPUT_ORDERS CAN process only ONE IDOC at a time.Am I right ?)
    It would be great if someone has the patience to give a detailed reply.Looking forward to the reply !!
    Thanks,
    Arun.

    Hi Arun,
    You dont need a BPM for ur requirement. All you need to do is IDOC Message pacakages. where the IDOC are sent as a single package. here is the link to the page that details on hwo to do idoc packaging.
    http://help.sap.com/saphelp_nw04/helpdata/en/99/2653429392ab53e10000000a1550b0/content.htm
    you also refer to Michals weblog on IDoc pacakaging. But the approach i have jsut mentioned to you is more efficent and the one suggested by SAP. Michel was supposed to write one more weblog describing this approach.
    Cheers,
    Naveen

  • Multi-Mapping in IDOC without using BPM ?

    Hi ,
    Please check ..
    Can below given blog can be used to achive Multi-mapping in IDOC without using BPM ?
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
    Regards
    PS

    Solved .. Thx every one .
    Approache Used :
    1. Created mapping  with Change signature on target Message type(idoc) with 1..N Occurence.
    2. Operation mapping with change Occurence on Target Operation(1..Unbounded) .
    3. Used same Operation mapping in Interface Determination with 0..unbounded(Multiplicity).

  • Mapping problem: IDOC - XI - File

    Hi,
    in my scenario (Z-IDOC - XI - File) I have problems with the mapping:
    Z-IDOC :
    ZFIBUCH1
    _IDOC
    ___Begin
    ___EDI_DC40
    ___Z1L061 (0..999999999)
    _____Z1L062 (0..999999999)
    example
    L061 18000 DE 0101 23236318 050605 EUR
    __L062 18000 XXX XXX
    __L062 18000 XX1 CCC3
    L061 87000 DE 0101 050605 EUR
    __L062 87000 XXX XXX
    __L062 87000 XX1 XAA4
    the result should look like this :
    L061 18000 DE 0101 23236318 050605 EUR
    L062 18000 XXX XXX
    L062 18000 XX1 CCC3
    L061 87000 DE 0101 050605 EUR
    L062 87000 XXX XXX
    L062 87000 XX1 XAA4
    I tried the following  (target)-data types in the mapping but nothing did’nt work very well :
    MT_ZIFUCH_FILE
    __ row
    _____L061
    _______L062
    or
    MT_ZIFUCH_FILE
    __ row
    _____L061
    _____L062
    or
    MT_ZIFUCH_FILE
    _____L061
    _____L062
    Do I need here a BPM? Or should I use XSLT-Mapping??
    Or knows somebody a easyer way?
    Regards
    Christoph

    Hi,
    As per  my understanding to have a flat file struture you would require a flat structure at the target side.One similar to the second structure mentioned by you.
    DT_Target
    |_Header
           |______L61.....segment (child of header)
           |______L62.....segment (child of header)
    Using the mapping we convert the idoc structure to flat structure and then use content conversion like this :
    Recordset structure : L61,L62
    L61.fieldSeparator = ,(for you this value should be space)
    L62.fieldSeparator = ,
    I have not been able to convert the Target hierarchial structure to a flat file via content conversion.
    when i tried I got the values as
    L61,1800,...EUR,L62,8700,......
    Hope this helps,
    Regards,
    Sulakshana

  • Advanced mapping from IDOC to SOAP with reversed 3 level context change

    Hi everyone.
    I am having a though time mapping the HRMD_A01 IDOC into a SOAP message. The reason is that the reciever expects an xml structure where the root node is cost center instead of employee which is the case in the IDOC.
    Mapping from:
    IDOC (1..1)
       E1PLOGI (1..unb)
         SEGMENT (String)
         OBJID (String)
         E1PITYP (1..unb)
           E1P0001 (1..unb)
             SEGMENT (String)
             KOSTL (String)
    To this structure:
    List (1..1)
      CostCenters (1..unb)
        KOSTL (String)   ----> Mapped against KOSTL above
        Employees (1..unb)
          OBJID (String)   ----> Mapped against OBJID above  
    I expect several occurances of E1PLOGI which states multiple employees sent in the IDOC. I also expect several occurences of E1P0001 containing cost centers.
    My conclusion is that I need an advanced mapping and I have created one which collects all KOSTL for the IDOC context, deletes duplicates, and creates the CostCenters segment. This is now working. But my problem is that I can't create the employees segment in the right place. They are only created once under the first CostCenters node.
    Here's the java-code for mapping between KOSTL and CostCenters/KOSTL:
    public void costCenters(String[] var1, ResultList result, Container container) throws StreamTransformationException{
      Set set = new HashSet(Arrays.asList(var1));
      String[] array2 = (String[])(set.toArray(new String[set.size()]));
      Arrays.sort(array2);
      for (int i = 0; i < array2.length; i++) {
        result.addValue(array2<i>);
    Any ideas on how to proceed?
    Best Regards

    Hi,
      Do the mapping like below.
      UDF should be select as context.
    List (1..1)
      CostCenters (1..unb)
        KOSTL (String)   ----> Mapped against KOSTL above
        Employees (1..unb)
          OBJID (String)   ----> Mapped against OBJID above
    Mapping:
    KOSTL(RightSelectChange the context to E1PITYP)--UDF--Removecontext--CostCenters
    KOSTL(RightSelectChange the context to E1PITYP)--UDF--SplitbyValue(Each Value)--KOSTL
    constant---Employees
    OBJID----------------------------------------------Use One As Many---SplitByValue (EachValue)----------OBJID
    KOSTL(RightSelectChange the context to E1PITYP)--UDF---
    KOSTL(RightSelectChange the context to E1PITYP)--UDF---
    Regards,
    Prakasu.M
    Edited by: prakasu on May 20, 2009 3:28 PM

  • Multi Mapping - Receiver IDOC & Mail with BPM

    Hi,
    Is it possible to use BPM with Multi Mapping for IDOC & Mail receivers sent parallely..
    Appreciate your help ..
    Thanks,
    vasanth.

    Hi Michal,
    Thanks Michal,
    We are using PI 7.1, Our Scope to do File to IDOC & Mail scenario in between we have to do RFC Lookups..
    Could you pls guide me thru the steps fo BPM,
    1 SA -> OB to AA
    2 ID  -> OB to AA & AA to Recv
    3.RD -> OB to AA & AA to Recv
    4.RA -> AA to IB & AA to IB
    Correct me if i'm wrong..
    Clarification : Is there is any way out to implement this scenario with out BPM.
    We already implemented this scenario with 2 MM & 2 OM, Scenario works fine...but we have to use 1 Mapping..
    Appreciate your help in advance..
    Thanks,
    vasanth.

  • Sender JDBC Adapter Select/Update Issue

    Dear All,
    We have configured a Sender JDBC Adapter to Poll data from the DB2 tables. It is working fine and both the select and the update queries written are also getting properly executed and are changing the status of the flag from Y to N once read from database.
    In the communication channel ->
    select * from <table> where flag = 'N'.
    update <table> set flag = 'Y' where flag = 'N'.
    But I have one doubt after executing the select query some new data comes into the table of status flag 'N"., then will this unselected data will also be updated to 'Y' .
    The question is while we do a select and update from XI on the DB table and at the same time there is an insert happening into the table from the other end how will the adpater behave in this case.Will it result in missing of some records during next select/update transaction from XI..
    Your inputs will be appreciated.
    Regards
    Amit

    Amit
    Did you ever get a solution to your question ?
       Sender JDBC Adapter Select/Update Issue  
    Posted: Apr 24, 2008 2:29 PM           Reply 
    Dear All,
    We have configured a Sender JDBC Adapter to Poll data from the DB2 tables. It is working fine and both the select and the update queries written are also getting properly executed and are changing the status of the flag from Y to N once read from database.
    In the communication channel ->
    select * from <table> where flag = 'N'.
    update <table> set flag = 'Y' where flag = 'N'.
    But I have one doubt after executing the select query some new data comes into the table of status flag 'N"., then will this unselected data will also be updated to 'Y' .
    The question is while we do a select and update from XI on the DB table and at the same time there is an insert happening into the table from the other end how will the adpater behave in this case.Will it result in missing of some records during next select/update transaction from XI..
    Your inputs will be appreciated.
    Regards
    Amit

  • Payload in String need Java mapping to IDOC structure

    Hi
    I have a payload in a field and that payload needs to  be mapped to IDOC sturcture. As per my understanding I will have to write java mapping for the same.
    I don't have any background of java, can anyone help me do this stuff or give me some inputs for the same.
    Regards
    Ria

    Dear Ria,
    Does the Source field consists of payload, then there must be original payload for which you have created Source Structure in XI right.
    I think your source structure look like this if I'm not wrong:
    <Data Type>
        < Field>
          <Field>
           <Field-Payload>
           </Field-Payload>
           </Field>
           </Field>
    </DataType>
    If this is so, you can split the values in the field by FCC. If your field consists of simple payload you can use String functions to extract the value and map it to IDOC field.
    Best Regards
    Praveen K

  • Mapping for IDoc to File

    Hi,
           I am doing mapping for IDoc to file scenario.
    Idoc is INVOIC02.
    Source field  is KRATE from segment E1EDP05
    Target field is Rate.
    Mapping rule is as follows.
    zero when Condiditon type (E1EDP05-KSCHL ) = YCSE  ( enter total 15 digits without any decimal in it. The last 2 digits will be treated as digits after decimal )
    Can someone explain the mapping?
    I have to map KRATE and Rate but where does KSCHL comes into this?
    Please explain

    TAKE HELP FROM THESE LINKS : These links can be helpful for you.
    http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/5d/db0e83e8e74202a5bff527055ab7e5/content.htm
    Regards,
    Sandeep Kaushik

  • Fields to be mapped for Idoc/Xi interface

    For customer collaboration we need to map the Idoc/Xi interface for following things
    In FS what field should be mentioned for following
         u2022     Integration SNC with R/3:
    u2022     ORDERS (PI) (Order Creation)
    u2022     ORDERSP (PI) (Order Confirmation)
    u2022     DESADV (PI) (ASN)
    u2022     Integration with the customer
    o     PROACT = new integration with SNC (PI)
    o     Product Forecast Notification
    o     ( Order ID Notification ) - To be evaluated for PO nrs.
    o     ORDERSP = AS IS
    o     DESADV = AS IS
    o     Proof of Delivery

    I am closing this Thread
    Thanks

Maybe you are looking for

  • Query help on totalling 2 account balances

    Hi Experts, I have the following query: SELECT SUM(T0.[SYSDeb] - T0.[SYSCred]) AS 'Production' FROM JDT1 T0  INNER JOIN OJDT T1 ON T0.TransId = T1.TransId WHERE T0.[Account] = '_SYS00000000238' AND T0.[Account] = '_SYS00000000239' If I add the second

  • CUE Website not reachable

    Hello, we've configured a UC560 with Cisco Standards. So the CUE has the IP-adress 10.1.10.1 (Gateway .2). The CUE successfully answer a ping ! The CCA CUE diagnostics ended successful. I also can connect to CUE through CLI of the UC560. BUT : The We

  • I need a replacement key for left shift, DV4 2106tx.

    This model is new and i can't find a spare key for the left shift key , the retainer broke and i can't do anything about it right now except asking for help, please tell me where and how can i get the spare key with retainers (i am also ready to buy

  • SAP Business one Freight Query

    Hi experts, i have created a query in B1 query generator and saved . The purpose of the query is to calculate some values based on the group of the BP and the item code too. I used User-defined value but i get an error anytime i change my quantity. B

  • Error receiver determination

    Hi, i have a problem whith the receiver determination. The receiver determination fails because the Sender Service is used in upper case by the XI. What i can't explain is, that the business system is written in lower case in the SLD and when this sy