cancel
Showing results for 
Search instead for 
Did you mean: 

to access the data displayed in Activity Report directly from the source.

Former Member
0 Kudos
49

hi Expert,

We need to access the data displayed in Activity Report directly from the source where it is stored (or comming from).

We are aware or the Portal Activity Iview but actually it doesnt serve our pourpose.

Is there any way to get this done.

Regards,

Sanjyoti.

View Entire Topic
former_member182374
Active Contributor
0 Kudos

Hi,

See this link: http://help.sap.com/saphelp_nw2004s/helpdata/en/48/6aa9429b930b31e10000000a1550b0/content.htm

You access the tables directly and use plain JDBC to query it.

Regards,

Omri

Former Member
0 Kudos

Hi Omri,

As i am new to this would you please guide me what has to be done/used to access the tables directly (eg:- WD application or EP application). Please guide me further i think it will help me solve my problem.

Your reply was very helpful and i have awarded points for the same.

Regards,

Sanjyoti.

former_member182374
Active Contributor
0 Kudos

Hi,

Try this:

In the visual administrater (go.bat in the server):

Unser services --> JDBC connector. Look in it's properties for sysDS.aliases

for this example I used BC_JMS (could be any other valid alias)

Connection con = null;
String DB_alias = "BC_JMS"; 

try {
	InitialContext ctx = new InitialContext();
	DataSource ds=(DataSource)ctx.lookup("jdbc/"+DB_alias);
	con = ds.getConnection();
}
catch (Exception ex){
	wdComponentAPI.getMessageManager().reportException(ex.getLocalizedMessage(),true);
}

ResultSet rs = null;
try{
	if (con != null){
		// Execute the SQL statement	
		java.sql.Statement stmt = con.createStatement();
	
		String sql_string = "SELECT * FROM WCR_USERFIRSTLOGON";	
		rs = stmt.executeQuery(sql_string);
	
		// iterate result set...
			
	}	
} catch (Exception ex){
	wdComponentAPI.getMessageManager().reportException(ex.getLocalizedMessage(),true);			
}

Regards,

Omri

Former Member
0 Kudos

hi Omri,

As i am new to this, Would you please guide me where to write this code.

Regards,

Sanjyoti.

former_member182374
Active Contributor
0 Kudos

Hi,

If you are new to Web Dynpro you can simply put the code in the wdDoInit method.

If you are new to JDBC (which is nothing to do with SAP) then go to the source:

http://72.5.124.55/docs/books/tutorial/jdbc/index.html

Regards,

Omri

Former Member
0 Kudos

hi Omri,

You have almost solved my thank you.

here are your points.

Regards,

sanjyoti.