HR-ABAP(Payroll Management)

Hi All,
I am new to HR-ABAP.
I wanted to know more about HR-ABAP(Payroll Management).
Please send me the links or documents if u have collected.
Regards,
Mihira

1.http://www.atomhr.com/know_preview/Reading_Payroll_Results_with_ABAP.htm
2.http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?track=NL-142&ad=500911#Payroll
3. http://www.sap-press.com/product.cfm?account=&product=H967
http://www.sapdevelopment.co.uk/hr/payres_abap.htm
http://www.sapdevelopment.co.uk/hr/payres_tcode.htm
http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPA/PAPA.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPD/PAPD.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYINT/PYINT_BASICS.pdf
http://www.atomhr.com/training/Technical_Topics_in_HR.htm
http://www.planetsap.com/hr_abap_main_page.htm
you can see some Standard Program examples in this one..
http://www.sapdevelopment.co.uk/programs/programshr.htm
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?Offer=SAlgwn12604#Certification
These are the FAQ's that might helps you
http://www.sap-img.com/human/hr-faq.htm
http://www.sapgenie.com/faq/hr.htm

Similar Messages

  • HR-ABAP Payroll-reports-interfaces-forms

    Hi everybody,
                     Please can any body send me the code for HR-ABAP  Payroll, time management  in case of REPORTS, Interfaces.
    I mean  to  get  coding fof retrievel of data from Payroll and Time Management modules.
    Waiting for reply.

    Hi,
    please go thorugh following links
    HR deals with the INFOTYPES which are similar to Tables in General ABAP.
    There are different ways of fetching data from these infotypes.
    There are different areas in HR LIKE Personal Admn, Orgn Management, Benefits, Time amangement, Event Management, Payroll etc
    Infotypes for these areas are different from one another area.
    storing of records data in each type of area is different
    LDBS like PNP are used in HR programing.
    Instead of Select.. we use some ROUTINES and PROVIDE..ENDPROVIDE.. etc
    and in the case of Pay roll we use Clusters and we Import and Export them for data fetching.
    On the whole Normal ABAP is different from HR abap.
    For Personal Admn the Infotypes start with PA0000 to PA1999
    Time Related Infotypes start with PA2000 to PA2999.
    Orgn related Infotypes start with HRP1000 to HRP1999.
    All custom developed infotypes stsrat with PA9000 onwards.
    In payroll processing we use Clusters like PCL1,2,3 and 4.
    Instead of Select query we use PROVIDE and ENDPROVIDE..
    You have to assign a Logical Database in the attributes PNP.
    Go through the SAp doc for HR programming and start doing.
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/report%2bin%2bhr%2babap%2b(without%2bLDB)
    http://www.sapdevelopment.co.uk/hr/hrhome.htm
    See:
    http://help.sap.com/saphelp_46c/helpdata/en/4f/d5268a575e11d189270000e8322f96/content.htm
    Please check this link for HR sample programs.
    http://www.sapdevelopment.co.uk/hr/hrhome.htm
    http://www.sapfans.com/forums/viewtopic.php?p=498530&sid=d7ec5866e3fb26880da129de45ce79de
    http://www.sapcookbook.com/preview_hr_questions.htm
    http://www.atomhr.com/library_full.htm
    http://www.sapdevelopment.co.uk/hr/hrhome.htm
    http://www.planetsap.com/hr_abap_main_page.htm
    http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci983590,00.html
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b74ce990-0201-0010-a595-8c1203c93e56
    http://www.planetsap.com/hr_abap_main_page.htm
    http://www.sap-img.com/abap/sample-hr-reports-allocate-petrol-allowance.htm
    http://www.planetsap.com/HR_ABAP_LDB.htm
    http://help.sap.com/erp2005_ehp_02/helpdata/en/16/b8b83b5b831f3be10000000a114084/content.htm
    http://help.sap.com/saphelp_45b/helpdata/en/1e/728d281d5e11d289d30000e82158f1/content.htm
    http://diocio.wordpress.com/2007/04/27/sap-abap-insert-infotype-data-with-maintain-text/
    Reward Points if found helpfull..
    Cheers,
    Chandra Sekhar.

  • HR ABAP - PAYROLL - Copy existing payroll function and changes

    Hello all,
    Required a help over an issue with HR ABAP - Payroll module.
    My requirement is to Copy an existing custom Payroll Function (Transaction PE04), into a new one. The existing payroll function has the code for updating payroll results in RT table. I have to change the statements in the new function making sure that now it will update  IT/OT table instead of RT table.
    Kindly help me with the issue.
    Thanks,
    Ruchir.
    Edited by: Ruchir Pathak on Nov 17, 2011 9:09 AM

    Hi,
    you can not copy function as i know. you should create a new one and copy code from the existing function to new function and modify code for the new requirement. this will be mush easier.
    Çağatay

  • Do we need to setup traditional ABAP Transport Management System on XI?

    I was confused that do we need to setup ABAP transport Management System on XI, since the IR and ID object will use CMS or File to transport between DEV->QAS->PRD. If we still need, could you pls let me know why we need it?
    one more question is: if we maintained some parameter in XI dev, say, we maintained Integration Server patameter to let system can moniter Syn message, if we want this paramter used in XI QAS, is that the only way to maintain it mannully in QAS, or we have other way to make it? thank you for your help

    Zhang,
    You are absolutely correct. You transport all your ID and IR objects using CMS or File transports.
    But lets suppose you have developed some zprograms or abap mapping in XI. This basically reside on the ABAP stack. So for this objects to transport we will follow the procedure what we do normally to transporting the R3 objects. So what ever you develop on the ABAP stack we need to transport to QA and to Prod using ABAP transport system.
    ---Satish

  • ABAP SQL manager

    Please, advice ABAP SQL manager.
    Program which allows to execute any SQL queries.

    hi ;
    İf you want execute T-sql in sap , u can use this program ;
    Regards.
    İrfan
    << cut and paste without attribution from https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7168fa07-0b01-0010-7698-87fbfc556f1d
    removed. Points unassigned. >>
    Edited by: Rob Burbank on Mar 27, 2009 5:35 PM

  • Manpower output (HR-ABAP Payroll)

    Hi ABAP Gurus,
    I have done manpower detalis using PNP logical database.
    this program is regarding manpower details according to plant wise and payroll area wise.
    for this i have used smart forms, but where ever i call smartform function, the output is comming as n times(i.e single output for each pernr )
    Can you please help me out.
    Thanks and Regards,
    Giri

    Hi
    See this sample report to display Cost center wise Man power and do accordingly
    report zporgr0040
           line-size 108
           line-count 60(1)
           no standard page heading
           message-id zndc.
    Database Tables
    tables: hrp1001,     " HR Master Record (Orgn. Assignment)
            pa0002,      " Personal Data
            t528t,       " Position Texts
            t527x,       " Org Unit Text
            t528b,       " Positions
            csks,        " Cost Center
            cskt.        " Cost Center Texts
    Declaration of Internal Tables
    Internal Table for Orgn Object Data  HRP1000
    data: begin of obj_tab occurs 0,
            otype like hrp1000-otype,      " Object Type
            objid like hrp1000-objid,      " Object ID
            plvar like hrp1000-plvar,      " Plan Version
            istat like hrp1000-istat,      " Planning Status
            begda like hrp1000-begda,      " Begin date
            endda like hrp1000-endda,      " End date
          end of obj_tab.
    Internal Table for Active Employees data PA0000
    data: begin of stat_tab occurs 0,
            pernr like pa0000-pernr,       " Object Type
            begda like pa0000-begda,       " Begin date
            endda like pa0000-endda,       " End date
            stat2 like pa0000-stat2,       " Employment Status
          end of stat_tab.
    Internal Table for Actual Orgn Assignment Data PA0001
    data: begin of act_tab occurs 0,
            pernr like pa0001-pernr,       " Object Type
            begda like pa0001-begda,       " Begin date
            endda like pa0001-endda,       " End date
            kostl like pa0001-kostl,       " Cost Center
            orgeh like pa0001-orgeh,       " Org Unit
            plans like pa0001-plans,       " Position
            natio like pa0002-natio,       " Nationality
          end of act_tab.
    Internal Table for Orgn Data HRP1001
    data: begin of org_tab occurs 0,
            otype like hrp1001-otype,      " Object Type
            objid like hrp1001-objid,      " Object ID
            plvar like hrp1001-plvar,      " Plan Version
            istat like hrp1001-istat,      " Planning Status
            begda like hrp1001-begda,      " Begin date
            endda like hrp1001-endda,      " End date
            subty like hrp1001-subty,      " Sub Type
            sclas like hrp1001-sclas,      " Type of Related Object
            sobid like hrp1001-sobid,      " Id of Related Object
            kostl like pa0001-kostl,       " Cost Center
            plstx like t528t-plstx,        " Position Text
            orgtx like t527x-orgtx,        " Org Unit Text
          end of org_tab.
    Internal Table for Position Calculations
    data: begin of org1_tab occurs 0,
            kostl like pa0001-kostl,       " Cost Center
            objid like hrp1001-objid,      " Object ID
          end of org1_tab.
    Internal Table for Position Calculations
    data: begin of org2_tab occurs 0,
            kostl like pa0001-kostl,       " Cost Center
            count type i,                  " No of Positions
          end of org2_tab.
    Internal Table for Actual Manpower Calculations
    data: begin of act1_tab occurs 0,
            kostl like pa0001-kostl,       " Cost Center
            natio like pa0002-natio,       " Nationality
            plans like pa0001-plans,       " Position
          end of act1_tab.
    Internal Table for Actual Manpower Calculations(UAE)
    data: begin of act2_tab occurs 0,
            kostl like pa0001-kostl,       " Cost Center
            natio like pa0002-natio,       " Nationality
          end of act2_tab.
    Internal Table for Actual Manpower Calculations(Others)
    data: begin of act3_tab occurs 0,
            kostl like pa0001-kostl,       " Cost Center
            natio like pa0002-natio,       " Nationality
          end of act3_tab.
    Internal Table for Actual Manpower Calculations(UAE)
    data: begin of act4_tab occurs 0,
            kostl like pa0001-kostl,       " Cost Center
            count1 type i,                 " No of Positions(UAE)
          end of act4_tab.
    Internal Table for Actual Manpower Calculations(OTHERS)
    data: begin of act5_tab occurs 0,
            kostl like pa0001-kostl,       " Cost Center
            count2 type i,                 " No of Positions(Others)
          end of act5_tab.
    Internal Table for Vaccancies Data
    data: begin of vac_tab occurs 0,
            plvar like hrp1007-plvar,      " Plan Version
            otype like hrp1007-otype,      " Object Type
            objid like hrp1007-objid,      " Object ID
            istat like hrp1007-istat,      " Planning Status
            begda like hrp1007-begda,      " Begin date
            endda like hrp1007-endda,      " End date
            vacan like hrp1007-vacan,      " Vacancy Indicator
            status like hrp1007-status,    " Status of Vacancy
          end of vac_tab.
    Internal Table to store the Report Output data
    data : begin of rep_tab occurs 0 ,
             kostl(10) type n,                  " Cost Cente
             plans   like pa0001-plans,         " Position
             vacan   like hrp1007-vacan,        " Vacancy Indicator
             status  like hrp1007-status,       " Status of Vacancy
             plstx   like t528t-plstx,          " Position Text
             orgtx like t527x-orgtx,            " Org Unit Text
           end of rep_tab.
    Internal Table to store the Report Output data
    data : begin of rep1_tab occurs 0 ,
             kostl(10) type n,                  " Cost Cente
             cnt     type i,                    " No of Vacancies
           end of rep1_tab.
    Internal Table to store the Report Output data
    data : begin of rep2_tab occurs 0 ,
             kostl(10) type n,                  " Cost Cente
             app_no    type i,                  " Approved
             nat_no    type i,                  " National
             exp_no    type i,                  " Expatriate
             tot_no    type i,                  " Total
             vac_no    type i,                  " Vacancies
           end of rep2_tab.
    Declaration of Variables
    data: v_sobid  like hrp1001-sobid,   " Object Id
          v_sobid1 like hrp1001-sobid,   " Object Id
          v_sobid2 like hrp1001-sobid,   " Object Id
          v_sclas  like hrp1001-sclas,   " Related Obj Type
          v_subty  like hrp1001-subty,   " Related Object Id
          v_otype  like hrp1007-otype,   " Object Type
         v_str(9)    type c,            " Text
         v_str1(10)  type c,            " Text
          v_cnt    like sy-tabix.        " Table Index
    Declaration of Constants
    constants : c_x         type c value 'X',            " Flag
                c_stat1  like pa0000-stat2  value '3',   " Emp Status
                c_plan   like hrp1001-plvar value '01',  " Plan Version
                c_name   like hrp1000-uname value 'SAP', " Uname
                c_uae    like pa0002-natio  value 'AE',  " Country
                c_type   like hrp1007-otype  value 'O',  " Object Type
                c_otype  like hrp1007-otype  value 'S',  " Object Type
                c_stat   like hrp1007-status value '0',  " Status
                c_pstat  like hrp1007-istat  value '1',  " Plang Status
                c_sclas  like hrp1001-sclas value 'K',    " Rel. Obj Type
                c_subty  like hrp1001-subty value 'A002', " Related ObjId
                c_subty2 like hrp1001-subty value 'A003', " Related ObjId
                c_sclas1 like hrp1001-sclas value 'O',    " Rel.Obj Type
                c_subty1 like hrp1001-subty value 'A011', " Rel.Object Id
                c_kokrs  like coej-kokrs value '1000'. " Controlling Area
    Selection Screen
    selection-screen begin of block b1 with frame title text-001.
    parameters     :
      p_date  like pa0001-begda obligatory default sy-datum. " Date
    select-options :
      s_kostl for csks-kostl,                     " Cost Center
      s_plans for t528b-plans.                    " Position ID
    selection-screen end of block b1.
    At selection-screen
    at selection-screen.
    Validate the Selection Screen fields
      perform validate_screen.
    Start-of-Selection
    start-of-selection.
    Get the Orgn data from database Table HRP1001
      perform get_org_data.
    Get the Actual Manpower from PA0001
      perform get_act_data.
    Get the Vaccancies data from database Table HRP1007
      perform get_vac_data.
    Append the data into final Internal Table
      perform append_data.
    Top-of-page
    top-of-page.
    Write the Report and Column Headings
      perform top_of_page.
    End-of-Page
    end-of-page.
      write /1(108) sy-uline.
    End-of-Selection
    end-of-selection.
    Display the Output Report.
      perform display_report.
    Form-Routines
    *&      Form  validate_screen
    Validation of selection Screen fields
    form validate_screen.
    Validation of Position ID
      clear t528b.
      if not s_plans[] is initial.
        select single plans
          into t528b-plans
          from t528b
          where plans in s_plans.
        if sy-subrc <> 0.
          message e999 with 'Invalid Position ID'(009).
        endif.
      endif.
    Validation of Cost Center
      clear csks.
      if not s_kostl[] is initial.
        select single kostl
          into csks-kostl
          from csks
          where kostl in s_kostl.
        if sy-subrc <> 0.
          message e999 with 'Invalid Cost Center'(008).
        endif.
      endif.
    endform.                  "validate_screen
    *&      Form  get_org_data
    Get the Orgn Data from Database Table HRP1001
    form get_org_data.
    v_str  = 'Developee'(002).
    v_str1 = 'Deployment'(003).
    Select All the Positions from HRP1000
      select otype       " Object Type
             objid       " Object ID
             plvar       " Plan Version
             istat       " Planning Status
             begda       " Begin date
             endda       " End date
         into table obj_tab
         from hrp1000
         where otype = c_otype  and
               plvar = c_plan   and
               istat = c_pstat  and
               begda le p_date  and
               endda ge p_date  and
               objid in s_plans and
               uname ne c_name.
      sort obj_tab by otype objid.
    Get the Orgn and Cost Center for all the above Positions
      if not obj_tab[] is initial.
        select otype       " Object Type
               objid       " Object ID
               plvar       " Plan Version
               istat       " Planning Status
               begda       " Begin date
               endda       " End date
               subty       " Sub Type
               sclas       " Type of Related Object
               sobid       " Id of Related Object
           into table org_tab
           from hrp1001
           for all entries in obj_tab
           where otype = c_otype  and
                 plvar = c_plan   and
                 istat = c_pstat  and
                 begda le p_date  and
                 endda ge p_date  and
                 sclas eq c_sclas1 and
                 subty eq c_subty2 and
                 objid eq obj_tab-objid.
      endif.
      sort org_tab by otype objid.
    Get the Cost Center
      loop at org_tab.
        v_otype = c_otype.       " S
        v_sclas = c_sclas.       " K
        v_subty = c_subty1.                                     " A011
        v_sobid = org_tab-objid.
        perform get_org using v_otype v_sclas v_subty
                        v_sobid.
        if sy-subrc = 0.
          org_tab-kostl = hrp1001-sobid+0(10).
        else.
          v_otype = c_otype.    " S
          v_sclas = c_sclas1.   " O
          v_subty = c_subty2.                                   " A003
          v_sobid = org_tab-objid.
          perform get_org using v_otype v_sclas v_subty
                         v_sobid.
          if sy-subrc = 0.
            v_otype = c_type.     " O
            v_sclas = c_sclas.    " K
            v_subty = c_subty1.                                 " A011
            v_sobid1 = v_sobid.
            perform get_org using v_otype v_sclas v_subty
                                 v_sobid.
            if sy-subrc <> 0.
              v_otype = c_type.    " O
              v_sclas = c_sclas1.  " O
              v_subty = c_subty.                                " A002
              v_sobid = v_sobid1.
              perform get_org using v_otype v_sclas v_subty
                        v_sobid.
              if sy-subrc = 0.
                v_otype = c_type.   " O
                v_sclas = c_sclas.  " K
                v_subty = c_subty1.                             " A011
                v_sobid2 = v_sobid.
                perform get_org using v_otype v_sclas v_subty
                                 v_sobid.
                if sy-subrc <> 0.
                  v_otype = c_type.   " O
                  v_sclas = c_sclas1. " O
                  v_subty = c_subty.                            " A002
                  v_sobid = v_sobid2.
                  perform get_org using v_otype v_sclas v_subty
                          v_sobid.
                else.
                  org_tab-kostl = hrp1001-sobid+0(10).
                endif.
              endif.
            else.
              org_tab-kostl = hrp1001-sobid+0(10).
            endif.
          else.
            v_otype = c_otype.   " S
            v_sclas = c_otype.   " S
            v_subty = c_subty.                                  " A002
            v_sobid = org_tab-objid.
            perform get_org using v_otype v_sclas v_subty
                           v_sobid.
            if sy-subrc = 0.
              v_otype = c_otype.  " S
              v_sclas = c_sclas.  " K
              v_subty = c_subty1.                               " A011
              v_sobid1 = v_sobid.
              perform get_org using v_otype v_sclas v_subty
                                   v_sobid.
              if sy-subrc <> 0.
                v_otype = c_otype.  " S
                v_sclas = c_sclas1. " O
                v_subty = c_subty2.                             " A003
                v_sobid = v_sobid1.
                perform get_org using v_otype v_sclas v_subty
                          v_sobid.
                if sy-subrc = 0.
                  v_otype = c_type.   " O
                  v_sclas = c_sclas.  " K
                  v_subty = c_subty1.                           " A011
                  v_sobid2 = v_sobid.
                  perform get_org using v_otype v_sclas v_subty
                                   v_sobid.
                  if sy-subrc <> 0.
                    v_otype = c_type.    " O
                    v_sclas = c_sclas1.  " O
                    v_subty = c_subty.                          " A002
                    v_sobid = v_sobid2.
                    perform get_org using v_otype v_sclas v_subty
                            v_sobid.
                  else.
                    org_tab-kostl = hrp1001-sobid+0(10).
                  endif.
                endif.
              else.
                org_tab-kostl = hrp1001-sobid+0(10).
              endif.
            endif.
          endif.
        endif.
    Get the Position Text
        clear t528t.
        select single plstx from t528t into t528t-plstx
          where sprsl = sy-langu and
                otype = c_otype  and
                plans = org_tab-objid.
        org_tab-plstx = t528t-plstx.
    Get the Org Unit Text
        clear t527x.
        select single orgtx from t527x into t527x-orgtx
          where sprsl = sy-langu and
                orgeh = org_tab-sobid+0(8).
        org_tab-orgtx = t527x-orgtx.
        modify org_tab index sy-tabix.
        clear v_sobid.
      endloop.
      sort org_tab by otype objid.
    Calculate the Approved No of Positions
      loop at org_tab.
        if org_tab-kostl in s_kostl.
          move-corresponding org_tab to org1_tab.
          append org1_tab.
          clear org1_tab.
        endif.
      endloop.
      sort org1_tab by kostl objid.
      clear v_cnt.
      loop at org1_tab.
        at end of kostl.
          sy-tabix = sy-tabix - v_cnt.
          org2_tab-kostl = org1_tab-kostl.
          org2_tab-count   = sy-tabix.
          v_cnt = v_cnt + sy-tabix.
          append org2_tab.
          clear:org2_tab.
        endat.
      endloop.
      sort org2_tab by kostl.
    endform.              "get_org_data
    *&      Form  get_act_data
    Get the Actual Manpower Data from Database Table PA0001
    form get_act_data.
      clear  : stat_tab, act_tab.
      refresh: stat_tab, act_tab.
    Get all the Active Employees
      select pernr       " Object Type
             begda       " Begin date
             endda       " End date
             stat2       " Emp Status
           into table stat_tab
           from pa0000
           where stat2 eq c_stat1 and
                 begda le p_date  and
                 endda ge p_date.
      sort act_tab by pernr.
      if not stat_tab[] is initial.
        select pernr       " Object Type
               begda       " Begin date
               endda       " End date
               kostl       " Cost Center
               orgeh       " Org Unit
               plans       " Position
           into table act_tab
           from pa0001
           for all entries in stat_tab
           where pernr eq stat_tab-pernr and
                 kostl in s_kostl and
                 plans in s_plans and
                 persg eq '1'     and
                 begda le p_date  and
                 endda ge p_date.
      endif.
      sort act_tab by pernr.
      loop at act_tab.
        move-corresponding act_tab to act1_tab.
        clear pa0002-natio.
        select single natio into pa0002-natio from pa0002
          where pernr = act_tab-pernr.
        if sy-subrc = 0.
          act1_tab-natio = pa0002-natio.
        endif.
        append act1_tab.
        clear act1_tab.
      endloop.
      sort act1_tab by kostl natio.
    Calculate the Local and Expatriate Manpower
      loop at act1_tab.
        if act1_tab-natio = c_uae.
          act2_tab-kostl = act1_tab-kostl.
          act2_tab-natio = act1_tab-natio.
        else.
          act3_tab-kostl = act1_tab-kostl.
          act3_tab-natio = act1_tab-natio.
        endif.
        append: act2_tab, act3_tab.
        clear : act2_tab,act3_tab.
      endloop.
      sort act2_tab by kostl.
      sort act3_tab by kostl.
    Actual UAE Manpower
      clear v_cnt.
      loop at act2_tab.
        at end of kostl.
          sy-tabix = sy-tabix - v_cnt.
          act4_tab-kostl   = act2_tab-kostl.
          act4_tab-count1  = sy-tabix.
          v_cnt = v_cnt + sy-tabix.
          append act4_tab.
          clear:act4_tab.
        endat.
      endloop.
      sort act4_tab by kostl.
    Other Countries
      clear v_cnt.
      loop at act3_tab.
        at end of kostl.
          sy-tabix = sy-tabix - v_cnt.
          act5_tab-kostl   = act3_tab-kostl.
          act5_tab-count2  = sy-tabix.
          v_cnt = v_cnt + sy-tabix.
          append act5_tab.
          clear:act5_tab.
        endat.
      endloop.
      sort act5_tab by kostl.
    endform.              "get_act_data
    *&      Form  get_org
    Get the Cost Center from Parent Org Id
    form get_org using p_v_otype p_v_sclas p_v_subty p_v_sobid.
      clear hrp1001.
      select single * from hrp1001
            where otype = p_v_otype  and
                  plvar = c_plan   and
                  istat = c_pstat  and
                  begda le p_date  and
                  endda ge p_date  and
                  sclas eq p_v_sclas   and
                  subty eq p_v_subty  and
                  objid eq p_v_sobid.
      v_sobid = hrp1001-sobid+0(8).
    endform.                    " get_org
    *&      Form  get_vac_data
    Get the Vaccancies Data from Database Table HRP1007
    form get_vac_data.
      if not org_tab[] is initial.
        select plvar       " Plan Version
               otype       " Object Type
               objid       " Object ID
               istat       " Planning Status
               begda       " Begin date
               endda       " End date
               vacan       " Vacancy Indicator
               status      " Status of Vacancy
           into table vac_tab
           from hrp1007
           for all entries in org_tab
           where plvar = c_plan   and
                 otype = c_otype  and
                 istat eq c_pstat and
                 objid = org_tab-objid and
                 begda le p_date and
                 endda ge p_date and
                 vacan eq c_x  and
                 status eq c_stat.
      endif.
      sort vac_tab by plvar otype objid.
    Get the HR data into the rep_tab Internal Table
      loop at vac_tab.
        rep_tab-plans  = vac_tab-objid.
        rep_tab-vacan  = vac_tab-vacan.
        rep_tab-status = vac_tab-status.
        read table org_tab with key objid = vac_tab-objid.
        if sy-subrc = 0.
          rep_tab-kostl = org_tab-kostl.
          rep_tab-plstx = org_tab-plstx.
          rep_tab-orgtx = org_tab-orgtx.
        endif.
        append rep_tab.
        clear  rep_tab.
      endloop.
      loop at rep_tab.
        if not rep_tab-kostl in s_kostl.
          delete rep_tab index sy-tabix.
        endif.
      endloop.
      sort rep_tab by kostl plans.
    delete rep_tab where plstx cs v_str.
    delete rep_tab where orgtx cs v_str1.
    Calculate the Count of Vacancies in each Division
      clear v_cnt.
      loop at rep_tab.
        at end of kostl.
          sy-tabix = sy-tabix - v_cnt.
          rep1_tab-kostl = rep_tab-kostl.
          rep1_tab-cnt   = sy-tabix.
          v_cnt = v_cnt + sy-tabix.
          append rep1_tab.
          clear:rep1_tab.
        endat.
      endloop.
      sort rep1_tab by kostl.
    endform.                  "get_vac_data
    *&      Form append_data
    Append the data into final Internal Table
    form append_data.
      loop at org2_tab.
        rep2_tab-kostl = org2_tab-kostl.
        rep2_tab-app_no = org2_tab-count.
        read table act4_tab with key kostl = org2_tab-kostl
                                     binary search.
        if sy-subrc = 0.
          rep2_tab-nat_no = act4_tab-count1.
        endif.
        read table act5_tab with key kostl = org2_tab-kostl
                                     binary search.
        if sy-subrc = 0.
          rep2_tab-exp_no = act5_tab-count2.
        endif.
        read table rep1_tab with key kostl = org2_tab-kostl
                                     binary search.
        if sy-subrc = 0.
          rep2_tab-vac_no = rep1_tab-cnt.
        endif.
        rep2_tab-tot_no = rep2_tab-nat_no + rep2_tab-exp_no.
        append rep2_tab.
        clear rep2_tab.
      endloop.
      sort rep2_tab by kostl.
    endform.             "append_data
    *&      Form  top_of_page
    Write the Report and Column Headings
    form top_of_page.
      skip.
      format color col_heading on.
      write: /1(108) 'NATIONAL DRILLING COMPANY'(010) centered,
             /1(108) 'Summary of Manning Level Report'(011) centered.
      format color off.
      skip.
      write: /2 'Key Date        :'(013), p_date,
             75 'Report Run Date:'(041), sy-datum.
      if not s_kostl[] is initial.
        if s_kostl-high is initial.
          write: /2 'Cost Center     :'(023), s_kostl-low,
                 75 'Time           :'(042), sy-uzeit.
        else.
          write: /2 'Cost Center From:'(024), s_kostl-low+7(3),
                                    'To'(022), s_kostl-high,
                 75 'Time           :'(042), sy-uzeit.
        endif.
      else.
        write: /75  'Time           :'(042), sy-uzeit.
      endif.
      if not s_plans[] is initial.
        if s_plans-high is initial.
          write: /2 'Position Id     :'(019), s_plans-low,
                 75 'User           :'(043), sy-uname.
        else.
          write: /2 'Position Id From:'(021), s_plans-low,
                              'To'(022), s_plans-high,
                 75 'User           :'(043), sy-uname.
        endif.
      else.
        write: /75 'User           :'(043), sy-uname.
      endif.
      write: /75 'Page No        :'(044), sy-pagno.
      skip.
      write /1(108) sy-uline.
      format color col_heading.
      write:/1 sy-vline,
            12 sy-vline, 53 sy-vline,
            64 sy-vline, 65(32)  'Actual'(018) centered,
            97 sy-vline,108 sy-vline.
      write:/1 sy-vline,  2(10) 'CostCenter'(014),
            12 sy-vline, 13(40) 'Description'(026) centered,
            53 sy-vline, 54(10) 'Approved'(025) centered,
            64 sy-vline, 65(32)  sy-uline,
            97 sy-vline, 98(10) 'Vacancies'(017),
           108 sy-vline.
      write:/1 sy-vline,
            12 sy-vline, 53 sy-vline,
            64 sy-vline, 65(10) 'National'(015) centered,
            75 sy-vline, 76(10) 'Expatriate'(020) centered,
            86 sy-vline, 87(10) 'Total'(016) centered,
            97 sy-vline,108 sy-vline.
      format color off.
      write /1(108) sy-uline.
    endform.               "top_of_page
    *&      Form  Display_report
    Write the Report Output
    form display_report.
      if rep2_tab[] is initial.
        message i999 with
        'No Data found for the entered Selection'(035).
      else.
        loop at rep2_tab.
    Authorization Check for the Orgn and Cost Centers
          perform auth_check_org.
          if sy-subrc = 0.
            clear cskt.
            select single ltext into cskt-ltext from cskt
                where spras = sy-langu and
                      kokrs = c_kokrs and
                      kostl = rep2_tab-kostl.
            format color col_normal.
            write: /1 sy-vline, 2(10) rep2_tab-kostl+7(3),
                   12 sy-vline, 13(40) cskt-ltext,
                   53 sy-vline, 54(10) rep2_tab-app_no,
                   64 sy-vline, 65(10) rep2_tab-nat_no,
                   75 sy-vline, 76(10) rep2_tab-exp_no,
                   86 sy-vline, 87(10) rep2_tab-tot_no,
                   97 sy-vline, 98(10) rep2_tab-vac_no,
                  108 sy-vline.
            format color off.
            at last.
              sum.
              format color 3.
              write /1(108) sy-uline.
              write: /1 sy-vline, 2(10) 'Total'(027),
                     12 sy-vline,
                     53 sy-vline, 54(10) rep2_tab-app_no,
                     64 sy-vline, 65(10) rep2_tab-nat_no,
                     75 sy-vline, 76(10) rep2_tab-exp_no,
                     86 sy-vline, 87(10) rep2_tab-tot_no,
                     97 sy-vline, 98(10) rep2_tab-vac_no,
                    108 sy-vline.
              format color off.
            endat.
          endif.
        endloop.
      endif.
      write /1(108) sy-uline.
    endform.                    " Display_report
    *&      Form  auth_check_org
    Authorization Check for the Orgn and Cost Center
    form auth_check_org.
      authority-check object 'ZNDCHROM'
            id 'PLVAR' dummy
            id 'OTYPE' dummy
            id 'KOSTL' field rep2_tab-kostl.
    endform.                  "auth_check_org
    Reward points for useful Answers
    Regards
    Anji

  • HR ABAP Alternate manager

    Hi ,
    I have a requirement to find the alternate manager of an employee ,the requirement is as follows :
    Get the position number from  PA0001-PLANS  (record w/ENDDA=12/31/9999). This i am doing by
    RP-PROVIDE-FROM-LAST P0001 SPACE PNPBEGDA PNPENDDA.
    IF PNP-SW-FOUND = '1'.
    Position_number = P0001-PLANS.
    ENDIF.
    Then i need to look for position in HRP001  the field sobid OTYPE=S, OBJID=position number). Look for RSIGN=A and RELAT=CCA, and ENDDA=12/31/9999.
    IF found then in the report i should populate 'YES' in the report
    else.
    Get SOBID. Look up that position in HRP1001. Repeat steps in 1) above. Continue until either Alt Manager is found, or no Reports To relationship is found (this should be the CEO's position which will not have an alt manager or a Reports To position)
           c) If no alt manager is found, input "No" in this field (without quotes)
    How will i code this .
    can any body provide their inputs?
    regards
    Prasun

    I think you already have all the logic required, so you should only dress it in ABAP code.
    It should go more or less like this
    "alterative manager position
    data l_alter_pos type plans.
    "related position
    data l_position type plans.
    RP-PROVIDE-FROM-LAST P0001 SPACE PNPBEGDA PNPENDDA.
    IF PNP-SW-FOUND = '1'.
       l_position  = P0001-PLANS.
    ENDIF.
    while l_alter_pos is inital.
    call function 'RH_READ_INFTY_1001'
            exporting
              plvar            = '01'
              otype            = 'S'
              objid            = l_position
              istat            = '1'
              begda            = sy-datum
              endda            = '99991231'
              subty            = 'ACCA'
            tables
              i1001            = lt_1001
            exceptions
              nothing_found    = 1
              wrong_condition  = 2
              wrong_parameters = 3
              others           = 4.
          if lt_1001 is not initial.
               "related position found
               read table lt_1001 assigning <wa_1001> index 1.
               if sy-subrc = 0.
                  l_alter_pos = <wa_1001>-sobid.
                  exit.  "don't look further
               endif.
          else.
               "no position found, look other relationship
                "here I don't know how you want to pass SOBID, of which object?
                l_position = ....-sobid,
               "check new position to be found (go at the beginnig of the loop)
          endif.              
    endwhile.
    write: 'Alternative manager position' , l_alter_pos.
    The only confusing thing in your logic is this point
    else.
    Get SOBID. Look up that position in HRP1001.
    Which means if you don't find any relation to current position, look up for this position relationship? This does not make sense for me. So if you clarify more, we could help more.
    Regards
    Marcin

  • Get Support at Logon Page for ABAP User Management.

    Hi,
    Just want know that is it possible to have Get Support feature at Portal Logon page when portal is configured as User Management of Application Server ABAP as Data Source.
    Basically, the password reset functionality should work from Get Support link when Porta UME is User Management of Application Server ABAP as Data Source.
    If Possbile, please let me know what configuration needs to be done..
    Thanks in advance.
    Regards,
    Aditya Metukul
    Message was edited by: aditya metukul

    Hi,
    Try <portalschema>.wwv_redirect.url('<portalschema>.home');
    Please replace portalschema with the name of your portal schema.
    Thanks,
    Sharmila

  • WD ABAP Travel management

    We have activated business function FIN_TRAVEL_1 in ECC in order to use ABAP WD based applications through BP for ESS 1.41.
    Based on this [online sap documentation|http://help.sap.com/erp2005_ehp_04/helpdata/en/97/7dc46839ff314f863b90e7fbd12c8e/frameset.htm] , it explains by saying - once expenses request is approved by manager, a mail will be trigerred to FI department for payment posting using background job processing program (RPRFIN00_40).
    But, it does explain how the advance section is handled whenever employee is requesting for advance via travel request once it is approved by manager. Can anybody tell how this is handled in FI ?
    Another more sceanrio, is there any option is Travel management wherein employee can only request for advance - for example employee is planned to extend his/her stay on deputaion ?
    Is tcode trip is absolute or still continued to be use in ECC ?
    Regards,
    Anil Kumar.

    Hi,
    This workflow..for If a trip with status request approved/settled or trip approved/settled is assigned the status transferred to FI by transfer program RPRFIN00_40, a workflow is started, based on template type TripTransFI.
    The configuration part for the Travel management you can get it form follwoing link
    ESS / MSS Configuration (SAP Best Practicesfor SAP HCM V2.600) (N06)
    http://help.sap.com/bp_hcmv1600/BBLibrary/Documentation/N06_BB_ConfigGuide_EN_US.do
    the senario that you r discussion is abt Workflows .................
    thre r Workflows iin the SAP system ..........that you can use for the same
    But you need to use that AS per your bussiness Requairements.......

  • HR-ABAP Payroll report

    Hi Gurus,
       I have to display payroll report ( With PNP logical data base ), where in I have to compare indicator 'P' & 'A' records of each personal number for given period.
      sample code & useful links will be  rewarded with points.
    Thanks,
    U.S.Raju

    refer program
    EXAMPLE_PNP_GET_PAYROLL.
    It might be useful to u....

  • Synchronous Inbound ABAP Proxy - Manage status in SXMB_MONI

    Hi Gurus!!
    I have a synchronous SOAP->PI->ABAP Proxy. This ABAP Proxy sends a response to the Sender SOAP with the result of the process execution.
    If the execution finishes with an error (by example, the material to change is locked by another user), the ABAP Proxy sends the response with this error to the SOAP Sender, in the response of the message, without exception. In SXMB_MONI the execution of the message is correct. Is there any way to set the status of the message on SXMB_MONI to other status, and continue sending the corresponding response to the SOAP Sender? If is possible without exception handling?
    Thanks and regards,
    MML001.

    Hope I understood your question. You can send the response (happy flow without exception) and fault message (application or business exception) from the inbound proxy response. But in both cases , SXMB_MONI treats the response message is success. Only in the case of system or connectivity between systems, it shows error message. You could handle even using a specific field in the payload whether the message is successful or not rather than thinking about setting status in monitoring level.

  • Hr-abap payroll

    hi,
    plz  let me know how to exclude one person and run payroll,
    explain process flow .
    Thanks&Regards
    vijaya.m

    Wrong forum!

  • HR ABAP-Payroll Function Module

    Hi pple,
    Well, When I am trying to run the payroll function module PYXX_READ_PAYROLL_RESULT, I am getting a DUMP.
    I checked the corresponding input data from PCL2 table. But still it is dumping.
    Can anyone send me some sample code, so that I too will learn the usage of this function module.
    Regards,
    Raja Sekhar

    hi,
    just having a look in google i found this example.
      CALL FUNCTION 'CU_READ_RGDIR'
          EXPORTING
               persnr          = p0001-pernr
          IMPORTING
               molga           = country
          TABLES
               in_rgdir        = rgdir
          EXCEPTIONS
               no_record_found = 1
               OTHERS          = 2.
    LOOP AT rgdir WHERE void = space AND
                         fpbeg GE pn-begps AND
                         fpend LE pn-endps AND
                         srtza EQ 'A'.
       v_pernr = p0001-pernr.
       v_seqnr = rgdir-seqnr.
       CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
         EXPORTING
          clusterid                       = 'RU'
           employeenumber                 = v_pernr
           sequencenumber                 = v_seqnr
      READ_ONLY_BUFFER                   = ' '
      READ_ONLY_INTERNATIONAL            = ' '
      ARC_GROUP                          = ' '
      CHECK_READ_AUTHORITY               = 'X'
      FILTER_CUMULATIONS                 = 'X'
      CLIENT                             * IMPORTING
      VERSION_NUMBER_PAYVN               *   VERSION_NUMBER_PCL2                      CHANGING
           payroll_result                     = payroll
        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.
    Hope it helps.
    Best regards.

  • HR ABAP payroll Related

    Hi,
    Can any one give an idea of how to implement the fn. module HR_GET_PAYROLL_RESULTS as i tried giving the values for a already exisiting personnel from pc_payresult ,in the import parameters of function module and execute it iam not getting the results table but instead gives an error message
    Exception       WRONG_STRUCTURE_OF_RESULT_TAB                               
    Message ID:      RP      Message number:      016
    Message:                                                                    
    WRONG_STRUCTURE_OF_RESULT_TAB  
    Thanks in advance
    Regards,
    Sangram

    Hi Sangram,
    See below code sample for reading payroll results for an employee in US
    *select the max sequence number for the PERNR from directory
      SELECT MAX( seqnr )
        INTO w_seqnr
        FROM hrpy_rgdir
       WHERE pernr EQ w_pernr.
      IF sy-subrc IS INITIAL.
    **get the payroll results for the employee
        CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
          EXPORTING
            employeenumber               = w_pernr
            sequencenumber               = w_seqnr
            clusterid                    = 'RU' "depends on for which country
          CHANGING
            payroll_result               = i_payresult
          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
            OTHERS                       = 8.
        IF sy-subrc IS INITIAL.
    *Get the CRT (cumulative results) table entries
          i_crt[] = i_payresult-inter-crt[].
    you can read the i_crt table with wage type (lgart) & cumty (yearly) and get the year to date amounts.
    This is for US so the declaration of parameters are as follows
    i_payresult        TYPE payus_result,
    i_crt              TYPE TABLE OF pc208.
    Cheers

  • Hr-abap payroll (payslip problem)

    Hi,
    I am modifying the payslip.
    Here in input screen we r using plant option.
    my problem is if the person shifts from one plant to another plant then the payslip of that person must be latest plant payslip.
    but if the end user takes payslip of the persons according to plant wise then that particular persons payslip is comming in both the plants.
    I am using the following FM.
    CALL FUNCTION 'LAST_DAY_OF_MONTHS'
        EXPORTING
          DAY_IN            = W_BEGDA
        IMPORTING
          LAST_DAY_OF_MONTH = W_ENDDA.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    is there any function module like a person joining the middle of the month
    for example:
    he joins on 15 th of the month and it has to calculate the last day ofthe month.

    Hi
    Eg:
    parameters: s_date type sy-datum,
                      e_date type sy-datum.
      s_date = sy-datum.
      call function 'RP_LAST_DAY_OF_MONTHS'
           exporting
                day_in            = s_date
           importing
                last_day_of_month = e_date.
    write : e_date.
    Regards
    Raj

Maybe you are looking for

  • I need a code to run a report from a forms on 10G...

    Hi!! I´m migrating from 6i to 10G and i cant run a report... can someone send me a sample code to run a report from a form in 10G?? Thanks!! Regards!

  • How to create a dynamic tag in MII

    Hi  , I want to repeat this item tag for different segments and for each segment the <SEGNAM> will be changing and <SDATA> i am fetching from DB. Is there any way to make this item tag a dynamic tag. so that i will use the same item tag for different

  • Adobe Muse Full Screen Slideshow image quality

    Hi, I have a question. Is it natural that if i add an image to my slideshow the quality of it in adobe muse or in my browser is worse than original size? My image is rather big 3400x and when it is exported to muse i see pixels and blur effect etc. I

  • Syslog triggered fetch config

    Hi, I have an issue with syslog triggered fetch config feature. The problem is that LMS expects Sub-facility to be a part of the syslog message. I have set the Facility to be SYS and severity 5. Result? Nothing is happening, because none of our devic

  • Folders duplicate problem

    Hi, I have a perfectly organized library in itunes. I have 110G of music perfectly labelled and with cover art!!! My problem is, on my computer, my music folder (itunes media) is about 330G I REALLY don't want to mess up anything in my library but is