To get  HOD for the employees(HR-ABAP)

Hi Experets,
i am new in  abap hr please suggest me  how to get hod of an employee and trying to do with bellow codes, kindly suggest me.
select single ORGEH from pa0001 into lv_orgeh where pernr = employeenumber
                                                       and ENDDA = '99991231'.
               if sy-subrc = 0.
select single sobid from HRP1001 into lv_sobid where OBJID = lv_orgeh
                                                       and rsign = 'A'
                                                       and relat = '803'
                                                       and endda = '99991231'.
   if sy-subrc = 0.
     SELECT SINGLE objid FROM HRP1001 INTO lv_objid
                   WHERE OTYPE = 'O'
                   AND   OBJID = lv_sobid
                   AND   RELAT = '12'
                   AND   RSIGN =  'B'
                   AND   ENDDA = '99991231'  .
   IF SY-SUBRC EQ 0.
     SELECT SINGLE sobid INTO lv_sobid
               FROM hrp1001
              WHERE otype EQ 'S'
                AND objid EQ lv_objid
                AND plvar EQ '01'
                AND rsign EQ 'A'
                AND relat EQ '008'
                AND istat EQ '1'
                AND endda EQ '99991231'.
             IF sy-subrc EQ 0.
               lv_pernr = lv_sobid.
    ENDIF.
   ENDIF.
   ENDIF.
   ENDIF.
   ENDIF.

FYI
see the include = RPCMFPV0 for
call function 'HR_GET_ABSENCE_QUOTA_DATA'
HRBR_REM_ABSENCE_NEW_QUOTA    
HRBR_REM_ABSENCE_NO_NEW_QUOTA 
HR_ABSENCE_VALUATION_VIA_QUOTA
HR_QUOTAS_DEDUCTED_BY_ABSENCE 
HR_QUOTA_SPLITS_FOR_ABSENCE   
HR_SPLIT_ABSENCE_BY_QUOTA     
HR_ABSENCE_QUOTA_REMOTE       
HR_INFOCOLUMN_ABSENCE_QUOTA_10
Thanks
Saquib

