Salary in the current month and  the previous one

Hi
I have a table that stores payroll details like the following stracture
earn code
period from
period to
user_id
time
I want to do one report which displays both the salary of one employee in the current month and his salary is the previous one
Thank you for your help

you might use the LAG-function to get the previous months salary. Hard to know, as you did not provide any information about your report and database versions.

Similar Messages

  • Creation of a Query to show the values for the current month and the last 12 months data.

    Dear All,
    Good day!
    I have to create a Query with the below requirement.
    I have to create a Query to show the values for the current month and the last 12 months data.
    Can you please guide me how to achieve this ??
    thank you,
    Regards,
    Hema

    Hema
    explain the exact problem..? as you mentioned you want to create query to show values for current month and last 12 months.. so I think you want to show values for 12 months from current data.. you can achive this by multiple way..
    you can have selection screen and field with date .. and restrict based on system current date and 12 months before or you can handle this at your target.. .. I mean there are multiple ways to restrict data by date range..
    for some more hints..
    http://www.forumtopics.com/busobj/viewtopic.php?t=34393&sid=7fba465d0463bf7ff5ec46c128754ed6
    http://businessintelligence.ittoolbox.com/groups/technical-functional/cognos8-l/how-to-display-last-12-months-in-report-based-on-todays-date-3231850
    http://scn.sap.com/thread/3217381
    search on SDN you will get many other ways..
    Thanks,
    Bhupesh

  • How to create a function to get the 16th of the current month and the 15th of the next month

    I need to create a function to get the 16th of the current month and 15th of the next month to use it in the fast formula to calculate the sick leave.
    Example:
    If an employee takes a sick leave from 16 feb 2015 to 17 feb 2015 , I want it to affect march's payroll not February.
    Please help and thanks in advance.

    Below statement gives you the result. Use the concept and write your PL/SQL function.
    select TO_DATE('16-'||TO_CHAR(SYSDATE, 'MON-RRRR')), TO_DATE('15-'||TO_CHAR(add_months(SYSDATE, 1), 'MON-RRRR')) from dual;
    Or you can use same construct directly in the fast formula by changing syntax accordingly.
    Regards,
    Peddi.

  • Close the current UI and open another one

    Hello everyone,
    I've got the following code and I want to close the current window and open another one. When i use "System.exit(1);" it closes everything when I use "this.dispose()" it doesn't close anything what could I try to get this to work? any suggestions?
    the code is:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    //public class Equip_or_Job implements ActionListener {
    public class Equip_or_Job extends Frame implements ActionListener {
        JFrame dFrame;
        JPanel jePanel;
        JButton choice;
        JComboBox jeqid = new JComboBox();
        public Equip_or_Job() {
            //Create and set up the window.
            dFrame = new JFrame("Work with Jobid or Equipid");
            dFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Create and set up the panel.
            jePanel = new JPanel(new GridLayout(2, 1));
            dFrame.getContentPane().setLayout(new BorderLayout());
            //Add the widgets.
            addWidgets();
            //Set the default button.
            dFrame.getRootPane().setDefaultButton(choice);
            //Add the panel to the window.
            dFrame.getContentPane().add(jePanel, BorderLayout.CENTER);
            //Display the window.
            dFrame.pack();
            dFrame.setVisible(true);
    Create and add the widgets.
        private void addWidgets() {
             //Create widgets.
              jeqid.addItem("Chose by Job");
              jeqid.addItem("Chose by Equipment");
              choice = new JButton("Chose");
                //Listen to events from the Convert button.
                choice.addActionListener(this);
              jePanel.add(jeqid);
              jePanel.add(choice);
        public void actionPerformed(ActionEvent event) {
              String sel = (String) jeqid.getSelectedItem();
            if("Chose by Job".equals(sel)){
                   InsertNewDates inj = new InsertNewDates();
                   //System.exit(1);
                   dispose();
              else if("Chose by Equipment".equals(sel)){
                   InsertNewDates ineq = new InsertNewDates();
                   //System.exit(1);
                   dispose();
    Create the GUI and show it.  For thread safety,
    this method should be invoked from the
    event-dispatching thread.
        private static void createAndShowGUI() {
            //Make sure we have nice window decorations.
            try {
                   UIManager.setLookAndFeel(
                        UIManager.getCrossPlatformLookAndFeelClassName());
              catch (Exception e) { }
            Equip_or_Job eorj = new Equip_or_Job();
        public static void main(String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    thanks in advance :o)

    I'm not exactly sure what you want to do, but...:
    dFrame.setVisible(false) hides the current Frame and the application is still running
    Best reagrds, Marco

  • SQL Query-return current month and the same month of last year

    hello-
    I would like to display the current month name, count of errors, year, and month number for both current year and previous year. Having trouble getting my query to display as following..... 
    Month   CountofErrors      Year      MoNo
    January                  57    2015          1
    January                 155   2014          1
    thank you!

    Its hard to answer without DDL and DML and sample data.
    Give a try
    select DATENAME(month,getdate()),Month(getdate()),YEAR(getdate()) ,COUNT(*) from dbo.errortable
    where DATENAME(month,getdate())='January' and YEAR(getdate()) in(YEAR(getdate()),YEAR(getdate())-1)
    group by DATENAME(month,getdate()),Month(getdate()),YEAR(getdate())
    --Prashanth

  • Using SQL stored procedures How to get the list of .rar files from e:\Tempbackup directories from the different remote desktop windows server and delete the .rar files which contains the current month and date

    Concept:
    Every month i need to find the list of .rar files from the
    E:/TempBackup directory from the different environments (remote desktop servers) and i need to delete the current month
    .rar files alone from the respective (E:/TempBackup) directory. below is example files structure inside the
    E:/TempBackup.
    example:
    zDROP_2014_08_31_Backups.rar
    zDROP_2014_09_31_Backups.rar
    zDROP_2014_10_31_Backups.rar
    from the above list i need to delete the zDROP_2014_08_31_Backups.rar(current month) file alone and also logs should be capture for this deletion.
    key words for this are zDROP and Current month and date.
    i need a stored procedure for this concept. could you please help on this.

    Hello,
    You can schedule an operating system task (Control Panel -> Schedule task) to either call a batch file or a PowerShell script.
    Please read the following resources for examples:
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/61373719-fffb-4d94-bdbe-7d8ed8620b44/delete-filesfolders-on-remote-servers-using-powershell?forum=winserverpowershell
    http://www.networknet.nl/apps/wp/archives/943
    http://jeffwouters.nl/index.php/2011/10/powershell-script-to-delete-files-older-that-a-week/
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • How to set the current month as the default value of an input control?

    Hello,
    I want to set the current month or current year as the default value of an input control. Something like try to get the month from the currentdate() formula and assign it to the input control.
    Is this possible?
    Thanks & Regards
    SU

    >
    soauniverse wrote:
    > Hello,
    >
    > I want to set the current month or current year as the default value of an input control. Something like try to get the month from the currentdate() formula and assign it to the input control.
    >
    > Is this possible?
    >
    > Thanks & Regards
    > SU
    I don't think so.  I tried to find a property or something in that Input Control but there is nothing to set it that way.

  • How can I get the current user and the current page?

    Hi everyone
    Question..
    It is possible to get the current user (from the user's database on apex) and the current page? (I mean, if I'm in page 4 be able to query a variable / function or something which could give me the current displayed page)
    Thank you very much... I'd been researching without success :-S so I'll appreciate your help
    Regards,
    Fury

    Fury,
    If the user has authenticated, :APP_USER is the name that was used. The current page id is in :APP_PAGE_ID.
    Although I showed bind variable notation for those, & substitution format and v() notation are also available for referencing developer-defined items or built-in names. See the User's Guide for more details.
    Scott

  • Stepper motor 8SMC1-USBhF and power meter PM100D: how to merge the two VIs into one and make a XY graph of the current position and the power

    Hi there,
    I have a stepper motor (8SMC1-USBhF) and a power meter (PM100D). I want to measure the power while the stepper motor is moving, and obtain an XY graph with the current position on x axis and the power on y axis. So I just merged the two VIs together by copying and pasting, and created local variables for current position and readout value, and changed them to read, and then linked them to the XY graph, but apparently it doesnt work.
    So could you please instruct me how to merge them and obtain an XY graph appropriately?
    Attached are the two VIs.
    Thank you!
    Attachments:
    PM100D Simple Example.vi ‏42 KB
    StepperMotor.vi ‏97 KB

    Hello,
    The XY graph requires that each datapoint on the X axis corresponds to a datapoint on the Y axis.  To create XY data you will need to creat two arrays of X data and Y data with the same amount of elements then cluster the two arrays together to wire into the XY graph.  As an example take a look at the VI snippet below.  Is there a specific error being thrown?
    Regards,
    Isaac S.
    Applications Engineer
    National Instruments

  • If I bought a Macbook within the past month and the RAM starts to malfunction do I have to pay for a new RAM or is it covered by my 1 Year Warranty?

    I bought a Macbook Pro a month ago and all of a sudden my computer has been malfunctioning. I went to the apple store and they said that my RAM is not working correctly and now I have to pay $200 for a new one. Do I have to pay for it or should my 1 Year Warranty cover the cost? 

    I agree with you that Apple should cover it, and that if they're initially unwilling to, then a complaint should be raised.  However, the poster remarked that he went to an Apple store, Apple diagnosed the problem as being faulty RAM, and then the poster said that he has to pay $200 for "a new one" (new RAM, I presume).  No matter what you or I say on here, if the representative that the poster spoke to brought up a $200 charge, then what is he going to do?  "Some users on the internet told me it should be free, so I'm not going to pay that - just fix it for free"?
    Or maybe I'm having trouble following what happened.  It seems to me that if the poster went to an Apple store and had a system that was within warranty, if Apple found a problem, they would replace it for free.  In that case, where did the poster get the number for the $200 charge, and why is it even necessary to ask if it's covered?  Either he encountered an Apple Genius who didn't handle the case properly, or there's more to the story that he's not revealing (water damage, or so on).

  • Since getting os5 my calendar is blank until i go back a month, then return to the current month and everything appears. Anyone else having this problem?

    First time submission. Sorry if I'm doing it wrong.

    Others have reported that problem.
    If you want Apple to know report it at: http://www.apple.com/feedback/ipad.html

  • Display Month and 12 previous Months

    I am trying to create a report (CRXI) which will display month data for the current month and the 12 previous months.   I am going to use subreports (similar to a calendar report) but am having trouble displaying the 12 previous month, year  headers.  
    I get the current month, year from a prompt date and then need to decrease a month for 12 months.  
    Any help would be appreciated.

    Hi Martha,
    If you want to create a report for last 12 months and don't want to include present month then use the record selection for main report as
    (month({DateField}) < month(currentdate)
    and
    year({DateField})= year(currentdate))
    or
    (month({DateField})>=month(currentdate)
    and
    year({DateField})=year(currentdate)-1)
    and in the subreport use the record selection to get current month date as
    (month({DateField}) =month(currentdate)
    and
    year({DateField})= year(currentdate))
    Regards,
    Raghavendra

  • How to calculate the measure for the next month using the AGO Function

    Hi,
    I need to calculate the measure for the current month and the next month.
    Can anyone please let me know the syntax to use AGO function for the above requirement.
    Regards,
    Ambika Nanda.

    Hi.
    You can also use Oracle analytic functions LAG and LEAD inside the EVALUATE obiee function. The second one will give you the next measure.
    For example the report is:
    TIMES.CALENDAR_MONTH_DESC
    SALES.AMOUNT_SOLD
    LAG column: EVALUATE('LAG(%1, 1) OVER (ORDER BY %2)' AS DOUBLE, SALES.AMOUNT_SOLD, TIMES.CALENDAR_MONTH_DESC)
    LEAD column: EVALUATE('LEAD(%1, 1) OVER (ORDER BY %2)' AS DOUBLE, SALES.AMOUNT_SOLD, TIMES.CALENDAR_MONTH_DESC)
    And the result is:
    CALENDAR_MONTH_DESC--------AMOUNT_SOLD--------LAG--------------LEAD
    2000-01----------------------------------8025513.84---------------------------8474475.88
    2000-02----------------------------------8474475.88----- 8025513.84-----7439568.24
    2000-03----------------------------------7439568.24------8474475.88-----7062040.48
    2000-04----------------------------------7062040.48------7439568.24-----7497971.40
    Regards
    Goran
    http://108obiee.blogspot.com

  • To Display two previous months YTD-Actual columns from the current month

    Hi All,
    i want to create a FSG report in which i require three columns describing months one for the current month and two for the previous months in order like if i run report in Oct 06 then other columns will be Sep 06, Aug 06 is this possible?
    if yes then how ??
    i m using POI-2 and POI-1 which is giving wrong results.
    thanks.

    i got the solution:)
    i was just assigning an offset to the cumulative column as well.

  • How to get the current month starting date and ending date by default ?

    Hello Creators,
    This is my requirement, kindly do the needful, Please dont gimme any links i've no access for other sites, gimme the right solution.
    My Requirement :
    Creation Date (VBAK-ERDAT) - Select Option. By default, the program should run for the current Month ie between the starting and ending date of the current month when the program is run. Today the date is 18th using sy-datum we can bring the current date by calling it in the initialization event, but the requirement is it should not give me the current date, it should only give me the month starting date and the end date. Kindly help.
    Thanks in advance ...

    DATA: gv_datum LIKE vbak-erdat.
    SELECT-OPTIONS: so_date FOR gv_datum.
    INITIALIZATION.
      CALL FUNCTION 'HR_JP_MONTH_BEGIN_END_DATE'
        EXPORTING
          iv_date             = sy-datum
        IMPORTING
          ev_month_begin_date = so_date-low
          ev_month_end_date   = so_date-high.
      so_date-option = 'BT'.
      APPEND so_date.
    START-OF-SELECTION.
    Hope this solves the issue. Don't forget to be generous
    Cheers,
    Sougata.

Maybe you are looking for

  • Standard BI Data Source for FMGLFLEXT

    Hello Friends, The standard data source for the Financials New Legder is 0FI_GL_10 General Ledger: Leading Ledger Balances, which fetches the data from the FAGLFLEXT Table using the Extract Structure FAGL_EXTSTRUCT_LEAD. However there has been a migr

  • Space after Paragraph: How much picas equal a blank line in Garamond Regular 7.5?

    I'm using Indesign CC and  would like to add a blank line after every paragraph in my document. I found out how to do that, but the only unit I'm offered is picas. I could probably switch to inches, but that doesn't really help me. My main text is wr

  • Is knowledege in Abap necessary to learn Web Dynpro java

    Hi All, I am getting training in Web Dynpro java i want to know whether  knowledege in Abap is necessary to learn Web Dynpro java. Thanks & Regards, jyothi.

  • How to Delete unwanted Apps for ever?

    Sometimes we download 'apps', which may turn out just duds or NOT as good and functional as we expect them to be. Then we decide to delete and though they are deleted from iPad ( 4th Gen) or iPhone, the same remain in the iTunes and show up at the ti

  • Re-Download app from Ovi STore

    Hi, I just bought an app from the Ovi STore (Shozu) but had some problems during installation I tried re-downloading it but it prompts me again to buy the application How can you re-download an application you allraedy purchased from the ovi store (t