Calculate salary of employee from April to December ??

Hi all,
I want to find the salary of the employee from April to December month for that particular year entered on the selection screen, and then from January to March as well.
How is it possible?
I tried looking into various infotypes, but I couldn't find how to resolve this.
Any help would be apperciated and rewarded.
Regards
Tarun

Hi all,
I am using the below code for my problem.
  data: l_pernr like pa0000-pernr.
deviding the date and month
month = date+4(2).
*date = date+6(2).
curr_year = date+0(4).
IF month GT 3.
next_year = curr_year + 1.
ELSE.
next_year = curr_year.
curr_year = curr_year - 1.
ENDIF.
*CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
EXPORTING
i_date = mydate
I_MONMIT = 00
i_periv = 'XX'
IMPORTING
E_BUPER =
E_GJAHR = curr_year
EXCEPTIONS
INPUT_FALSE = 1
T009_NOTFOUND = 2
T009B_NOTFOUND = 3
OTHERS = 4
CONCATENATE curr_year '04' '01' INTO p_begda.
CONCATENATE curr_year '12' '31' INTO p_endda.
  call function 'CU_READ_RGDIR'
    exporting
      persnr          = ls_tds_1-pernr
    importing
      molga           = w_molga
    tables
      in_rgdir        = it_rgdir1
    exceptions
      no_record_found = 1
      others          = 2.
  if not w_molga is initial.
    call function 'CD_READ_LAST'
      exporting
        begin_date      = p_begda
        end_date        = p_endda
      importing
        out_seqnr       = w_seqnr
      tables
        rgdir           = it_rgdir
      exceptions
        no_record_found = 1
        others          = 2.
  endif.
  sort it_rgdir by fpend descending.
  loop at it_rgdir into wa_itrgdir. "where fpbeg le p_endda and fpend = p_endda.
    w_seqnr = wa_itrgdir-seqnr.
  endloop.
  select single relid from t500l into w_relid where molga  =  'W_MOLGA'.
  l_pernr = ls_tds_1-pernr .
  call function 'PYXX_READ_PAYROLL_RESULT'
    exporting
      clusterid                    = w_relid
      employeenumber               = l_pernr
      sequencenumber               = w_seqnr                "'00003'
      read_only_international      = 'X'
    changing
      payroll_result               = it_result
    exceptions
      illegal_isocode_or_clusterid = 1
      error_generating_import      = 2
      import_mismatch_error        = 3
      subpool_dir_full             = 4
      no_read_authority            = 5
      no_record_found              = 6
      versions_do_not_match        = 7
      error_reading_archive        = 8
      error_reading_relid          = 9
      others                       = 10.
  loop at it_result-inter-rt into wa_rt.    " MAIN DATA THAT CAME FROM RT TABLE   FROM FN MODULE... LIKE FINAL PAYMENT I.E IN AMNT 19
    wagetype = wa_rt-lgart.
    case wagetype.
      when '1000'.
        ls_tds-up_to_april = ls_tds-up_to_april + wa_rt-betrg.
      when '1010'.
        ls_tds-up_to_april = ls_tds-up_to_april + wa_rt-betrg .
      when '1020'.
        ls_tds-up_to_april = ls_tds-up_to_april + wa_rt-betrg .
      when '1030'.
        ls_tds-up_to_april = ls_tds-up_to_april + wa_rt-betrg .
      when '1100'. " HRA REPAYMENT
        ls_tds-up_to_april = ls_tds-up_to_april + wa_rt-betrg .
      when '1040'. " HRA BALANCE
        ls_tds-up_to_april = ls_tds-up_to_april + wa_rt-betrg .
      when '1050'. " STAFF ADVANCE REPAYMENT
        ls_tds-up_to_april = ls_tds-up_to_april + wa_rt-betrg .
      when '1060'. " STAFF ADVANCE BALANCE
        ls_tds-up_to_april = ls_tds-up_to_april + wa_rt-betrg .
      when '1080'. " STAFF LOAN REPAYMENT
        ls_tds-up_to_april = ls_tds-up_to_april + wa_rt-betrg .
      when '1090'. " STAFF LOAN REPAYMENT
        ls_tds-up_to_april = ls_tds-up_to_april + wa_rt-betrg .
      when '1120'.
        ls_tds-up_to_april = ls_tds-up_to_april + wa_rt-betrg .
      when '1130'.
        ls_tds-up_to_april = ls_tds-up_to_april + wa_rt-betrg .
      when '1140'.
        ls_tds-up_to_april = ls_tds-up_to_april + wa_rt-betrg .
      when '3010'.
        ls_tds-up_to_april = ls_tds-up_to_april + wa_rt-betrg .
      when '1160'.
        ls_tds-up_to_april = ls_tds-up_to_april + wa_rt-betrg .
      when '/3E1'.
        ls_tds-up_to_april = ls_tds-up_to_april + wa_rt-betrg .
      when '/3E2'.
        ls_tds-up_to_april = ls_tds-up_to_april + wa_rt-betrg .
      when '/460'.
        ls_tds-up_to_april = ls_tds-up_to_april + wa_rt-betrg .
      when '/3P1'.
        ls_tds-up_to_april = ls_tds-up_to_april + wa_rt-betrg .
      when '9000'.
        ls_tds-up_to_april = ls_tds-up_to_april + wa_rt-betrg . " BONUS
      when '4000'.
        ls_tds-up_to_april = ls_tds-up_to_april + ( -1 * wa_rt-betrg ). " ADVANCE
      when '4020'.
        ls_tds-up_to_april = ls_tds-up_to_april + ( -1 * wa_rt-betrg ).
      when '4080'.
        ls_tds-up_to_april = ls_tds-up_to_april + ( -1 * wa_rt-betrg ).
      when '4030'.
        ls_tds-up_to_april = ls_tds-up_to_april + ( -1 * wa_rt-betrg ).
      when '4045'.
        ls_tds-up_to_april = ls_tds-up_to_april + ( -1 * wa_rt-betrg ).
      when '4070'.
        ls_tds-up_to_april = ls_tds-up_to_april + ( -1 * wa_rt-betrg ).
      when '4010'.
        ls_tds-up_to_april = ls_tds-up_to_april + ( -1 * wa_rt-betrg ).
      when '/3W1'.
        ls_tds-up_to_april = ls_tds-up_to_april + wa_rt-betrg .
      when '1170'.
        ls_tds-up_to_april = ls_tds-up_to_april + wa_rt-betrg .
    endcase.
  endloop.