Similar Messages

  • Hi i want to create BAPI to get approver of the employee

    hi i want to create BAPI to get approver of the employee
    in this  BAPI if there are two approver for that employee than i need both approver personal no.
    please help me
    thanks in advanced.

    Hi
    I doubt whether there is a direct Standard BAPI for that.
    The below report will get you the employees approver org position. Even if there are two approvers are there, it will display both the approvers position.
    *& Report  ZGD_TEST_HR_ORG_STR
    REPORT  ZGD_TEST_HR_ORG_STR.
       DATA: plvar            LIKE hrsobid-plvar.
      DATA: otype            LIKE hrsobid-otype.
      DATA: sobid            LIKE hrsobid-sobid.
      DATA: date             LIKE sy-datum.
      DATA: leading_position LIKE hrobject OCCURS 1 WITH HEADER LINE.
      DATA: org_agent        LIKE swhactor.
      DATA: lv_sw_vapos      TYPE xflag,
            lv_subrc         TYPE sy-subrc.
      DATA spfli_wa TYPE spfli.
      DATA carrid_buffer TYPE spfli-carrid.
      IF plvar IS INITIAL.
        CALL FUNCTION 'RH_GET_ACTIVE_WF_PLVAR'
          IMPORTING
            act_plvar       = plvar
          EXCEPTIONS
            no_active_plvar = 1.
        IF sy-subrc > 0.
          MESSAGE e300(5w) RAISING no_active_plvar.
        ENDIF.
      ENDIF.
    IF otype IS INITIAL OR sobid IS INITIAL.
          otype = 'US'.
          sobid = sy-uname.
      ENDIF.
      CALL FUNCTION 'RH_GET_LEADING_POSITION'
        EXPORTING
          plvar              = plvar
          otype              = otype
          sobid              = sobid
          date               = sy-datum
          auth               = ' '
          consider_vac_pos   = space
        TABLES
          leading_pos        = leading_position
        EXCEPTIONS
          no_lead_pos_found  = 1
          OTHERS             = 2.
       IF sy-subrc > 0.
        MESSAGE e802(5w) WITH otype sobid
                         RAISING no_lead_pos_found.
      ELSE.
        LOOP AT leading_position.
          write :  / leading_position-otype,
                     leading_position-objid.
        ENDLOOP.
      endif.
    Hope it helps you

  • I have an apple ID for the South African iTunes store how do I get one for the US store?, I have an apple ID for the South African iTunes store how do I get one for the US store?

    I have an apple ID for the South african i Tunes store.  How do I get one for the US one?  I want to use Mind Snacks.

    You will need a valid billing address in the US and be in the US when you want to buy anything from it. You can try requesting that it be added to the South African, but ultimately it's the app's developer that will have to grant Apple a licence to sell it there : http://www.apple.com/feedback/itunes.html

  • Error while updating HRA in infotype 581 for the employees.

    Hi,
    System is showing an error while updating HRA in infotype 581 for the employees.
    The error is No Automatic updation for IT0008. Allowance Grouping not found.
    What is this error. Please advice what to do in this case.

    Hi Deepthi,
    Check Table V_T7INA5,V_T7INA1,V_T7INA3 and V_T7INA9 also.
    Check it,
    Regards,
    Vinod.
    Edited by: vinod rao on Jul 30, 2008 1:23 PM

  • How do you get apps for the 1st generation iPod touch

    How do I get apps for the 1st generation iPod touch?

    By updating the iOS on the iPOd.  The 1G can go as high as 3.1.3.  That works with a lot of apps.  But some apps require a higher iOS and/or newer iPod.
    Purchasing iOS 3.1 Software Update for iPod touch (1st generation)

  • VA00 condition type not getting determined for the returns order

    Hi All,
    I have a case where VA00 condition type not getting determined for the returns order that has been created with respect to the billing document.
    When the pricing conditions are being copied from invoice it is getting copied but later it is getting deleted in the include LV61AA42.
    Note:VA00 condition type is getting deleted from the  internal table tkomv[].
    If any one came across  this scenario can you please help me.
    Request your valuable inputs

    Hi,
    Please check the copy control setting in VTAA.
    Maintain the pricing type as "D" at item category level for the respective document type .
    Hope this will resolve your issue.
    Regards,
    Krishna O

  • HT4463 I attempted to purchase Civilizations V on my Macbook Pro, yet the application will not download.  How can I either get the download to complete or get refunded for the purchase?

    I attempted to purchase the app Civilization V for my Macbook Pro, but the app will not download.  How can I get the app to either finish the download or get refunded for the purchase?

    Yuk, what a horrible app. But if you insist...
    Mac App Store: How to resume interrupted downloads
              http://support.apple.com/kb/HT4485

  • I am getting this for the first time when i sync .iphone 3gs error message itunes could not sync calendars to the iphone because the sync server failed to sync iphone

    i am getting this for the first time when i sync .iphone 3gs error message itunes could not sync calendars to the iphone because the sync server failed to sync iphone

    I have tried the suggestion to reset the sync log to no avail. Anyone have another idea? This just started after I downloaded 4.3.5.

  • How do I determine the correct sales org for the employee?

    Hi
    The requirement here is to determine the correct sales org for the employee logged in when creating an activity (a customer visit). We know that all employees will belong to one sales org.
    On this basis, in the organisational data determination I have maintained the organisational data profile Z0001 with the Organisational Model Determination Rule: 10000162 (employees for responsible org. unit). I have left the Responsibilities Determination Rule empty. I am not sure if both have to be filled. Can anyone explain the difference between the two?
    I have checked the sales organisation and distribution channel. This is for the sales scenario.
    I simulated this rule in Maintain Determination Rules. I entered the Sales Org and no agents (employees) were found.
    The org data profile Z0001 has been assigned to the transaction.
    The Object Permitted in Determination has been checked for the sales scenario in the Organisational Model.
    Regards
    Declan

    Hi PePe
    I made the change and it worked as I wanted it. Thanks a lot.
    You say there's no need to Maintain the Responsibilities Rule. Can I ask what this section does and why it can be one or the other?
    Regards
    Declan

  • My organization is looking to invest ipads for the employees to perform everyday tasks. just wondering what would apples recommendation be for as far as apps and method of distribution would be?

    my organization is looking to invest ipads for the employees to perform everyday tasks. just wondering what would apples recommendation be for as far as apps and method of distribution would be?

    Use VPP.  Select an MDM.  Read the google doc below.
    IT Resources -- ios & OS X -- This is a fantastic web page.  I like the education site over the business site.
    View documentation, video tutorials, and web pages to help IT professionals develop and deploy education solutions.
    http://www.apple.com/education/resources/information-technology.html
       business site is:
       http://www.apple.com/lae/ipad/business/resources/
    Excellent guide. See announcment post -- https://discussions.apple.com/thread/4256735?tstart=0
    https://docs.google.com/document/d/1SMBgyzONxcx6_FswgkW9XYLpA4oCt_2y1uw9ceMZ9F4/ edit?pli=1
    good tips for initial deployment:
    https://discussions.apple.com/message/18942350#18942350
    https://discussions.apple.com/thread/3804209?tstart=0
    Educational institutions in the USA can use the App Store Volume Purchase Program (VPP) to buy Apps.
    https://support.assistiveware.com/index.php?pg=kb.page&id=54
    There are three ownership models:
        *     Personal
        *     Institution
        *     Layered. combines personal & institution.
    Watch this apple video on layered ownership.  It education based, but that's OK.
    http://www.apple.com/education/resources/videos/#ios-layered-ownership
    More ways to transfer files and access Word documents:
    https://discussions.apple.com/thread/4044866?tstart=0
    All of the "Office" document editing applications on the iPad have limitations.  Best try them out to see if they meet your needs.
    iWork by Apple
        * Keynote
        * Numbers
        * Pages
    DocsToGo
    • VIEW/EDIT/CREATE Word & Excel files(Office 2007/2008/2010)
    • VIEW PowerPoint, PDF, iWork, Text, .RTF, and more!
    • Send & receive attached supported documents using the built-in Mail app
    • FREE desktop application with your purchase! Compatible on Win & Mac allows you 2-way file sync with a WIFI connection.
    • Open & Edit files within DocsToGo from any 3rd party app that supports the “Open In” feature
    • Supports iTunes File Sharing via USB cable for manually moving files
    https://itunes.apple.com/us/app/documents-to-go-office-suite/id317117961?mt=8
    Office² HD
    "Office² HD, the most intuitive and straightforward office document editor available on the iPad, makes it easy to open, view, create and edit Word (DOC & DOCX), Excel (XLS & XLSX), and PowerPoint (PPT & PPTX) files right from your iPad!"
    https://itunes.apple.com/us/app/office2-hd/id364361728?mt=8
    Quickoffice Pro HD
    Create and edit ALL Microsoft® Office -- document, spreadsheet, and presentation formats, as well as view PDF files, on the go. Our advanced file manager lets you manage local files, access Google Drive or other cloud accounts, and works with your iPad email attachments so you can work anywhere, anytime - online and offline.
    https://itunes.apple.com/us/app/quickoffice-pro-hd-edit-office/id376212724?mt=8
    nsdjoey presents ways to edit office documents in this web page:
    https://discussions.apple.com/message/21953221#21953221

  • Org unit is not getting defaulted for the selected position in infotype0001

    Org unit is not getting defaulted for the selected position in infotype 0001 during the hiring action.
    In OM Org. units and positions have been created.
    The Org. unit to Position relationship is also created.
    But inspite of this, In infotype 0001, the after selecting a position, the Org unit is still getting defaulted to "00000000" instead of the Org. unit Id to which the position belongs. (Please note: At the time of selecting the position, I do structure search and the position is shown under the correct Or. unit)
    Have I missed any step?

    Have u run the RHINTE programmes properly ?
    are u able to save the record?
    As some times it may be display probolem, if u r able to save the record then check the relationship in pp10/po13.
    and U have not answered what Mr. Valeri is asking about your Implementation/support because these type we come accress if data is not uploaded properly.
    Regards
    vinmax

  • I have several episodes of a TV show that say "download error, tap to retry" and when I do it just repeats that error message.  Can I get it to work? If not can I get reimbursed for the episodes I'm missing?  I'm using an iPad one which has worked fine B4

    I have several episodes of a TV show where it says download error, tap to retry and when I do it repeats the error message.  Can I get it to work or get reimbursed for the ones I'm missing?  I'm using an iPad 1 which has worked fine for all the others.

    Hi AlpineJean,
    I'm sorry to hear you are having issues downloading some episodes to your iPad.
    I would first suggest you sign out of your iTunes account on your iPad, restart the device and sign back in.
    Settings > iTunes & App Stores > Tap on your Apple ID account > Tap Sign Out
    Click on the link below for additional troubleshooting steps with more details and screenshots.
    I've quoted some helpful highlights for you:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    To view or download previously purchased:
    TV Shows on iOS
    Open the iTunes Store on your device.
    Make sure you are signed in with the same Apple ID you used for the original purchase.
    Tap More from the bottom navigation bar.
    Tap TV Shows.
    Locate the TV show episode or series you would like to download.
    Once you've located the TV shows you are looking for, tap the download button.
    The TV show will begin downloading.
    Previous purchases may be unavailable if they have been refunded or are no longer on the iTunes Store. Downloading previously purchased movies and TV shows requires iTunes 10.6 or later.
    If this does not resolve your issue, please follow these instructions for support from the iTunes Store:
    How to report an issue with your iTunes Store, App Store, Mac App Store, or iBookstore purchase
    Find the email receipt for your purchase.
    Click Report a Problem under the app that is having the issue.
    When prompted, enter the Apple ID and password you used to purchase the item, then click Report a Problem.
    Click Report a Problem next to the item you are having an issue with.
    From the Choose Problem dropdown menu, choose the appropriate issue.
    Follow the onscreen instructions and—if prompted—type a description of the problem into the text field.
    Click Submit to have your issue reviewed.
    Have a great day!
    - Judy

  • I have a message: "Could not get session for the OEM Repository."

    Dear Sir,
    I browsed reports that has been published in OEM. But I received an error:
    "Could not get session for the OEM Repository. Check to ensure that the OEM Repository is up."
    What can I do?
    Thank a lot

    You will need to go into your Files and locate the song.  By default, iTunes saves songs in the iTunes Media Folder which can be found in the following locations:
    Mac OS X: /Users/username/Music
    Windows XP: \Documents and Settings\username\My Documents\My Music\
    Windows Vista: \Users\username\Music\iTunes
    Windows 7 and Windows 8: \Users\username\My Music\iTunes
    If you locate your song file, when you try to play it in iTunes, you will be given an option to locate.  Navigate to the file in the pop up window and iTunes will re-path the file location.
    Most people encounter this issue when moving to a new computer or if you have your music saved on an external drive or folder that you have since moved or removed.  The imperative part is finding the song so you can re-map it.

  • How do I get refunded for the purchase of a third party app?

    I have purchased an app called crestron mobile pro on Saturday 2-15,  when I actually needed the crestron mobile pro g version. How do I get refunded for the wrong version of the app, which I don't need anymore?

    All purchases are considered final, but you can try the 'report a problem' link to contact iTunes Support and see if they will refund or credit you : http://reportaproblem.apple.com
    If the 'report a problem' link doesn't work then you can try contacting iTunes Support via this page : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page

  • Why do my ringback tones play garbled when you call my phone and how do I get credit for the purchase?

    Why do my ringback tones play garbled when calling my phone and how do you get credit for the purchases?
    Thanks,
    Dick

        Dcoyle, We definitely know the importance of understanding options when it comes to ringback tones on your device. I'm truly sorry to learn that you've been experiencing distorted sound. Is this something that just started recently? Which device do you currently have with us? We'll look into this for you, indeed.
    TanishaS1_VZW
    Follow us on Twitter @VZWSupport

Maybe you are looking for