Skip to Content
0
Former Member
Jul 31, 2009 at 01:26 PM

XML TO ABAP

17 Views

Hello All,

We have been durind the last week to map an XML file to an ABAP interal table, with out any success. We have read wiki samples, blogs and several post about it, but we have not been able to read completely the XML.

We are doing it with CALL TRANSFORMATION stm,

The XML structure is:

<BEAN>
   <MSGID>22</MSGID>
   <SUPPLIER>11</SUPPLIER>
   <EVENTS>
        <EVENT>
              <ID_PROGRAM> RRRRARR</ID_PROGRAM>
              <CALLS>
                      <CALL>
                             <ID_CALL>222</ID_CALL>
                             <CAN>333</CAN>
                      </CALL>
              </CALLS>
        </EVENT>
   </EVENTS>
</BEAN>

The XSL we are using is:

        <BEAN>
          <BEAN>
            <MSGID>
              <xsl:value-of select="bean/msgid"/>
            </MSGID>
            <SUPPLIER>
              <xsl:value-of select="bean/supplier"/>
            </SUPPLIER>
            <EVENTS>
              <EVENT>
                <EVENT>
                  <IDPROGRAM>
                       <xsl:value-of select="idprogram"/>
                  </IDPROGRAM>                  
                  <CALLS>
                         <xsl:for-each select="//call">
                         <CALL>
                            <ID_CALL>
                                <xsl:value-of select="call"/>
                            </ID_CALL>
                            <CAN>
	         <xsl:value-of select="can"/>
                           </CAN>
                      </CALL>
                    </xsl:for-each>
                  </CALLS>
                </EVENT>
              </EVENT>
            </EVENTS>
          </BEAN>
        </BEAN>

But we are unable to map values of the node <CALLS>, we have no more ideas or clue on how to achive it,

PLEASE HELP US!!

Gabriel P.-