How to compare Sale data with Previous data

Hi Guys,
    Any one tell me how we will compare Sales data with Last year Sale data. Is there any T.Code or any kind of Report in the SAP. If available please suggest the same.
Thanks & regards,
Naveen Bhatia

Hi Naveen,
Did yo ucheck t-code SD01
Regards
Rohit.

Similar Messages

  • How to compare table data and table field

    Hi buddy,
        I have some question about how to compare table data and table field.
       1. I know there is one method:   CL_ABAP_UNIT_ASSERT=>ASSERT_TABLE_CONTAINS  , it use in unit test to compare the table data(A and B) , you can loop table A into structure A1, then use this mehtod it can compare whether table B contain structure A1.  but when I try to use this in main program it will dump.
              CL_ABAP_UNIT_ASSERT=>ASSERT_TABLE_CONTAINS(
                                                                                                        LINE    = A1
                                                                                                        TABLE = B ).
           Is there any method or FM can be used to compare the table data ?
        2. I also want to compare two table field , try to find out the different. How to realize this.
    Thank you for your sincerely answer.

    Hi Zongjie,
    What`s the difference, if you using loop A into wa_A, read table B into wa_B with all field, then compare with wa_A and wa_B.
    The question 2, seems no standard FM available here.
    Loop A into wa_A.
       Loop B into wa_B.
           if wa_A-field1 eq wa_B-field1.
           endif.
            if wa_A-field2 eq wa_B-field2. 
           endif.
       endloop.
    endloop.
    regards,
    Archer

  • How to Compare two Dates in java

    How to Compare two Date Field after getting the values from jTextField1.getText() and jTextField2.getText().

    Date d1=DateFormat.getDateInstance().parse(yourstring1);
    same for d2
    d1.compareTo(d2);
    could be that i misrememberd the exact naems of some functions or mixed up something in the equence of d1=

  • How to compare two dates that should not exceed morethan 3 years

    hi all,
    can you please tell me how to compare two dates( basically dates are string type)
    that should not exceed more than 3 years? in JAVASCRIPT
    Thanks in Advance.

    This is not a JavaScript forum.
    [*Google* JavaScript Forum|http://www.google.co.uk/search?q=JavaScript+Forum&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-GB:official&client=firefox-a]
    Good luck.

  • How to compare two dates to know which one is greater than oher?

    how to compare two dates to know which one is greater than oher?
    Please search before asking basic questions.
    Edited by: Rob Burbank on Mar 27, 2009 9:26 AM

    Hi,
    If thse to date fields are of same type u can directly compare like this.
    regards,
    Bharat.

  • How to list Sales Order with credit block

    Hi, Gurus,
    I really don't know how to list sales orders with credit block?
    Is there any way for end user to do it?
    If so, is it possible to list SO with credit block for certain period of time such as one month?
    Any help would be appreciated.

    HI
    Check T-Code VKM2 (Released documents)
    You need to check VKM1 (Blocked Documents)
    Sorry before i gave wrong information , myself i corrected VKM2 for released not for blocked list (Due to non Availability of SAP access )
    Regards,
    Prasanna
    Edited by: prasanna_sap on Feb 7, 2012 7:12 AM

  • Can anybody tell how to compare two documents with two pointers controlled with the same mouse

    can anybody tell how to compare two documents with two pointers controlled with the same mouse ??

    I saw what I need but in a game to find the differences between two photos (two screens, two pointers controlled by one mouse), and I need a program to make the same thing   (compare a chosen files)

  • How to compare current date with past date

    Sample code for comparing current date with past date
    i dont want to Calender.set method to compare it.
    How can i do it?

    PLEASE stay with ONE thread:
    http://forum.java.sun.com/thread.jspa?threadID=5143991&tstart=0

  • How to compare delivery date in schedule lines and PGI in outbound delivery

    Hi,
    I want to create a report to monitor and compare different dates in sales and delivery process.
    One of my key figure is the comparison between date confirmed to the customer, that I can find in the schedule line of the sales order, and the actual goods issue date from the outbound delivery.
    But I can't succeed in making the link between delivery and schedule lines, means between LIKP and VBEP.
    Would you have any idea?
    Thank you.

    It seems there's no exact (table) connection / link between delivery item and schedule line item.
    Those who were searching for this thing (link / connection between delivery item and schedule line) were recommended to use FM "RV_SCHEDULE_CHECK_DELIVERIES".
    This FM calculates the delivered quantity for each schedule line, so it makes link between the delivery item and schedule lines - however if you check the code it's quite sophisticated...
    (if you put a breakpoint in the FM and display a SO in VA03, you can check how the parameters have to be populated with data).
    Schedule Line and Delivery Link
    Edited by: Csaba Szommer on Aug 5, 2011 12:03 AM

  • How to compare 2 dates in a JPA QL query

    hello all,
    how can i compare 2 dates in JPA QL ,?
    my idea was to convert the dates to String, and i used 'to_char',
    but i think it doesn't work in JPA QL;
    this is my query(it works in oracle but not in java) :
    Query q=em.createQuery("select sum(o.montant) from Operation o join o.codTransac t join o.codCaisse c where (t.sens='D')and (to_char(c.dateCaisse,'MM/DD/YYYY')=to_char(o.dateOp,'MM/DD/YYYY'))");
    can some one help me?
    thanks

    I don´t know if it´s the same case, but I had a similar problem and I`m posting here the way I solved it (maybe it isn´t the best solution but worked to me).
    I have to compare a date come from a web form (format dd/mm/yyyy) with a Timestamp data from DB (dd/mm/yy hh24:mi:ss).
    Solution:
    //String dateTo from web form
    //Substring here were used to get only dd/mm/yy from DB and ignore the hours
    ql.append(" SELECT o FROM Table o WHERE SUBSTRING(o.dateTime,1,8) = :end ");
    q = getEntityManager().createQuery(ql.toString());
    q.setParameter("end",convertStringToDateSimple(dateTo));
    //function used to parse the String date and return in an appropriate format expected in the above query
    public static String convertStringToDateSimple (final String source)
         final SimpleDateFormat format = new SimpleDateFormat("dd/MM/yy");
              String parsed = null;
                   try
                        parsed = format.format(format.parse(source));
                   catch (ParseException e)
                        throw new RuntimeException(e);
              return parsed;
    Edited by: user8947239 on 31/10/2011 10:58

  • How to compare 2 dates, on date and on time

    Hi,
    Can anyone explain me how I can compare 2 dates!
    I can compare them by date, but not by time.
    For example:
    Date1 = '2003-07-25 16:50:15.0'
    Date2 = '2003-07-25 14:20:48.0'
    I want to get the dates that are bigger than the date '2003-07-25 15:30:57.0', but I don't get any result.
    Normally I must get Date1 as result.
    This is because only the date is compared, not the time.
    If I ask the dates bigger than '2003-07-24 14:35:31.0' I get Date1 and Date2 as result!
    I want all the data where the foto_crea_date is bigger than the given date.
    I do this in my where-clause as followed:
    TO_CHAR(FOTO_CREA_DATE,'yyyy-MM-dd hh:mm') > '2003-07-24 06:10:15.0'
    and it works just fine for the dates, not for the time
    I hope someone can help me!!

    Hi,
    I tried to use to_date instead of to_char but than I get the following error!
    Return Error Message: JBO-27122: SQL error during statement preparation.
    Statement: SELECT FotoMain.FOTO_ID, FotoMain.FOTO_CDCM, FotoMain.FOTO_CONF, FotoMain.FOTO_COMP, FotoMain.FOTO_CLIENT, FotoMain.FOTO_CLIENT_GROUP, FotoMain.FOTO_DESCRIPTION, FotoMain.FOTO_PUBL, FotoMain.FOTO_PUBL_SITE, FotoMain.FOTO_ECMA_ID, FotoMain.FOTO_CREA_DATE, FotoMain.FOTO_EXCL, FotoMain.FOTO_MRKT, FotoMain.FOTO_ID || ', ' || FotoMain.FOTO_DESCRIPTION AS VIEW_ATTR FROM FOTO_MAIN FotoMain WHERE (FOTO_CREA_DATE >= TO_DATE('2003-07-24 16:15','yyyy-MM-dd hh:mm')) ORDER BY FOTOMAIN.FOTO_ID
    Error Message: ORA-01810: format code appears twice
    If tried also something else and it works just fine for the dates but still not with the time.
    I tried it as followed:
    String last = "2003-07-24 16:15";
    String wherelastlogin="TO_CHAR(FOTO_CREA_DATE,'yyyy-MM-dd hh:mm') >= '" + last + "'";
    Can anyone help me because I need to compare also the time?!

  • How to compare 2 dates in SQL Server 2000 DB using Java?

    How do you compare 2 dates in SQL Server 2000 DB using Java?
    Let's say we have two fields: Date Reported and Target Finish Date.
    Date Reported is 09-10-2004 09:55:55: PM
    Target Finish Date is 09-12-2004 11:59:59: PM
    What i want to happen is i want to convert both dates to days and get the difference of the two.
    can SQL Server 2000 DB do this?

    it doesnt wrk.
    ok here's what i did:
    iv tested a simple code for this case.
    I created a table name tblDate which has 3 columns namely date_ID, date_From (datatype datetime), date_To (datatype datetime).
    I inserted 1 row: date_ID has the value 1, date_From has the value 10/22/2004, and date_To has the value 10/24/2004.
    i run the java code below:
    int days = 0;
              String query = "SELECT date_From, date_To cast(date_From-date_To AS int) AS Diff FROM tblZoo WHERE date_ID = '1'";
              try
                   DBConnect db = new DBConnect();
                   db.openCon();
                   ResultSet rs = db.execute(query);
                   while(rs.next())
                        days = rs.getInt("Diff");
                   db.closeCon();                         
              catch (Exception ex)
                   System.out.println("Error on Execution: " + ex);
              return days;___________
    an error occurred: Error on Execution: java.lang.nullpointerexception

  • How to create sales order with configuration?

    Hi, all!
    I'm trying to create sales order with multi-level BOM's explosion using BAPI_SALESORDER_CREATEFROMDAT2, but with no success.
    Scanning and following ton's of OSS notes and already posted answers in this forum regarding configuration in sales order doesn't lead to success to.
    So can anybody throw light on rules for populating data structures for items and items configuration in case of multi-level BOM's explosion in sales order? Providing working code snippet would be great.
    Regards,
    Maxim.

    Hi, all!
    Just want to properly close the thread and share experience gained.
    The main reason of error was in incorrect TABLES parameters populating for sales order items and their configuration.
    Not the secret that there is a lack of documentation for even BAPIs FM, especially for comprehensive things to do. And it seems that the right way to resolve proper structure of import/tables parameters for "creation/change" function modules is to call "corresponding read-FM" for object created on-line  and see how return parameters are populated.
    For example, for BAPI_SALESORDER_CREATEFROMDAT2 such corresponding FM is BAPISDORDER_GETDETAILEDLIST, which returns near the same structures.
    Actually in my case such algorithm was used in the first place. But BAPISDORDER_GETDETAILEDLIST returned wrong parameters as was discovered later This error was fixed by implementing OSS note 821191 and sales order was succesfully created.
    And I want to thank SAP Support experts in effective assistance. 10 points are yours!
    Regards,
    Maxim.

  • How to fill empty cells with previous non empty value?

    Hello 
    rows where cat=2 do not have price and i want to fill it with previous value wich cat=1 for every item
    Table named tb
    id        item_no     price         cat 
    1           I1             5           1
    3           I1                          2          the price must be 5   
    4           I1                          2          the price must be 5  too
    9           I1             2           1
    10         I2             10          1
    11         I2             5           1
    15         I2              10        1       
    28         I2                          2        the price must be 10  
    30         I2             2           1
    32         I2             10          1
    filled table must be like that:
    id        item_no     price       cat 
    1           I1             5           1
    3           I1            
    5           2          
    4           I1            
    5          2          
    9           I1             2          1
    10         I2             10        1
    11         I2             5          1
    15         I2             10        1       
    28         I2            
    10        2      
    30         I2             2          1
    32         I2             10         1
    How can i do that?

    Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions and formatting rules. You have no idea,
    do you? Temporal data should use ISO-8601 formats. Code should be in Standard SQL as much as possible and not local dialect. 
    This is minimal polite behavior on SQL forums. Why are you so rude to people? Now we have to guess a everything and try to fix your mess. 
    There is no generic “id” in RDBMS; it has to be an industry identifier or “<something in particular>_id”. I like the GTIN. Was that useless vague name supposed to be “<something>_cat” as a category scale? 
    CREATE TABLE Items
    (foo_seq INTEGER NOT NULL, 
     gtin CHAR(15) NOT NULL, 
     unit_price DECIMAL (12,2), 
     foobar_cat CHAR(1) NOT NULL
         CHECK (foobar_cat IN ('1', '2')), 
    CREATE PROCEDURE Add_New_Item
    INSERT INTO Items
    VALUES
    (1, 'I2', 5.00, 1), 
    (3, 'I1', NULL, 2), -- unit price must be 5.00
    (4, 'I1', NULL, 2), -- unit price must be 5.00
    (9, 'I1', 2.00, 1), 
    (10, 'I2', 10.00, 1), 
    (11, 'I2', 5.00, 1), 
    (15, 'I2', 10.00, 1), 
    (28, 'I2', NULL, 2), -- unit price must be 10
    (30, 'I2', 2.00, 1);
    >> rows where cat=2 do not have price and I want to fill it with previous value which cat=1 for every item <<
    Rows in a table are not ordered! There is no concept of “previous row” in RDBMS. This is fundamental. Are you using a sequence that you erroneously call “id”? 
    But that makes no sense! Look at (1, 'I2', 5.00, 1) and then (3, 'I1', NULL, 2). Why does item 'I2' have anything to do with the price of item 'I1'? 
    Can you explain? 
    Table named tb
    id   item_no   price   cat 
    1    'I1',  5    1
    3    'I1',  NULL   2  -- the price must be 5   
    4    'I1',  NULL   2  -- the price must be 5  too
    9    'I1',  2    1
    10   'I2',  10   1
    11   'I2',  5    1
    15   'I2',   10   1   
    28   'I2',  NULL   2   -- the price must be 10  
    30   'I2',  2    1
    32   'I2',  10   1
    filled table must be like that:
    id   item_no   price   cat 
    1    'I1',  5    1
    3    'I1',  5    2   
    4    'I1',  5   2   
    9    'I1',  2   1
    10   'I2',  10   1
    11   'I2',  5   1
    15   'I2',  10   1   
    28   'I2',  10   2   
    30   'I2',  2   1
    32   'I2',  10   1
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • How to compare current time with any particular time?

    Hi All,
    Problem:
    I have a form which accept data from user but i want that user can enter data only before 4 in the evening after that no data will be accepted and user get any message. Now the problem is I want to compare the current time with 4 o clock or 16:00:00 but i dont know how to check whether the current time is greater or lesser than 4. Till now my code are like this: if(tt.equals("16:00:00")){}else{}
    where tt is current time. but this is not the feasible solution for my second clause.
    Any kind of help will greatly appreciate.
    Thanks

    One more thing:
    I find timestamp class quite helpful in my case but i
    dont know how to implement the before() method
    of this class.
    Any idea.* You wouldn't implement before(). You'd just use it. It's already implemented for you.
    * before() doesn't just compare the hour of the day. It compare two date & time objects to see which one is greater--that is, it effectively looks at all the fields, not just HOUR.
    * You don't need Timestamp if you're not dealing with a database.

Maybe you are looking for

  • Cost estimate missing for a material in sales order

    Hi All Users have opened sales orders with materials which does not have a  valid costestimates. These missing cost estimate sales orders did not flow to COPA. Is there any report,  I can run to view all those sales orders which did not flow to COPA?

  • Signing a "Printed" PDF?

    My Purchase order generation program is hosted in FileMaker. From the FileMaker program I can "Print" PDF files. Is there anyway to digitally sign this PDF file with Acrobat Reader? I would prefer not to create a form, just place digital signatures o

  • How to get(copy) the contents i.e the cell of an excel sheet to other excel

    How to get(copy) the contents i.e the cells of an excel sheet to another excel sheet. I can read the contents i.e the text in the cells and able to display it in the Java console i want these contents to be copied to another excel sheet with the cell

  • How can I get back (Microsoft Office 2013), I recently deleted b/c Firefox questioned it?

    I managed to get back my Microsoft Office 2013 in this pc by activating required program. After a restart, I was prompted by Firefox screen to resume previous settings or continue with the new one. I accidentally checked the wrong box and got me back

  • Morningstar mobile app on Torch 9810

    After over a month of callikng Morningstar.com, they finally admit that they will NOT be attempting to fix their mobile app for the Torch 9810.  They claim it's an OS 7 problem with RIM. HELP!  I'm a stockbroker, and rely heavily on that mobile app t