Skip to Content
avatar image
Former Member

JDBC receiver report error message: attribute action missing

Hello Colleagues,

I am working on a scenario:

SAP ECC >XI proxy >XI server >JDBC adapter >oracle database.

SAP ECC is sending a request(SQL query) to get the result from DB.

The payload is

==========================================================================

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

- http://boe.com.cn/b1/cim">

- <root>

- <stmt>

- <Query action="SQL_QUERY">

<access>SELECT productspecname AS MATNR, productiontype AS DISGR, SUBSTR(factoryname,1,1) AS SHOP FROM PRODUCTSPEC WHERE activestate = 'Active'</access>

</Query>

</stmt>

</root>

</ns1:MT_B1_MES_GETMAT_IN>

============================================================================

As you might already seen, the action attribute is there, but i always get the error log:

Error processing request in sax parser: No 'action' attribute found in XML document (attribute "action" missing or wrong XML structure)

I searched for the threads in forum but it seems, people get the same error always due to the wrong XML document.

but i check my xml, it looks right. why still get the "action attribute missing" error...

Best regards, Charlie Cai

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    Oct 08, 2010 at 11:37 AM

    The action attribute belongs to the third hierarchy level, you have it in the forth.

    <root>
      <StatementName1>
        <dbTableName action ...

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Stefan,

      You are right! i deleted one level and the message works.

      Thanks a lot!

      Best regards, Charlie

  • Oct 08, 2010 at 12:05 PM

    hi,

    have a look at this link first

    http://help.sap.com/saphelp_nw04/helpdata/EN/2e/96fd3f2d14e869e10000000a155106/frameset.htm

    while using SQL_QUERY try to u placeholders as explained above.

    if you are still have a issue post it back.

    Regards

    Vijay

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 08, 2010 at 12:32 PM

    Hi Charlie,

    I think i got the problem here.

    Your payload is perfectly fine.

    In the payload here, you have not used placeholders. (Which is perfectly fine as they are optional)

    But, if you are not using placeholders, then the <key>block can be omitted or left empty.

    In both cases, you must not select the "Key Tags Mandatory field" under Processing Tab in the configuration, as this will cause runtime errors.

    By default, while configuring the JDBC receiver channel, the "Key Tags Mandatory field" is by default checked.

    You need to just uncheck this input in the Configuration of the JDBC receiver channel.

    I hope this will surely solve the problem.

    Regards, Gaurav.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 08, 2010 at 11:39 AM
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 08, 2010 at 11:48 AM

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

    - <ns1:MT_B1_MES_GETMAT_IN xmlns:ns1="http://boe.com.cn/b1/cim">

    - <root>

    - <stmt>

    - <Query action="SQL_QUERY">

    <access>SELECT productspecname AS MATNR, productiontype AS DISGR, SUBSTR(factoryname,1,1) AS SHOP FROM PRODUCTSPEC WHERE activestate = 'Active'</access>

    </Query>

    </stmt>

    </root>

    </ns1:MT_B1_MES_GETMAT_IN>

    In your query, are you executing Select Statement ?

    For Target JDBC, you can Insert data in table, Update Data in table & Execute Stored Procedures from PI System.

    using Actions

    INSERT

    UPDATE

    EXECUTE.

    Change your scenario Action as per your requirement.

    No idea for ACTION = SQL_QUERY.

    Add comment
    10|10000 characters needed characters exceeded