cancel
Showing results for 
Search instead for 
Did you mean: 

Java Mapping DB lookup

Former Member
0 Kudos

Dear All,

Someone had told me that one of the reason we use JAVA mapping for Database lookup during runtime mapping. But how do you achieve database lookup during runtime mapping, how is the database retrieved, is it using java API's or by using JDBC adapter. Please advice on the complete setup.

Regards,

Ashish

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Ashish,

JDBC receiver adapter supports lookup. To execute calls to an application system by using the lookup API, we can use either a generic or special lookup API.

Refer this help for further information:

http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0/content.htm

---Satish

Former Member
0 Kudos

Ashish,

Database lookup at runtime mapping can be achieved using preconfigured

JDBC Adapter.

Code snipet would look like this :

//Determine a channel, as created in the Configuration

channel = LookupService.getChannel("DBORA","CC_JDBC_IN");

//Get a system accessor for the channel.

accessor = LookupService.getDataBaseAccessor(channel);

//Execute Query and get the values in resultset

resultSet = accessor.execute(Query);

Regards

Kavitha

Former Member
0 Kudos

Dear All,

So it's mandatory to use the JDBC adapter for database lookup, this can't be achieved by using the normal java coding in the mapping program.

Regards,

Ashish

Former Member
0 Kudos

Ashish,

It is not mandatory to use JDBC adapter. It is upto your requirement. You can directly use lookup in the java mapping itself and then send back your data from the mapping to only RFC, JDBC and SOAP Adapters.

---Satish

Former Member
0 Kudos

Ashish,

Its not mandatory to use JDBC .

Access to DB can be achieved from java code using SystemAccessor class

Please go through this link for ur java code

https://www.sdn.sap.com/irj/sdn/javadocs

Regards

Kavitha

agasthuri_doss
Active Contributor
0 Kudos

Dear Ashish,

To my knowledge thru JDBC adapter it is possible,

Regards

Agasthuri Doss