cancel
Showing results for 
Search instead for 
Did you mean: 

Need Help for the Following Error!!!

Former Member
0 Kudos

Hello Experts,

          I am using IDoc to JDBC scenario for my requirement in PO 7.4 Version.

Here are the below error details in Receiver JDBC channel:

     Unable to execute statement for table or stored procedure.
'mat0.tsap.materialstamm' (Structure 'Material') due to
java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly
ended

JDBC message processing failed; reason Error processing request in sax
parser: Error when executing statement for table/stored proc.
'mat0.tsap.materialstamm' (structure 'Material'):
java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly
ended

MP: exception caught with cause
com.sap.engine.interfaces.messaging.api.exception.MessagingException:
Error processing request in sax parser: Error when executing statement
for table/stored proc. 'mat0.tsap.materialstamm' (structure 'Material'):
java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly
ended

Also here is my XML payload after Mapping:

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

<ns0:MT_MaterialDB xmlns:ns0="urn:base:pa:US4:Masterdata:1.0">

   <Material>

      <dbTableName action="INSERT">

         <table>mat0.tsap.materialstamm</table>

         <access>

            <IDOC_NR>123459696</IDOC_NR>

            <DATE>2015/10/05</DATE>

            <BUKRS>0015</BUKRS>

            <KENNUNG>TJ10</KENNUNG>

            <MATERIAL_TYP>LVR</MATERIAL_TYP>

            <WERK>40J8</WERK>

            <LAGER>0001</LAGER>

            <LAGER_PLATZ>1235</LAGER_PLATZ>

            <ART_NR>1235869</ART_NR>

            <LME>4</LME>

            <AME>4</AME>

            <UMREZ/>

            <UMREN/>

            <UN_NR>2358  </UN_NR>

            <EINKAUF_GRP>123585698</EINKAUF_GRP>

            <ART_NR_TEXT_1>0000000011111111110000000000000000000000</ART_NR_TEXT_1>

            <ART_NR_TEXT_2>1000000000000000000000000000000000000000</ART_NR_TEXT_2>

            <ART_NR_TEXT_3>1000000000000000000000000000000000</ART_NR_TEXT_3>

         </access>

      </dbTableName>

   </Material>

</ns0:MT_MaterialDB>

Since I am using JDBC channel as a receiver, Would request you to kindly let me know where the command needs to be provided so that I can proceed further.

Thanks in advance!!!

Best Regards,

Prashanth Bharadwaj

Accepted Solutions (1)

Accepted Solutions (1)

iaki_vila
Active Contributor
0 Kudos

Hi Prashanth,

Try with this XML:


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

<ns0:MT_MaterialDB xmlns:ns0="urn:base:pa:US4:Masterdata:1.0">

    <Material>

        <materialstamm action="INSERT">

            <table>mat0.tsap.materialstamm</table>

            <access>

                <IDOC_NR>123459696</IDOC_NR>

                <DATE>2015/10/05</DATE>

                <BUKRS>0015</BUKRS>

                <KENNUNG>TJ10</KENNUNG>

                <MATERIAL_TYP>LVR</MATERIAL_TYP>

                <WERK>40J8</WERK>

                <LAGER>0001</LAGER>

                <LAGER_PLATZ>1235</LAGER_PLATZ>

                <ART_NR>1235869</ART_NR>

                <LME>4</LME>

                <AME>4</AME>

                <UMREZ/>

                <UMREN/>

                <UN_NR>2358  </UN_NR>

                <EINKAUF_GRP>123585698</EINKAUF_GRP>

                <ART_NR_TEXT_1>0000000011111111110000000000000000000000</ART_NR_TEXT_1>

                <ART_NR_TEXT_2>1000000000000000000000000000000000000000</ART_NR_TEXT_2>

                <ART_NR_TEXT_3>1000000000000000000000000000000000</ART_NR_TEXT_3>

            </access>

        </materialstamm>

    </Material>

</ns0:MT_MaterialDB>

Regards.

Former Member
0 Kudos

Hi Inaki,

     Thanks for the Reply. I tried with the same payload as per your previous mail. But the error do persists. Here is my receiver payload.

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

