Request: Function Module - Get PERNR from UserID

Hi,
Is a simple Function Module available for getting the PERNR from a UserID?
For example, I'll send the FM the UserID and will get back the relevant PERNR.
Please Help.
Thanks,
John

Hi John,
FM is one way but
Simple code to Find personnel number for UNAME
  SELECT SINGLE pernr INTO t_pernr
    FROM pa0105
    WHERE subty = '0001' AND
          endda >= sy-datum AND
          begda <= sy-datum AND
          usrid = p_uname.
Best Regards,
Aslam

Similar Messages

  • Function module get tables from view

    Hello,
    I am looking for a function module or something alike where I can find the tables used in a specific view.
    I know how to get the data from the view, but I only want the table names.
    Can anyone help?

    Hi,
    Please try with the Function Module "VIEW_GET_TABLES" by passing the name of the View to the Importing Paramater "VIEWNAME" and tables parameter "VIEW_TABLES" will list the tables used in the VIEW.
    Regards,
    Srinivas

  • How to get PERNR from employee search(teamviewer) iView in to a WD-4-ABAP.

    Hello All,
    I had developed a new Web Dynpro for ABAP (WD4A) component for updating a custom Infotype. This application is meant for the manager to maintain some specific data through portal for his employees in the team.
    WD4A application is built based on the employee number it receives from the portal.
         How could I get PERNR from employee search(teamviewer) iView in to my WD4A component?
    In portal I had developed a test page by copying the standard page from MSS com.sap.pct.erp.mss.general_information, and added my WD4A application through an iView into this page.
    Then I hided all the other iVews in the page except (1) employee search and (2)my WD4A iVew. On the preview everything appears fine.
    During the preview of this page it triggers the WDDOINIT of WD4A component main view and then the WDDOMODIFYVIEW. When I select an employee from the employee search, then it triggers only WDDOMODIFYVIEW in the WD4A application and not the WDDOINIT anymore.
    In my  WDDOMODIFYVIEW I had inserted the following code:
      DATA lo_api_component TYPE REF TO if_wd_component.
      DATA lo_portal_manager TYPE REF TO if_wd_portal_integration.
      lo_api_component = wd_comp_controller->wd_get_api( ).
      lo_portal_manager = lo_api_component->get_portal_manager( ).
      DATA lo_api_controller TYPE REF TO if_wd_view_controller.
      lo_api_controller ?= wd_this->wd_get_api( ).
      CALL METHOD lo_portal_manager->subscribe_event
        EXPORTING
          portal_event_namespace = 'urn:com.sap.mss.employeesearch'
          portal_event_name      = 'selection_changed'
          view                   = lo_api_controller
          action                 = 'GET_SELECTED_PERNR'.
    And in the action: 'GET_SELECTED_PERNR'
    METHOD onactionget_selected_pernr .
      DATA lv_str_pernr TYPE string.
      DATA lv_strlen TYPE i.
      DATA lv_pernr TYPE pernr_d.
      DATA lv_offset TYPE i.
      wdevent->get_string(
      EXPORTING
      name = 'PORTAL_EVENT_PARAMETER'
      RECEIVING
      value = lv_str_pernr ).
      lv_strlen = STRLEN( lv_str_pernr ).
      lv_offset = lv_strlen - 8.
      lv_pernr = lv_str_pernr+lv_offset(8).
    ENDMETHOD.
    This is not functioning form me. The action is not getting trigged with the code in WDDOMODIFYVIEW.
    I had gone through several threads in u2018SDN say:
         Pass pernr to WebDynro
         MSS - General Information - Related Activities Links persnr.
         SAP Note: 1112733.
    Most of the threads are answered but incomplete. In some threads people shared document personally which had been helpful.
    I am stuck with this scenario of handling the employee number from employee search iView. Helpful suggestions will be rewarded for sure.
    Thanks in advance.

    Do i understand you correctly that you are not getting the portal event ?
    This can be several reasons ?
    Both portal system and WDA server has to be in same domain and same proptocol to communicate with Portal event.
    Please check in that direction and search posts on this topic.

  • Standard function modules for selection from vbak/vbup/ekko/ekpo

    hi experts ,
    do you know if there is an existing standard function modules for selection from vbak/vbup/ekko/ekpo.
    please help

    Hi,
    for VBAK
    ADSPCM_READ_VBAK               Read VBAK (with SPEC2KM-data)
    PRS_GET_GLOBAL_VBAK            Get global structure VBAK
    Regards,
    Jyothi CH.
    Edited by: Jyothi Chinnabathuni on Feb 23, 2009 2:46 PM

  • Standard leave request function module

    standar leave request function module (example import parameters strat date end date and leave type ) if i execute this bapi i want my subordinate name and leave applied is successful)

    I got this from my collegue who is an ABAP consultant. Hope it helps.
    ABSE                                             Object Type "Absence"
    BAPI_ABSENCE_APPROVE           Unlock absence
    BAPI_ABSENCE_CHANGE            Change absence
    BAPI_ABSENCE_CREATE            Create absence
    BAPI_ABSENCE_DELETE            Delete absence
    BAPI_ABSENCE_GETDETAIL         Read absence
    BAPI_ABSENCE_GETDETAILEDLIST   Read instances with data
    BAPI_ABSENCE_GETLIST           Read instances
    BAPI_ABSENCE_REQUEST           Create locked absence
    BAPI_ABSENCE_SIMULATECREATION  Simulation: Create absence

  • Is there any function module getting the cpu type?

    Is there any function module getting the cpu type?

    I guess the database server...
    I would like to get the SAP system cpu type as done in transaction st06 under system information.
    Thanks.

  • How to get pernr from Recruitment module(PB000),

    Hi All,
    I want to read the pernr from the applicant data PBnnnn, There is one GET PERNR,
    for PAnnnn, which reads pernrs from Employee data. Is there any similar way for
    applicant data also?

    Do i understand you correctly that you are not getting the portal event ?
    This can be several reasons ?
    Both portal system and WDA server has to be in same domain and same proptocol to communicate with Portal event.
    Please check in that direction and search posts on this topic.

  • Transports/requests function module

    Hi experts,
    I have searched for some standard function module which returns transports details (E070,E071) with no result.
    Also FM should be remote-enabled and what is important - there must be some filtering criteria like E070-AS4USER (Owner of a request or task) ...
    Any idea ?
    Best regards, Daniel.

    Daniel,
    My requirement is to read transport list (filtered by uname like in SE01) to JCo Java application (remote-functions) and make this application universal, system specific independent... (only standard FM) - sorry I should told this earlier.
    Well, like others have mentioned, you just need to create a Z function module(FM) and mark it as Remote Enabled, you could have the interface of this Z FM to be the same as that of TRINT_SELECT_REQUESTS or you can changeit for example you can take off IMPORT parameter "VIA Selection" etc and set Default values.
    Once you make this an RFC it becomes available to all external systems which can invoke an RFC, also you can take it a step ahead and expose this custom RFC as a Web Service too.
    Note sure if i understand what you meant by
    system specific independent... (only standard FM)
    The Z RFC will be independent, and will be specific to the target system on which you run this RFC.
    Ok, but when I start this application on other SAP server it won't work.
    Do you mean when you invoke the TRINT_SELECT_REQUESTS from JCo, you need to keep in mind that you cannot invoke TRINT_SELECT_REQUESTS directly from Jco, you need to wrap it within an RFC.
    Now, If you meant you are not able to invoke the Z RFC from JCo, update the post on what is the message you get?
    Regards,
    Chen

  • Function module throwing error from work area. Cannot find the problem...

    REPORT  ZPSMARTFORM1.
    tables: zptable1.
    types: begin of ty_zptable1,
          f1 type zf1,
          f2 type zf2,
          f3 type zf3,
    end of ty_zptable1.
    data: itab type table of ty_zptable1 with header line.
    data: wa type ty_zptable1.
    select f1 f2 f3 from zptable1 into table itab.
    CALL FUNCTION '/1BCDWB/SF00000005'
    EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
      CONTROL_PARAMETERS         =
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
      OUTPUT_OPTIONS             =
      USER_SETTINGS              = 'X'
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
      JOB_OUTPUT_INFO            =
      JOB_OUTPUT_OPTIONS         =
      TABLES
        ITAB                       =   .
    EXCEPTIONS
      FORMATTING_ERROR           = 1
      INTERNAL_ERROR             = 2
      SEND_ERROR                 = 3
      USER_CANCELED              = 4
      OTHERS                     = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    this is my driver program.In my form interface  there are tables,import,export are there where i have to declare tables data.If i am putting wa means it is throwing error.Please show me the clear information.
    Edited by: Julius Bussche on Nov 14, 2008 10:09 AM

    REPORT ZPSMARTFORM1.
    tables: zptable1.
    types: begin of ty_zptable1,
    f1 type zf1,
    f2 type zf2,
    f3 type zf3,
    end of ty_zptable1.
    data: itab type table of ty_zptable1 with header line.
    data: wa type ty_zptable1.
    select f1 f2 f3 from zptable1 into table itab.
    CALL FUNCTION '/1BCDWB/SF00000005'
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS =
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS =
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    JOB_OUTPUT_OPTIONS =
    TABLES
    ITAB = .
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Plz for this driver program. Give me the exact solution.I am passing the information like itab  like zptable1 ther ein the smart form table. Even now i am getting error.Here in this driver program i passed itab = itab means .I  am not getting solution.If i have to change any function module name means plz tell me.What i have to put there.Plz give me the correct solution

  • Get PERNR from PCPO transaction

    Hi Experts,
    I have,
    1. RunId
    2. G/L account number
    3. Order number
    4. Business area
    Is there any function module which will give me the PERNR output based on above mentioned input?
    Regards,
    Rajneesh

    Hi,
    Once you run the payroll posting you will get the posting number. Go to Document overview there If you double click on that you can see all employees by PERNR wise.

  • Does Update function module gets executed after Commit Work?

    Hi Gurus,
    I have a BAPI with a Commit work. Does update function module V1 , V2 - i need mainly about the sequence of V2, gets executed after Commit work or before Commit work.
    Thanks

    Pl refer to SAP help on the same as follows.
    https://help.sap.com/saphelp_nw04/helpdata/en/e5/de86e135cd11d3acb00000e83539c3/content.htm
    Regards,
    Naveen Vishal

  • What is function module get previous date by enteing no of days

    FM should take : 7 days
    and should return : 4.12.2007
    as output.
    Thanx,
    Naveen

    Hi,
    Apart from function module, you can write as follows.
    data : date1 type datum,
           date2 type datum.
    date1 = sy-datum.
    date2 = date1 - 7 .
    write date2.

  • Function Module Get Conf by PO number

    Dear Expert,
    I would like to get Confirmation number by PO Number. Please let me know what the Function module should I use in SRM
    example : I have a PO number, I want to know the confirmations number related for these PO number
    Many Thanks

    Hello,
    please find the code below:
    DATA : lv_po                  TYPE CRMD_ORDERADM_H-OBJECT_ID,
                  lv_conf               TYPE CRMD_ORDERADM_H-OBJECT_ID,
                  lt_pdlist               TYPE TABLE OF BBP_PDS_PDLIST,
                  ls_pdlist              TYPE BBP_PDS_PDLIST,
                  lt_messages       TYPE TABLE OF BBP_PDS_MESSAGES,
    lv_po  = po num ber
    *Get the confirmation number for given po number
      CALL FUNCTION 'BBP_PD_CONF_GETLIST'
        EXPORTING
          I_FOR_PO_ID = lv_po
        TABLES
          E_PDLIST    = lt_pdlist
          E_MESSAGES  = lt_messages.
    LOOP AT lt_pdlist into ls_pdlist WHERE OBJECT_TYPE = 'BUS2203'.
                lv_conf = ls_pdlist-object_id 
    ENDLOOP.
    Regards,
    Neelima

  • HR-stopping Get Pernr from triggering

    hi,
    My selection-screen is combination of PNP + other Fields
    i am using GET PERNR to retrive values..
    my Problem is that When no values is given in PNP fields , i want to Skip
    GET PERNR statement.but i am unable to do it..
    Kindly give some solution.

    hi,
    check the fields whether they are initial or not.
    if the PNP fields are initial then dont process the GET PERNR.
    Dummy code.
    If not PNP-fields initial.
    GET PERNR.
    Endif.
    <b>Reward points if useful</b>
    chandra

  • Get PERNR from UNAME

    Hello Experts,
    I am currently writing a program to list all users of a role and their current position. I need to find a way to get PERNR given a username to eventually obtain the position number. Any help would be appreciated.
    Thanks,
    Nicole

    Hi Nicole,
    This depends on the how user ID are maintained in your system.
    You may get the perner using Infotype 0105. There you have field USRID which is the user ID. Using this you can get the PERNR and once you got the PERNR you can get all the details Using different Infotypes.
    Regards,
    Atish

Maybe you are looking for

  • Calling external C-functions in DLLs with struct as parameters

    Hi all PL/SQL Gurus ! Is it possible to call external functions in a DLL written in C wich has pointers to C-structs as parameter. Can you point me to an example or extended documentation about this. I had a look at the Oracle doc's but found no exam

  • Call list question

    Hi, I have "exported" a call list to interaction center web client. I have opened it and picked the first BP from the list, but when I "finish" the call the BP is not removed from the list. I have also set the staus for the interaction center record

  • Support for 32-bit

    I have a number of 32-bit files produced by the Merge to HDR routine in PS CS2 and CS3. I store the 32-bit files as the key creative stage in HDR processing is in the reduction to 16-bit (Image> Mode> 16 bpc in PS) and so it's handy to keep the 32-bi

  • Help: error 1074395247 invalid template descriptor.

    Hello, I am trying to implement a programming that use webcam to catch video by function Vision Acquisition, and track a small object (shown on picture below) by Vision Assisstant and finally save it to AVI. The first time I run the programming, it w

  • How to open apps downloaded from other websites on Macbook Pro?

    I downloaded some apps but I was not able to open them because there was an alert telling me that it was from an unverified author, anyway, something like that? How to solve it? Does it mean I can only download apps from Apple Store only?