HR ABAP - to get payroll data after payroll run

Hi,
there is a Weekly payroll area, Now after the payroll run every week -  I need to get all the wage types starting with '7' for the pernr s.
For this i first find out the date (current date - 7 days)  and then pass it to FM : HRAR_GET_PAYROLL_PERIOD to get the payroll period - Is this step correct ?
then i read the RGDIR and then the payroll results using FMs. Is this the correct way to do.
Also if i need all the wagetypes starting with '7' is it fine if i read only the RT table.. is there any need to read any other ?
Any help with the correct flow logic ..

This FM returns correct results, but to be 100% sure do a small test:
- go to se37 -> run this FM to test it
- as you have weekly payroll, there should be around 4 such periods within one month, so you should be getting 4 different BEGDA and ENDDA for different date
- enter dates like 01.07.2009 - BEGDA ENDDA should be 01.07.2009 - 08.07.2009
then 09.07.2009 - BEGA ENDDA should be 09-07.2009 - 16.07.2009
etc
- for all above results there should be same PABRJ PABRP, but these are of no interests
- if you get something like above, this means that FM works fine
Now when you get RGDIR, filter it to get only data where FPBEG = BEGDA and FPEND = ENDDA. This way you will work only with the period you want.
Also if i need all the wagetypes starting with '7' is it fine if i read only the RT table.. is there any need to read any other ?
I usually work with this one, also CRT (Cumulative RT) can store WT. My functional guy, however, says that sometimes they might appear in some other tables like BT, but this I am not sure about.
Regards
Marcin