The first fm is giving me all the date periods which are there in pc_payresult, but the second fm is not giving me anything in it_rgdir. What is the reason for that.
Further, i am using all this code in a form, and calling this form inside a loop for all the pernrs.
And now seqnr will be different for different date periods. so suppose for 1.4.2011 to 31.12.2011, will have 9 different seqnr's, so i will have to call the last fm(3rd fm) 9 times to get complete sum, or any other solution is available??

Similar Messages

  • Report that  display salary for employee from this year and prvious year

    Hi
    How to do a report that display salary for employee from this year an previous year, my table has from period and two perid?
    Thanks

    You could try something like this but you MUST learn how to post questions! Very few members will help you if you word your question poorly or forget to mention vital imformation!
    select distinct ty.id, ty.emp, ty.sal, ly.sal
    from (select distinct id, userid, sal
    from salary_table
    where id = 123456
    and from_period = '01-JAN-2010'
    and to_period = '31-DEC-2010') LY,
    salary_table TY
    where ty.id = 123456
    and ty.from_period = '01-JAN-2011'
    and ty.to_period = '31-DEC-2011'

  • I need to find an email I sent in April. There are emails from December 2012, but none from April of 2012. Where can I find them or are they gone forever?

    I need to find an email I sent in April. There are emails from December 2012, but none from April of 2012. Where can I find them or are they gone forever?

    Hi GemmaMcD,
    Welcome to the forum and thanks for posting. I’m sorry you’re having problems with the bills etc. I can take a look into this for you if you wish. Drop me an email with the details. You’ll find the “contact us” form in the about me section of my profile.
    Cheers
    David
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry but we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)

  • Transferring an Employee from one Company Code to Another Company Code

    Dear All,
                       we are implementing the HR Implementation for the group of Hospitals, each hospital being an Individual Legal entity, but there is a requirement, where in there is a possibility that the employee may be transferred from one Hospital to other on a short term basis or on a long term basis, and as long as the Employee stays in that transferred place, his salary is to be paid from that particular Hospital,
    As per my understanding, we have to run the seperation action and then go for a hiring action in the new company,,, but this wouldnt solve the purpose if the employee works for 10 days in a month in one Hospital and the rest in the Other Hospital...
    I have come across various posts on sdn regarding the same issue that it is possible, but i didn't find the end result for this one,I would request you to provide me with your inputs on this one.
    Regards,
    Bharadwaj

    Hi ,, I am aware that we need to execute a transfer action, but how can we transfer an employee from one company code to another???  let me explain you with my scenario here....
    HOSPITAL-1 : XYZ1 ( Company Code)
    HOSPITAL-2 : XYZ2( Company Code)
    Hospital 1 (XYZ1) and 2(XYZ2) belong to the XYZ Group of Companies
    both these hospitals are separate legal entities
    an Employee "A" is working in a Hospital 1 ( XYZ1) from 1st of a month till 10th and from 11th onwards he is working in Hospital2(XYZ2).
    if i want to transfer an employee internally from one Personnel Area to another Personnel area or from one org unit to other org unit then i can do it through transfer actions, but how am i supposed to do a transfer action in between two company codes?

  • We should give salary for GM from 2 companies , ie from  2 company codes ,

    Team,
    We should give salary for GM from 2 companies , ie from  2 company codes , how to do this?
    plz help.
    Rex

    But Concurrent Employment  is for employee working for 2 countries, do we use this for 2 companies in a country
    Rex

  • Replication of employee from R/3 to CRM

    Can anyone send me the document about the steps to replicate employee from R/3 to CRM ? My email address is [email protected] . Thanks in advance.

    It is done by using ALE.

  • Error while transferring an employee from one position to another

    When i am transferring an employee from one position to another i am not being able to do so. This position is visible in HRP10001.

    Hi,
    Have you tried using any other aciton like Org re-assignment, promotion action etc or tryid in PA30 itself?
    Regards
    ET

  • Transfer Employee From one Business group to another

    Hello,
    As per my understanding we do have a functionality of transferring employee from one business group to another. Can any one tell me the exact steps for the same. It is there from 11.5.10 and the profile setting we have to set is HR: Propagate Data. Can anyone tell what from here I need to do for a transfer for employee between business group.
    Thanks

    hello Pdelapena,
    Benefit tab is not available for all BG responsibility, like india is not having the benefit tab.
    Secondly if i want to go for some Long range compensation say an employee has worked for 2 yrs then he is eligible. Now technically speaking the the transfer employee should be eligible for the same. But if we terminate him and then hire him back in the new BG only the thing that is same is Party_ID apart from that is nothing same. Can you please put some suggestions.
    Eg: Person Hired on 10 Jul 2007 in US BG
    Person Transferred to India BG on 20 Jul 2008
    Now the company plans to give a compensation to all the employee who have been part of the company for 2 yrs or plus till 20 Jul 2009
    Now this particular employee will not be pulled out in the eligibility criteria.
    Can any one please pass there comments
    Thanks
    Nitin

  • I was trying to download my itunes to my iphone and did a restore by mistake.  Now all my contacts, pictures etc are gone from april to now.  How can I revert my iphone back to the way it was

    I was trying to download my itunes to my iphone and did a restore by mistake.  Now all my contacts, pictures etc are gone from april to now.  How can I revert my iphone back to the way it was

    - You do have iTunes version 11 on the computer, right. Saying the latest is not sufficient.
    - Have you tried everthing here:
    iOS: Device not recognized in iTunes for Windows
    - You should
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    Your library/media will not be affected.
    - Does the iPod charge?

  • I got new iphone and when i connect it to my pc, it lost all my current data and replaced it with the backup on my computer, which is from april. so i have lost all my calendar information and schedule. does anyone know how i can reverse this?

    i got new iphone and when i connect it to my pc, it lost all my current data and replaced it with the backup on my computer, which is from april. so i have lost all my calendar information and schedule. does anyone know how i can reverse this and get my information back?

    Every backup replaces the old one, so, unless you included the backup folder in your computer backup routine, you can't get back your calendar info.
    The only time iTunes will not replace a backup is, when you use it to restore from, this one will stay in the backup list in iTunes.
    More info on backups here: http://support.apple.com/kb/HT1766

  • I Am from Brasil and december last year i bought a non contract iphone in usa but it still locked, now apple is sending non contract unlocked iphone, next week i am going to usa and would like to know if it is possible to pay and unlock my iphone in usa

    I Am from Brasil and december last year i bought a non contract iphone in usa but it still locked, now apple is sending non contract unlocked iphone, next week i am going to usa and would like to know if it is possible to pay and unlock my iphone in usa

    A no-contract sales price does not mean unlocked.
    Apple is now selling an officially unlocked iPhone in the U.S. which has nothing whatsoever to do with AT&T unlocking iPhones. It is up to the carrier and the carrier only to officially unlock an iPhone that was sold as carrier locked with the carrier - in this case sold as carrier locked with AT&T. This may change one day, but at the present time AT&T does not unlock an iPhone for any reason or under any circumstances.

  • How to deassign a employee from a Org. unit by using function module?

    Hi,
    I want to deassign an employee from an orgnization unit in Org. model. Though I know I can do it manually in Org. Model. But since the number is big, I want to do it by using report. So do you which function module I can use to do it?
    Many thanks and Best regards,
    Long

    Hi,
    I feel following 2 Fms will be of use to you.
    1. BUB_BUPA_RELATION_MODIFY
    2. BUB_BUPA_RELATIONS_MODIFY
    I hope this helps.
    Regards,
    Venkat

  • Is there a way I can have my form calculate a total time from beginning and ending time?

    Is there a way I can have my form calculate a total time from beginning and ending time?

    Sorry, but Formscentral doesn't support either a timer function or any kind of calculation. You might be able to do this if created your form in PDF. For help with PDF form creation in Acrobat I suggest you repost your question to the Acrobat Forum.
    Andrew

  • Replicating partner function (VE=sales employee) from CRM to ECC

    Hello, we managed to replicate the ECC customers and contact persons to SAP CRM.
    Now we also want to replicate to CRM the partner functions (VE = sales employee) of ECC that are linked to the customer in the sales view. When I replicate the object customer_rel they are not synchronised to CRM. I have maintainted the 'distribution of partner functions from SAP ECC into CRM and vice versa in SPRO.
    What are the different steps that I need to do? What am I missing?
    Should we be alble to see those relationships on BP in CRM once synchronised? If yes, in which relationship? Since the employee responsible is already filled manually for another function.
    Thanks for your help on replicating partner functions from CRM to ECC?
    Kr, Anouck

    Hi Anouck.
    If I've understood correctly, for that you must pass the employees from ECC to CRM first.
    You can do this by running report RHALEINI at ECC side, but you must configure some things first (like creating a CRM grouping to indicate the number range for employees, and to activate at CRM side this integration)
    Kind regards,
    Garcia

  • How to restrict employees from accessing managers data using custom security profile

    Hi,
    I am using custom security profile for restricting the employees from accessing supervisors details(PG.SEGMENT2=4). I have written the custom code as below :
    Responsibility :US Super HRMS Manager
    ASSIGNMENT.PERSON_ID
    IN
    (SELECT PAF.PERSON_ID FROM PER_ALL_PEOPLE_F PAF,
    PER_ALL_ASSIGNMENTS_F PF,
    PAY_PEOPLE_GROUPS PG,
    PER_PERSON_TYPE_USAGES_F PPU,
    FND_USER FNU
    WHERE PAF.PERSON_ID=PF.PERSON_ID
    AND :EFFECTIVE_DATE BETWEEN PAF.EFFECTIVE_START_DATE
    AND PAF.EFFECTIVE_END_DATE
    AND PF.PEOPLE_GROUP_ID=PG.PEOPLE_GROUP_ID
    AND :EFFECTIVE_DATE BETWEEN PF.EFFECTIVE_START_DATE AND PF.EFFECTIVE_END_DATE
    AND PPU.PERSON_ID=PAF.PERSON_ID
    AND PPU.PERSON_ID=PF.PERSON_ID
    AND :EFFECTIVE_DATE BETWEEN PPU.EFFECTIVE_START_daTE AND PPU.EFFECTIVE_END_DATE
    AND PAF.PERSON_ID=FNU.EMPLOYEE_ID
    AND PAF.PERSON_TYPE_ID =2
    AND PPU.PERSON_TYPE_ID
    IN(2,62)
    and PAF.person_id = FND_PROFILE.value('user_id')
    AND PG.SEGMENT2=8)
    and using "restrict the people visible to each other using this profile".
    I have assigned the security profile to HR user responsibility
    But when I query the supervisor name in HR User responsibility , it is not restricting me from viewing supervisor details.
    When I query for first time, its restricting me to view others details, but when I close that click on torch button and try searching, its allowing me to access manages details.
    Can any one please let me know what setups need to be done for restricting employees from viewing supervisors data.
    I have gone through the document "Understanding and Using HRMS Security in Oracle HRMS" but didn't got any idea.
    Please suggest.
    Thanks & Regards,
    Anusha.

    Hi All ,
    i solved the problem by using event 01 of header view and using the table "Extract" .
    Regards,
    Neha

