cancel
Showing results for 
Search instead for 
Did you mean: 

CSV to JDBC

Former Member
0 Kudos

I have a CSV file with multiply records I am trying to insert into an Oracle database. I have been able to sucessfully insert only the first record from the file into the table. Does anyone have any idea on why only the first record is getting inserted?

Thanks

Skip Ford

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

This is the structure for the outbound CSV file.

DT_OUTPLAIN complex type

ROW element xsd:sting 0...unbounded

name element xsd:sting 1

date element xsd:sting 1

car element xsd:sting 1

This is the inbound to JDBC

DT_INPLAIN_JDBC_REC complex type

STATEMENTNAME element 1

SKIP_TEST element 1

action atribute xsd:sting optional

TABLE element xsd:sting 1

access element 1

data1 element xsd:sting 1

data2 element xsd:sting 1

data3 element xsd:sting 1

So the goal is to take the multiply records from the CSV file and insert them into the oracle database.

Thanks

Skip Ford

moorthy
Active Contributor
0 Kudos

Hi,

one option is STATEMENTNAME element 0..n

Hope this solves the problem.. Before run your interface test the mapping in the mapping editor in Integration Repository

Rgds,

Moorthy

Former Member
0 Kudos

I have tried that and I am still only getting the first record in the database. This is what the test shows I get from the mapping...

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

<ns0:MT_OUTPLAIN_JDBC_REC xmlns:ns0="http://idexxi.com/sapxi/edhr/vendordata">

<STATEMENTNAME>

<SKIP_TEST action="INSERT">

<TABLE>SKIP_TEST</TABLE>

<access>

<VENDOR_DATA1>Ralph</VENDOR_DATA1>

<VENDOR_DATA2>f</VENDOR_DATA2>

<VENDOR_DATA3>Chevy</VENDOR_DATA3>

</access>

</SKIP_TEST>

</STATEMENTNAME>

<STATEMENTNAME>

<SKIP_TEST action="INSERT">

<TABLE>SKIP_TEST</TABLE>

<access>

<VENDOR_DATA1>skip</VENDOR_DATA1>

<VENDOR_DATA2>hg</VENDOR_DATA2>

<VENDOR_DATA3>Ford</VENDOR_DATA3>

</access>

</SKIP_TEST>

</STATEMENTNAME>

</ns0:MT_OUTPLAIN_JDBC_REC>

justin_santhanam
Active Contributor
0 Kudos

Ford,

You've got two Statement in the output right? Please check the XML u gave above.

Best regards,

raj.

Answers (3)

Answers (3)

Former Member
0 Kudos

In sender file adapter what did you choose for number of records per message(check with *).....and also what error is it throwing in sxmb_moni or in RWB.

Regards,

Ravi

moorthy
Active Contributor
0 Kudos

Hi,

Change the occurence for the JDBC Target structure(o..n) so that you can insert multiple entries.

Check out this for more http://help.sap.com/saphelp_nw70/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm

Thanks,

Krishna

justin_santhanam
Active Contributor
0 Kudos

Ford,

It could be easy for us to suggest, if you give the source and target data types with <b>occurrences</b>.

Best regards,

raj.