cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC receiver report error message: attribute action missing

Former Member
0 Kudos

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" ?>

- <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>

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

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

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

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

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

Former Member
0 Kudos

Hi Stefan,

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

Thanks a lot!

Best regards, Charlie

Answers (4)

Answers (4)

Former Member
0 Kudos

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.

stefan_grube
Active Contributor
0 Kudos

> Your payload is perfectly fine.

No, it is not.

vijay_kumar133
Active Participant
0 Kudos

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

former_member208856
Active Contributor
0 Kudos

<?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.

Former Member
0 Kudos