cancel
Showing results for 
Search instead for 
Did you mean: 

FATAL ERROR document format: structure 'STATEMENT'

Former Member
0 Kudos

Hi experts,

I've a scenario IDOC to JDBC, give me the error: FATAL ERROR document format: structure 'STATEMENT'

I don't understand becausse payload is OK:

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

- <ns0:MT_MATERIALES xmlns:ns0="http://idom.com/arteche/PP_I07_15A/Maestro_Materiales">

- <STATEMENT>

- <TABLENAME ACTION="UPDATE_INSERT">

<TABLE>MAESTRO_MATERIALES</TABLE>

</TABLENAME>

- <ACCESS>

<MATERIAL>100000016</MATERIAL>

<DESCRIPCION>mmpp1</DESCRIPCION>

<TIPO_ARTICULO>3</TIPO_ARTICULO>

<GRUPO_ARTICULOS>014</GRUPO_ARTICULOS>

<LEADTIME>00</LEADTIME>

<CENTRO>0101</CENTRO>

</ACCESS>

</STATEMENT>

</ns0:MT_MATERIALES>

somebody can help me please?

very thanks,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Assuming you want to update or insert the properties for a specific material number, try:


<?xml version="1.0" encoding="UTF-8" ?> 
<ns0:MT_MATERIALES xmlns:ns0="http://idom.com/arteche/PP_I07_15A/Maestro_Materiales"> 
  <statement>
    <tablename action="UPDATE_INSERT">
      <table>MAESTRO_MATERIALES</table>
      <access> 
        <MATERIAL>100000016</MATERIAL> 
        <DESCRIPCION>mmpp1</DESCRIPCION> 
        <TIPO_ARTICULO>3</TIPO_ARTICULO> 
        <GRUPO_ARTICULOS>014</GRUPO_ARTICULOS> 
        <LEADTIME>00</LEADTIME> 
        <CENTRO>0101</CENTRO> 
      </access>
      <key>
        <MATERIAL>100000016</MATERIAL> 
      </key>
    </tablename>
  </statement>
</ns0:MT_MATERIALES>

Kind regards,

Koen

Answers (2)

Answers (2)

former_member200962
Active Contributor
0 Kudos

Hi,

The format of your input message (towards DB is not proper)...

<ns0:MT_MATERIALES xmlns:ns0="http://idom.com/arteche/PP_I07_15A/Maestro_Materiales">

- <STATEMENT>

<TABLENAME ACTION="UPDATE_INSERT">

<TABLE>MAESTRO_MATERIALES</TABLE>

</TABLENAME>

<ACCESS>

<MATERIAL>100000016</MATERIAL>

<DESCRIPCION>mmpp1</DESCRIPCION>

<TIPO_ARTICULO>3</TIPO_ARTICULO>

<GRUPO_ARTICULOS>014</GRUPO_ARTICULOS>

<LEADTIME>00</LEADTIME>

<CENTRO>0101</CENTRO>

</ACCESS>

</STATEMENT>

</ns0:MT_MATERIALES>

The actual format should be:

<root>
  <StatementName1>
<dbTableName action=u201DUPDATEu201D | u201CUPDATE_INSERTu201D>
    <table>realDbTableName</table>
<access>
<col1>val1</col1>
<col2>val2new</col2>
</access>
<key1>
<col2>val2old</col2>
<col4>val4</col4>
</key1>
<key2>
<col2>val2old2</col2>
</key2>
</dbTableName>
  </StatementName1>

In the above format look where the TableName tab should end...for more info:

http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm

Regards,

Abhishek

Edited by: abhishek salvi on Feb 26, 2009 4:07 PM

Former Member
0 Kudos

This message was moderated.