cancel
Showing results for 
Search instead for 
Did you mean: 

How to deal with two tables in the Data Base

Former Member
0 Kudos

Hi Experts,

IF WE WANT TO GET THE DATA FROM THE TWO TABLES, WHAT QUERY SQL STATEMNET SHOULD HAVE TO WRITE AND ANY CONFIGURATION CHANGES NEED TO BE DONE AND WHAT SETTINGS NEED TO BE DONE IN THE ESR .

PLEASE EXPLAIN ME ON THIS .

THANKS IN ADVANCE.

RAM

Accepted Solutions (0)

Answers (5)

Answers (5)

prateek
Active Contributor
0 Kudos

Don't post question in UPPERCASE. I hope you don't mean to shout.

Read Rules of Engagement. Thread locked.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

If you are using the same database and referencing two tables then you dont need special configuration for it. You use single jdbc adapter. In ESR you create two statment structure one for each table. This is one option. The second option is use join statment and write query and in this case one statment data structure.

Please go through the help sap link for the jdbc document structure.

http://help.sap.com/SAPHELP_NW04s/helpdata/EN/2e/96fd3f2d14e869e10000000a155106/content.htm

The second option can be done using the below structure.

<StatementName>
<anyName action=u201D SQL_QUERYu201D >
<access>SQL-String with optional placeholder(s)</access>
<key>
  <placeholder1>value1</placeholder1>
  <placeholder2>value2<placeholder2>
</key>
 </anyName >  
 </StatementName>

Former Member
0 Kudos

i suggest that u go for SP ...let SP handle the data extraction logic (if ur logic is complex)..

but in case if u have to write query then chk this:

http://forums.sdn.sap.com/thread.jspa?threadID=1643139

Former Member
0 Kudos

Did you tried using Join Statement

Former Member
0 Kudos

PLEASE EXPLAIN ME WITH ONE EXAMPLE .

THANKS IN ADVANCE.

RAM.