<ns0:MT_MaterialDB xmlns:ns0="urn:base:pa:US4:Masterdata:1.0">

   <Material>

      <materialstamm action="INSERT">

         <table>mat0.tsap.materialstamm</table>

         <access>

            <IDOC_NR>123459696</IDOC_NR>

            <DATE>2015/10/05</DATE>

            <BUKRS>0015</BUKRS>

            <KENNUNG>TJ10</KENNUNG>

            <MATERIAL_TYP>LVR</MATERIAL_TYP>

            <WERK>40J8</WERK>

            <LAGER>0001</LAGER>

            <LAGER_PLATZ>1235</LAGER_PLATZ>

            <ART_NR>1235869</ART_NR>

            <LME>4</LME>

            <AME>4</AME>

            <UMREZ/>

            <UMREN/>

            <UN_NR>2358  </UN_NR>

            <EINKAUF_GRP>123585698</EINKAUF_GRP>

            <ART_NR_TEXT_1>0000000011111111110000000000000000000000</ART_NR_TEXT_1>

            <ART_NR_TEXT_2>1000000000000000000000000000000000000000</ART_NR_TEXT_2>

            <ART_NR_TEXT_3>1000000000000000000000000000000000</ART_NR_TEXT_3>

         </access>

      </materialstamm>

   </Material>

</ns0:MT_MaterialDB>

Error from Adapter Engine:

  Unable to execute statement for table or stored procedure.
'mat0.tsap.materialstamm' (Structure 'Material') due to
java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly
ended

JDBC message processing failed; reason Error processing request in sax
parser: Error when executing statement for table/stored proc.
'mat0.tsap.materialstamm' (structure 'Material'):
java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly
ended

MP: exception caught with cause
com.sap.engine.interfaces.messaging.api.exception.MessagingException:
Error processing request in sax parser: Error when executing statement
for table/stored proc. 'mat0.tsap.materialstamm' (structure 'Material'):
java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly
ended.


Kindly do the needful.


Thanks in advance!!!

Best Regards,

Prashanth Bharadwaj


iaki_vila
Active Contributor
0 Kudos

Hi Prashanth,

The issue could be in the DATE tag, when i work with ORACLE database i usually do this sentence (😞


<DATE hasQuot="No">TO_DATE('2014/08/25', 'yyyy/mm/dd')</DATE>

Regards.

Former Member
0 Kudos

Hi Inaki,

     Thanks for the Reply. I tried even after disabling the date field same payload as per your previous But the error do persists. Here is my receiver payload with out DATE field.

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

<ns0:MT_MaterialDB xmlns:ns0="urn:base:pa:US4:Masterdata:1.0">

   <Material>

      <materialstamm action="INSERT">

         <table>mat0.tsap.materialstamm</table>

         <access>

            <IDOC_NR>123459696</IDOC_NR>

            <BUKRS>0015</BUKRS>

            <KENNUNG>TJ10</KENNUNG>

            <MATERIAL_TYP>LVR</MATERIAL_TYP>

            <WERK>40J8</WERK>

            <LAGER>0001</LAGER>

            <LAGER_PLATZ>1235</LAGER_PLATZ>

            <ART_NR>1235869</ART_NR>

            <LME>4</LME>

            <AME>4</AME>

            <UMREZ/>

            <UMREN/>

            <UN_NR>2358  </UN_NR>

            <EINKAUF_GRP>123585698</EINKAUF_GRP>

            <ART_NR_TEXT_1>0000000011111111110000000000000000000000</ART_NR_TEXT_1>

            <ART_NR_TEXT_2>1000000000000000000000000000000000000000</ART_NR_TEXT_2>

            <ART_NR_TEXT_3>1000000000000000000000000000000000</ART_NR_TEXT_3>

         </access>

      </materialstamm>

   </Material>

</ns0:MT_MaterialDB>

Error from Adapter Engine:

  Unable to execute statement for table or stored procedure.
'mat0.tsap.materialstamm' (Structure 'Material') due to
java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly
ended

JDBC message processing failed; reason Error processing request in sax
parser: Error when executing statement for table/stored proc.
'mat0.tsap.materialstamm' (structure 'Material'):
java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly
ended

MP: exception caught with cause
com.sap.engine.interfaces.messaging.api.exception.MessagingException:
Error processing request in sax parser: Error when executing statement
for table/stored proc. 'mat0.tsap.materialstamm' (structure 'Material'):
java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly
ended.


Kindly do the needful.


Thanks in advance!!!

Best Regards,

Prashanth Bharadwaj

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Prashanth,

Try removing <Material> and ending </Material> from the XML and see.

Regards,

Souvik

iaki_vila
Active Contributor
0 Kudos

Hi Prashanth,

Could you access to the DB table schema?, i said this because you can check if you are using the right names, if you are using right values depending of their types and if there is any mandatory value.

Also, you can wait more SCN members answers, i see your XML structure fine .

Regards.