cancel
Showing results for 
Search instead for 
Did you mean: 

KMC table lookup?

Former Member
0 Kudos

Hi,

as part of our substitution integrated custom functionality, I'd need to see which substitutes a user has set up in his/her UWL ('Manage substitutions' web dynpro app). SAP pointed me to the portal table KMC_WF_SUBSTITUTE, but I don't yet know how to access it.

Can any of you show me the right way? I'm looking for an API function or a way to directly access the table and to wrap this fetch in a web service to be called from a backend R/3 system. We're on ECC5.0 basis SP13 and EP6.0 SP15 so the official UWL API is not yet available.

Best regards,

Mikko

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Oh i forgot the first part..

It is best if you use this table form a java app, with or without the uwl api.

You can create an ejb with your desired handling methods, expose them as a web service and call them from your backend.

I've just showed you the way to do what we at SAP recommend not doing, but sometimes it just <b>must</b> be done if the API is not friendly or as your case, not yet available.

Former Member
0 Kudos

Thanks Homer,

this verifies the approach we're taking. We're however lacking in the skills required to do the job so most likely we'll be in touch with SAP remote consulting with this.

Thanks & best regards,

Mikko

Former Member
0 Kudos

If you have an ejb project you can create a DBPool to your database, if not, use the standard SAP<SISID>DB Connection pool.

<i>To get the pool use this code</i>

Context env;
try {
javax.naming.Context env = (Context) new InitialContext().lookup("java:comp/env");
//env = (Context) new InitialContext();
javax.sql.DataSource pool = (DataSource) env.lookup("jdbc/SAPJ2EDB");
java.sql.Connection conn = pool.getConnection();

//to execute queries, updates, ect
//(conn.createStatement()).executeQuery(query)

	
} catch (javax.naming.NamingException e) {	
//your exception handling stuff
}

Hope it helps.

<b>Points would be greatly appreciated</b>

Best regards,

Homer Vargas

SAP EP Development Consultant

SAP Web AS Development Consultant

SAP Andina y del Caribe