on 02-14-2008 8:46 AM
Hi,
i m doing file to jdbc scenario
can anyone tell me how to update data in the database
can u give me the mapping for the same or some link
plz reply soon
Hi,
You can update the database by using jdbc adapter ....
Go through this links and blogs u will find out how to update the data base...
/people/alessandro.berta/blog/2005/10/04/save-time-with-generalized-jdbc-datatypes
/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30
/people/sameer.shadab/blog/2005/10/24/connecting-to-ms-access-using-receiver-jdbc-adapter-without-dsn file to jdbc
JDBC ADAPTER
http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
/people/saravanakumar.kuppusamy2/blog/2005/01/19/rdbms-system-integration-using-xi-30-jdbc-senderreceiver-adapter
/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30 - File to JDBC
JDBC - http://help.sap.com/saphelp_nw2004s/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm
multiple tables with JDBC - http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
JDBC Response /people/swaroopa.vishwanath/blog/2006/12/28/send-rfc-to-sap-xi-150-asynchronous
JDBC RECEIVER ADAPTER
/people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step
plz reward points
thanq
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thnks a tonn
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Create yor outbound message type according to your table structure(create action attribute at the begining of the inbound structure and then add your table strucre). in your message mapping, map a constant with value "INERT" or "UPDATE". User JDBC adapter in your inbound CC.
Thanks,
Reyaz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
To update the database table you need to have use receiver JDBC adapter with either UPDATE or INSERT_UPDATE actions
UPDATE will update the table and INSERT_UPDATE will either insert the data if its not available or update if the data available as per key fields given in below structure.
Remember to have same field names (col1) as per database table. (Case sensitive)
Please follow below structure while creating Receiver Data type and for mapping
<root>
<StatementName1>
<dbTableName action=UPDATE | UPDATE_INSERT>
<table>realDbTableName</table>
<access>
<col1>val1</col1>
<col2>val2new</col2>
</access>
<key1>
<col2>val2old</col2>
<col4>val4</col4>
</key1>
<key2>
<col2>val2old2</col2>
</key2>
</dbTableName>
</StatementName1>
</root>
http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/frameset.htm
Here you have to pass the key filed values and the data to be updated in
database table.
then you just need to configure the Receiver JDBC adapter,
I think there are couple of links have already provided, so you could refer from it for step by step procedure
Please let me know if you need any thing else in it
thanks
Swarup.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vikas,
As you had said there are many records in the file.
So you have the file structure with you as well as the table strructure.
Lets say file structure is
<Head>
-->Field1
-->Field2
-->Field3
-->Field4
-->Field5
Table structrue is
TableName
-->col1
-->col2
-->col3
-->col4
Here you could get the info as which are the key fields in table lets say col1 is key field.
Now in mapping you will have to update only col2 and col4 so the structure will be as below
<root>
<StatementName1>
<dbTableName action=UPDATE | UPDATE_INSERT>
<table>TableName</table>
<col2>val1</col2>
<col4>val2new</col4>
<key1>
<col1>val1old</col1>
</key1>
</TableName>
</StatementName1>
</root>
Here you just need to map the
file to JDBC
Field1 ---> Col1
Field2 ---> Col2
Filed4 ---> Col4
remeaining Fields from flat file will be there but no mapping have to do for it.
thus on the basis of Field1 we will be updating Field 2 and Field4.
The important thing while dealing with Multiple records is in fiel structure
the HEAD will be with Occurance unbounded (Can do this at Data type)
and on JDBC structure side it will be StatementName with Occurance unbounded .
Here you will get Step by Step Screen Shots of File to JDBC as what I had explained you above
Thanks
Swarup
Edited by: Swarup Sawant on Feb 14, 2008 10:27 AM
Hi,,
You can map UPDATE keyword using constant function to action an attribute...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi vikas,
Just give the table corresponding in table filed and in action use UPDATE_INSERT
Regards...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.