cancel
Showing results for 
Search instead for 
Did you mean: 

Message Mapping

Former Member
0 Kudos

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.....

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?

Thank you very much

Sateesh

Accepted Solutions (0)

Answers (1)

Answers (1)

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi Satish,

format your thread properly it is not understandanble format.

Regards,

Raj