Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

XML ABAP

raul_natu
Explorer
0 Likes
523

Hi! I want to read this data into abap


<?xml version="1.0" encoding="UTF-8" ?> 
- <formulario1>
  <Descricao>TESTE</Descricao> 
  <Localizacao>MEXICO</Localizacao> 
  <datahora1>12.12.2009</datahora1> 
  <datahora2>13.12.2009</datahora2> 
  <Nome>Jose Manuel</Nome> 
  <Numero>123467890</Numero> 
  <Categoria>REUNIÃO</Categoria> 
  <Prioridade>ALTA</Prioridade> 
  <CampoTexto2>REUNIAO CONSUMIDA COM SUCESSO</CampoTexto2> 
  </formulario1>

and i have this in transformation


<?sap.transform simple?>
uFEFF<?sap.transform simple?>
<tt:transform xmlns:tt="http://www.sap.com/transformation-templates" xmlns:ddic="http://www.sap.com/abapxml/types/dictionary" xmlns:def="http://www.sap.com/abapxml/types/defined">
  <tt:root name="ROOT" type="?"></tt:root>
  <tt:root name="FORMULARIO1" type="ddic:ZSTRUCT_NEWDATASET"></tt:root>
  <tt:template>
    <FORMULARIO1>
      <NUMERO tt:value-ref=".FORMULARIO1.NUMERO"></NUMERO>
      <DESCRICAO tt:value-ref=".FORMULARIO1.DESCRICAO"></DESCRICAO>
      <LOCALIZACAO tt:value-ref=".FORMULARIO1.LOCALIZACAO"></LOCALIZACAO>
      <DATAHORA1 tt:value-ref=".FORMULARIO1.DATAHORA1"></DATAHORA1>
      <DATAHORA2 tt:value-ref=".FORMULARIO1.DATAHORA2"></DATAHORA2>
      <NOME tt:value-ref=".FORMULARIO1.NOME"></NOME>
      <CATEGORIA tt:value-ref=".FORMULARIO1.CATEGORIA"></CATEGORIA>
      <PRIORIDADE tt:value-ref=".FORMULARIO1.PRIORIDADE"></PRIORIDADE>
      <CAMPOTEXTO2 tt:value-ref=".FORMULARIO1.CAMPOTEXTO2"></CAMPOTEXTO2>
    </FORMULARIO1>
  </tt:template>
</tt:transform>

and it is giving this error "ST_MATCH_FAIL" where is my fault?

Thanks,

Raul Natu

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
462

Hi,

The XML transformation is case sensitive . So try to change the transformation and execute.

Sruthi

3 REPLIES 3
Read only

Former Member
0 Likes
462

Hi,

use the Function module..

TEXT_CONVERT_XML_TO_SAP

Regards,

Prabhudas

Read only

mvoros
Active Contributor
0 Likes
462

Hi,

as far I know XML is case sensitive. But it's just my guess and maybe SAP is specific.

Cheers

Read only

Former Member
0 Likes
463

Hi,

The XML transformation is case sensitive . So try to change the transformation and execute.

Sruthi