on 2011 Nov 29 1:38 PM
Hello, I would like to switch-off "Activate Accessibility Feature" property for all Our SAP Portal 7.00 users. I know it's possible to do it individually in User Management application, but mass update would be better. Best way is to know specific field in table.
Thanks.
Hi,
Good news for you is yes there is a table UME_STRINGS which holds this information.
Bad news is I found that unless the accessibility level has been changed atleast once you won't find an entry in the table. And as this is the master UME table I won't suggest creating a new row on your own, the effects can be catastrophic.
However you can use the below code to display the accessibility level (Note the above statement, you will only get those users for which the accessibility has been changed and saved atleast once).
Create an abstract portal component component and copy and paste the below code in doContent method to test.
public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
{
DataSource dataSource= null;
ResultSet resultSet= null;
String sqlStatement =null;
ResultSetMetaData rsmd =null;
String nativesqlStatement=null;
try
{
//sqlStatement = "select MAX(TIMESTAMPHOUR),LOGONID from WCR_USERSTAT GROUP BY LOGONID";
sqlStatement ="SELECT PID, ATTR, VAL From UME_STRINGS WHERE ATTR = 'accessibilitylevel'";
InitialContext initialContext= new InitialContext();
dataSource= (DataSource) initialContext.lookup("jdbc/SAP/EP_PCD");
java.sql.Connection connection= dataSource.getConnection();
java.sql.Statement statement= connection.createStatement();
Statement stmt=NativeSQLAccess.createNativeStatement(connection);
resultSet= statement.executeQuery(sqlStatement);
rsmd=resultSet.getMetaData();
if(resultSet!=null)
{
int m = 0;
response.write("<html>");
response.write("<body>");
response.write("<br>");
response.write("<TABLE width='100%' border='2' cellspacing='2'>");
response.write("<tr>");
response.write("<td>"+"PID" +"</td>" );
response.write("<td>"+"ATTR"+"</td>" );
response.write("<td>"+"VAL"+"</td>" );
response.write("</tr>");
while (resultSet.next()) {
m++;
response.write("<tr>");
response.write("<td>"+resultSet.getString(1)+"</td>" );
response.write("<td>"+resultSet.getString(2)+ "</td>");
response.write("<td>"+resultSet.getString(3)+ "</td>");
response.write("</tr>");
}
response.write("</table>");
response.write("<br>");
response.write("Record count is " + m);
}
}
catch (Exception e)
{
response.write("<br>Exception : " + e);
}
response.write("</body>");
response.write("</html>");
}
Thanks
Prashant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
68 | |
10 | |
8 | |
7 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.