Maybe you are looking for

  • How to allow access from LAN to server on LAN using external FQDN? (Outlook web access issue)

    I may have phrased the topic not too clearly, but I have an external domain name of mail.company.com , I want my users INSIDE the company be able to also get to https://mail.company.com , currently they cannot (nothing loads, looks to me as if firewa

  • No Bootable Drive Found, I HAVE UNIQUE SITUATION

    Hello everyone, I would really appreciate some help! I have a MacBook Pro and I've been trying to download Window 7 on it. Basically, I finally got a bootable flashdrive with Windows 7 on it. I have two actually. One made by Bootcamp, (Someone on you

  • Problem with changing flash content - Need help

    I need help in changing  the flash content. Here is my proble, 1) I bought a flash template (I will call this Original) from a website and paid some money to customize my menu,logo and background color. 2) After they finished it they sent me several

  • Functional Location

    Hi, Client is having lot of moving Equipments. So then he want that when production person should create notifiaction, he should enter the location also to identify the location of perticular machine like welding machine. For fixed machines , that wi

  • Lightroom 5 Slideshow doesn't render on MacBookPro?

    I have a MacBookPro 2,2 laptop and can use most other modules without difficulty, but when I try to create a slideshow, the program starts to render the first slide and then stops, leaving me with a black screen.