Count total number of existing Portal users..Urgent
Hello All,
im working on EP6 SP9 (and SP12).
I would appreciate if anyone would please guide me - How can I retrieve total number of existing Portal users (<b>using code</b> & not Activity Reporting).
This is kinda urgent....please I request you all.
Thanks in Advance.
Warm Regards,
Ritu R HUnjan
Hi ritu,
Check this code. This will give you the total no of users and the names of all the users:
package com.hcl;
import com.sap.security.api.ISearchResult;
import com.sap.security.api.IUser;
import com.sap.security.api.IUserFactory;
import com.sap.security.api.IUserSearchFilter;
import com.sap.security.api.UMFactory;
import com.sapportals.portal.prt.component.AbstractPortalComponent;
import com.sapportals.portal.prt.component.IPortalComponentRequest;
import com.sapportals.portal.prt.component.IPortalComponentResponse;
public class PortalUsers extends AbstractPortalComponent
public void doContent(
IPortalComponentRequest request,
IPortalComponentResponse response)
try
IUserFactory userfactory = UMFactory.getUserFactory();
IUserSearchFilter userfltr = userfactory.getUserSearchFilter();
userfltr.setMaxSearchResultSize(5000);
ISearchResult userResult = userfactory.searchUsers(userfltr);
int size = userResult.size();
response.write("<table><tr><td bgcolor=Green>"+ "Names of the user are:"+ "</td></tr></table>n");
while (userResult.hasNext())
response.write("<table border=0>n");
String uniqueid = (String) userResult.next();
IUser user = userfactory.getUser(uniqueid);
response.write("<tr><td>"+ user.getDisplayName()+ "</td></tr>n");
response.write("</table>n");
response.write("<table border=0><tr><td bgcolor=Green>"+ " Total no of users "+ "</td></tr>n");
response.write("<tr><td bgcolor=Red>"+ size+ "</td></tr></table>n");
catch (Exception e)
I hope this solves your problem
Regards
Pravesh
PS: Please reward points if answer is helpful.
Similar Messages
-
Count total number of rows present in the schema
Count total number of rows present in the schema including table, sequence, view
Desirable Output
table Sequence Views
1000 20 1000You mean You need to count the No of Tables, View and Sequence Present in the Schema ??
Hi Some thing like this,
SELECT a.view_cnt AS "View Count", b.tab_cnt AS "Table Count",
c.seq_cnt AS "Sequence Count"
FROM (SELECT COUNT (*) view_cnt
FROM USER_VIEWS) a,
(SELECT COUNT (*) tab_cnt
FROM USER_TABLES) b,
(SELECT COUNT (*) seq_cnt
FROM USER_SEQUENCES) cWhich give you,
View Count Table Count Sequence Count
153 878 32Thanks,
Shankar
Edited by: Shankar Viji on Aug 28, 2012 3:03 AM -
How to count total number of records in mYSQL through JSP ??
hi
i want method to count total number of records in table.
it was there rs.count() method in VB .
But what about JSP , i used MYSQL database.
tell me solution please...
thanks...
remember JSP - total record count for mySQLhello mr.
i don't want ur suggestion ok
i know that site.
no need to give suggestion if u don't give code.
its better to give proper reply instead of making a
comment in forum.
next time take care
He was perfectly justified in that remark. I have given you the information you need, nicely, twice. But I, and noone else here is going to do your work for you. We will point you in the direction you need to be looking, but we are not going to give code. If you attempt to code something yourself, and it doesn't work, then post the code you tried, and we may make some corrections to it. Then again, with the attitude you've shown so far we probably will not. But one thing no one here will do, is do your work. Especially not for free.
Now, if you are not willing to sit down, and look at the suggestion that has already been made, and attempt to use it. Then continue wasting your time, but go away and stop wasting our time. -
How to Count total number of Words in PDF?
I am used Adobe Acrobat javascript inbuilt function getPageNumWords(<pagenumber>) it return the number of words present in specified page, but while am copy and paste text content from PDF file to MS Word, Words count given by MS Word is little bit differ, so any one know in which aspect Acrobat count the words?
Which words count result is correct?
Shall is go with Acrobat Words count result or MS Words count result?
But I want to count the total number of words in PDF file (my input is PDF file) else can I go with iText?
Words count in PDf using iText is possible?Word counts are likely to vary a little according to how you count. For instance, are hyphenated words one or two words? What if the hyphen is at the end of a line? Do numbers count as words? Headers and footers? Captions?
Generally, you just accept a slight variation. If you are counting words in a professional context, i.e. where payment is per word, you probably need a contractual definition of how words are to be counted; in the absence of one, I suggest you use Word. -
Issue with Total Number of SODs at user level.
Friends,
Quick question -
We are using GRC 5.3 Production on NT 20003 server. and back end systems are ECC 6.0
1.We added the Additional Role to one of the business users in ECC 6.0
2.We ran the FULL synch after adding this role in backend.
Issue : The total number of SODs did not change for users, even though the SODs for this business users did increase about 300.
Locations of Screen
Informer Tab ->> Risk Violoations.
Analysis Type -> Users
Does anyone has any idea how this numbers get interpreted?
The Total number of Violations for permission should increase, if user level SOD gets increased, as per our understanding.
PTIt should be in below sequence -
1. Full or incremental sync for user/role/profile
2. Full or incremental batch risk analysis for role/user/profile
3. Management report
The view you see is management report, which is based upon above jobs. FIrst jobs does high level sync like user/role/profile addition/deletion etc. Second job actually does risk analysis. Third one fills up the management view. If your batch risk analysis was run on Aug 30 aug 10 and management report after completion of the same, the report will show the same data till you run these jobs again even there are many changes in backend authorization.
Hope it clarifies your query.
Regards,
Sabita -
Count total number of record of table with deletion from archiving object
Does anyone know is there any SAP standard program to count the total number of record of the table with deletion from Archiving Object and display in repprt?
Not sure of the question. Are you looking to get the sql "select count(*) from table" from using the TopLink expression framework or are you getting that SQL already and want something else?
If you are looking just to get the count from a table/class, you can use a ReportQuery:
ReportQuery rquery = new ReportQuery(ClassToQueryOn.class);
rquery.addCount(); //equivalent to count(*);
session.executeQuery(rquery);
You can use a report query to return data instead of objects, and use selection criteria just like a normal read query.
Best Regards,
Chris -
How to count Total Number of Pages in SAPSCRIPT
Hi,
Iam unable to print total number of pages in the First Page of SAPSCRIPT.Iam writing the Logic in the Varibale window.
Please kindly help me.
In First Page , The preview is
Page 1 of 1-
In Second Page , Teh Preview is
Page 2 of 2
The Logic is ....
1. Variable window of Script
PERFORM CHECK_PAGE IN PROGRAM ZZZF_SAPSCRIPT_EXITS
USING &SAPSCRIPT-FORMPAGES&
CHANGING &WS_PAGE&
ENDPERFORM
Page &PAGE(C)& of &WS_PAGE&
2. Program
FORM check_page TABLES p_pagein STRUCTURE itcsy
p_pageout STRUCTURE itcsy.
DATA : p_i TYPE sypagno.
READ TABLE p_pagein INDEX 1.
IF sy-subrc = 0 .
p_i = p_pagein-value.
p_i = p_i - 1 .
READ TABLE p_pageout INDEX 1.
CLEAR p_pageout-value.
*p_pageout-value = p_i+0(3).
WRITE P_I TO p_pageout-value.
condense p_pageout-value no-gaps.
MODIFY p_pageout INDEX sy-tabix.
ENDIF.
ENDFORM. "check_page
Please help me ASAP.
Regards,
Deepthi.Try this
'On The Form'
IF &NEXTPAGE& EQ 0
DEFINE &DECRE& := '2'
PERFORM SET_TEXT_SYMBOL IN PROGRAM YSS20200
USING &SAPSCRIPT-FORMPAGES&
USING &DECRE&
ENDPERFORM
ENDIF
'In The Program'
DATA : BEGIN OF script_table OCCURS 0.
INCLUDE STRUCTURE itcsy.
DATA END OF script_table.
Used to modify total pages so they print correctly
FORM set_text_symbol TABLES input_table LIKE script_table[]
output_table LIKE script_table[].
DATA: pageno TYPE i,
intCnt type i,
chrPg(2) type c.
READ TABLE input_table INDEX 1.
MOVE input_table-VALUE TO pageno.
READ TABLE input_table INDEX 2.
MOVE input_table-VALUE TO intCnt.
subtract intcnt from pageno.
write pageno to chrpg.
CALL FUNCTION 'TEXT_SYMBOL_SETVALUE'
EXPORTING
NAME = 'FORMPAGES'
VALUE = chrpg
VALUE_LENGTH = 0
REPLACE_SYMBOLS = ' '
ENDFORM. -
String function to count total number of a specific character.
Gurus,
I've been trying to use INSTR to decipher a string to count the number of pipes in each string. Anyone have a simple SQL which shows how to use a string function to return a count of a specific character?
Thanks
-ScottHi, Scott,
To see how many '|' characters are in txt, you can see how much txt shrinks when you remove the '|'s.
LENGTH (txt) - NVL ( LENGTH ( TRANSLATE ( txt
, 'x|'
, 'x'
, 0
)The expression above works in any version of Oracle.
Starting in Oracle 11, you can also use REGEXP_COUNT:
REGEXP_COUNT (txt, '\|')'|' is a special symbol in regular expressions, so it has to be "escaped" ('\|') to indicate the pipe character. -
Total Number of Votes in User's Statistics
Could the AUR have a statistic that says how many votes for each package in total a user has?
Last edited by matthewbauer (2009-07-25 23:39:38)There are a lot of interesting algorithms for ranking. One of my favorites is h-index. Sadly, h-index is not very kind to me, since I only have three packages.
Just for fun, here's the highest ranked. Note that there are some 2465-ish people with packages on the AUR, and only 37 have an h-index of 15 or more.
sergej 73
Dragonlord 54
pressh 44
gcarrier 44
bash 43
StefanHusmann 38
Arkham 36
bardo 35
partition 33
Ghost1227 33
tdy 31
codemac 28
arch-haskell 28
wonder 27
swiergot 27
dsa 27
Allan 27
Romashka 26
stativ 25
Chris.Giles 25
donvla 23
Slash 23
Snowman 22
Shirakawasuna 20
dtw 19
daenyth 19
urandom 17
even 17
djszapi 17
abhidg 17
Cilyan 17
thotypous 16
djclue917 16
leemars 15
drschwalbenmann 15
Xyne 15
Synthead 15
On the low end:
H index, number of people
0, 144
1, 1119
2, 478
3, 238
4, 149
5, 88
6, 58
7, 40
8, 46
9, 20
10, 13
11, 10
12, 7
13, 8
14, 8 -
Hi all,
I am new to Web Dynpro Java. Can anyone help me how to check if the user is existing user?
Regards,
Nithya MHi,
Go through this code,
try {
IWDClientUser clientUser = WDClientUser.getCurrentUser();
clientUser1.getClientUserID());
clientUser1.getDescription());
clientUser1.getFirstName());
clientUser1.getLastName());
clientUser1.getSalutation());
clientUser1.getServiceName());
clientUser1.getTitle());
clientUser1.getVersion());
clientUser1.getClass());
clientUser1.getVersion());
clientUser.isAnonymouseUser());
catch (WDUMException e)
wdComponentAPI.getMessageManager().reportException( e.getMessage(), true);
e.printStackTrace();
Regards
Padma N -
How to catch PERNR number linked to Portal User
Hello All,
Just working on some webdynpro demo and examples. I have a question to you all experts. Just want to know how to capture the pernr attached to a poral user.
Ex:
I want to display home and office address in iView. For some portla user1 there is attached pernr1.
How will I be able to identify the pernr number?
Thanks,
Rajcatch(Exception e)
//wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("Exception"+e.getMessage());
//@@end
The following code section can be used for any Java code that is
not to be visible to other controllers/views or that contains constructs
currently not supported directly by Web Dynpro (such as inner classes or
member variables etc.). </p>
Note: The content of this section is in no way managed/controlled
by the Web Dynpro Designtime or the Web Dynpro Runtime.
//@@begin others
IRepository repository;
public int getPernr(String user)
int ret = 0;
double pool = Math.random();
//the repository we gonna be using
try{
// Add a connection pool for the specified system
JCO.addClientPool(
"test1"+pool, //alias for this pool
100,
//max. number of connections
"", //SAP client
"", //userid
"", //password
"EN", //language
"", //host name
"00" //system number
// Create a new repository
repository = JCO.createRepository(
"MYRepository", "test1"+pool);
catch(JCO.Exception ex) {
wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(
"Exceptionwwwwwwx"+ex.getMessage());
JCO.Client client =
null;
try{
// Get a function template from the repository
System.out.println(
"start");
//wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("ExceptWWWW");
JCO.Function function = repository.getFunctionTemplate(
"CRIF_GET_EMPLOYEE_FOR_USER").getFunction();//it is a function module u need to write that takes user_name as input and gives employeenumber as output
//wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("ExceptioWWW");
// Fill in input parameters
JCO.ParameterList input = function.getImportParameterList();
input.setValue(user,
"USER_NAME" );
//input.setValue(String.valueOf(new Date()), "BEGINDATE" );
//input.setValue(String.valueOf(new Date()), "ENDDATE" );
// Get a client from the pool
//wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("ExceptionQQ");
client = JCO.getClient(
"SB1");
//wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("Exception");
// Execute function the remote system
client.execute(function);
System.out.println(
"2");
// Print return message
ret=function.getExportParameterList().getInt(
"EMPLOYEENUMBER");
System.out.println(
"3");
System.out.println(
"RETURN MESSAGE: " + ret);
catch(Exception ex) {
System.out.println(
"Caught an exception333: " + ex);
finally{
// Always release client !!!
JCO.releaseClient(client);
//try
return ret;
//@@end
content of obsolete user coding area(s) -
//@@begin obsolete:javadoc:getPerNr()
// /** Declared method. */
//@@end
//@@begin obsolete:getPerNr()
//@@end
xxxxxxxxxxxxxxxxxxxxxxxxxx
Bala
Edited by: Armin Reichert on Jan 1, 2008 3:57 PM -
Portal Users hits count on the homepage
Hi all,
I want to put hits count (total number of visitors) on my portal homepage, just like any other website. Don't have any idea how to do it. Can anyone guide me on this. Waiting for some quick response.
Thanks in advance,
Ganpati Jhahey ganpati .
open your portal, login into it.
step1: go to tab into the top level navigation bar System administrator --> support --> portal runtime --> browse deployment (in Test and Configuration Tools admin tools) --> download com.sap.portal.masthead.bak
step 2:now rename that com.sap.portal.masthead.bak to com.sap.portal.masthead.par
step3:
now import that par file in netweaver developer studio and make the necessary changes like putting a variable to get incremented each time mast head is loaded. this way u can keep track of the number of hits.
step4: include .jar files of the downloaded par file to the
for any clarification please ping again.
reward if found useful.
thx and regards.
Anoop Gupta -
Total number of Users and Tablespaces in EBS
Hi,
I want to know how many total number of Oracle database users are there inn Oracle EBS R12, and how many number of tablespaces are there in EBS. what docx should I consult for this sort of information. Kindly send me the links of such info.
Regards,
AbbasiHi,
Please see these links/docs.
Connected users
http://forums.oracle.com/forums/search.jspa?threadID=&q=Connected+users&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
Note: 131704.1 - Database Scripts Library Index
Thanks,
Hussein -
Hi all,
I want to put hits count (total number of visitors) on my portal homepage, just like any other website. Don't have any idea how to do it. Please explain me the exact process..ASAP...
Thanks in advance,
Prashant Agrawal
Edited by: PrashantAgrawal on Jan 14, 2012 7:30 AMHi,
You can use portal activity report iview to gather this information.
Please refer the below help link for more information about portal activity report.
http://help.sap.com/saphelp_nw04/helpdata/en/58/728ea01cf64fff996b827f2a06f9b1/frameset.htm
For your specific requirement, please refer the link "Defining the Type of Report".
Here you can use third type of report called "Page/iView activity".
This Shows the number of times users requested each page/iView.
Thanks and Regards,
Sowmya K -
How to calculate the number of times an user has accesed a BEx report
Hi Experts,
We have number of reports in our BW portal and users logon to the portal and run the reports.
How do we count the number of times each user has logged in and ran each report.
Kindly advice.
Thanks,
SaiHi Sai:
I think you can use BI statistics information, which could provide you more detail information.
You can follow the document
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/90080703-4331-2a10-cd98-9c1e95acdea0
Regards,
Louis Lu
Maybe you are looking for
-
Search resources based on created date
Hi, I am unable to search the resources based on creation date. I used the code as follows. sqb = new SearchQueryListBuilder(); Timestamp ts3 = new Timestamp(d3.getTime()); String searchCreDt = "default:created(value>"ts3.toString()")"; sqb.setSelect
-
Missing ejb relation description file after deploying ejb module
when i deploye a ejb module to oc4j_extended_1013_dp4 successfully, it's can't find the file ejb-jar.xml that descript ejb relations and navigators. why? how can i defense it ?
-
Had to reset router, wired connection fine wireless not working even w/out security
hi, after that freakin blackout that made my internet stop workin, i did a complete reset to my router, and reconfigured it all over again, now i can connect to the internet if im wired to it but if im wireless i cant (tried with other laptops, xbox
-
Can't burn CD in Photoshop Elements 4.0
PE does not recognize my CD or DVD drives. I use Windows XP and both drives are working if I want to play a CD. Can you help me configure PE so that it finds my CD drive?
-
Experts, I have a scenario as below. There are 3 pages in a dashboard with each page having its prompt. Each of the 3 prompts is having SSN(edit box) as its common column. When the user clicks on this dashboard, the SSN for the first page should defa