cancel
Showing results for 
Search instead for 
Did you mean: 

error while using Jdbc receiver adapter

Former Member
0 Kudos

Hi,

Iam using a receiver jdbc adapter to update a table in my database.Here iam using 'UPDATE' as my action in the mapping.It is giving the foowing error....

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

Can Please anybody tell me what may be the problem with my scenario...

Thanks & Regards,

Radhika.

Accepted Solutions (1)

Accepted Solutions (1)

former_member189387
Active Contributor
0 Kudos

Hi ,

action type should be attribute . Please go through the following structure for update .

<b>

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

<ns1:MT_RESPONSE xmlns:ns1="http://com/Test">

<STATEMENT_NAME>

<TABLENAME action="UPDATE">

<TABLE>Utility</TABLE>

<access>

<Updated_On/>

</access>

<key>

<TrnHisID/>

</key>

</TABLENAME>

</STATEMENT_NAME>

</ns1:MT_RESPONSE></b>

query for above we may say as

<b>UPDATE Utility set Updated_On='' where TrnHisID =''</b>

Hope it helps

Regards.,

V.Rangarajan

Answers (5)

Answers (5)

Former Member
0 Kudos

>>>>What happens If we map any field in the table with a constant which contains no value ?

At runtime XI will pick that constant value from mapping to pipeline service..

former_member267355
Active Participant
0 Kudos

Hi,

Have a look at this blog

/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30

your datatype should be of the structure same like the receiver datatype.

when you do mapping you have to hardcode action and table field.

Map the action field to constant having 'update' as value and

map table field with constant which has the table name

Regards,

Sakthi.

Former Member
0 Kudos

Hi Radhika,

<b>Cause :</b> You missed the action attribute while creating the Target Structure corresponding to the table which you want to populate/update.

<b>Action</b> attribute is a must as it provides the info to Db that what sort of action you want to perform on the table...

<b>Solution :</b>

Create a action attribute in target structure and map it with a constant function and to this constant function pass some value as per your usage like INSERT/UPDATE or UPDATE_INSERT..

hope you got everything..If not feel to ping..

Regards,

former_member189387
Active Contributor
0 Kudos

Hi,

If possible give the desing of ur datatype for update which you are passing to the JDBC Receiver Adapter

Best Regards.,

V.Rangarajan

Former Member
0 Kudos

Hi,

Can u please tell me what is desing?

Thanks & Regards,

Radhika.

former_member192892
Active Contributor
0 Kudos

Hi Radhika,

Can you provide the receiver data type structure you are using

Regards

Varun

former_member189387
Active Contributor
0 Kudos

Hi ,

Design means ur datatype structure as i specified earlier

Regards.,

V.Rangarajan

Former Member
0 Kudos

Hi all,

My problem is solved.The wrong with me is that I didn't put a subelement under statement which should contain action,table,access...

I have one more question,

Are any of these keywords like statement,action,table and access are case-sensitive?

Thanks & Regards,

Radhika.

former_member267355
Active Participant
0 Kudos

Hi,

Its not case sensitive but structure should be correct.

Regards,

Sakthi

Former Member
0 Kudos

Hi Sakthi,

Thankyou,

What happens If we map any field in the table with a constant which contains no value ?

Thanks & Regards,

Radhika.

former_member267355
Active Participant
0 Kudos

Hi,

There are some fields which are mandatory like action, table.

If you dont pass value to it, your scenario wont work or will give error.

Regards,

Sakthi

prateek
Active Contributor
0 Kudos

The field mapped with the constant and no value correponds to NULL value OR Empty String in database. this depends upon the parameter

"Interpretation Of Empty String Value" in receiver JDBC adapter. Thsi is a mandatory field and its default value is NULL

Regards,

Prateek

Former Member
0 Kudos

Hi Radhika,

While creating a datatype for jdbc, u need to create an attribute "Action". have u created that.

Follow the below weblog for thesame:

/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30

Regards,

Ravi.