Similar Messages

  • ABAP HR - get pension data

    Hi Experts,
        How can we get pension data of an employee from clusters or payroll results.
    Thank you.
    Regards,
    Admir.
    Points will be rewarded.

    Hi Admir,
    Please check infotype <b>PA0071</b>.
    Regards
    Aneesh.

  • Reg: Interface - SAP payroll data to payroll system

    I am downloading employee data from SAP to TAB delimited flat files.
    For this , i am using logical databases PNP ,Info type P0002 and tables CATSDB.
    In selection screen, i am getting the file name by using PARAMETRERS.
    1.Then at selection-screen , I am calling a method  <b>CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG</b> for display a file open dialog .
    then using GET , i am collecting the reocords into an internal table and then downloading using CALL FUNCTION 'GUI_DOWNLOAD'.
    MY DOUBTS ARE
    1.this is an interface program,as the interface run, a log file should be produced.how to  do this???
    2.I am using CAll Method CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG . is there an alternate function for this???
    3.Give me more information on CAll Method CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG and RP_PROVIDE_FROM_LAST ?????
    4.Payroll data downloaded from SAP must be separated into different files depending on receiving payroll system and business unit.  This is because the data file will be specific to payroll system and business unit.  The file will however have the same format .
    i.e.From : SAP SYSTEM
        To:various systems
            1.PBHR
            2.MICROPAY
            3.PAYFLEX
            4.UNIPAY
    So what conditions i need to put???
    Pl kindly reply imm

    Jayasree,
    1.this is an interface program,as the interface run, a log file should be produced.how to do this???
    Generate a log in a internal table and use the method to download the data into a file. This will be your log file.
    2. I am using CAll Method CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG . is there an alternate function for this???
    This will open a dialog where the user can choose which file needs to be read. This is the latest method that SAP has given, not sure why are you looking for alternatives.
    3. Give me more information on CAll Method CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG and RP_PROVIDE_FROM_LAST ?????
    Sames as above.
    4. The conditions you need to know probably from your functional consultants as to which data needs to go to which system.
    Regards,
    Ravi
    Note : Please reward the posts that help you.

  • Function to get the date after substraction

    Hi Gurus,
    I understand that the function "RE_ADD_MONTH_TO_DATE" is used for calculate the date after added certain month(s).
    But, how do I do it in the other way. What I mean here is I want to substract the date.
    For example my current date is 09.05.2008, substract 3 years is 09.05.2005.
    All ideas and suggestion are greatly appreciated.
    Thanks.

    Hi ,
    u can use the same function module RE_ADD_MONTH_TO_DATE with passing months in negetive number like,
    month = -36.
    in the function module.
    regards,
    kk.

  • Why I get "Error in getting session data" error when running report?

    Hello,
    I have reporting services on one server, and SharePoint 2010 on other server. When I view report from browser, I got blank page. From Report Server Log file, I got below error:
    v VERBOSE: writting session cookie: ekkrjbubp00t5wzc3rzspvzb
    v VERBOSE: Saved report snapshot to session in a background thread <for same session id>
    e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerStorageException: , An error occurred within the report server database.  This may be due to a connection failure, timeout or low disk condition within the database.;
    e ERROR: Error in getting session data: Expired Session: ekkrjbubp00t5wzc3rzspvzb
    e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ExecutionNotFoundException: , Microsoft.ReportingServices.Diagnostics.Utilities.ExecutionNotFoundException: The report execution ekkrjbubp00t5wzc3rzspvzb has expired or cannot be found
    Are there anyone getting the same issue as mine? I did not see any solutions for this issue when I searched.
    Thanks,
    Megan

    There are a number of timeouts in SSRS; session timeout, report execution timeouts, http request timeouts.  A session timeout in SSRS is not the same as a session timeout in ASP.NET.  Below are some articles that can help you understand the timeouts
    and hopefully lead you down the path of discovery.
    This articles is a good article as it discusses the session timeout and the keep alive that is sent from the report viewer.
    http://blogs.msdn.com/b/jgalla/archive/2006/10/11/session-timeout-during-execution.aspx
    This article is good as well in describing some of the timeouts.
    http://blogs.msdn.com/b/dynamicsaxbi/archive/2013/02/14/how-to-addressing-ssrs-session-timeouts.aspx

  • Availability/GR Date after MRP Run

    Hi All,
    After MRP Run for perticular period, system plan the material at the start date of the period. Is there any ways where we can set it to last date of the period.
    Like if I will put the PIR for Month of March and April, system will create the PIR on 01/03/07 and 01/04/07. so is there any ways where it can be change to 31/03/07 and 30/04/07 for march and April.
    Regards
    Pavan

    Hi Pravan,
    you can configure lot size key in SPRO accordingly
    lot size procedure-p
    lo size ind-M
    Scheduling-2
    no of period 1
    assign it o material in MRP 1 view.
    Regards
    Hemant Gadhari

  • ABAP HR : Restriction of data after GET PERNR

    Hi Folks,
    I am using LDP PNP and using get statement. I am using multiple Infotypes. So all the Pxxxx are getting field with each GET PERNR. I have to extract last record which I am getting using RP_PROVIDE_FROM_LAST.
    Can I avoid getting all the data of a PERNR after GET PERNR or is there any other way to get only the latest record.
    Thanks
    Rahul

    Hi ,
    In my opinion i can infer your questions as ..
    suppose p0000 has 3 records for pernr 5125.
    Get PERNR.
    rpprovidefrom last -> triggers last date ..
    Here usage of rp provide allows u to pick the latest entry . Now you are asking the loading of p0000 should happen only with 1 record( instead of 3 ) .
    Get PERNR.
    --> here  u need to see p0000 with 1 entry only ..
    **rpprovide*from last -> triggers last date ..
    May be a check from initialization to restrict based on date entry within the interval .. and if in that interval there are two records i suppose it cannot pick one.. thats my opinion .. lets see if someone has a better solution .
    BR,
    Vijay.

  • ALV - Maybe a NEW problem to get changed data, after input from ALV

    Hi all,
    I have tried to search an existing post to solve this ALV problem, with key words 'ALV' and 'refresh', but I don't find the good one... so sorry if the problem have already been solved.
    <u>An example of the problem and process should be more clear than words :</u>
    1) CALL ALV
    CALL METHOD grid1->set_table_for_first_display
         EXPORTING
                   is_layout        = gs_layout
                   is_variant       = gs_variant "&see below
                   i_save           = x_save     "&see below
                   I_BYPASSING_BUFFER = 'X'
         CHANGING
                   it_outtab        = t_zppegam[]
                   it_fieldcatalog  = GT_field_cat_entete[].
    2) User edit values from cells from ALV.
    For example, insert a new line with '+' button, and <u>fills each cells</u>.
    3) The problem is that at the beginning of the PAI
    there is a blank line into internal table t_zppegam,
    instead of the line with the data filled into cells ALV by user
    3') Internal table t_zppegam have the good data only if user clik on the button refresh of ALV, before go throw PAI.
    Have any suggestions? Thank you for your help.
    Best Regards,
    Tony.

    Hi all,
    I have just solved my problem...
    I have found this one into SE38 / BCALV_GRID_EDIT fifth program.
    data: l_valid(1) type c.
    call method grid1->check_changed_data importing e_valid = l_valid.
    Tony

  • Can't get any data after running a TDP

    Hi,Supers,
    I'm running through TBW10_EN_Col62 and there's a Exercise 8 "Loading Transaction Data from
    a SAP source system":
    1 create a tranformation
    2 create a DTP
    3 excute the DTP
    I excuted the DTP, it's "green",but I didn't got any data in my cube,I goto source ECC run RSA3,there was success extract data.
    the DTP's Extraction Mode is "Delta". the DS name is "0CO_OM_CCA_1".
    question:
    1  Is there any step the Exercise missed? I know if want a delta extraction,first must have a init delta,but the Exercise didn't mention that,I'm famuliar with BW350,not quite with BI7.
    2 In BI7 you can load transaction data only use DTP,without first data package to PSA and then PSA to DSO or cube through DTP?
    thanks!
    Edited by: denny Cai on Dec 19, 2008 9:10 AM

    HI
    If the DS 0CO_OM_CCA_1 is 3.x Datasource first you need to migrate the datasource from 3.x to BI 7.0.
    Without migrating the datasource we cannot load the data from DTP to CUBE.
    So first Migrate the DS wiht Export Option. Then create infopackage and load the data upto PSA.
    Next create Trasformations and load the Data from PSA 0r DATASOURCE  to Datatragets.
    Hope It Clarifies you.
    Regards,
    Nagaraju.V

  • Applet error with changing variable data after several runs....

    Can anyone give some advice on the following:
    I have a java card program running on a gsm sim:
    The program makes use of member variables which
    contain data that is reused and rewritten all the time.
    The member variables are all declared as (for example)
    private byte[] myVariable = {(byte) ' ',(byte) ' '};
    And the values stored in the variables are changed
    everytime the program gets an event. This works fine
    for about 15 - 35 times and then suddenly the program
    can't execute any code that accesses these variables (the
    other parts that simply display a message or the menu and that
    never change their variable's value have no problem running on).
    Does anyone know a specific reason for this ? Should I rather
    use my own EF entries on the SIM to keep data ? Is there any
    specific rules around using variables and reusing them ?
    The only fix (once this occurs) seems to be to reload the applet
    onto the card...resetting the phone etc. does not change this
    behaviour....
    Any help would be much appreciated...

    I don't think that your problem lies in your private member variable.
    From my point of view it is more likely that you some kind of memory allocation problem somewhere.
    Anyway it is always a good idea to post a minimal applet which reproduces the erroneous behaviour.

  • Problem getting correct data from MS Access after doing an Update

    Hi all,
    I have a problem getting correct data after doing an update. This is the scenario
    I am selecting some(Eg: All records where Column X = �7� ) records and update a column with a particular value (SET Column X = �c� ) in all these records by going through a while loop. In the while loop I add these records to a vector too, and pass it as the return value.
    After getting this return value I go through a for loop and get each record one by one from the DB and check if my previous update has actually happened. Since No errors were caught while updating DB, I assume all records are updated properly but my record set shows one after another as if it has not been updated. But if I open the DB it is actually updated.
    This does not happen to all records, always it shows like this
    1st record     Mode = �c�
    2nd record     Mode = �7�
    3st record     Mode = �c�
    4nd record     Mode = �7�
    9th record     Mode = �c�
    10th record     Mode = �7�
    I am relatively new to java and this is someone elses code that I have to modify,So I am not sure if there some thing wrong in the code too
    //Here is the method that gets records and call to update and add to vector
    public static Vector getCanceledWorkOrders() throws CSDDBException{
    //Variable declaration
      try {
        objDBConn = DBHandler.getCSDBCon();
        strSQL  = "SELECT bal bla WHERE [Detailed Mode])=?)";
        objStmt = objDBConn.prepareStatement(strSQL);   
        objStmt.setString(1, '7');
        objWOPRs = objStmt.executeQuery();
        while (objWOPRs.next()) {
         //Add elements to a vector by getting from result set
          //updating each record as PROCESSING_CANCELLED_WO(c)
          iRetVal = WorkOrderDetailingPolicy.updateRecordStatus(objPWODP.iWorkOrderNumber, objPWODP.strPersonInformed, EMSConstants.PROCESSING_CANCELLED_WO);
          if (iRetVal == -1) {
            throw new NewException("Updating failed");
      catch (Exception e) {
        vecWONumbers = null;
        throw new CSDDBException(e.getMessage());
      }finally{
        try {
          objWOPRs.close();
          objStmt.close();
          DBHandler.releaseCSDBCon(objDBConn);
        catch (Exception ex) {}
      //return vector
    //here is the code that actually updates the records
    public static int updateRecordStatus(int iWONumber, String strPerInformed , String strStatus) throws CSDDBException{
       PreparedStatement objStmt = null;
       Connection objDBConn  = null;
       String strSQL = null;
       int iRetVal = -1;
       try{
         objDBConn  = DBHandler.getCSDBCon();
         objDBConn.setAutoCommit(false);
         strSQL = "UPDATE Table SET [Detailed Mode] = ? WHERE bla bla";
         objStmt = objDBConn.prepareStatement(strSQL);
         objStmt.setString(1, strStatus);    
         objStmt.execute();
         objDBConn.commit();
         iRetVal = 1;
       }catch(Exception e){
         iRetVal = -1;
       }finally{
         try{
           objStmt.close();
           DBHandler.releaseCSDBCon(objDBConn);
         }catch(Exception ex){}
       return iRetVal;
    //Here is the code that call the records again
      public static WorkOrderDetailingPolicy getWorkOrders(int iWorkOrderNo) throws CSDDBException{
        Connection objDBConn = null;
        PreparedStatement objStmt = null;
        ResultSet objWOPRs = null;
        WorkOrderDetailingPolicy objPWODP = null;
        String strSQL = null;
        try {
          objDBConn = DBHandler.getCSDBCon();    
          strSQL = "SELECT * FROM [Work Order Detailing] WHERE [Work Order No] = ?";
          objStmt = objDBConn.prepareStatement(strSQL);
          objStmt.setInt(1, iWorkOrderNo);
           objWOPRs = objStmt.executeQuery();
          if (objWOPRs.next()) {
            objPWODP = new WorkOrderDetailingPolicy();
            objPWODP.iWorkOrderNumber = objWOPRs.getInt("Work Order No");
            //......Get Record values
        catch (Exception e) {
          objPWODP = null;
          throw new CSDDBException(e.getMessage());
        }finally{
          try {
            objWOPRs.close();
            objStmt.close();
            DBHandler.releaseCSDBCon(objDBConn);
          catch (Exception ex) {}
        return objPWODP;
      }

    Hello,
    Can you put an example of your problem online?
    Are you sure you're not having problems with case sensitive data?
    Thanks,
    Dimitri

  • Parse the URL column to get data after 5th "/"

    Hi All,
    I have a url column that i need to parse to get the data after 5th Slash. can anyone help me here.
    Table : URLData
    url
    http://www.abc.com/OurJourneys/Ourlife/the-Great-Explorers/dp
    http://www.abc.com/OurJourneys/Ourlife/Times-new-time/OurJourneys.aspx year=2015&region=Antaica&type=Sl
    http://www.abc.com
    I result should be below data
    the-Great-Explorers
    Times-new-time
    Any help would be much appreciated

    The code you gave me works fine but it always gets me second last position.
    http://www.abc.com/OurJourneys/Ourlife/the-Great-Explorers/dp
    http://www.abc.com/OurJourneys/Ourlife/Times-new-time/OurJourneys.aspx
    year=2015&region=Antaica&type
    http://www.abc.com
    what if i want to get 3rd last position.
    http://www.abc.com/OurJourneys/Ourlife/the-Great-Explorers/dp
    http://www.abc.com/OurJourneys/Ourlife/Times-new-time/OurJourneys.aspx
    year=2015&region=Antaica&type
    http://www.abc.com
    Can you help me to get code for that.

  • How to get next date or date after n th day of a given date ?

    I want to get the date after n th day of a given date.
    Here a date and an integer will be the input.
    suppose 15/12/2007 and 3 are the inputs and the output will be 18/12/2007
    Is there any method to solve this purpose ?
    Plz its urgent !!

    javagalaxy.com wrote:
    I didn't feel this is a home work for them. I feel the OP is trying to learn.Well, that is a part of what homework is. Now, tell me how doing it for them helps them learn? They might run it once, to make sure it does what it is suppossed to do, then simply turn it in. In the process, they haven't learned a thing. Only a very small fraction of posters will study the posted code to figure it out, as evidenced by the fact, that if the code is not 100% cut-n-paste capable for their assignment, they will come back and complain that this or that does not work, or was not done.
    >
    This will be good learning for the OP, why don't you point out what is done badly.
    Did you mean using
    now.add(Calendar.DAY_OF_MONTH, daysToAdd);
    instead of
    now.set(Calendar.DAY_OF_MONTH, now.get(Calendar.DAY_OF_MONTH)+daysToAdd);?
    That is the main crux of it, yes, but homework or not, you should actually attempt to catch and handle the exceptions, rather than simply declaring "throws Exception". Handling exceptions in the homework assignments will cause that to become a habit and you will actually do it correctly without thinking about it. Just like constantly declaring "throws Exception" in your homework will also make that a habit, and guarnatee that you will someday also do that when it counts, thereby causing all sorts of problems (usually for coworkers).
    if its something else then please do let us know.
    I can also learn how to do it good :)

  • Error reading data after submit.

    Hi All,
    I have a problem getting some data after i submit a standard report FPO4.
    Here the issue is with a file that is getting created by a dynamic report created and called internally by a report on the same path every time dynamically. say (/devabap/if/out/XXXX.0 for the first time and the next time we run the report file name would be /devabap/if/out/XXXX.1 etc.2,3,4,5,). I am now using the FM: FILE_GET_NAME to get the name and then proceeding further to get my output.
    But when i am trying to use the above function module for a single run i am getting the correct result as ther is only one file present in the path.If i run the same report with different variants parallely in background then in the application server there are there are two or more files already created for two different run's as said above ( .0 and .1) the logic is such that i have to get the latest file and so a wrong file is getting picked up at the time of parallel run.
    Note: When i Submit the transaction the ouput screen along with the data contains the File path & File Name as said above.I am trying to get the file name from the submit screen as the file is generated dynamically. For change in the instance (run) again there will be change in the file name. So system is not identifying the correct file. The dynamic program that is getting created and placing the file in the path is opened in another session (NEW) and hence i am not a ble to use any of the methods like ( SET/GET Parameters) also the IMPORT/EXPORT statements.
    The flow of the execution is (Program A --> Standard Transaction B --> Dynamically created Program C --> File is getting created) . Here i want the file name that program c is creating in my zprogram A.
    Could any one please advise?
    Regards,
    Vijay

    Hi All,
    I have a problem getting some data after i submit a standard report FPO4.
    Here the issue is with a file that is getting created by a dynamic report created and called internally by a report on the same path every time dynamically. say (/devabap/if/out/XXXX.0 for the first time and the next time we run the report file name would be /devabap/if/out/XXXX.1 etc.2,3,4,5,). I am now using the FM: FILE_GET_NAME to get the name and then proceeding further to get my output.
    But when i am trying to use the above function module for a single run i am getting the correct result as ther is only one file present in the path.If i run the same report with different variants parallely in background then in the application server there are there are two or more files already created for two different run's as said above ( .0 and .1) the logic is such that i have to get the latest file and so a wrong file is getting picked up at the time of parallel run.
    Note: When i Submit the transaction the ouput screen along with the data contains the File path & File Name as said above.I am trying to get the file name from the submit screen as the file is generated dynamically. For change in the instance (run) again there will be change in the file name. So system is not identifying the correct file. The dynamic program that is getting created and placing the file in the path is opened in another session (NEW) and hence i am not a ble to use any of the methods like ( SET/GET Parameters) also the IMPORT/EXPORT statements.
    The flow of the execution is (Program A --> Standard Transaction B --> Dynamically created Program C --> File is getting created) . Here i want the file name that program c is creating in my zprogram A.
    Could any one please advise?
    Regards,
    Vijay

  • Schedule lines are not coming for HALB after MRP run

    Dear All,
    I am not getting schedule line after mrp run, inspite of all required setting only purchase requisitions are coming.
    Material type is HALB and involve a subcontracting process (30). For raw material I am getting the schedule line but in the case of HALB, it is not coming.
    Pls let me know if I am missing something and guide me further on this.
    Thanks & Regards
    Kundan Kumar

    Hi,
    In transaction OMDT you have to enable the indicator create schedule lines
    In MD02 MRP control Prameter here select the Delivery schedules -3- Schedule line. Processing Key as NETCH and Planning Mode - 3 delted and recreated.
    Maintain source list ME01, in that put MRP indicator as '2' i.e. schedule lines via MRP.Put your agreement no in that.
    If u run MRP properly u will get schedule lines automatically in ME38.
    Make the schedule agreement, make it source relevent in the source list make is FIX and MRP indicator as 3.

Maybe you are looking for

  • Windows 7 won't allow file association with CC apps.  Why?

    The title says it all.  Any app I installed that replaced a prior version won't link.  I go in manually and attempt to create a file type association and Windows simply ignores the request.  There are no error messages.  I hestitate to dive into rege

  • TAW10 and TAW12 exercises in Netweaver 7.01 ABAP Trial Version

    Hello, I just finished the ABAP academy, courses TAW10 and TAW12. I want to do some exercises for studying to the certification test, but the exercises in the books require ABAP objects (such as tables, structures, data elements, templates and so on)

  • ADF Button components: How to disable drag and drop [SOLVED]

    Hi everyone I need to develop an application which allows not the user to drag and drop button components. I've converted every single af:commandbutton to h:commandbutton, to prevent this behaviour, but a huge lot of other problems arose from this "s

  • Selection screen and DP

    Hi friends           Can any one tell me which event triggers first and the order of event triggering when both selection screen and dialog program is used..Also tell me which event  wont fire. Regards Suresh.A

  • Startup server Solaris EP SP2 Patch 4

    I am trying to startup portal..... I start state controller successfully then dispatcher successfully joins state controller then I attempt to start server and it hangs at Loading service: com.sap.portal.usermanagement|security Aug 5, 2004 11:50:36 A