Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 08, 2010 at 11:39 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on 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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.