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,
Raj

catch(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

Similar Messages

  • 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.

  • How to link a Portal User ID in the Html code

    Hi,
    I have requirement where in I need to create a HTML page with a Input Parameter as Portal user ID.
    This HTML Page is included in a webpage created by Web Page Composer.
    Please guide me how i can catch Portal UserID PArameter in this HTML code ?
    OR
    Can I use EPCM Portal Eventing for the same ?
    Awaiting Reply !
    Thanks,
    Smita Thorat
    Edited by: smita thorat on Feb 8, 2010 5:09 PM

    Hi!
    The way you suggest should not be used.
    A CS user will be created as a normal OID user and will receive the CS attributes in a different subtree later during the provisioning.
    For creating CS users use oesuser and uniuser. Files provisioning will work in a different manner anyway.
    cu
    Andreas

  • 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,
    Sai

    Hi 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

  • How to know the number of times end users search on iStore

    How can we know the number of times end users search on iStore

    I am not sure how can you do that with Oracle but I am doing that with Google Analytics (Site Search Settings).
    Thanks
    Shazi
    Edited by: 903823 on Nov 30, 2012 7:59 AM
    Edited by: 903823 on Nov 30, 2012 7:59 AM

  • How to publish - Circular / News - all oracle portal users

    Dear friend,
    I am new to Oracle Portal,
    want to design two pages
    one contains about news about our organization or any new updates everyday or week those will be updated here
    another one page contains about circular for all our portal users
    anyone help with details, will be appreciated
    Thanks in advance
    Regs...
    selvan
    [email protected]

    Can you do with wikis? http://docs.oracle.com/cd/E21764_01/webcenter.1111/e10149/content_wikis.htm#WCSUG7207
    If not, take a look also here: http://www.oracle.com/technetwork/middleware/ias/index-089317.html or at discussion in this thread: Re: Metadata through user input from portal application while new check In

  • How to find Invoice number linked to FI accounting document number ??

    Hello All,
    I have been looking around for all possible combinations to find the link between FI accounting document number (BSEG-BELNR) and Intercompany Invoice number (for which billing corr. to STOs' or POs' is done).
    The requirement is that during ERS posting, we have accounting document numbers (BSEG-BELNR) and associated STOs' for this (BSEG-EBELN), but we are unable to map the Intercompany Billing Invoice number(s) (where the billing corr. to STOs' obtained from BSEG-EBELN) to this accounting document number (BSEG-BELNR).
    Any pointers or detailed view solution would be of great help.
    Thanks,
    Ansh

    Hello DPM,
    Thank you for the descriptive help. But my requirement is to look for Intercomapny Billing number (VBRK-VBELN) linked to an accounting document number (BSEG-BELNR) and not Invoice Receipt Number.
    The steps that I am following are:
    From BSEG, found EBELN (Stock Transfer Order) and XREF3 (Reference Key, combination of fiscal yr., some ref. number, maybe GR no. and ref item no.), based on BELNR (Accounting document number).
    From EKBE, found XBLNR (Reference Delivery Number or Direct Intercompany Billing Number on which GR is done) based on
    EKBE - EBELN = BSEG - EBELN
    EKBE - BELNR = BSEG - XREF3 (only ref and item no., considering it to be a GR no.)
    EKBE - VGABE = '1' and EKBE - BEWTP = 'E'.
    From VBRP, found VBELN (Intercompany Billing No., which is a desired number) based on
    VBRP - AUBEL = EKBE -EBELN (Stock Transfer Order)
    VBRP - VGBEL = EKBE - XBLNR (Delivery number)
    Here, I am not sure about 2 things:
    Whether the reference no in BSEG-XREF3 will always be Goods Receipt number for Stock Transfer Order or not. If not, then what it can be and how I will have to proceed further then.
    Secondly, If in case for an accounting document number, I have 2 Stock Transfer orders (BSEG - EBELN) and same reference number (BSEG-XREF3), then from History table (EKBE) I get only single delivery based on which GR was doen for both STOs', then I shall be getting single Intercompany Billing Invoice from VBRP or different ?
    Kindly provide your inputs.
    Thanks,
    Ansh

  • HOW TO DISPLAY BW REPORTS(LINKS) IN PORTAL??

    Hi All,
    I am haveing Links of BW Report i have to display those reports in portal
    How can i achive this except URL IVIEW??
    I want to know that is theare any inbuilt template of Iview or any othere method to display thease reports in portal??
    Any help will be highly appretiated.
    Thanks in Advance.
    Vinit Soni

    Hi Vinit,
    After looking into ur BW url , i think u r not using webtemplates.
    u can follow below steps
    Creating an BEx Web Application iView :
    1.Right-click on the iViews folder, and choose New &#8594; iView. The iView Wizard displays.
    2.Select iView template – create an iView from an existing iView template radio button.
    3.Choose Next.
    4.In the iView Wizard, select BEx Web Application iView radio button.
    5.Choose Next.
    6.Enter a name, iView ID and iView ID Prefix.
    7.Choose Next.
    8.Choose SAP BW2.x/3.x radio button from Version.  
    9.Choose Next.
    10.Select the SAP BW system alias SAP_BW and in the BEx Web Application Query String, copy the query id from the URL of your desired query from the string text &INFOCUBE onwards (for example, &CMD=LDOC&INFOCUBE=0MKTG_C01&QUERY=ZMKTG_C01_Q7001).
    11.Choose Next.
    And also maku sure u have configured WAS settings in system object u have created
    Hope this helps u
    Regards
    Krishna.

  • How To Change Default Expiration Date for Portal User in Linux and Windows?

    Hello,
    I have a couple of environments I recently installed:
    1. Oracle Application Server 10 Release 2 (10.1.2) SEOne on Windows
    2. Oracle Application Server 10g Release 2 (10.1.2) Enterprise Edition on Linux
    I heard the portal and orcladmin user passwords will expire in about 60 days. I want to prevent this from happening. How can I set the expiration date to never expire for both these users? Or at least give me some warning?
    I heard that you can do this through the Oracle Directory Manager. However, I am unsure as which server to enter on the field. I've used the following:
    <servername>.hostname.com/389
    <DBname>.hostname.com/389
    They say 389 is the default port. Since I did not really
    Does anyone have any ideas?

    You have the answer in yours hands:
    Search for "60 days" in the forum
    How can I enfore Password Expiry Without Lockout?
    for instance.
    For the servername, it's the name of your server and the port is depending of your platform (have a look to $ORACLE_HOME_INFRA/install/portlist.ini) and
    chech the value for: Oracle Internet Directory port
    Patrick.

  • How can I create a link that allows users to convert a Wiki pages into PDF format.

    I am working on an enterprise Wiki library site collection, but I want to create a link named “Convert to PDF” , which allow users to convert the current Wiki into a pdf file. I need this link to be displayed some where in all the exsiting Wikis pages, and
    on any new wiki page. Can anyone advice if there is already such as capability within sharePoint 2013.
    Thanks

    Hi,
    For your requirement, we can add this link to the master page, then it will appear in the pages which apply this master page.
    To convert the current page to PDF, you can take consideration of using jsPDF.
    The links below with demos for your reference:
    http://parall.ax/products/jspdf
    Best regards
    Patrick Liang
    TechNet Community Support

  • How to identify the number of unique active users/connections on PIX/ASA

    Hi,
    Is it at all possible with SNMP or other tools to identify the unique number of connections on PIX or ASA. I’m not referring to the number of session or the results of “show conn count” but rather something similar to what “show local host” command will provide.
    Thanks in advance

    Hi,
    If  you are looking for SNMP OIDs to get 'show local-host' output from ASA, please try the following OIDs and check if you are getting the relevant outputs :
    1.3.6.1.4.1.9.9.147.1.1.1.2.1.5.        cfwBasicConnectionEventType
    1.3.6.1.4.1.9.9.147.1.2.2.2.1.3.        cfwConnectionStatDescription
    1.3.6.1.4.1.9.9.147.1.2.2.2.1.4.        cfwConnectionStatCount
    1.3.6.1.4.1.9.9.147.1.2.2.2.1.5.        cfwConnectionStatValue
    Thanks

  • How to find number of Real Applications users available in SAP R/3 system.?

    Hello Experts,
    How to check the Number of Real application users available in R/3 system (except system , communication users and Admin users)
    Is there any TCODE to check this..
    Please let me know how to do.
    Regards,
    Ravi Maddela

    Hello ,
    Thnx for the Immediate response
    But Al08 or Sm04 will show only active users
    I want all Real application users available in the R/3 system.
    When I check few users may not login.
    I want all the users available even though they were not logged in
    Regards,
    Ravi Maddela

  • How to catch java.io.FileNotFoundException when user enters a.jsp which is not a vali

    How to catch java.io.FileNotFoundException when a user enters a bogus jsp page. For example. I have a page called login.jsp. If a user enters log.jsp, the entire path is show and i get java.io.FileNotFoundException. This should not happen. This only happened since I upgraded to 9iAS. I tried send_error=true in zone.properties like i did when i was just using oracle http that came with database and it doesnt work. How are all you guys catching this?? I cant find any documentation. They say send_error=true will work, but IT DOESNT.
    Thanks for your time

    Hi Adam,
    I am also facing the same problem of the java.io.FIleNotFOundException in the browser display when i am giving a wrong file path in the Url. you have mentioned that you have solved it when you were using Orcale 8i Http Server, can you please guide me for that( as we are also using Oracle 8i) I checked with putting send_error=true in zone.properties file but that is not working. What exctly you have done to get rid of that error message. I am using Windows Nt platform.
    Thanks and Regards.
    Arnab

  • Quick link for anonymous user

    People,
    Can somebody tell me how to use a quick link for anonymous user
    I'm able to access this
    http://<server>:<port>/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.caritor.Student!2fcom.caritor.iviews!2fKMNavigationview
    but http://<server>:<port>/irj/servlet/prt/portal/prtroot/<quicklink> is not working.
    Krishna Murthy

    HI Michael,
    I have one more qn for you.
    Normally, when an iView set to anonymous users is opened(with the full pcd path), it opens up in a page directly without the role being displayed. (Like wat happens in the preview of an iView)
    But when the quick link is used, it drills down the role and shows the iView. Is there any way to avoid the role being shown in this case?
    Regards,
    Krishna Murthy

  • How can I grant Application access to a user via API ) programattically

    how do I grant access to a portal user from API
    I want to grant access to a user from an API, ie I need a
    command to grant "SCOTT" access to "EXAMPLE_APP" APPLICATION as
    an end user?

    Hi,
    I am assuming that you have already updated the EUL in the Administrator Edition, correct? If not, open Discoverer Administrator and login to the database you want to connect to. You must use your EUL user name which I assume has already been created and assigned the correct privileges in the database. You will be asked to update your EUL. Follow the prompts.
    Once logged into the EUL, go to Tools \ Privileges and find the user that you want to give administrator access to.
    Hopefully, this answers your question.
    Regards,
    Nancy

Maybe you are looking for

  • ITunes asks me to register my new iPad every time I open it

    I just bought a new iPad a few weeks a go and registered it on my mac the very day. But ever since iTunes keeps asking me to register my new iPad. I checked, My Support Profile, and Apple has the New iPad's serial number registered with my account. A

  • How to update Prodcution order qty using /AFS/BAPI_GOODSMVT_CREATE

    Hi Friends, I need your help desperately, I am using the BAPI, '/AFS/BAPI_GOODSMVT_CREATE' its working fine but it gets updated only Inv management / warehouse management perfectly, but my requirement is this return qty to be adjusted against the pro

  • How can I change a brush stroke after it is drawn?

    I cannot make good pen lines with a thick stroke. It gets all out of wack. Is it possible to make my lines and change them afterwards?

  • Installing JAVA JDK

    Hi this is my first time to install java jdk 1.6.0.. I have a question, what is the effect if I already installed the JAVA JDK without installing the recommended patches for this software?

  • Help with icon on n85 screen

    Hi all. Looking for help with an icon that appears at near the top left corner of my n85 screen (I'm new to S60's).  It appears when I'm either in a call using the keypad to dial a number.  Sometimes it's a small arrow/triangle in an orange/red backg