cancel
Showing results for 
Search instead for 
Did you mean: 

File to JDBC Adapter

Former Member
0 Kudos

Hi All

I am trying to configure File to JDBC Adapter to insert data in the database .I am having problem with message mapping.I get the error with the statement field in mapping .Please can anyone let me know what mapping changes need to be done

My Mapping is as follow

SOURCE TARGET

MT_INFO_DATA----


>MT_JDBC_REC

Header----


> Statement

TABLENAME

Update_insert----


>Action

T_EMPLOYEE(TABLE NAME)----


> TABLE

ACCESS

EMP_NO----


>EMP_NO

COMP_ID----


>COMP_ID

BRANCH----


>BRANCH

Error: TransformException error in xml processor class: Error processing request in sax parser: Error when executing statement for table/stored proc. 'T_EMPLOYEE' (structure 'STATEMENT'): java.sql.SQLException: FATAL ERROR document format: structure 'STATEMENT', no key element found

Please can anyone let me know what is to be mapped with the field STATEMENT.

Thanks

Amit

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Yes they are numbers in the database

Also i have done the other setting in the receiver adapter

Former Member
0 Kudos

Hi Sorry

This is the output

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

<ns0:MT_JDBCRECEIVER xmlns:ns0="http://tcs.com/XI/IND/DOW/ESS"><STATEMENT><TABLENAME action="INSERT"><TABLE>T_EMPLOYEE</TABLE><access><EMPLOYEE_NO>392143</EMPLOYEE_NO><COMPANY_ID>1</COMPANY_ID><BRANCH_ID></BRANCH_ID></access></TABLENAME></STATEMENT></ns0:MT_JDBCRECEIVER>

bhavesh_kantilal
Active Contributor
0 Kudos

Amit,

Are company Id and Employee Id Numbers in the database?

Also, in the Receiver JDBC adapter select option<b> Interpretation of Empty String Values</b> as NULL.

Regards

Bhavesh

Former Member
0 Kudos

HI This is the payload .

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

- <ns:MT_INFOTYPE_DATA xmlns:ns="http://demo.com/XI/IND/temp/ESS">

- <Header>

<EMPLOYEE_NO>392143</EMPLOYEE_NO>

<COMPANY_ID>1</COMPANY_ID>

<BRANCH_ID />

</Header>

</ns:MT_INFOTYPE_DATA>

bhavesh_kantilal
Active Contributor
0 Kudos

This is the input payload, what is the output of the mappping?

Former Member
0 Kudos

Hi Bhavesh

I did as suggested but still i am getting the following error

Error: TransformException error in xml processor class: Error processing request in sax parser: Error when executing statement for table/stored proc. 'T_EMPLOYEE' (structure 'STATEMENT'): java.sql.SQLException: ORA-01861: literal does not match format string

- 2007-05-24 06:21:17 IST: Processing started

- 2007-05-24 06:07:48 IST: Error: TransformException error in xml processor class: Error processing request in sax parser: Error when executing statement for table/stored proc. 'T_EMPLOYEE' (structure 'STATEMENT'): java.sql.SQLException: FATAL ERROR document format: structure 'STATEMENT', no key element found

- 2007-05-24 06:07:48 IST: Processing started

- 2007-05-24 06:05:48 IST: Error: TransformException error in xml processor class: Error processing request in sax parser: Error when executing statement for table/stored proc. 'T_EMPLOYEE' (structure 'STATEMENT'): java.sql.SQLException: FATAL ERROR document format: structure 'STATEMENT', no key element found

bhavesh_kantilal
Active Contributor
0 Kudos

><i> Error processing request in sax parser: Error when executing statement for table/stored proc. 'T_EMPLOYEE' (structure 'STATEMENT'): java.sql.SQLException: ORA-01861: literal does not match format string</i>

Can you provde us the output XML that is going as the input to the JDBC adapter?

My hitch here is that the Column names are not correct in your output XML.

Regards

Bhavesh

Former Member
0 Kudos

You need the key tag in oyur receiver JDBC data type.

Ref:http://help.sap.com/saphelp_nw2004s/helpdata/en/4b/a20c4cfea96b498b1e1af3f32f0670/frameset.htm

Regards,

Jai Shankar

bhavesh_kantilal
Active Contributor
0 Kudos

Amit,

If you are trying to insert data into the database, then the Action should be,

ACTION = "INSERT" anot ACTION ="UPDATE_INSERT".

Make the action as INSERT and things will work fine.

Regards

Bhavesh